aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2024-05-06 12:33:32 +0200
committerChristoph Müllner <christoph.muellner@vrull.eu>2024-05-08 16:09:27 +0200
commit3b9c760072c7792cbae6f38894756d2b96c2fd8c (patch)
tree72ec3e5cec17d52531c27540e313088280e3dfef /gcc/cp/parser.cc
parent4e46a3537ff57938a0d98fa524ac2fff8b08ae6d (diff)
downloadgcc-3b9c760072c7792cbae6f38894756d2b96c2fd8c.zip
gcc-3b9c760072c7792cbae6f38894756d2b96c2fd8c.tar.gz
gcc-3b9c760072c7792cbae6f38894756d2b96c2fd8c.tar.bz2
RISC-V: Add zero_extract support for rv64gc
The combiner attempts to optimize a zero-extension of a logical right shift using zero_extract. We already utilize this optimization for those cases that result in a single instructions. Let's add a insn_and_split pattern that also matches the generic case, where we can emit an optimized sequence of a slli/srli. Tested with SPEC CPU 2017 (rv64gc). PR target/111501 gcc/ChangeLog: * config/riscv/riscv.md (*lshr<GPR:mode>3_zero_extend_4): New pattern for zero-extraction. gcc/testsuite/ChangeLog: * gcc.target/riscv/extend-shift-helpers.h: New test. * gcc.target/riscv/pr111501.c: New test. * gcc.target/riscv/zero-extend-rshift-32.c: New test. * gcc.target/riscv/zero-extend-rshift-64.c: New test. * gcc.target/riscv/zero-extend-rshift.c: New test. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions