summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-06-30 19:22:37 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-06-30 19:22:37 +0000
commitb5597e38f6c052926cd985bea8a0325e9fefdc60 (patch)
tree9f080c3e1dd29322435de447da81f2541000c597
parent937c71f2b37b04a7a0d7062365c57485fc9ae995 (diff)
downloadbcm5719-llvm-b5597e38f6c052926cd985bea8a0325e9fefdc60.tar.gz
bcm5719-llvm-b5597e38f6c052926cd985bea8a0325e9fefdc60.zip
FP EXTLOAD is not support on all archs, expand to LOAD and FP_EXTEND
llvm-svn: 22319
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 0f168435da4..bf97fea2a45 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -522,6 +522,15 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
AddLegalizedOperand(SDOperand(Node, 1), Result.getValue(1));
return Result.getValue(Op.ResNo);
case TargetLowering::Expand:
+ //f64 = EXTLOAD f32 should expand to LOAD, FP_EXTEND
+ if (SrcVT == MVT::f32 && Node->getValueType(0) == MVT::f64) {
+ SDOperand Load = DAG.getLoad(SrcVT, Tmp1, Tmp2, Node->getOperand(2));
+ Result =
+ DAG.getNode(ISD::FP_EXTEND, Node->getValueType(0), Load, SrcVT);
+ if (Op.ResNo)
+ return Load.getValue(1);
+ return Result;
+ }
assert(Node->getOpcode() != ISD::EXTLOAD &&
"EXTLOAD should always be supported!");
// Turn the unsupported load into an EXTLOAD followed by an explicit
OpenPOWER on IntegriCloud