Skip to content

Commit 951f2e7

Browse files
committed
Add comments
1 parent f640ab4 commit 951f2e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59320,6 +59320,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5932059320
Op.getOpcode() == X86ISD::UNPCKL ||
5932159321
Op.getOpcode() == X86ISD::UNPCKH);
5932259322
})) {
59323+
// Collect the individual per-lane v2f64/v4f64 shuffles.
5932359324
MVT OpVT = Ops[0].getSimpleValueType();
5932459325
unsigned NumOpElts = OpVT.getVectorNumElements();
5932559326
SmallVector<SmallVector<SDValue, 2>, 4> SrcOps(NumOps);
@@ -59333,6 +59334,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5933359334
return V.getValueType() == OpVT;
5933459335
});
5933559336
})) {
59337+
// Concatenate the shuffle masks into SHUFPD mask and collect subops.
5933659338
bool Unary = true;
5933759339
unsigned SHUFPDMask = 0;
5933859340
SmallVector<SDValue, 4> LHS(NumOps), RHS(NumOps);
@@ -59343,6 +59345,8 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5934359345
for (unsigned J = 0; J != NumOpElts; ++J)
5934459346
SHUFPDMask |= (SrcMasks[I][J] & 1) << ((I * NumOpElts) + J);
5934559347
}
59348+
// Concat SHUFPD LHS/RHS operands - if they match then it will become a
59349+
// PERMILPD mask and we can always profitably concatenate them.
5934659350
SDValue Concat0 =
5934759351
combineConcatVectorOps(DL, VT, LHS, DAG, Subtarget, Depth + 1);
5934859352
SDValue Concat1 =

0 commit comments

Comments
 (0)