[PATCH] D17483: [X86][SSE41] Combine insertion of zero scalars into vector blends with zero
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 20 08:26:13 PST 2016
RKSimon created this revision.
RKSimon added reviewers: qcolombet, ab, spatel, andreadb.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.
This patch attempts to replace the insertion of zero scalars with a vector blend with zero. Not only does this avoid the use of the integer insertion instructions (which are particularly slow on many targets) but it adds the ability to merge multiple insertions together.
There are 2 parts to this patch - the lowering of zero insertions to shuffles and the combining of target shuffles into blends with zeros - if accepted these will be committed separately.
Note: Support for blending in other rematerializable constants (e.g. insertion of all-bits) would be easy to add but multiple insertions wouldn't be merged until we can support combining of binary shuffles. I will add support for the insertion stage now at least if people think its worth it?
Repository:
rL LLVM
http://reviews.llvm.org/D17483
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/insertelement-zero.ll
test/CodeGen/X86/insertps-combine.ll
test/CodeGen/X86/vec_insert-7.ll
test/CodeGen/X86/vector-shuffle-128-v2.ll
test/CodeGen/X86/vector-zext.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17483.48595.patch
Type: text/x-patch
Size: 22677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160220/a47da752/attachment.bin>
More information about the llvm-commits
mailing list