[PATCH] D75396: [ValueTracking] A value is never undef or poison if it must raise UB
Juneyoung Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 29 14:47:09 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG282ec4050436: [ValueTracking] A value is never undef or poison if it must raise UB (authored by aqjune).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75396/new/
https://reviews.llvm.org/D75396
Files:
llvm/lib/Analysis/ValueTracking.cpp
Index: llvm/lib/Analysis/ValueTracking.cpp
===================================================================
--- llvm/lib/Analysis/ValueTracking.cpp
+++ llvm/lib/Analysis/ValueTracking.cpp
@@ -4551,6 +4551,13 @@
return true;
}
+ if (auto I = dyn_cast<Instruction>(V)) {
+ if (programUndefinedIfFullPoison(I) && I->getType()->isIntegerTy(1))
+ // Note: once we have an agreement that poison is a value-wise concept,
+ // we can remove the isIntegerTy(1) constraint.
+ return true;
+ }
+
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75396.247466.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200229/0eaa0ca3/attachment.bin>
More information about the llvm-commits
mailing list