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

            Bug ID: 96446
           Summary: ICE when spilling an MMA accumulator
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bergner at gcc dot gnu.org
  Target Milestone: ---

We get an ICE when we are forced to spill an MMA accumulator that has a zero
value.  We seem to be missing a alternative that accepts the value zero in the
move pattern.  This is broken on trunk and the GCC 10 branch.

bergner@pike:~/gcc/BUGS$ cat quad-ice.c 
extern void bar (void);
void
foo (__vector_quad *dst)
{
  __vector_quad acc;
  __builtin_mma_xxsetaccz (&acc);
  bar ();
  *dst = acc;
}

bergner@pike:~/gcc/BUGS$
/home/bergner/gcc/build/gcc-fsf-mainline-base-debug/gcc/xgcc
-B/home/bergner/gcc/build/gcc-fsf-mainline-base-debug/gcc -S -O2 -mcpu=power10
quad-ice.c 
quad-ice.c: In function ‘foo’:
quad-ice.c:9:1: error: could not split insn
    9 | }
      | ^
(insn 15 41 16 (set (reg:PXI 32 0 [orig:117 _1 ] [117])
        (const_int 0 [0])) "quad-ice.c":8:8 2001 {*movpxi}
     (nil))
during RTL pass: final
quad-ice.c:9:1: internal compiler error: in final_scan_insn_1, at final.c:3073
0x11109e6b _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/rtl-error.c:108
0x10a741bf final_scan_insn_1
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/final.c:3073
0x10a74a4b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/final.c:3152
0x10a6f807 final_1
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/final.c:2020
0x10a7b6f7 rest_of_handle_final
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/final.c:4658
0x10a7be3f execute
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/final.c:4736
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to