summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2018-01-15 20:33:53 +0000
committerCraig Topper <craig.topper@intel.com>2018-01-15 20:33:53 +0000
commit1393ccf949219c5c977a0883671d7074fd2d2721 (patch)
tree1a176bac354e6f68207cd5941eee36e87b362c99 /llvm
parentaacc622564617aef665eae04f59881aefc8bd2ab (diff)
downloadbcm5719-llvm-1393ccf949219c5c977a0883671d7074fd2d2721.tar.gz
bcm5719-llvm-1393ccf949219c5c977a0883671d7074fd2d2721.zip
[X86] Use MVT::getVectorVT instead of EVT::getVectorVT when splitting 256/512 bit build_vectors. NFC
We must be creating a legal type here which means it can be an MVT. llvm-svn: 322512
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/X86/X86ISelLowering.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index e8a18e6473b..68ca5bd42bb 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -7946,13 +7946,13 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
// supported, we assume that we will fall back to a shuffle to get the scalar
// blended with the constants. Insertion into a zero vector is handled as a
// special-case somewhere below here.
- LLVMContext &Context = *DAG.getContext();
if (NumConstants == NumElems - 1 && NumNonZero != 1 &&
(isOperationLegalOrCustom(ISD::INSERT_VECTOR_ELT, VT) ||
isOperationLegalOrCustom(ISD::VECTOR_SHUFFLE, VT))) {
// Create an all-constant vector. The variable element in the old
// build vector is replaced by undef in the constant vector. Save the
// variable scalar element and its index for use in the insertelement.
+ LLVMContext &Context = *DAG.getContext();
Type *EltType = Op.getValueType().getScalarType().getTypeForEVT(Context);
SmallVector<Constant *, 16> ConstVecOps(NumElems, UndefValue::get(EltType));
SDValue VarElt;
@@ -8114,7 +8114,7 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
// For AVX-length vectors, build the individual 128-bit pieces and use
// shuffles to put them in place.
if (VT.getSizeInBits() > 128) {
- EVT HVT = EVT::getVectorVT(Context, ExtVT, NumElems/2);
+ MVT HVT = MVT::getVectorVT(ExtVT, NumElems/2);
// Build both the lower and upper subvector.
SDValue Lower =
OpenPOWER on IntegriCloud