From bb48c402f4ca67c9e5d0ed1104700c50058d6fb8 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Tue, 19 Mar 2019 17:10:59 +0100 Subject: [PATCH] re PR target/89378 ([MIPS] FAIL: gcc.dg/vect/pr88598-3.c -mmsa (internal compiler error)) PR target/89378 * config/mips/mips.c (mips_expand_vec_cond_expr): Use gen_lowpart instead of gen_rtx_SUBREG. * config/mips/mips-msa.md (vec_extract): Likewise. From-SVN: r269801 --- gcc/ChangeLog | 7 +++++++ gcc/config/mips/mips-msa.md | 4 ++-- gcc/config/mips/mips.c | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 94d1e4e950e..f2ce11d4d5f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-03-19 Jakub Jelinek + + PR target/89378 + * config/mips/mips.c (mips_expand_vec_cond_expr): Use gen_lowpart + instead of gen_rtx_SUBREG. + * config/mips/mips-msa.md (vec_extract): Likewise. + 2019-03-19 Richard Biener PR debug/88389 diff --git a/gcc/config/mips/mips-msa.md b/gcc/config/mips/mips-msa.md index 9777590c3b9..929646d3b71 100644 --- a/gcc/config/mips/mips-msa.md +++ b/gcc/config/mips/mips-msa.md @@ -346,12 +346,12 @@ operands[2] accordingly. */ rtx wd = gen_reg_rtx (V16QImode); rtx ws = gen_reg_rtx (V16QImode); - emit_move_insn (ws, gen_rtx_SUBREG (V16QImode, operands[1], 0)); + emit_move_insn (ws, gen_lowpart (V16QImode, operands[1])); rtx n = GEN_INT (val * GET_MODE_SIZE (mode)); gcc_assert (INTVAL (n) < GET_MODE_NUNITS (V16QImode)); emit_insn (gen_msa_sldi_b (wd, ws, ws, n)); temp = gen_reg_rtx (mode); - emit_move_insn (temp, gen_rtx_SUBREG (mode, wd, 0)); + emit_move_insn (temp, gen_lowpart (mode, wd)); } emit_insn (gen_msa_vec_extract_ (operands[0], temp)); DONE; diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 4b42077a336..48f324410b9 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -22265,7 +22265,7 @@ mips_expand_vec_cond_expr (machine_mode mode, machine_mode vimode, if (mode != vimode) { xop1 = gen_reg_rtx (vimode); - emit_move_insn (xop1, gen_rtx_SUBREG (vimode, operands[1], 0)); + emit_move_insn (xop1, gen_lowpart (vimode, operands[1])); } emit_move_insn (src1, xop1); } @@ -22282,7 +22282,7 @@ mips_expand_vec_cond_expr (machine_mode mode, machine_mode vimode, if (mode != vimode) { xop2 = gen_reg_rtx (vimode); - emit_move_insn (xop2, gen_rtx_SUBREG (vimode, operands[2], 0)); + emit_move_insn (xop2, gen_lowpart (vimode, operands[2])); } emit_move_insn (src2, xop2); } -- 2.30.2