[PATCH] D17490: [InstCombine][SSE] Demanded vector elements for scalar intrinsics
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 21 08:56:16 PST 2016
RKSimon created this revision.
RKSimon added reviewers: majnemer, craig.topper, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.
This patch improves support for determining the demanded vector elements through SSE scalar intrinsics:
1 - recognise that we only need the lowest element of the second input for binary scalar operations
2 - recognise that the roundss/roundsd intrinsics use the lowest element of the second input and the remaining elements from the first input
3 - demanded vector element support for unary and some extra binary scalar intrinsics
4 - addss gets simplified to a fadd call if we aren't interested in the pass through elements (can we do this for div/sqrt?)
5 - if we don't need the lowest element of a scalar operation then just use the first argument (the pass through elements) directly
I'm happy to split this into multiple commits if anyone thinks its necessary.
I can also add support for propagating demanded elements through any equivalent packed SSE intrinsics in a future patch (these wouldn't use the pass through patterns).
Repository:
rL LLVM
http://reviews.llvm.org/D17490
Files:
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
test/Transforms/InstCombine/x86-sse.ll
test/Transforms/InstCombine/x86-sse2.ll
test/Transforms/InstCombine/x86-sse41.ll
test/Transforms/InstCombine/x86-xop.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17490.48623.patch
Type: text/x-patch
Size: 44523 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160221/eab175c5/attachment.bin>
More information about the llvm-commits
mailing list