summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-04-04 00:57:08 +0000
committerNate Begeman <natebegeman@mac.com>2005-04-04 00:57:08 +0000
commitcc00a7c42dac67a2461aa9da8e8db8e88619f89a (patch)
treedd11ccf811e4f3bd8a5249c7b562cb18afd855a3 /llvm/lib
parent4784489de2c4b47791d2a838d66ce0b0f4c1a7cd (diff)
downloadbcm5719-llvm-cc00a7c42dac67a2461aa9da8e8db8e88619f89a.tar.gz
bcm5719-llvm-cc00a7c42dac67a2461aa9da8e8db8e88619f89a.zip
Handle expanding arguments to ISD::TRUNCATE. This happens on PowerPC when
you have something like i16 = truncate i64. This fixes Regression/C/casts llvm-svn: 21073
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 248c7bafd5d..492071adba7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1126,7 +1126,9 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
Result = PromoteOp(Node->getOperand(0));
break;
case Expand:
- assert(0 && "Cannot handle expand yet");
+ ExpandOp(Node->getOperand(0), Tmp1, Tmp2);
+ // Truncate the low part of the expanded value to the result type
+ Result = DAG.getNode(ISD::TRUNCATE, VT, Tmp1);
}
break;
case ISD::SIGN_EXTEND:
OpenPOWER on IntegriCloud