[PATCH] D142330: [AssumptionCache] caches @llvm.experimental.guard's

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 24 00:42:48 PST 2023


nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:620
+    CondGuardInst *I = cast<CondGuardInst>(AssumeVH);
+    assert(I && "must be an assume or experimental.guard intrinsic");
     assert(I->getFunction() == Q.CxtI->getFunction() &&
----------------
Drop these asserts, they are implied by `cast<>` (rather than `dyn_cast<>`).


================
Comment at: llvm/lib/Transforms/Utils/CodeExtractor.cpp:1670
     for (Instruction &I : llvm::make_early_inc_range(*Block)) {
       if (auto *AI = dyn_cast<AssumeInst>(&I)) {
         if (AC)
----------------
This needs to use CondGuardInst.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142330/new/

https://reviews.llvm.org/D142330



More information about the llvm-commits mailing list