[LoopUnrollAnalyzer] Check that we're using SCEV for the same loop we're simulating.
authorMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 26 Feb 2016 02:57:05 +0000 (02:57 +0000)
committerMichael Zolotukhin <mzolotukhin@apple.com>
Fri, 26 Feb 2016 02:57:05 +0000 (02:57 +0000)
commit9f520ebc5413cd9561e3c8ee7f5d2dfc8db3ac23
tree18785374d750d80bc482783b8526f7bc622b7311
parentb850251d3e7110e050610e8652319db86ffeec65
[LoopUnrollAnalyzer] Check that we're using SCEV for the same loop we're simulating.

Summary: Check that we're using SCEV for the same loop we're simulating. Otherwise, we might try to use the iteration number of the current loop in SCEV expressions for inner/outer loops IVs, which is clearly incorrect.

Reviewers: chandlerc, hfinkel

Subscribers: sanjoy, llvm-commits, mzolotukhin

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

llvm-svn: 261958
llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
llvm/lib/Analysis/LoopUnrollAnalyzer.cpp
llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
llvm/unittests/Analysis/UnrollAnalyzer.cpp