aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/rotate-6a.c
diff options
context:
space:
mode:
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>2023-12-07 20:08:02 +0800
committerLehua Ding <lehua.ding@rivai.ai>2023-12-07 20:21:10 +0800
commitabded9bf3e1ebc1789d47ac2c445f5b613981a0e (patch)
treed423712b4abdd32a484c0ffaee37536d768e7787 /gcc/testsuite/c-c++-common/rotate-6a.c
parent570d74119d2daaa9ea909b6326a3756f548097d0 (diff)
downloadgcc-abded9bf3e1ebc1789d47ac2c445f5b613981a0e.zip
gcc-abded9bf3e1ebc1789d47ac2c445f5b613981a0e.tar.gz
gcc-abded9bf3e1ebc1789d47ac2c445f5b613981a0e.tar.bz2
RISC-V: Fix AVL propagation ICE for vleff/vlsegff
This patch fixes 400 ICEs in full coverage testing: internal compiler error: in validate_change_or_fail, at config/riscv/riscv-v.cc:4597 The root cause is each operand is used in vleff/vlsegff twice: (define_insn "@pred_fault_load<mode>" [(set (match_operand:V 0 "register_operand" "=vd, vd, vr, vr") (if_then_else:V (unspec:<VM> [(match_operand:<VM> 1 "vector_mask_operand" " vm, vm, Wc1, Wc1") (match_operand 4 "vector_length_operand" " rK, rK, rK, rK") (match_operand 5 "const_int_operand" " i, i, i, i") (match_operand 6 "const_int_operand" " i, i, i, i") (match_operand 7 "const_int_operand" " i, i, i, i") (reg:SI VL_REGNUM) (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) (unspec:V [(match_operand:V 3 "memory_operand" " m, m, m, m")] UNSPEC_VLEFF) (match_operand:V 2 "vector_merge_operand" " vu, 0, vu, 0"))) (set (reg:SI VL_REGNUM) (unspec:SI [(if_then_else:V (unspec:<VM> [(match_dup 1) (match_dup 4) (match_dup 5) (match_dup 6) (match_dup 7) (reg:SI VL_REGNUM) (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) (unspec:V [(match_dup 3)] UNSPEC_VLEFF) (match_dup 2))] UNSPEC_MODIFY_VL))] Then later instruction change in AVL propagation change ICE: validate_change_or_fail (rinsn, recog_data.operand_loc[index], get_avl_type_rtx (avl_type::NONVLMAX), false); which is the operand change according to location. Such operand change in 2 locations instead of 1. So regenerate pattern for such instructions AVL propagation to fix the ICEs. gcc/ChangeLog: * config/riscv/riscv-avlprop.cc (simplify_replace_avl): New function. (simplify_replace_vlmax_avl): Fix bug. * config/riscv/t-riscv: Add a new include file. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/avl_prop-2.c: New test.
Diffstat (limited to 'gcc/testsuite/c-c++-common/rotate-6a.c')
0 files changed, 0 insertions, 0 deletions