summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAditya Nandakumar <aditya_nandakumar@apple.com>2016-01-07 23:22:55 +0000
committerAditya Nandakumar <aditya_nandakumar@apple.com>2016-01-07 23:22:55 +0000
commitf94c149f7fc52e48a83a59282fbc63834d464ef0 (patch)
tree276c078afab582a09914c3d48bc3c1d4557c6de1 /llvm/lib
parentb9ec4c6cea629ecf177d9d56640e1b87bdd8befc (diff)
downloadbcm5719-llvm-f94c149f7fc52e48a83a59282fbc63834d464ef0.tar.gz
bcm5719-llvm-f94c149f7fc52e48a83a59282fbc63834d464ef0.zip
Instructions to be redone only if from the same BB
While adding instructions(possible roots) to be redone, make sure they are from the same basic block. llvm-svn: 257112
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index 401a740856e..bcadd4e2bee 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -2155,7 +2155,8 @@ void Reassociate::OptimizeInst(Instruction *I) {
// During the initial run we will get to the root of the tree.
// But if we get here while we are redoing instructions, there is no
// guarantee that the root will be visited. So Redo later
- if (BO->user_back() != BO)
+ if (BO->user_back() != BO &&
+ BO->getParent() == BO->user_back()->getParent())
RedoInsts.insert(BO->user_back());
return;
}
OpenPOWER on IntegriCloud