A complementary fold to D49179.
https://bugs.llvm.org/show_bug.cgi?id=38123
https://rise4fun.com/Alive/Rny
Caveat: one more thing in test/Transforms/InstCombine/icmp-logical.ll breaks.
Paths
| Differential D49205
[InstCombine] Fold x & (-1 >> y) != x to x u> (-1 >> y) ClosedPublic Authored by lebedev.ri on Jul 11 2018, 2:38 PM.
Details Summary A complementary fold to D49179. https://bugs.llvm.org/show_bug.cgi?id=38123 Caveat: one more thing in test/Transforms/InstCombine/icmp-logical.ll breaks.
Diff Detail
Event Timelinelebedev.ri added a parent revision: D49179: [InstCombine] Fold x & (-1 >> y) == x to x u<= (-1 >> y) . Comment Actions LGTM - unless you have questions/concerns, I think it's fine if you want to continue enhancing this fold without pre-commit review. You've already done the hard part of writing the proofs and regression tests. :) This revision is now accepted and ready to land.Jul 12 2018, 6:38 AM Comment Actions
Thank you for the review.
The other 4(?) patterns here will be non-commutative, so i'm not sure how those will go yet.. Closed by commit rL336911: [InstCombine] Fold x & (-1 >> y) != x to x u> (-1 >> y) (authored by lebedevri). · Explain WhyJul 12 2018, 8:01 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 155183 llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/trunk/test/Transforms/InstCombine/canonicalize-constant-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
llvm/trunk/test/Transforms/InstCombine/canonicalize-low-bit-mask-and-icmp-ne-to-icmp-ugt.ll
llvm/trunk/test/Transforms/InstCombine/icmp-logical.ll
|