From: Richard Biener Date: Thu, 19 Sep 2019 17:05:51 +0000 (+0000) Subject: re PR target/91814 (ICE in elimination_costs_in_insn, at reload1.c:3549 since r274926) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=54dc857754b64ae1e56191d983ae2c4434d96fb2;p=gcc.git re PR target/91814 (ICE in elimination_costs_in_insn, at reload1.c:3549 since r274926) 2019-09-19 Richard Biener PR target/91814 * config/i386/i386-features.c (gen_gpr_to_xmm_move_src): Force operand to a register if it isn't nonimmediate_operand. From-SVN: r275971 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3be2b55523b..9010eaed92f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-09-19 Richard Biener + + PR target/91814 + * config/i386/i386-features.c (gen_gpr_to_xmm_move_src): + Force operand to a register if it isn't nonimmediate_operand. + 2019-09-19 Wilco Dijkstra * config/arm/arm.md (di3): Use and . diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index 454eeaebef9..f57a5555f8f 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -668,10 +668,13 @@ scalar_chain::emit_conversion_insns (rtx insns, rtx_insn *after) static rtx gen_gpr_to_xmm_move_src (enum machine_mode vmode, rtx gpr) { + if (!nonimmediate_operand (gpr, GET_MODE_INNER (vmode))) + gpr = force_reg (GET_MODE_INNER (vmode), gpr); switch (GET_MODE_NUNITS (vmode)) { case 1: - return gen_rtx_SUBREG (vmode, gpr, 0); + /* We are not using this case currently. */ + gcc_unreachable (); case 2: return gen_rtx_VEC_CONCAT (vmode, gpr, CONST0_RTX (GET_MODE_INNER (vmode)));