From 43d69f96f17cc7883012b8ec1e6ae0c56a2c87fa Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Thu, 6 Dec 2018 23:53:58 +0000 Subject: [PATCH] [DAGCombiner] don't bother saving a SDLoc for a node that's dead; NFCI We shouldn't care about the debug location for a node that we're creating, but attaching the root of the pattern should be the best effort. (If this is not true, then we are doing it wrong all over the SDAG). This is no-functional-change-intended, and there are no regression test diffs...and that's what I expected. But there's a similar line above this diff, where those assumptions apparently do not hold. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348550 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index ee7b3825911..70ce0a7e5e2 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3767,7 +3767,7 @@ SDValue DAGCombiner::hoistLogicOpWithSameOpcodeHands(SDNode *N) { // If either operand has other uses, this transform is not an improvement. if (!N0.hasOneUse() || !N1.hasOneUse()) return SDValue(); - SDValue Logic = DAG.getNode(LogicOpcode, SDLoc(N0), XVT, X, Y); + SDValue Logic = DAG.getNode(LogicOpcode, DL, XVT, X, Y); AddToWorklist(Logic.getNode()); return DAG.getNode(HandOpcode, DL, VT, Logic, N0.getOperand(1)); } -- 2.11.0