aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2021-04-06 11:11:44 -0700
committerPhilip Reames <listmail@philipreames.com>2021-04-06 11:16:22 -0700
commita6d2a8d6f59a974752666305c4baaabebee41b95 (patch)
treefd78a01447da0dc40916251620efc2214465be3e /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
parent3b1b1d7530e6cf2c3aac25fc9d079f083e929137 (diff)
downloadllvm-a6d2a8d6f59a974752666305c4baaabebee41b95.zip
llvm-a6d2a8d6f59a974752666305c4baaabebee41b95.tar.gz
llvm-a6d2a8d6f59a974752666305c4baaabebee41b95.tar.bz2
Add a subclass of IntrinsicInst for llvm.assume [nfc]
Add the subclass, update a few places which check for the intrinsic to use idiomatic dyn_cast, and update the public interface of AssumptionCache to use the new class. A follow up change will do the same for the newer assumption query/bundle mechanisms.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopRotationUtils.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
index 200993f..25f767b 100644
--- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp
@@ -467,9 +467,8 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
C->setName(Inst->getName());
C->insertBefore(LoopEntryBranch);
- if (auto *II = dyn_cast<IntrinsicInst>(C))
- if (II->getIntrinsicID() == Intrinsic::assume)
- AC->registerAssumption(II);
+ if (auto *II = dyn_cast<AssumeInst>(C))
+ AC->registerAssumption(II);
// MemorySSA cares whether the cloned instruction was inserted or not, and
// not whether it can be remapped to a simplified value.
if (MSSAU)