[Bug target/123285] [14 Regression] [Trunk] AArch64: Miscompile at -O3 due to early_ra misses clobber of inline-asm
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 00:14:30 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123285
--- Comment #19 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Andrew Pinski
<pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:4585ccdfab5d7546f648abd151d34b25c6a25495
commit r14-12428-g4585ccdfab5d7546f648abd151d34b25c6a25495
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Tue Jan 27 12:19:13 2026 -0800
aarch64: early-ra: Fix handling of multi-register allocation with clobbers
[PR123285]
So the problem here is while forming chains, we don't process hard register
conflicts (and ABI based ones) for allocnos which are already part of a
chain.
This means sometimes we allocate a register to a color which might be
clobbered
over is live range.
Processing clobbers for all allocnos don't work while forming a chain does
not work as the chain's front allocnos' candidates does not get updated.
So we need to the processing of clobbers (and ABI clobbers) before starting
to form the chains.
Changes since v1:
* v2: remove accidental hack which was there just for testing.
* v3: Move the copying of the shared part to new earlier loop too.
Fix small white space issue.
Bootstrappd and tested on aarch64-linux-gnu.
PR target/123285
gcc/ChangeLog:
* config/aarch64/aarch64-early-ra.cc (early_ra::form_chains):
Process clobbers
and ABI clobbers before starting to form the chain.
gcc/testsuite/ChangeLog:
* gcc.target/aarch64/pr123285-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list