[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
       
    Fri Feb 28 21:42:38 PST 2020
    
    
  
aqjune updated this revision to Diff 247406.
aqjune added a comment.
Rebase
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.247406.patch
Type: text/x-patch
Size: 542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200229/496cd7a7/attachment.bin>
    
    
More information about the llvm-commits
mailing list