[X86][AVX] Use extract128BitVector helper. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 16 Dec 2017 23:09:57 +0000 (23:09 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 16 Dec 2017 23:09:57 +0000 (23:09 +0000)
llvm-svn: 320932

llvm/lib/Target/X86/X86ISelLowering.cpp

index 0163612..b3dddb9 100644 (file)
@@ -10450,10 +10450,7 @@ static SDValue lowerVectorShuffleAsBroadcast(const SDLoc &DL, MVT VT,
            "Unexpected vector element size");
     assert((SrcVT.is256BitVector() || SrcVT.is512BitVector()) &&
            "Unexpected vector size");
-
-    MVT ExtVT = MVT::getVectorVT(SrcVT.getScalarType(), 128 / EltSize);
-    V = DAG.getNode(ISD::EXTRACT_SUBVECTOR, DL, ExtVT, V,
-                    DAG.getIntPtrConstant(BroadcastIdx, DL));
+    V = extract128BitVector(V, BroadcastIdx, DAG, DL);
   }
 
   if (Opcode == X86ISD::MOVDDUP && !V.getValueType().isVector())