[PATCH] D29097: [X86][SSE] Lower scalar_to_vector(0) to zero vector
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 13:56:53 PST 2017
RKSimon created this revision.
Herald added a subscriber: igorb.
Replaces an xor+movd/movq with an xorps which will be shorter in codesize, avoid an int-fpu transfer, allow modern cores to fast path the result during decode and helps other combines recognise an all-zero vector.
The only reason I can think of that we'd want to keep scalar_to_vector in this case is to help recognise the upper elts are undef but this doesn't seem to be a problem?
Repository:
rL LLVM
https://reviews.llvm.org/D29097
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/clear_upper_vector_element_bits.ll
test/CodeGen/X86/insertelement-zero.ll
test/CodeGen/X86/vector-shuffle-variable-128.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29097.85627.patch
Type: text/x-patch
Size: 11256 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170124/4dd3650a/attachment.bin>
More information about the llvm-commits
mailing list