summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-23 07:30:46 +0000
committerChris Lattner <sabre@nondot.org>2006-01-23 07:30:46 +0000
commit763dfd772314d19b33bc7e004ddff0d16295f1e7 (patch)
tree745b045f3d99ce83b1cd4d0a6bb5c37dbadca144
parentc7243b5b7016724f42531cdd314bc1eafe49179c (diff)
downloadbcm5719-llvm-763dfd772314d19b33bc7e004ddff0d16295f1e7.tar.gz
bcm5719-llvm-763dfd772314d19b33bc7e004ddff0d16295f1e7.zip
Fix Regression/CodeGen/SparcV8/2006-01-22-BitConvertLegalize.ll by making
sure that the result of expanding a BIT_CONVERT node is itself legalized. llvm-svn: 25538
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 245f8477485..77e721e8b76 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2501,14 +2501,16 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
break;
case ISD::BIT_CONVERT:
- if (!isTypeLegal(Node->getOperand(0).getValueType()))
+ if (!isTypeLegal(Node->getOperand(0).getValueType())) {
Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0));
- else {
+ Result = LegalizeOp(Result);
+ } else {
switch (TLI.getOperationAction(ISD::BIT_CONVERT,
Node->getOperand(0).getValueType())) {
default: assert(0 && "Unknown operation action!");
case TargetLowering::Expand:
Result = ExpandBIT_CONVERT(Node->getValueType(0), Node->getOperand(0));
+ Result = LegalizeOp(Result);
break;
case TargetLowering::Legal:
Tmp1 = LegalizeOp(Node->getOperand(0));
OpenPOWER on IntegriCloud