aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.cc
diff options
context:
space:
mode:
authorVineet Gupta <vineetg@rivosinc.com>2023-08-07 13:45:29 -0700
committerVineet Gupta <vineetg@rivosinc.com>2023-08-25 12:20:18 -0700
commitb41d7eb0e14785ff0ad6e6922cbd4c880e680bf9 (patch)
treec051cbe9583c301683b7f9f05c0af9c5384b18a3 /gcc/tree-inline.cc
parentd9a0d692ffc6951c5670f54c3f4f17ec64a58600 (diff)
downloadgcc-b41d7eb0e14785ff0ad6e6922cbd4c880e680bf9.zip
gcc-b41d7eb0e14785ff0ad6e6922cbd4c880e680bf9.tar.gz
gcc-b41d7eb0e14785ff0ad6e6922cbd4c880e680bf9.tar.bz2
RISC-V: Enable Hoist to GCSE simple constants
Hoist want_to_gcse_p () calls rtx_cost () to compute max distance for hoist candidates. For a simple const (say 6 which needs seperate insn "LI 6") backend currently returns 0, causing Hoist to bail and elide GCSE. Note that constants requiring more than 1 insns to setup were working fine since riscv_rtx_costs () was returning non-zero (although that itself might need refining: see bugzilla 111139). To keep testsuite parity, some V tests need updating which started failing in the new costing regime. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_rtx_costs): Adjust const_int cost. Add some comments about different constants handling. gcc/testsuite/ChangeLog: * gcc.target/riscv/gcse-const.c: New Test * gcc.target/riscv/rvv/vsetvl/vlmax_conflict-7.c: Remove test for Jump. * gcc.target/riscv/rvv/vsetvl/vlmax_conflict-8.c: Ditto. Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
Diffstat (limited to 'gcc/tree-inline.cc')
0 files changed, 0 insertions, 0 deletions