]> git.ipfire.org Git - people/ms/gcc.git/commit
RISC-V: Fix ICE of RVV compare intrinsic
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Fri, 10 Mar 2023 08:08:57 +0000 (16:08 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Mon, 13 Mar 2023 16:25:14 +0000 (00:25 +0800)
commit6f6eba35b9f06d35ff7bea81969fe905a5584bdc
tree4f75ebef82f3fa723f67270f853744ba06a9cd9f
parent7ff57009bcc728044ba2de339ecd16721d48aba3
RISC-V: Fix ICE of RVV compare intrinsic

vfrsub_vf_m.cpp: In function 'int main()':
vfrsub_vf_m.cpp:5:43: error: invalid argument to built-in function
   5 |   vbool32_t d = __riscv_vmflt_vf_f32m1_b32(c, b, 8);
     |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
during RTL pass: expand
vfrsub_vf_m.cpp:5:43: internal compiler error: Segmentation fault
0x19f1b89 crash_signal
       ../../../../riscv-gnu-toolchain-trunk/riscv-gcc/gcc/toplev.cc:314
0x1472e2f store_expr(tree_node*, rtx_def*, int, bool, bool)
       ../../../../riscv-gnu-toolchain-trunk/riscv-gcc/gcc/expr.cc:6348

gcc/ChangeLog:

* config/riscv/riscv-vector-builtins.cc
(function_expander::use_compare_insn): Add operand predicate check.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/base/bug-1.c: New test.
gcc/config/riscv/riscv-vector-builtins.cc
gcc/testsuite/gcc.target/riscv/rvv/base/bug-1.c [new file with mode: 0644]