[PATCH] D22537: [InstSimplify] recognize trunc + icmp sgt/slt variants of select simplifications (PR28466)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 20 10:04:28 PDT 2016


eli.friedman added inline comments.

================
Comment at: lib/Analysis/InstructionSimplify.cpp:3411
@@ +3410,3 @@
+/// eq/ne.
+static Value *simplifySelectWithFakeICmpEq(Value *CmpLHS, Value *TrueVal,
+                                           Value *FalseVal, bool TrueWhenUnset,
----------------
spatel wrote:
> eli.friedman wrote:
> > Do we want to look through the truncate in something like "(trunc X) & C == C2 ? X : Y"?
> Is this the pattern in the last 4 tests of this patch, or something more general?
I was thinking of a case where instead of trunc+slt, you have trunc+and+eq.  Looking through a truncate isn't really specific to slt.


https://reviews.llvm.org/D22537





More information about the llvm-commits mailing list