[SCEV] Fix isLoopEntryGuardedByCond usage
authorSerguei Katkov <serguei.katkov@azul.com>
Mon, 22 Jan 2018 07:31:41 +0000 (07:31 +0000)
committerSerguei Katkov <serguei.katkov@azul.com>
Mon, 22 Jan 2018 07:31:41 +0000 (07:31 +0000)
commit50714a1cbc9b0f49e0dff961ffb50fd80668b250
treea0b9e0ffffbefc26daf54a949b8b1e0b6f956dd6
parentbb3c570633d67e3a0c80992b09f9743fb2e2ea78
[SCEV] Fix isLoopEntryGuardedByCond usage

ScalarEvolution::isKnownPredicate invokes isLoopEntryGuardedByCond without check
that SCEV is available at entry point of the loop. It is incorrect and fixed by patch.

Reviewers: sanjoy, mkazantsev, anna, dorit
Reviewed By: mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D42165

llvm-svn: 323077
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp
llvm/test/Transforms/IndVarSimplify/inner-loop.ll [new file with mode: 0644]