[PATCH] D96929: [ValueTracking] Improve impliesPoison

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 09:00:24 PST 2021


spatel added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:4888-4890
+    if (isa<ExtractValueInst>(I) && isa<ExtractValueInst>(ValAssumedPoison)) {
+      if (I->getOperand(0) == I2->getOperand(0) &&
+          isAllPoisonOrNot(I->getOperand(0)))
----------------
Are there other patterns that you are planning to add here?
If not, we could make the patch much smaller with a more direct match like we use in InstCombineSelect.cpp:
  WithOverflowInst *II;
  if (!match(CondVal, m_ExtractValue<1>(m_WithOverflowInst(II))) ||
      !match(FalseVal, m_ExtractValue<0>(m_Specific(II))))
    return nullptr;


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96929



More information about the llvm-commits mailing list