[PATCH] D69963: Handling null AssumptionCache in simplifyCFG

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 7 09:27:35 PST 2019


xbolva00 added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:2277
       // Register the new instruction with the assumption cache if necessary.
-      if (auto *II = dyn_cast_or_null<IntrinsicInst>(N))
-        if (II->getIntrinsicID() == Intrinsic::assume)
-          AC->registerAssumption(II);
+      if (AC && match(N, m_Intrinsic<Intrinsic::assume>()))
+        AC->registerAssumption(cast<IntrinsicInst>(N));
----------------
if (AC && N && match(N, m_Intrinsic<Intrinsic::assume>()))

?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69963





More information about the llvm-commits mailing list