Skip to content

Commit 5e71ca3

Browse files
committed
[X86] combineConcatVectorOps - pull out repeated uses of VT.getScalarSizeInBits(). NFC.
We already have a EltSizeInBits variable
1 parent 43924cb commit 5e71ca3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55623,7 +55623,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5562355623
if (ConcatMask.size() == (NumOps * NumSrcElts)) {
5562455624
SDValue Src = concatSubVectors(Ops[0].getOperand(1),
5562555625
Ops[1].getOperand(1), DAG, DL);
55626-
MVT IntMaskSVT = MVT::getIntegerVT(VT.getScalarSizeInBits());
55626+
MVT IntMaskSVT = MVT::getIntegerVT(EltSizeInBits);
5562755627
MVT IntMaskVT = MVT::getVectorVT(IntMaskSVT, NumOps * NumSrcElts);
5562855628
SDValue Mask = getConstVector(ConcatMask, IntMaskVT, DAG, DL, true);
5562955629
return DAG.getNode(X86ISD::VPERMV, DL, VT, Mask, Src);
@@ -55654,7 +55654,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5565455654
Ops[1].getOperand(0), DAG, DL);
5565555655
SDValue Src1 = concatSubVectors(Ops[0].getOperand(2),
5565655656
Ops[1].getOperand(2), DAG, DL);
55657-
MVT IntMaskSVT = MVT::getIntegerVT(VT.getScalarSizeInBits());
55657+
MVT IntMaskSVT = MVT::getIntegerVT(EltSizeInBits);
5565855658
MVT IntMaskVT = MVT::getVectorVT(IntMaskSVT, NumOps * NumSrcElts);
5565955659
SDValue Mask = getConstVector(ConcatMask, IntMaskVT, DAG, DL, true);
5566055660
return DAG.getNode(X86ISD::VPERMV3, DL, VT, Src0, Mask, Src1);
@@ -55777,7 +55777,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5577755777
case ISD::VSELECT:
5577855778
case X86ISD::BLENDV:
5577955779
if (!IsSplat && VT.is256BitVector() && Ops.size() == 2 &&
55780-
(VT.getScalarSizeInBits() >= 32 || Subtarget.hasInt256()) &&
55780+
(EltSizeInBits >= 32 || Subtarget.hasInt256()) &&
5578155781
IsConcatFree(VT, Ops, 1) && IsConcatFree(VT, Ops, 2)) {
5578255782
EVT SelVT = Ops[0].getOperand(0).getValueType();
5578355783
SelVT = SelVT.getDoubleNumVectorElementsVT(*DAG.getContext());

0 commit comments

Comments
 (0)