[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Evan Cheng
evan.cheng at apple.com
Tue Dec 12 19:20:13 PST 2006
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.438 -> 1.439
---
Log message:
Expand (f64 extload f32) to (f64 fp_ext (load f32)) if f64 type action is expand.
---
Diffs of the changes: (+10 -0)
LegalizeDAG.cpp | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.438 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.439
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.438 Tue Dec 12 20:38:13 2006
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Tue Dec 12 21:19:57 2006
@@ -4547,6 +4547,16 @@
std::swap(Lo, Hi);
} else {
MVT::ValueType EVT = LD->getLoadedVT();
+
+ if (VT == MVT::f64 && EVT == MVT::f32) {
+ // f64 = EXTLOAD f32 should expand to LOAD, FP_EXTEND
+ SDOperand Load = DAG.getLoad(EVT, Ch, Ptr, LD->getSrcValue(),
+ LD->getSrcValueOffset());
+ // Remember that we legalized the chain.
+ AddLegalizedOperand(SDOperand(Node, 1), LegalizeOp(Load.getValue(1)));
+ ExpandOp(DAG.getNode(ISD::FP_EXTEND, VT, Load), Lo, Hi);
+ break;
+ }
if (EVT == NVT)
Lo = DAG.getLoad(NVT, Ch, Ptr, LD->getSrcValue(),
More information about the llvm-commits
mailing list