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

            Bug ID: 91408
           Summary: [10 Regression] ICE in extract_insn, at recog.c:2310
                    since r273981
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: uros at gcc dot gnu.org
  Target Milestone: ---

Starting from the revision, I see ICE for:

$ cat ice.i
long long a;
unsigned char b;
short *c;
int d;
void fn1(long long *p1) {
  unsigned char *e = (char *)p1;
  int f, g;
  d = 0;
  for (; d < 8; d++) {
    f = b - e[d];
    if (f < 0)
      f = -f;
    g += f;
  }
  c[0] = g;
}
void fn2() { fn1(&a); }

$ gcc -O2 -ftree-loop-vectorize -O2 -fno-tree-forwprop ice.i -c
ice.i: In function ‘fn2’:
ice.i:17:1: error: unrecognizable insn:
   17 | void fn2() { fn1(&a); }
      | ^~~~
(insn 13 12 14 2 (set (reg:V1DI 99)
        (unspec:V1DI [
                (reg:V8QI 93)
                (mem/c:V8QI (reg/f:DI 97) [0 MEM <vector(8) unsigned char>
[(unsigned char *)&a]+0 S8 A64])
            ] UNSPEC_PSADBW)) -1
     (nil))
during RTL pass: vregs
ice.i:17:1: internal compiler error: in extract_insn, at recog.c:2310
0x6a4bb7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
        /home/marxin/Programming/gcc/gcc/rtl-error.c:108
0x6a4bd3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
        /home/marxin/Programming/gcc/gcc/rtl-error.c:116
0x6a2d47 extract_insn(rtx_insn*)
        /home/marxin/Programming/gcc/gcc/recog.c:2310
0xab4f63 instantiate_virtual_regs_in_insn
        /home/marxin/Programming/gcc/gcc/function.c:1606
0xab4f63 instantiate_virtual_regs
        /home/marxin/Programming/gcc/gcc/function.c:1976
0xab4f63 execute
        /home/marxin/Programming/gcc/gcc/function.c:2025
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