[PATCH] D118539: [InstCombine] try to fold one-demanded-bit-of-multiply

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 29 09:26:23 PST 2022


spatel created this revision.
spatel added reviewers: lebedev.ri, efriedma, RKSimon, fwolff.
Herald added subscribers: hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a generalization of the icmp fold in D118061 <https://reviews.llvm.org/D118061> (and that can probably be abandoned if this is sufficient). 
We're looking for a disguised form of "odd * odd must be odd".
Some Alive2 proofs to show correctness:
https://alive2.llvm.org/ce/z/60Y8hz
https://alive2.llvm.org/ce/z/HfAP6R


https://reviews.llvm.org/D118539

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  llvm/test/Transforms/InstCombine/icmp-mul-and.ll
  llvm/test/Transforms/InstCombine/mul-masked-bits.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118539.404285.patch
Type: text/x-patch
Size: 7179 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220129/98a499b1/attachment.bin>


More information about the llvm-commits mailing list