[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Dale Johannesen
dalej at apple.com
Thu Jun 7 14:07:37 PDT 2007
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.457 -> 1.458
---
Log message:
Do not change the size of function arguments. PR 1489: http://llvm.org/PR1489 .
---
Diffs of the changes: (+9 -1)
SelectionDAGISel.cpp | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.457 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.458
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.457 Wed Jun 6 05:05:18 2007
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Thu Jun 7 16:07:15 2007
@@ -3993,7 +3993,15 @@
Op = DAG.getNode(ExtOp, getTypeToTransformTo(VT), Op);
} else {
assert(MVT::isFloatingPoint(VT) && "Not int or FP?");
- Op = DAG.getNode(ISD::FP_EXTEND, getTypeToTransformTo(VT), Op);
+ // A true promotion would change the size of the argument.
+ // Instead, pretend this is an int. If FP objects are not
+ // passed the same as ints, the original type should be Legal
+ // and we should not get here.
+ Op = DAG.getNode(ISD::BIT_CONVERT,
+ VT==MVT::f32 ? MVT::i32 :
+ (VT==MVT::f64 ? MVT::i64 :
+ MVT::Other),
+ Op);
}
Ops.push_back(Op);
Ops.push_back(DAG.getConstant(Flags, MVT::i32));
More information about the llvm-commits
mailing list