@@ -1618,17 +1618,6 @@ HexagonTargetLowering::LowerHvxBuildVector(SDValue Op, SelectionDAG &DAG)
16181618  for  (unsigned  i = 0 ; i != Size; ++i)
16191619    Ops.push_back (Op.getOperand (i));
16201620
1621-   //  First, split the BUILD_VECTOR for vector pairs. We could generate
1622-   //  some pairs directly (via splat), but splats should be generated
1623-   //  by the combiner prior to getting here.
1624-   if  (VecTy.getSizeInBits () == 16 *Subtarget.getVectorLength ()) {
1625-     ArrayRef<SDValue> A (Ops);
1626-     MVT SingleTy = typeSplit (VecTy).first ;
1627-     SDValue V0 = buildHvxVectorReg (A.take_front (Size/2 ), dl, SingleTy, DAG);
1628-     SDValue V1 = buildHvxVectorReg (A.drop_front (Size/2 ), dl, SingleTy, DAG);
1629-     return  DAG.getNode (ISD::CONCAT_VECTORS, dl, VecTy, V0, V1);
1630-   }
1631- 
16321621  if  (VecTy.getVectorElementType () == MVT::i1)
16331622    return  buildHvxVectorPred (Ops, dl, VecTy, DAG);
16341623
@@ -1645,6 +1634,17 @@ HexagonTargetLowering::LowerHvxBuildVector(SDValue Op, SelectionDAG &DAG)
16451634    return  DAG.getBitcast (tyVector (VecTy, MVT::f16 ), T0);
16461635  }
16471636
1637+   //  First, split the BUILD_VECTOR for vector pairs. We could generate
1638+   //  some pairs directly (via splat), but splats should be generated
1639+   //  by the combiner prior to getting here.
1640+   if  (VecTy.getSizeInBits () == 16  * Subtarget.getVectorLength ()) {
1641+     ArrayRef<SDValue> A (Ops);
1642+     MVT SingleTy = typeSplit (VecTy).first ;
1643+     SDValue V0 = buildHvxVectorReg (A.take_front (Size / 2 ), dl, SingleTy, DAG);
1644+     SDValue V1 = buildHvxVectorReg (A.drop_front (Size / 2 ), dl, SingleTy, DAG);
1645+     return  DAG.getNode (ISD::CONCAT_VECTORS, dl, VecTy, V0, V1);
1646+   }
1647+ 
16481648  return  buildHvxVectorReg (Ops, dl, VecTy, DAG);
16491649}
16501650
0 commit comments