]> git.ipfire.org Git - thirdparty/gcc.git/commit
RISC-V: Support cond vfsgnj.vv autovec patterns
authorLehua Ding <lehua.ding@rivai.ai>
Wed, 13 Sep 2023 09:34:43 +0000 (17:34 +0800)
committerLehua Ding <lehua.ding@rivai.ai>
Wed, 13 Sep 2023 09:56:01 +0000 (17:56 +0800)
commit6737a51728881790b54e490494b468267f04a608
tree3edb603c7b751af53ee80f1f02c3499198fb06bf
parent92ea12ea99fce546772a40b7bbc2ea850db9b1be
RISC-V: Support cond vfsgnj.vv autovec patterns

This patch add combine patterns to combine vfsgnj.vv + vcond_mask
to mask vfsgnj.vv. For vfsgnjx.vv, it can not be produced in midend
currently. We will send another patch to take this issue.

gcc/ChangeLog:

* config/riscv/autovec-opt.md (*copysign<mode>_neg): Move.
(*cond_copysign<mode>): New combine pattern.
* config/riscv/riscv-v.cc (needs_fp_rounding): Extend.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/autovec/cond/cond_copysign-run.c: New test.
* gcc.target/riscv/rvv/autovec/cond/cond_copysign-rv32gcv.c: New test.
* gcc.target/riscv/rvv/autovec/cond/cond_copysign-rv64gcv.c: New test.
* gcc.target/riscv/rvv/autovec/cond/cond_copysign-template.h: New test.
* gcc.target/riscv/rvv/autovec/cond/cond_copysign-zvfh-run.c: New test.
gcc/config/riscv/autovec-opt.md
gcc/config/riscv/riscv-v.cc
gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_copysign-run.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_copysign-rv32gcv.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_copysign-rv64gcv.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_copysign-template.h [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/autovec/cond/cond_copysign-zvfh-run.c [new file with mode: 0644]