Skip to content

Commit 22a45c4

Browse files
committed
[X86] combineConcatVectorOps - use all_of to check for matching PSHUFD/PSHUFLW/PSHUFHW shuffle mask.
Prep work before adding 512-bit support.
1 parent 0f73248 commit 22a45c4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58044,7 +58044,9 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5804458044
case X86ISD::PSHUFLW:
5804558045
case X86ISD::PSHUFD:
5804658046
if (!IsSplat && NumOps == 2 && VT.is256BitVector() &&
58047-
Subtarget.hasInt256() && Op0.getOperand(1) == Ops[1].getOperand(1)) {
58047+
Subtarget.hasInt256() && llvm::all_of(Ops, [Op0](SDValue Op) {
58048+
return Op.getOperand(1) == Op0.getOperand(1);
58049+
})) {
5804858050
return DAG.getNode(Op0.getOpcode(), DL, VT,
5804958051
ConcatSubOperand(VT, Ops, 0), Op0.getOperand(1));
5805058052
}

0 commit comments

Comments
 (0)