aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorgarthlei <garthlei@linux.alibaba.com>2024-09-11 17:09:37 +0800
committerPan Li <pan2.li@intel.com>2024-09-12 09:14:58 +0800
commitc08e493ceee47bbeb466eeef100be7c1dd01a4e5 (patch)
tree552c80ec508143e9a127a203e80d72516dcf296f /libcpp
parentba393bf8879e5cf1f917bd88246d6b80ac081052 (diff)
downloadgcc-c08e493ceee47bbeb466eeef100be7c1dd01a4e5.zip
gcc-c08e493ceee47bbeb466eeef100be7c1dd01a4e5.tar.gz
gcc-c08e493ceee47bbeb466eeef100be7c1dd01a4e5.tar.bz2
RISC-V: Fix vl_used_by_non_rvv_insn logic of vsetvl pass
This patch fixes a bug in the current vsetvl pass. The current pass uses `m_vl` to determine whether the dest operand has been used by non-RVV instructions. However, `m_vl` may have been modified as a result of an `update_avl` call, and thus would be no longer the dest operand of the original instruction. This can lead to incorrect vsetvl eliminations, as is shown in the testcase. In this patch, we create a `dest_vl` variable for this scenerio. gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc: Use `dest_vl` for dest VL operand gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/vsetvl_bug-3.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions