https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120688
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |15.2
Summary|[16 Regression] RISC-V: |[15/16 Regression]
|Miscompile at -O3 since |Miscompile at -O3 since
|r15-579-ga9251ab3c91 |r15-579-ga9251ab3c91
CC| |pinskia at gcc dot gnu.org,
| |rguenth at gcc dot gnu.org
Last reconfirmed| |2025-06-19
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The testcase relies on &cj != &ci, with -fstack-reuse=none it passes. Without
the loop we have sunk _10 = ad.0_9 != &ci beyond the EOS clobber. And RTL
expansion then has two non-conflicting lifetimes. Borderly wrong-code only
(nobody cares in practice).
ad ={v} &cj;
ad.0_9 ={v} ad;
ci ={v} {CLOBBER(eos)};
cj ={v} {CLOBBER(eos)};
ag.1_1 = ag;
if (ag.1_1 != 0)
goto <bb 4>; [11.00%]
else
goto <bb 3>; [89.00%]
;; succ: 3
;; 4
;; basic block 3, loop depth 1
;; pred: 2
;; 3
goto <bb 3>; [100.00%]
;; succ: 3
;; basic block 4, loop depth 0
;; pred: 2
_10 = ad.0_9 != &ci;
p.3_2 = (unsigned char) _10;
...