Skip to content

Commit b5da0cd

Browse files
committed
[X86] LowerTruncateVecI1 - reuse existing SDLoc. NFC.
1 parent b4393c7 commit b5da0cd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20591,14 +20591,12 @@ static SDValue LowerTruncateVecPack(MVT DstVT, SDValue In, const SDLoc &DL,
2059120591
return SDValue();
2059220592
}
2059320593

20594-
static SDValue LowerTruncateVecI1(SDValue Op, SelectionDAG &DAG,
20594+
static SDValue LowerTruncateVecI1(SDValue Op, const SDLoc &DL,
20595+
SelectionDAG &DAG,
2059520596
const X86Subtarget &Subtarget) {
20596-
20597-
SDLoc DL(Op);
2059820597
MVT VT = Op.getSimpleValueType();
2059920598
SDValue In = Op.getOperand(0);
2060020599
MVT InVT = In.getSimpleValueType();
20601-
2060220600
assert(VT.getVectorElementType() == MVT::i1 && "Unexpected vector type.");
2060320601

2060420602
// Shift LSB to MSB and use VPMOVB/W2M or TESTD/Q.
@@ -20717,7 +20715,7 @@ SDValue X86TargetLowering::LowerTRUNCATE(SDValue Op, SelectionDAG &DAG) const {
2071720715
}
2071820716

2071920717
if (VT.getVectorElementType() == MVT::i1)
20720-
return LowerTruncateVecI1(Op, DAG, Subtarget);
20718+
return LowerTruncateVecI1(Op, DL, DAG, Subtarget);
2072120719

2072220720
// Attempt to truncate with PACKUS/PACKSS even on AVX512 if we'd have to
2072320721
// concat from subvectors to use VPTRUNC etc.

0 commit comments

Comments
 (0)