[Bug target/91814] [10 Regression] ICE in elimination_costs_in_insn, at reload1.c:3549 since r274926

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Sep 19 11:53:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91814

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Richard Biener from comment #2)
> ISTR discussing this but holding back a fix at the time we weren't sure if
> we'd preserve the non-subreg sets.  So sth like 
> 
> Index: gcc/config/i386/i386-features.c
> ===================================================================
> --- gcc/config/i386/i386-features.c     (revision 275698)
> +++ gcc/config/i386/i386-features.c     (working copy)
> @@ -668,6 +668,8 @@ scalar_chain::emit_conversion_insns (rtx
>  static rtx
>  gen_gpr_to_xmm_move_src (enum machine_mode vmode, rtx gpr)
>  {
> +  if (!x86_64_general_operand (gpr, GET_MODE_INNER (vmode)))
> +    gpr = force_reg (GET_MODE_INNER (vmode), gpr);
>    switch (GET_MODE_NUNITS (vmode))
>      {
>      case 1:
> 
> fixes it with the question whether the use of x86_64_general_operand
> is correct and whether it's necessary for the NUNITS == 1 case
> (which IIRC isn't exercised anyway).

We should use nonimmediate_operand for NUNITS != 1. Perhaps also add
gcc_unreachable () for NUNITS == 1 case.


More information about the Gcc-bugs mailing list