@@ -9614,13 +9614,12 @@ X86TargetLowering::LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG) const {
9614
9614
// 256-bit AVX can use the vinsertf128 instruction
9615
9615
// to create 256-bit vectors from two other 128-bit ones.
9616
9616
// TODO: Detect subvector broadcast here instead of DAG combine?
9617
- static SDValue LowerAVXCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG,
9617
+ static SDValue LowerAVXCONCAT_VECTORS(SDValue Op, const SDLoc &dl,
9618
+ SelectionDAG &DAG,
9618
9619
const X86Subtarget &Subtarget) {
9619
- SDLoc dl(Op);
9620
9620
MVT ResVT = Op.getSimpleValueType();
9621
-
9622
- assert((ResVT.is256BitVector() ||
9623
- ResVT.is512BitVector()) && "Value type must be 256-/512-bit wide");
9621
+ assert((ResVT.is256BitVector() || ResVT.is512BitVector()) &&
9622
+ "Value type must be 256-/512-bit wide");
9624
9623
9625
9624
unsigned NumOperands = Op.getNumOperands();
9626
9625
unsigned NumFreezeUndef = 0;
@@ -9688,13 +9687,11 @@ static SDValue LowerAVXCONCAT_VECTORS(SDValue Op, SelectionDAG &DAG,
9688
9687
// zeros) of the result of a node that already zeros all upper bits of
9689
9688
// k-register.
9690
9689
// TODO: Merge this with LowerAVXCONCAT_VECTORS?
9691
- static SDValue LowerCONCAT_VECTORSvXi1(SDValue Op,
9690
+ static SDValue LowerCONCAT_VECTORSvXi1(SDValue Op, const SDLoc &dl,
9692
9691
const X86Subtarget &Subtarget,
9693
9692
SelectionDAG & DAG) {
9694
- SDLoc dl(Op);
9695
9693
MVT ResVT = Op.getSimpleValueType();
9696
9694
unsigned NumOperands = Op.getNumOperands();
9697
-
9698
9695
assert(NumOperands > 1 && isPowerOf2_32(NumOperands) &&
9699
9696
"Unexpected number of operands in CONCAT_VECTORS");
9700
9697
@@ -9766,19 +9763,18 @@ static SDValue LowerCONCAT_VECTORSvXi1(SDValue Op,
9766
9763
static SDValue LowerCONCAT_VECTORS(SDValue Op,
9767
9764
const X86Subtarget &Subtarget,
9768
9765
SelectionDAG &DAG) {
9766
+ SDLoc DL(Op);
9769
9767
MVT VT = Op.getSimpleValueType();
9770
9768
if (VT.getVectorElementType() == MVT::i1)
9771
- return LowerCONCAT_VECTORSvXi1(Op, Subtarget, DAG);
9772
-
9773
- assert((VT.is256BitVector() && Op.getNumOperands() == 2) ||
9774
- (VT.is512BitVector() && (Op.getNumOperands() == 2 ||
9775
- Op.getNumOperands() == 4)));
9769
+ return LowerCONCAT_VECTORSvXi1(Op, DL, Subtarget, DAG);
9776
9770
9777
9771
// AVX can use the vinsertf128 instruction to create 256-bit vectors
9778
9772
// from two other 128-bit ones.
9779
-
9780
9773
// 512-bit vector may contain 2 256-bit vectors or 4 128-bit vectors
9781
- return LowerAVXCONCAT_VECTORS(Op, DAG, Subtarget);
9774
+ assert((VT.is256BitVector() && Op.getNumOperands() == 2) ||
9775
+ (VT.is512BitVector() &&
9776
+ (Op.getNumOperands() == 2 || Op.getNumOperands() == 4)));
9777
+ return LowerAVXCONCAT_VECTORS(Op, DL, DAG, Subtarget);
9782
9778
}
9783
9779
9784
9780
//===----------------------------------------------------------------------===//
0 commit comments