diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2024-11-21 16:21:07 -0700 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-11-21 16:21:07 -0700 |
commit | 9b7917b34fa54d5b4ff0094ef4d949c6ac50f02e (patch) | |
tree | 28a757ea0b8ca7eb4a392e8805ec5d6df894a4e8 /gcc/gcc-urlifier.cc | |
parent | ffeee625c53d882171af436222a7b18ed9ed89e1 (diff) | |
download | gcc-9b7917b34fa54d5b4ff0094ef4d949c6ac50f02e.zip gcc-9b7917b34fa54d5b4ff0094ef4d949c6ac50f02e.tar.gz gcc-9b7917b34fa54d5b4ff0094ef4d949c6ac50f02e.tar.bz2 |
[RISC-V][PR target/117690] Add missing shift in constant synthesis
As hinted out in the BZ, we were missing a left shift in the constant synthesis
in the case where the upper 32 bits can be synthesized using a shNadd of the
low 32 bits.
This adjusts the synthesis to add the missing left shift and adjusts the cost
to account for the additional instruction.
Regression tested on riscv64-elf in my tester. Waiting for the pre-commit
tester before moving forward.
PR target/117690
gcc/
* config/riscv/riscv.cc (riscv_build_integer): Add missing left
shift when using shNadd to derive upper 32 bits from lower 32 bits.
gcc/testsuite
* gcc.target/riscv/pr117690.c: New test.
* gcc.target/riscv/synthesis-13.c: Adjust expected output.
Diffstat (limited to 'gcc/gcc-urlifier.cc')
0 files changed, 0 insertions, 0 deletions