summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2018-12-07 00:01:57 +0000
committerSanjay Patel <spatel@rotateright.com>2018-12-07 00:01:57 +0000
commitc6441c8547fa7da42106625c867c29de0ae961cd (patch)
tree8943bc12a02984bc0e95418d620ae99d32b4c630 /llvm/lib/CodeGen
parent8c1cd213b7f76f6b567ba91c8faaca8e98a63f12 (diff)
downloadbcm5719-llvm-c6441c8547fa7da42106625c867c29de0ae961cd.tar.gz
bcm5719-llvm-c6441c8547fa7da42106625c867c29de0ae961cd.zip
[DAGCombiner] use root SDLoc for all nodes created by logic fold
If this is not a valid way to assign an SDLoc, then we get this wrong all over SDAG. I don't know enough about the SDAG to explain this. IIUC, theoretically, debug info is not supposed to affect codegen. But here it has clearly affected 3 different targets, and the x86 change is an actual improvement. llvm-svn: 348552
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 70ce0a7e5e2..249cf5e9ab5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -3754,7 +3754,7 @@ SDValue DAGCombiner::hoistLogicOpWithSameOpcodeHands(SDNode *N) {
return SDValue();
}
// logic_op (hand_op X), (hand_op Y) --> hand_op (logic_op X, Y)
- 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);
}
OpenPOWER on IntegriCloud