[PATCH] D75397: [ValueTracking] Let getGuaranteedNonFullPoisonOp consider assume, remove mentioning about br
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 29 14:47:11 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG644e74768172: [ValueTracking] Let getGuaranteedNonFullPoisonOp consider assume, removeā¦ (authored by aqjune).
Changed prior to commit:
https://reviews.llvm.org/D75397?vs=247405&id=247467#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75397/new/
https://reviews.llvm.org/D75397
Files:
llvm/lib/Analysis/ValueTracking.cpp
Index: llvm/lib/Analysis/ValueTracking.cpp
===================================================================
--- llvm/lib/Analysis/ValueTracking.cpp
+++ llvm/lib/Analysis/ValueTracking.cpp
@@ -4708,11 +4708,18 @@
case Instruction::SRem:
return I->getOperand(1);
+ case Instruction::Call:
+ if (auto *II = dyn_cast<IntrinsicInst>(I)) {
+ switch (II->getIntrinsicID()) {
+ case Intrinsic::assume:
+ return II->getArgOperand(0);
+ default:
+ return nullptr;
+ }
+ }
+ return nullptr;
+
default:
- // Note: It's really tempting to think that a conditional branch or
- // switch should be listed here, but that's incorrect. It's not
- // branching off of poison which is UB, it is executing a side effecting
- // instruction which follows the branch.
return nullptr;
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75397.247467.patch
Type: text/x-patch
Size: 883 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200229/40cf5311/attachment.bin>
More information about the llvm-commits
mailing list