diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2016-11-09 23:05:01 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2016-11-09 23:05:01 +0000 |
commit | ddbf83ea14914e5a6c047e475939aaa536fe001b (patch) | |
tree | e68fdac8efb14134e0e06724ecf1687bbea3eb8a /llvm/lib/Transforms/Scalar/LoopRotation.cpp | |
parent | 5dbe7a9362040c925245a3cf30077b3a14d09a84 (diff) | |
download | bcm5719-llvm-ddbf83ea14914e5a6c047e475939aaa536fe001b.tar.gz bcm5719-llvm-ddbf83ea14914e5a6c047e475939aaa536fe001b.zip |
Preserve assumption cache in loop-rotate.
No testcase included because I can't figure out how to reduce it.
(It's easy to write a testcase where rotation clones an assume,
but that doesn't actually seem to trigger the crash in opt on
its own; maybe an issue with the laziness?)
Differential Revision: https://reviews.llvm.org/D26434
llvm-svn: 286410
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopRotation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp index 4498e1db521..32d2caa78da 100644 --- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp +++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp @@ -326,6 +326,10 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) { // Otherwise, stick the new instruction into the new block! C->setName(Inst->getName()); C->insertBefore(LoopEntryBranch); + + if (auto *II = dyn_cast<IntrinsicInst>(C)) + if (II->getIntrinsicID() == Intrinsic::assume) + AC->registerAssumption(II); } } |