@@ -1618,17 +1618,6 @@ HexagonTargetLowering::LowerHvxBuildVector(SDValue Op, SelectionDAG &DAG)
1618
1618
for (unsigned i = 0 ; i != Size ; ++i)
1619
1619
Ops.push_back (Op.getOperand (i));
1620
1620
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
-
1632
1621
if (VecTy.getVectorElementType () == MVT::i1)
1633
1622
return buildHvxVectorPred (Ops, dl, VecTy, DAG);
1634
1623
@@ -1645,6 +1634,17 @@ HexagonTargetLowering::LowerHvxBuildVector(SDValue Op, SelectionDAG &DAG)
1645
1634
return DAG.getBitcast (tyVector (VecTy, MVT::f16), T0);
1646
1635
}
1647
1636
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
+
1648
1648
return buildHvxVectorReg (Ops, dl, VecTy, DAG);
1649
1649
}
1650
1650
0 commit comments