diff options
author | Ju-Zhe Zhong <juzhe.zhong@rivai.ai> | 2023-03-13 15:52:01 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2023-03-17 17:49:05 +0800 |
commit | c413abed869e7e34a86855a015413418f3c6b595 (patch) | |
tree | 6c044aa31e11c3c95ddcccf5f1c59b1615a56c84 /gcc/function.cc | |
parent | 02880e7803b19c357718abd2f0d567b4a761f318 (diff) | |
download | gcc-c413abed869e7e34a86855a015413418f3c6b595.zip gcc-c413abed869e7e34a86855a015413418f3c6b595.tar.gz gcc-c413abed869e7e34a86855a015413418f3c6b595.tar.bz2 |
RISC-V: Handle undef for vector mask patterns
Add new instruction pattern for setting vector mask to undefine value,
also merge undef and non-undef ternary operation pattern like MAC operations to
single pattern.
gcc/ChangeLog:
* config/riscv/riscv-v.cc (legitimize_move): Allow undef value
as legitimate value.
* config/riscv/riscv-vector-builtins.cc
(function_expander::use_ternop_insn): Fix bugs of ternary intrinsic.
(function_expander::use_widen_ternop_insn): Ditto.
* config/riscv/vector.md (@vundefined<mode>): New pattern.
(pred_mul_<optab><mode>_undef_merge): Remove.
(*pred_mul_<optab><mode>_undef_merge_scalar): Ditto.
(*pred_mul_<optab><mode>_undef_merge_extended_scalar): Ditto.
(pred_neg_mul_<optab><mode>_undef_merge): Ditto.
(*pred_neg_mul_<optab><mode>_undef_merge_scalar): Ditto.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/binop_vv_constraint-4.c: Adapt the test.
* gcc.target/riscv/rvv/base/binop_vv_constraint-6.c: Ditto.
* gcc.target/riscv/rvv/base/binop_vx_constraint-127.c: Ditto.
* g++.target/riscv/rvv/base/bug-1.C: New test.
* gcc.target/riscv/rvv/base/bug-2.c: New test.
Signed-off-by: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Co-authored-by: kito-cheng <kito.cheng@sifive.com>
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions