diff options
author | Philip Reames <listmail@philipreames.com> | 2021-04-06 11:11:44 -0700 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-04-06 11:16:22 -0700 |
commit | a6d2a8d6f59a974752666305c4baaabebee41b95 (patch) | |
tree | fd78a01447da0dc40916251620efc2214465be3e /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | |
parent | 3b1b1d7530e6cf2c3aac25fc9d079f083e929137 (diff) | |
download | llvm-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.cpp | 5 |
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) |