aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.cc
diff options
context:
space:
mode:
authorChristoph Müllner <christoph.muellner@vrull.eu>2024-05-07 23:26:02 +0200
committerChristoph Müllner <christoph.muellner@vrull.eu>2024-05-08 16:00:51 +0200
commit4e46a3537ff57938a0d98fa524ac2fff8b08ae6d (patch)
tree4e0ddb6e303ded0c60a076dfa93a185b186c09cb /gcc/cp/parser.cc
parentdd388198b8be52ab378c935fc517a269e0ba741c (diff)
downloadgcc-4e46a3537ff57938a0d98fa524ac2fff8b08ae6d.zip
gcc-4e46a3537ff57938a0d98fa524ac2fff8b08ae6d.tar.gz
gcc-4e46a3537ff57938a0d98fa524ac2fff8b08ae6d.tar.bz2
RISC-V: Cover sign-extensions in lshrsi3_zero_extend_2
The pattern lshrsi3_zero_extend_2 extracts the MSB bits of the lower 32-bit word and zero-extends it back to DImode. This is realized using srliw, which operates on 32-bit registers. The same optimziation can be applied to sign-extensions when emitting a sraiw instead of the srliw. Given these two optimizations are so similar, this patch simply converts the existing one to also cover the sign-extension case as well. gcc/ChangeLog: * config/riscv/iterators.md (sraiw): New code iterator 'any_extract'. New code attribute 'extract_sidi_shift'. * config/riscv/riscv.md (*lshrsi3_zero_extend_2): Rename to... (*lshrsi3_extend_2):...this and add support for sign-extensions. gcc/testsuite/ChangeLog: * gcc.target/riscv/sign-extend-1.c: Test sraiw 24 and sraiw 16. Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'gcc/cp/parser.cc')
0 files changed, 0 insertions, 0 deletions