]> git.ipfire.org Git - thirdparty/gcc.git/commit
[RISC-V][PR target/119830] Fix RISC-V codegen on 32bit hosts
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 22 Jun 2025 18:35:19 +0000 (12:35 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Sun, 22 Jun 2025 18:35:19 +0000 (12:35 -0600)
commit07c02ff39e121a496c46d3a997a25e2f46ce227e
tree08383999ddc12a58d2c98d7c25d477c84380de3a
parent34e1e5e33ec3eb475c0c8278800b6fc246a86763
[RISC-V][PR target/119830] Fix RISC-V codegen on 32bit hosts

So this is Andrew's patch from the PR.  We weren't clean for a 32bit host in
some of the arithmetic for constant synthesis.

I confirmed the bug on a 32bit linux host, then confirmed that Andrew's patch
from the PR fixes the problem, then ran Andrew's patch through my tester
successfully.

Naturally I'll wait for pre-commit testing, but I'm not expecting problems.

PR target/119830
gcc/
* config/riscv/riscv.cc (riscv_build_integer_1): Make arithmetic in bclr case
clean for 32 bit hosts.

gcc/testsuite/
* gcc.target/riscv/pr119830.c: New test.
gcc/config/riscv/riscv.cc
gcc/testsuite/gcc.target/riscv/pr119830.c [new file with mode: 0644]