]> granicus.if.org Git - llvm/commit
[LoopReroll] Fix reroll root legality checking.
authorEli Friedman <efriedma@quicinc.com>
Tue, 12 Feb 2019 00:33:25 +0000 (00:33 +0000)
committerEli Friedman <efriedma@quicinc.com>
Tue, 12 Feb 2019 00:33:25 +0000 (00:33 +0000)
commit7dd25617402280e474247afdf16e117b35d98681
tree8b22d63858e5390d12bcd117a614ce8276112240
parent6f6c9d03984579bea6a24ec3ad0537abedacf195
[LoopReroll] Fix reroll root legality checking.

The code checked that the first root was an appropriate distance from
the base value, but skipped checking the other roots. This could lead to
rerolling a loop that can't be legally rerolled (at least, not without
rewriting the loop in a non-trivial way).

Differential Revision: https://reviews.llvm.org/D56812

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353779 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopRerollPass.cpp
test/Transforms/LoopReroll/basic.ll