aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-01 18:21:35 +0000
committerChris Lattner <sabre@nondot.org>2005-12-01 18:21:35 +0000
commit9ad17c9c9abfd6e011751d2fd2b03448e1dccb71 (patch)
tree3a128cbb6795788a0a9c91b5d25f8db54c9cdaeb
parent18c778f8be0b3a73ef43c2f8a335dbb2c6bdb0c6 (diff)
Promote line and column number information for our friendly 64-bit targets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24568 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/LegalizeDAG.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index e3d20e480f..0690c641db 100644
--- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -615,11 +615,18 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
Result = Tmp1;
break;
case TargetLowering::Legal:
- if (Tmp1 != Node->getOperand(0)) {
+ if (Tmp1 != Node->getOperand(0) ||
+ getTypeAction(Node->getOperand(1).getValueType()) == Promote) {
std::vector<SDOperand> Ops;
Ops.push_back(Tmp1);
- Ops.push_back(Node->getOperand(1)); // line # must be legal.
- Ops.push_back(Node->getOperand(2)); // col # must be legal.
+ if (getTypeAction(Node->getOperand(1).getValueType()) == Legal) {
+ Ops.push_back(Node->getOperand(1)); // line # must be legal.
+ Ops.push_back(Node->getOperand(2)); // col # must be legal.
+ } else {
+ // Otherwise promote them.
+ Ops.push_back(PromoteOp(Node->getOperand(1)));
+ Ops.push_back(PromoteOp(Node->getOperand(2)));
+ }
Ops.push_back(Node->getOperand(3)); // filename must be legal.
Ops.push_back(Node->getOperand(4)); // working dir # must be legal.
Result = DAG.getNode(ISD::LOCATION, MVT::Other, Ops);