[LFTR] Remove unnecessary latch check; NFCI
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 29 Jun 2019 12:41:02 +0000 (12:41 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 29 Jun 2019 12:41:02 +0000 (12:41 +0000)
commit61a8b62b4c961f25410fc126880befdf85424ea1
tree36de2cb5f6287570136096aa0a75b62cdc700b25
parente3a94ba4a928e7c2c94bb82bce0e525212fe38e1
[LFTR] Remove unnecessary latch check; NFCI

The whole indvars pass works on loops in simplified form, so there
is always a unique latch. Convert the condition into an assertion
in needsLFTR (though we also assert this in later LFTR functions).

Additionally update the comment on getLoopTest() now that we are
dealing with multiple exits.

llvm-svn: 364713
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp