[PATCH] D52147: [InstCombine] foldICmpWithLowBitMaskedVal(): handle uncanonical ((1 << y)+(-1)) mask
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 16 01:37:41 PDT 2018
lebedev.ri created this revision.
lebedev.ri added reviewers: spatel, craig.topper, RKSimon.
Same as to https://reviews.llvm.org/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.
Repository:
rL LLVM
https://reviews.llvm.org/D52147
Files:
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/canonicalize-low-bit-mask-v3-and-icmp-eq-to-icmp-ule.ll
test/Transforms/InstCombine/canonicalize-low-bit-mask-v3-and-icmp-ne-to-icmp-ugt.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52147.165675.patch
Type: text/x-patch
Size: 14669 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180916/879307ec/attachment.bin>
More information about the llvm-commits
mailing list