https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116234
Bug ID: 116234
Summary: [15 Regression] '-fcompare-debug' failure w/
`-mcpu=phecda -O2 -funroll-all-loops`
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: compare-debug-failure, ra
Severity: normal
Priority: P3
Component: rtl-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
CC: asolokha at gmx dot com, marxin at gcc dot gnu.org,
unassigned at gcc dot gnu.org
Target Milestone: ---
Target: aarch64-linux-gnu
Created attachment 58837
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58837&action=edit
testcase
```
[apinski@xeond2 gcc]$ ./xgcc -B. -mcpu=phecda -O2 -fcompare-debug
-funroll-all-loops -c t.f -fno-rename-registers
xgcc: error: t.f: ‘-fcompare-debug’ failure (length)
```
Unlike PR 104753, this does not go away with `-fno-rename-registers`. The first
difference in the RTL dump is reload (LRA).
Looks like the late combine 1 exposes this issue. That is it goes away in
-fno-late-combine-instructions but what late combine 1 does seems reasonible
and there is no difference in the IR except for the addition of the debug insns
there.