]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/riscv/riscv-vsetvl.cc
RISC-V: Fix dead loop for user vsetvli intrinsic avl checking [PR109773]
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Tue, 9 May 2023 02:19:34 +0000 (10:19 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 10 May 2023 08:21:44 +0000 (16:21 +0800)
commit69f3914414a303f0e2c8246e08925f90c207846c
tree2c04d16b131663ca229f9f694fdb7b53b6b8f709
parent3ef0ebf901f6299e76237777e1b72b65c795fac0
RISC-V: Fix dead loop for user vsetvli intrinsic avl checking [PR109773]

This patch is fix dead loop in vsetvl intrinsic avl checking.

vsetvli->get_def () has vsetvli->get_def () has vsetvli.....
Then it will keep looping in the vsetvli avl checking which is a dead loop.

PR target/109773

gcc/ChangeLog:

* config/riscv/riscv-vsetvl.cc (avl_source_has_vsetvl_p): New function.
(source_equal_p): Fix dead loop in vsetvl avl checking.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/rvv/vsetvl/pr109773-1.c: New test.
* gcc.target/riscv/rvv/vsetvl/pr109773-2.c: New test.
gcc/config/riscv/riscv-vsetvl.cc
gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr109773-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/riscv/rvv/vsetvl/pr109773-2.c [new file with mode: 0644]