https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120182
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |needs-bisection
Known to fail| |13.3.0, 15.0, 7.5.0
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
it's RTL DSE, -fno-dse fixes it.
> diff -u a-t.c.299r.cse2 a-t.c.300r.dse1
...
@@ -565,13 +176,6 @@
REG_BR_PROB 429500
15: NOTE_INSN_BASIC_BLOCK 3
17: [0x288000]=0
- 19: [0x288001]=0
- 21: [0x288002]=0
- 23: [0x288003]=0
- 25: [0x288004]=0
- 27: [0x288005]=0
- 29: [0x288006]=0
- 31: [0x288007]=0
33: r99:DI=[0x288000]
34: flags:CCZ=cmp(r99:DI,0)
35: pc={(flags:CCZ==0)?L38:pc}
@@ -584,13 +188,6 @@
39: NOTE_INSN_BASIC_BLOCK 6
41: [0x288000]=0x100
43: [0x288000]=0
- 45: [0x288001]=0
- 47: [0x288002]=0
- 49: [0x288003]=0
- 51: [0x288004]=0
- 53: [0x288005]=0
- 55: [0x288006]=0
- 57: [0x288007]=0
59: r101:DI=[0x288000]
60: flags:CCZ=cmp(r101:DI,0)
61: pc={(flags:CCZ==0)?L64:pc}
DSE fails to realize that insn 33 loads from insn 19. This is
(insn 17 15 19 3 (set (mem:QI (const_int 2654208 [0x288000]) [0 MEM[(char
*)2654208B]+0 S1 A128])
(const_int 0 [0])) "t.c":37:19 98 {*movqi_internal}
(nil))
(insn 19 17 21 3 (set (mem:QI (const_int 2654209 [0x288001]) [0 MEM[(char
*)2654209B]+0 S1 A8])
(const_int 0 [0])) "t.c":37:19 98 {*movqi_internal}
(nil))
...
(insn 33 31 34 3 (set (reg/f:DI 99 [ _14 ])
(mem/f:DI (const_int 2654208 [0x288000]) [1 MEM[(struct S
*)2654208B].next+0 S8 A128])) "t.c":39:14 95 {*movdi_internal}
(nil))
it's likely that somehow the constant addresses confuse it. Seems to be
a long-standing issue.