From: Richard Biener Date: Fri, 20 Sep 2019 11:14:34 +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=b049c26955642f80c1c3a84782d20c36b858d7d3;p=gcc.git re PR target/91814 (ICE in elimination_costs_in_insn, at reload1.c:3549 since r274926) 2019-09-20 Richard Biener Uros Bizjak PR target/91814 * config/i386/i386-features.c (gen_gpr_to_xmm_move_src): Revert previous change. (general_scalar_chain::convert_op): Force not suitable memory operands to a register. Co-Authored-By: Uros Bizjak From-SVN: r275998 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 756b4d47e12..76269e17eb0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2019-09-20 Richard Biener + Uros Bizjak + + PR target/91814 + * config/i386/i386-features.c (gen_gpr_to_xmm_move_src): Revert + previous change. + (general_scalar_chain::convert_op): Force not suitable memory + operands to a register. + 2019-09-20 Richard Biener PR tree-optimization/91821 diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index 546d78d99b5..9b297bac191 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -668,8 +668,6 @@ 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: @@ -835,6 +833,15 @@ general_scalar_chain::convert_op (rtx *op, rtx_insn *insn) { rtx tmp = gen_reg_rtx (GET_MODE (*op)); + /* Handle movabs. */ + if (!memory_operand (*op, GET_MODE (*op))) + { + rtx tmp2 = gen_reg_rtx (GET_MODE (*op)); + + emit_insn_before (gen_rtx_SET (tmp2, *op), insn); + *op = tmp2; + } + emit_insn_before (gen_rtx_SET (gen_rtx_SUBREG (vmode, tmp, 0), gen_gpr_to_xmm_move_src (vmode, *op)), insn);