[InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((1 << y)+(-1)) mask
Summary: Same as to D52146. `((1 << y)+(-1))` is simply non-canoniacal version of `~(-1 << y)`: https://rise4fun.com/Alive/0vl We can not canonicalize it due to the extra uses. But we can handle it here. Reviewers: spatel, craig.topper, RKSimon Reviewed By: spatel Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52147 llvm-svn: 342547
Showing
- llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp 5 additions, 2 deletionsllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
- llvm/test/Transforms/InstCombine/canonicalize-low-bit-mask-v3-and-icmp-eq-to-icmp-ule.ll 30 additions, 39 deletions...e/canonicalize-low-bit-mask-v3-and-icmp-eq-to-icmp-ule.ll
- llvm/test/Transforms/InstCombine/canonicalize-low-bit-mask-v3-and-icmp-ne-to-icmp-ugt.ll 30 additions, 39 deletions...e/canonicalize-low-bit-mask-v3-and-icmp-ne-to-icmp-ugt.ll
Loading
Please register or sign in to comment