[Bug rtl-optimization/116096] [15 Regression] during RTL pass: cprop_hardreg ICE: in extract_insn, at recog.cc:2848 (unrecognizable insn ashift:TI?) with -O2 -flive-range-shrinkage -fno-peephole2 -mstackrealign
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 25 22:40:11 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116096
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2024-07-25
CC| |rsandifo at gcc dot gnu.org
Component|target |rtl-optimization
Target Milestone|--- |15.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is interesting.
After reload we have:
```
(insn 450 93 97 2 (set (reg:QI 2 cx [521])
(reg:QI 38 r10 [521])) "/app/example.cpp":11:13 91 {*movqi_internal}
(nil))
(insn 97 450 385 2 (parallel [
(set (reg:TI 4 si [orig:337 _32 ] [337])
(ashift:TI (const_int 1671291085 [0x639de0cd])
(reg:QI 2 cx [521])))
(clobber (reg:CC 17 flags))
]) "/app/example.cpp":11:13 953 {ashlti3_doubleword}
(expr_list:REG_EQUIV (mem:TI (plus:DI (reg/f:DI 19 frame)
(const_int -80 [0xffffffffffffffb0])) [2 S16 A128])
(expr_list:REG_EQUAL (ashift:TI (const_int 1671291085 [0x639de0cd])
(reg:QI 38 r10 [521]))
(nil))))
```
And then late_combine2 comes long and just updates the REG_EQUAL and tries to
re-recognize the pattern and it fails and we get:
```
(insn 450 93 97 2 (set (reg:QI 2 cx [521])
(reg:QI 4 si [535])) "/app/example.cpp":11:13 91 {*movqi_internal}
(nil))
(insn 97 450 385 2 (parallel [
(set (reg:TI 4 si [orig:337 _32 ] [337])
(ashift:TI (const_int 1671291085 [0x639de0cd])
(reg:QI 2 cx [521])))
(clobber (reg:CC 17 flags))
]) "/app/example.cpp":11:13 -1
(expr_list:REG_EQUIV (mem:TI (plus:DI (reg/f:DI 19 frame)
(const_int -80 [0xffffffffffffffb0])) [2 S16 A128])
(expr_list:REG_EQUAL (ashift:TI (const_int 1671291085 [0x639de0cd])
(reg:QI 4 si [535]))
(nil))))
```
Note the -1 there basically saying it was not recognized. There was no changes
to the instruction at all except updating the note:
updating notes in:
```
97: {si:TI=0x639de0cd<<cx:QI;clobber flags:CC;}
REG_EQUIV [frame:DI-0x50]
REG_EQUAL 0x639de0cd<<r10:QI
updating insn 97 in-place
rescanning insn with uid = 97.
rescanning insn with uid = 450.
verify found no changes in insn with uid = 97.
```
More information about the Gcc-bugs
mailing list