aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2025-07-31 15:29:30 +0100
committerTamar Christina <tamar.christina@arm.com>2025-07-31 15:29:30 +0100
commit4a65ae52bacade00989f9840aab5ae11c4ef19f9 (patch)
tree78eb922c6af3d8af05a1a997f3a9799b07f2b11d /gcc/rust/parse
parent9996036205b5a71e7738f2daa29f4e6f79886a4e (diff)
downloadgcc-4a65ae52bacade00989f9840aab5ae11c4ef19f9.zip
gcc-4a65ae52bacade00989f9840aab5ae11c4ef19f9.tar.gz
gcc-4a65ae52bacade00989f9840aab5ae11c4ef19f9.tar.bz2
vect: Don't set bogus bounds on epilogues [PR120805]
The testcases in the PR are failing due to the code trying to set a vector range on an epilogue. However on epilogues the range doesn't make sense. In particular we are setting ranged to help niters analysis. But the epilogue doesn't iterate. Secondly the bounds variable hasn't been adjusted to vector iterations: In the epilogue this is calculated as <bb 13> [local count: 81467476]: # i_127 = PHI <tmp.7_131(10), 0(5)> # _132 = PHI <_133(10), 0(5)> _181 = (unsigned int) n_41(D); bnd.31_180 = _181 - _132; where _133 = niters_vector_mult_vf.6_130; but _132 is a phi node, and if coming from the vector loop skip edge _181 will be <1, VF>. But this is a range VRP or Ranger can easily report due to the guard on the skip_vector loop. Previously, non-const VF would skip this code entirely due to the .is_constant() check. Non-partial vector loop would also skip it because the bounds would fold to a constant. so it doesn't enter the !gimple_value check. When support for partial vector ranges was added, this accidentally enabled ranges on partial vector epilogues. This patch now makes it explicit that ranges shouldn't be set for epilogues, as they don't seem to be useful anyway. gcc/ChangeLog: PR tree-optimization/120805 * tree-vect-loop-manip.cc (vect_gen_vector_loop_niters): Skip setting bounds on epilogues.
Diffstat (limited to 'gcc/rust/parse')
0 files changed, 0 insertions, 0 deletions