[PATCH] D13348: [InstCombine] SSE4A constant folding and conversion to shuffles.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 1 08:17:28 PDT 2015
RKSimon created this revision.
RKSimon added reviewers: andreadb, Bigcheese, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.
This patch improves support for combining the SSE4A EXTRQ(I) and INSERTQ(I) intrinsics:
1 - Converts INSERTQ/EXTRQ calls to INSERTQI/EXTRQI if the 'index' operand is constant
2 - Converts INSERTQI/EXTRQI calls to shufflevector if the bit index/length are both byte aligned (we can already lower shuffles to INSERTQI/EXTRQI if its useful)
3 - Constant folding support
4 - Add zeroinitializer handling
Michael - I've also removed some old INSERTQI 'bundling' code that attempted to merge 2 INSERTQI calls; this doesn't actually work as it assumed that we were inserting from the same source and that ranges could be merged together. This isn't true as we always insert the bottom bits from a source. Technically we could reduce this to a single case where both are inserting to the same destination index and then just have a single insertion of the maximum of the 2 lengths - if you think this is worth it I'll add back the code for that case only.
Repository:
rL LLVM
http://reviews.llvm.org/D13348
Files:
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/x86-sse4a.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13348.36245.patch
Type: text/x-patch
Size: 36197 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151001/4bc0ecbc/attachment.bin>
More information about the llvm-commits
mailing list