https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122086
Bug ID: 122086
Summary: [16 regression] gcc.target/riscv/cmo-zicboz-zic64-1.c
fails after r16-4081
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: missed-optimization, testsuite-fail
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Target: riscv
As mentioned in
https://gcc.gnu.org/pipermail/gcc-patches/2025-September/696269.html,
gcc.target/riscv/cmo-zicboz-zic64-1.c started to fail since
r16-4081-g966cdec2b23b8049c263e.
Ok, I see the issue.
We now lose __builtin_assume_aligned for expand in some cases.
There are two/three ways of fixing this. One is lowering memset and the
aligning the access type to the new alignment.
The second way is to prevent forwprop for proping the ssa names from a
lower alignment and replacing the higher one.
That would fix -Og once I finish with set of patches.
The 3rd way, when removing __builtin_assume_aligned also mark the original
ssa name with the same alignment info if it is only used from the baa.
That means moving this to forwprop only.
Let me think which is the best