diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2025-08-13 11:17:02 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2025-08-13 11:17:52 -0600 |
commit | e31a353f1e7c5fe24a6b9d881adabfeed99dc845 (patch) | |
tree | d47dcf942b2d51a548bf7b50ce6d6a7d1f4103ab /gcc/rust/rust-diagnostics.cc | |
parent | 11f7d5648c42cd2ef6f0841cde6292b94831e7b6 (diff) | |
download | gcc-e31a353f1e7c5fe24a6b9d881adabfeed99dc845.zip gcc-e31a353f1e7c5fe24a6b9d881adabfeed99dc845.tar.gz gcc-e31a353f1e7c5fe24a6b9d881adabfeed99dc845.tar.bz2 |
[RISC-V][PR target/121160] Avoid bogus force_reg call
When we canonicalize the comparison for a czero sequence we need to handle both
integer and fp comparisons. Furthermore, within the integer space we want to
make sure we promote any sub-word objects to a full word.
All that is working fine. After promotion we then force the value into a
register if it is not a register or constant already. The idea is not to have
to special case subregs in subsequent code. This works fine except when we're
presented with a floating point object that would be a subword. (subreg:SF
(reg:SI)) on rv64 for example.
So this tightens up that force_reg step. Bootstapped and regression tested on
riscv64-linux-gnu and tested on riscv32-elf and riscv64-elf.
Pushing to the trunk after pre-commit verifies no regressions.
Jeff
PR target/121160
gcc/
* config/riscv/riscv.cc (canonicalize_comparands); Tighten check for
forcing value into a GPR.
gcc/testsuite/
* gcc.target/riscv/pr121160.c: New test.
Diffstat (limited to 'gcc/rust/rust-diagnostics.cc')
0 files changed, 0 insertions, 0 deletions