[PATCH] D34000: [LazyValueInfo] Don't run the more complex predicate handling code for EQ and NE in getPredicateResult

Phabricator via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 9 09:16:49 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL305086: [LazyValueInfo] Don't run the more complex predicate handling code for EQ and… (authored by ctopper).

Changed prior to commit:
  https://reviews.llvm.org/D34000?vs=101763&id=102042#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D34000

Files:
  llvm/trunk/lib/Analysis/LazyValueInfo.cpp


Index: llvm/trunk/lib/Analysis/LazyValueInfo.cpp
===================================================================
--- llvm/trunk/lib/Analysis/LazyValueInfo.cpp
+++ llvm/trunk/lib/Analysis/LazyValueInfo.cpp
@@ -1692,15 +1692,15 @@
 
       if (CR.isSingleElement())
         return LazyValueInfo::False;
+    } else {
+      // Handle more complex predicates.
+      ConstantRange TrueValues = ConstantRange::makeExactICmpRegion(
+          (ICmpInst::Predicate)Pred, CI->getValue());
+      if (TrueValues.contains(CR))
+        return LazyValueInfo::True;
+      if (TrueValues.inverse().contains(CR))
+        return LazyValueInfo::False;
     }
-
-    // Handle more complex predicates.
-    ConstantRange TrueValues = ConstantRange::makeExactICmpRegion(
-        (ICmpInst::Predicate)Pred, CI->getValue());
-    if (TrueValues.contains(CR))
-      return LazyValueInfo::True;
-    if (TrueValues.inverse().contains(CR))
-      return LazyValueInfo::False;
     return LazyValueInfo::Unknown;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34000.102042.patch
Type: text/x-patch
Size: 1006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170609/4b7a0f69/attachment.bin>


More information about the llvm-commits mailing list