[PATCH] D38756: [x86] use an insert op to put one variable element into a constant of vectors
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 14 08:07:49 PDT 2017
spatel updated this revision to Diff 119020.
spatel added a comment.
Patch updated:
IIUC, it's not safe to assume that we can always expand the insertelement node properly (even though I haven't found a case where that's a problem). So I've added an additional check before we try this:
(isOperationLegalOrCustom(ISD::INSERT_VECTOR_ELT, VT) ||
isOperationLegalOrCustom(ISD::VECTOR_SHUFFLE, VT))) {
The assumption is that if we're going to expand the insertelement, then it's going to be turned into a shuffle, so we must be able to lower that shuffle in order to do this transform.
This enables all of the same test diffs, so no changes there.
https://reviews.llvm.org/D38756
Files:
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/buildvec-insertvec.ll
test/CodeGen/X86/insert-into-constant-vector.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38756.119020.patch
Type: text/x-patch
Size: 47926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171014/9b0e8592/attachment.bin>
More information about the llvm-commits
mailing list