Bug 96273 - ice in extract_insn, at recog.c:2294, unrecognizable insn:
Summary: ice in extract_insn, at recog.c:2294, unrecognizable insn:
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2020-07-21 20:34 UTC by David Binderman
Modified: 2020-07-22 06:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
gzipped C++ source code (134.44 KB, application/gzip)
2020-07-21 20:34 UTC, David Binderman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2020-07-21 20:34:07 UTC
Created attachment 48911 [details]
gzipped C++ source code

The attached C++ code does this with today's gcc trunk:

splat.cpp:1637:1: error: unrecognizable insn:
(insn 1137 1136 1138 163 (set (mem/v:BLK (scratch:DI) [0  A8])
        (unspec:BLK [
                (mem/v:BLK (scratch:DI) [0  A8])
            ] UNSPEC_MFENCE)) -1
     (nil))
during RTL pass: vregs
splat.cpp:1637:1: internal compiler error: in extract_insn, at recog.c:2294
0xef8b46 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
	../../trunk.git/gcc/rtl-error.c:108
0xef8b6b _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
	../../trunk.git/gcc/rtl-error.c:116
0xebf423 extract_insn(rtx_insn*)
	../../trunk.git/gcc/recog.c:2294

Flags -O3 -march=native required. native is Piledriver. I'll
have a go at reducing the code.

This code used to work at date 20200719, so someone has broken
something in the last day or two.
Comment 1 David Binderman 2020-07-21 21:08:40 UTC
Reduced C++ code:

int b, c, e;
int d[1];
void f() {
  int a;
  for (;;) {
    c = 0;
    for (; c <= 1000; b += 10, c++) {
      a = 0;
      for (; a < 10; a++)
        if (b)
          e += d[b] = e;
    }
  }
}
Comment 2 Hongtao.liu 2020-07-22 06:50:50 UTC
Caused by patch in PR95750?
Comment 3 Uroš Bizjak 2020-07-22 06:52:14 UTC
Already fixed.