aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-patterns.cc
diff options
context:
space:
mode:
authorRaphael Moreira Zinsly <rzinsly@ventanamicro.com>2024-09-04 17:21:24 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-09-04 17:21:24 -0600
commitcbea72b265e4c9d1a595bd3ecd11b325021925d0 (patch)
tree95fbbc06c55296715ac38294251939c4d14aafae /gcc/tree-vect-patterns.cc
parent5326306e7d9d36eccc2c2f02e1357818625f057b (diff)
downloadgcc-cbea72b265e4c9d1a595bd3ecd11b325021925d0.zip
gcc-cbea72b265e4c9d1a595bd3ecd11b325021925d0.tar.gz
gcc-cbea72b265e4c9d1a595bd3ecd11b325021925d0.tar.bz2
[PATCH 1/3] RISC-V: Improve codegen for negative repeating large constants
Improve handling of constants where its upper and lower 32-bit halves are the same and have negative values. e.g. for: unsigned long f (void) { return 0xf0f0f0f0f0f0f0f0UL; } Without the patch: li a0,-252645376 addi a0,a0,240 li a5,-252645376 addi a5,a5,241 slli a5,a5,32 add a0,a5,a0 With the patch: li a5,252645376 addi a5,a5,-241 slli a0,a5,32 add a0,a0,a5 xori a0,a0,-1 gcc/ChangeLog: * config/riscv/riscv.cc (riscv_split_integer_cost): Adjust the cost of negative repeating constants. (riscv_split_integer): Handle negative repeating constants. gcc/testsuite/ChangeLog: * gcc.target/riscv/synthesis-11.c: New test.
Diffstat (limited to 'gcc/tree-vect-patterns.cc')
0 files changed, 0 insertions, 0 deletions