[llvm] b5da0cd - [X86] LowerTruncateVecI1 - reuse existing SDLoc. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 08:00:47 PDT 2024
Author: Simon Pilgrim
Date: 2024-05-13T16:00:23+01:00
New Revision: b5da0cd68287fa613052a3d3164f2e9de35bedd3
URL: https://github.com/llvm/llvm-project/commit/b5da0cd68287fa613052a3d3164f2e9de35bedd3
DIFF: https://github.com/llvm/llvm-project/commit/b5da0cd68287fa613052a3d3164f2e9de35bedd3.diff
LOG: [X86] LowerTruncateVecI1 - reuse existing SDLoc. NFC.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 9d13c043c2388..d1be60f18cabb 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -20591,14 +20591,12 @@ static SDValue LowerTruncateVecPack(MVT DstVT, SDValue In, const SDLoc &DL,
return SDValue();
}
-static SDValue LowerTruncateVecI1(SDValue Op, SelectionDAG &DAG,
+static SDValue LowerTruncateVecI1(SDValue Op, const SDLoc &DL,
+ SelectionDAG &DAG,
const X86Subtarget &Subtarget) {
-
- SDLoc DL(Op);
MVT VT = Op.getSimpleValueType();
SDValue In = Op.getOperand(0);
MVT InVT = In.getSimpleValueType();
-
assert(VT.getVectorElementType() == MVT::i1 && "Unexpected vector type.");
// Shift LSB to MSB and use VPMOVB/W2M or TESTD/Q.
@@ -20717,7 +20715,7 @@ SDValue X86TargetLowering::LowerTRUNCATE(SDValue Op, SelectionDAG &DAG) const {
}
if (VT.getVectorElementType() == MVT::i1)
- return LowerTruncateVecI1(Op, DAG, Subtarget);
+ return LowerTruncateVecI1(Op, DL, DAG, Subtarget);
// Attempt to truncate with PACKUS/PACKSS even on AVX512 if we'd have to
// concat from subvectors to use VPTRUNC etc.
More information about the llvm-commits
mailing list