Skip to content

Commit 0f99c6c

Browse files
committed
[RISCV] Remove duplicate DebugLoc variables from cases in ReplaceNodeResults. NFC
We already created a DebugLoc at the top of the function. We can just use that one.
1 parent c4fee95 commit 0f99c6c

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3894,7 +3894,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
38943894
assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() &&
38953895
"Unexpected custom legalisation");
38963896
bool IsAdd = N->getOpcode() == ISD::UADDO;
3897-
SDLoc DL(N);
38983897
// Create an ADDW or SUBW.
38993898
SDValue LHS = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0));
39003899
SDValue RHS = DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(1));
@@ -3918,7 +3917,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
39183917
case ISD::USUBSAT: {
39193918
assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() &&
39203919
"Unexpected custom legalisation");
3921-
SDLoc DL(N);
39223920
if (Subtarget.hasStdExtZbb()) {
39233921
// With Zbb we can sign extend and let LegalizeDAG use minu/maxu. Using
39243922
// sign extend allows overflow of the lower 32 bits to be detected on
@@ -3966,7 +3964,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
39663964
// This is similar to customLegalizeToWOp, except that we pass the second
39673965
// operand (a TargetConstant) straight through: it is already of type
39683966
// XLenVT.
3969-
SDLoc DL(N);
39703967
RISCVISD::NodeType WOpcode = getRISCVWOpcode(N->getOpcode());
39713968
SDValue NewOp0 =
39723969
DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0));
@@ -3981,7 +3978,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
39813978
// There is no SHFLIW instruction, but we can just promote the operation.
39823979
assert(N->getValueType(0) == MVT::i32 && Subtarget.is64Bit() &&
39833980
"Unexpected custom legalisation");
3984-
SDLoc DL(N);
39853981
SDValue NewOp0 =
39863982
DAG.getNode(ISD::ANY_EXTEND, DL, MVT::i64, N->getOperand(0));
39873983
SDValue NewRes =
@@ -4033,7 +4029,6 @@ void RISCVTargetLowering::ReplaceNodeResults(SDNode *N,
40334029
// transferred to the destination register. We issue two of these from the
40344030
// upper- and lower- halves of the SEW-bit vector element, slid down to the
40354031
// first element.
4036-
SDLoc DL(N);
40374032
SDValue Vec = N->getOperand(0);
40384033
SDValue Idx = N->getOperand(1);
40394034

0 commit comments

Comments
 (0)