[PATCH] D88316: [InstCombine] recognizeBSwapOrBitReverseIdiom - recognise zext(bswap(trunc(x))) patterns (PR39793)
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 09:15:55 PDT 2020
RKSimon created this revision.
RKSimon added reviewers: spatel, craig.topper, lebedev.ri, nikic.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
RKSimon requested review of this revision.
PR39793 demonstrated an issue where we fail to recognize 'partial' bswap patterns of the lower bytes of an integer source.
In fact, most of this is already in place collectBitParts suitably tags zero bits, so we just need to correctly handle this case by finding the zero'd upper bits and reducing the bswap pattern just to the active demanded bits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D88316
Files:
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/InstCombine/bswap.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88316.294344.patch
Type: text/x-patch
Size: 6529 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200925/de1260e1/attachment.bin>
More information about the llvm-commits
mailing list