[SCEV] Look at backedge dominating conditions.
authorSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 27 Mar 2015 23:18:08 +0000 (23:18 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Fri, 27 Mar 2015 23:18:08 +0000 (23:18 +0000)
commite464bbfb5a467fa6e90fc67cdacf4c5a6b3f0ecb
tree6edf66cebac2df65184e8082c8f7af9bb49ece30
parentb943370653917d8a674aaa9a47efc2965fd6dad3
[SCEV] Look at backedge dominating conditions.

Summary:
This change teaches ScalarEvolution::isLoopBackedgeGuardedByCond to look
at edges within the loop body that dominate the latch.  We don't do an
exhaustive search for all possible edges, but only a quick walk up the
dom tree.

Reviewers: atrick, hfinkel

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8627

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233447 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
test/Analysis/ScalarEvolution/latch-dominating-conditions.ll [new file with mode: 0644]