@@ -58013,6 +58013,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58013
58013
break;
58014
58014
}
58015
58015
case X86ISD::VBROADCAST: {
58016
+ // TODO: 512-bit VBROADCAST concatenation.
58016
58017
if (!IsSplat && llvm::all_of(Ops, [](SDValue Op) {
58017
58018
return Op.getOperand(0).getValueType().is128BitVector();
58018
58019
})) {
@@ -58039,7 +58040,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58039
58040
break;
58040
58041
}
58041
58042
case X86ISD::SHUFP: {
58042
- // Add SHUFPD support if/when necessary.
58043
+ // TODO: Add SHUFPD support if/when necessary.
58043
58044
if (!IsSplat &&
58044
58045
(VT == MVT::v8f32 ||
58045
58046
(VT == MVT::v16f32 && Subtarget.useAVX512Regs())) &&
@@ -58058,6 +58059,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58058
58059
}
58059
58060
case X86ISD::UNPCKH:
58060
58061
case X86ISD::UNPCKL: {
58062
+ // TODO: UNPCK should use CombineSubOperand
58061
58063
// Don't concatenate build_vector patterns.
58062
58064
if (!IsSplat && EltSizeInBits >= 32 &&
58063
58065
((VT.is256BitVector() && Subtarget.hasInt256()) ||
@@ -58077,6 +58079,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58077
58079
case X86ISD::PSHUFHW:
58078
58080
case X86ISD::PSHUFLW:
58079
58081
case X86ISD::PSHUFD:
58082
+ // TODO: 512-bit PSHUFD/LW/HW handling
58080
58083
if (!IsSplat && NumOps == 2 && VT.is256BitVector() &&
58081
58084
Subtarget.hasInt256() && llvm::all_of(Ops, [Op0](SDValue Op) {
58082
58085
return Op.getOperand(1) == Op0.getOperand(1);
@@ -58098,6 +58101,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58098
58101
DAG.getNode(X86ISD::VPERMILPI, DL, FloatVT, Res, Op0.getOperand(1));
58099
58102
return DAG.getBitcast(VT, Res);
58100
58103
}
58104
+ // TODO: v8f64 VPERMILPI concatenation.
58101
58105
if (!IsSplat && NumOps == 2 && VT == MVT::v4f64) {
58102
58106
uint64_t Idx0 = Ops[0].getConstantOperandVal(1);
58103
58107
uint64_t Idx1 = Ops[1].getConstantOperandVal(1);
@@ -58259,7 +58263,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58259
58263
case ISD::ANY_EXTEND_VECTOR_INREG:
58260
58264
case ISD::SIGN_EXTEND_VECTOR_INREG:
58261
58265
case ISD::ZERO_EXTEND_VECTOR_INREG: {
58262
- // TODO: Handle ANY_EXTEND combos with SIGN/ZERO_EXTEND .
58266
+ // TODO: Handle ANY_EXTEND_INREG combos with SIGN/ZERO_EXTEND_INREG .
58263
58267
if (!IsSplat && NumOps == 2 &&
58264
58268
((VT.is256BitVector() && Subtarget.hasInt256()) ||
58265
58269
(VT.is512BitVector() && Subtarget.useAVX512Regs() &&
@@ -58285,7 +58289,6 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58285
58289
case X86ISD::VSHLI:
58286
58290
case X86ISD::VSRLI:
58287
58291
// Special case: SHL/SRL AVX1 V4i64 by 32-bits can lower as a shuffle.
58288
- // TODO: Move this to LowerShiftByScalarImmediate?
58289
58292
if (VT == MVT::v4i64 && !Subtarget.hasInt256() &&
58290
58293
llvm::all_of(Ops, [](SDValue Op) {
58291
58294
return Op.getConstantOperandAPInt(1) == 32;
@@ -58319,6 +58322,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58319
58322
case X86ISD::VPERMI:
58320
58323
case X86ISD::VROTLI:
58321
58324
case X86ISD::VROTRI:
58325
+ // TODO: 256-bit VROT?I handling
58322
58326
if (VT.is512BitVector() && Subtarget.useAVX512Regs() &&
58323
58327
llvm::all_of(Ops, [Op0](SDValue Op) {
58324
58328
return Op0.getOperand(1) == Op.getOperand(1);
@@ -58335,6 +58339,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58335
58339
if (!IsSplat && (VT.is256BitVector() ||
58336
58340
(VT.is512BitVector() && Subtarget.useAVX512Regs()))) {
58337
58341
// Don't concatenate root AVX1 NOT patterns.
58342
+ // TODO: Allow NOT folding if Concat0 succeeds.
58338
58343
if (Op0.getOpcode() == ISD::XOR && Depth == 0 &&
58339
58344
!Subtarget.hasInt256() && llvm::all_of(Ops, [](SDValue X) {
58340
58345
return ISD::isBuildVectorAllOnes(X.getOperand(1).getNode());
@@ -58350,6 +58355,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58350
58355
break;
58351
58356
case X86ISD::PCMPEQ:
58352
58357
case X86ISD::PCMPGT:
58358
+ // TODO: 512-bit PCMPEQ/PCMPGT -> VPCMP+VPMOVM2 handling.
58353
58359
if (!IsSplat && VT.is256BitVector() && Subtarget.hasInt256()) {
58354
58360
SDValue Concat0 = CombineSubOperand(VT, Ops, 0);
58355
58361
SDValue Concat1 = CombineSubOperand(VT, Ops, 1);
@@ -58413,6 +58419,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58413
58419
}
58414
58420
break;
58415
58421
case X86ISD::GF2P8AFFINEQB:
58422
+ // TODO: GF2P8AFFINEQB should use CombineSubOperand.
58416
58423
if (!IsSplat &&
58417
58424
(VT.is256BitVector() ||
58418
58425
(VT.is512BitVector() && Subtarget.useAVX512Regs())) &&
@@ -58427,6 +58434,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58427
58434
case ISD::ADD:
58428
58435
case ISD::SUB:
58429
58436
case ISD::MUL:
58437
+ // TODO: Add more integer binops?
58430
58438
if (!IsSplat && ((VT.is256BitVector() && Subtarget.hasInt256()) ||
58431
58439
(VT.is512BitVector() && Subtarget.useAVX512Regs() &&
58432
58440
(EltSizeInBits >= 32 || Subtarget.useBWIRegs())))) {
@@ -58549,6 +58557,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58549
58557
}
58550
58558
break;
58551
58559
case ISD::VSELECT:
58560
+ // TODO: VSELECT should use CombineSubOperand.
58552
58561
if (!IsSplat && Subtarget.hasAVX512() &&
58553
58562
(VT.is256BitVector() ||
58554
58563
(VT.is512BitVector() && Subtarget.useAVX512Regs())) &&
@@ -58566,6 +58575,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
58566
58575
}
58567
58576
[[fallthrough]];
58568
58577
case X86ISD::BLENDV:
58578
+ // TODO: BLENDV should use CombineSubOperand.
58569
58579
if (!IsSplat && VT.is256BitVector() && NumOps == 2 &&
58570
58580
(EltSizeInBits >= 32 || Subtarget.hasInt256()) &&
58571
58581
IsConcatFree(VT, Ops, 1) && IsConcatFree(VT, Ops, 2)) {
0 commit comments