aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>2023-11-27 21:24:12 +0800
committerPan Li <pan2.li@intel.com>2023-11-28 10:10:55 +0800
commit9c16ca93641ad460a576a9ed7daf2aadf596193c (patch)
tree7d9b7ce61d637c004e7399bc311c31f17151304a /libcpp
parent5099525bff4f7c36f289537bb15c582a8b51e2b3 (diff)
downloadgcc-9c16ca93641ad460a576a9ed7daf2aadf596193c.zip
gcc-9c16ca93641ad460a576a9ed7daf2aadf596193c.tar.gz
gcc-9c16ca93641ad460a576a9ed7daf2aadf596193c.tar.bz2
RISC-V: Fix VSETVL PASS regression
This patch is regression fix patch, not an optimization patch. Since trunk GCC generates redundant vsetvl than GCC-13. This is the case: bb 2: def a2 (vsetvl a2, zero) bb 3: use a2 bb 4: use a2 (vle) before this patch: bb 2: vsetvl a2 zero bb 3: vsetvl zero, zero ----> should be eliminated. bb 4: vle.v The root cause is we didn't set bb 3 as transparent since the incorrect codes. bb 3 didn't modify "a2" just use it, the VSETVL status from bb 2 can be available to bb 3 and bb 4: bb 2 -> bb 3 -> bb4. Another regression fix is anticipation calculation: bb 4: use a5 (sub) use a5 (vle) The vle VSETVL status should be considered as anticipated as long as both sub and vle a5 def are coming from same def. Tested on zvl128b no regression. I am going to test on zvl256/zvl512/zvl1024 PR target/112713 gcc/ChangeLog: * config/riscv/riscv-vsetvl.cc (pre_vsetvl::compute_lcm_local_properties): Fix regression. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/vsetvl/pr112713-1.c: New test. * gcc.target/riscv/rvv/vsetvl/pr112713-2.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions