[PATCH] D112634: [InstCombine] canonicalize icmp with trunc op into mask and cmp, part 2

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 3 10:33:16 PDT 2021


spatel updated this revision to Diff 384507.
spatel added a comment.

Patch updated:
I am including the sibling pair of 'ult' folds here, so we can try to see if there's a cleaner way to implement this.
decomposeBitTestICmp() assumes the new compare constant is zero, so we could use that as-is for 2 of these, but then we'd still have the other 2 folds here.
I'm not sure if generalizing that helper would be useful for any other potential callers.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112634/new/

https://reviews.llvm.org/D112634

Files:
  llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
  llvm/test/Transforms/InstCombine/icmp-trunc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112634.384507.patch
Type: text/x-patch
Size: 6003 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211103/c8062ec1/attachment-0001.bin>


More information about the llvm-commits mailing list