[PATCH] D17184: [LVI] Extend select handling to catch min/max/clamp idioms

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 26 14:56:09 PST 2016


reames added inline comments.

================
Comment at: lib/Analysis/LazyValueInfo.cpp:922
@@ +921,3 @@
+    if (SelectPatternResult::isMinOrMax(SPR.Flavor) &&
+        LHS == SI->getTrueValue() && RHS == SI->getFalseValue()) {
+      switch (SPR.Flavor) {
----------------
sanjoy wrote:
> Is it possible for `LHS` to be the false value and `RHS` to be the true value?
This is defensive programming in case matchSelectPattern get's smarter.  


http://reviews.llvm.org/D17184





More information about the llvm-commits mailing list