]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/98117 - fix range set by vectorization on niter IVs
authorRichard Biener <rguenther@suse.de>
Mon, 7 Dec 2020 09:29:07 +0000 (10:29 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 26 Apr 2021 09:28:10 +0000 (11:28 +0200)
commitc6da7015827a0557108a65f384419cddd6f8ba57
tree1190fa06927a15cfbfd803629e43eb29caeb5df7
parent42a8453ae895c232082d0bcff9ae0edbe599ffc6
tree-optimization/98117 - fix range set by vectorization on niter IVs

This avoids the degenerate case of a TYPE_MAX_VALUE latch iteration
count value causing wrong range info for the vector IV.  There's
still the case of VF == 1 where if we don't know whether we hit the
above case we cannot emit a range.

2020-12-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98117
* tree-vect-loop-manip.c (vect_gen_vector_loop_niters):
Properly handle degenerate niter when setting the vector
loop IV range.

* gcc.dg/torture/pr98117.c: New testcase.

(cherry picked from commit 69894ce172412996c10c89838717980ede7c9003)
gcc/testsuite/gcc.dg/torture/pr98117.c [new file with mode: 0644]
gcc/tree-vect-loop-manip.c