[PATCH] D122166: [InstCombine] try to narrow shifted bswap-of-zext

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 11:28:20 PDT 2022


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

This is the IR counterpart to 370ebc9d9a573d6 <https://reviews.llvm.org/rG370ebc9d9a573d6a0bcb0d7c3e0a57d55b7a7673> which provided a bswap narrowing fix for issue #53867.

Here we can be more general (although I'm not sure yet what would happen for illegal types in codegen - too rare to worry about?):
https://alive2.llvm.org/ce/z/3-CPfo

This assumes that we have moved the shift after the bswap as proposed in D122010 <https://reviews.llvm.org/D122010>.


https://reviews.llvm.org/D122166

Files:
  llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
  llvm/test/Transforms/InstCombine/lshr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122166.417035.patch
Type: text/x-patch
Size: 4747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220321/dcd7a054/attachment.bin>


More information about the llvm-commits mailing list