From 54dc857754b64ae1e56191d983ae2c4434d96fb2 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 19 Sep 2019 17:05:51 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/config/i386/i386-features.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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))); -- 2.30.2