Skip to content

Commit cb6c093

Browse files
committed
[X86] combineConcatVectorOps - pull out repeated getTargetLoweringInfo calls. NFC.
1 parent 435ba72 commit cb6c093

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54482,6 +54482,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5448254482
SDValue Op0 = Ops[0];
5448354483
bool IsSplat = llvm::all_equal(Ops);
5448454484
unsigned NumOps = Ops.size();
54485+
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
5448554486

5448654487
// Repeated subvectors.
5448754488
if (IsSplat &&
@@ -54938,7 +54939,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5493854939
if (SelVT.getVectorElementType() == MVT::i1) {
5493954940
SelVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
5494054941
NumOps * SelVT.getVectorNumElements());
54941-
if (DAG.getTargetLoweringInfo().isTypeLegal(SelVT))
54942+
if (TLI.isTypeLegal(SelVT))
5494254943
return DAG.getNode(Op0.getOpcode(), DL, VT,
5494354944
ConcatSubOperand(SelVT.getSimpleVT(), Ops, 0),
5494454945
ConcatSubOperand(VT, Ops, 1),
@@ -54952,7 +54953,7 @@ static SDValue combineConcatVectorOps(const SDLoc &DL, MVT VT,
5495254953
IsConcatFree(VT, Ops, 1) && IsConcatFree(VT, Ops, 2)) {
5495354954
EVT SelVT = Ops[0].getOperand(0).getValueType();
5495454955
SelVT = SelVT.getDoubleNumVectorElementsVT(*DAG.getContext());
54955-
if (DAG.getTargetLoweringInfo().isTypeLegal(SelVT))
54956+
if (TLI.isTypeLegal(SelVT))
5495654957
return DAG.getNode(Op0.getOpcode(), DL, VT,
5495754958
ConcatSubOperand(SelVT.getSimpleVT(), Ops, 0),
5495854959
ConcatSubOperand(VT, Ops, 1),

0 commit comments

Comments
 (0)