aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 624c5d1e8f..3d28fd85f6 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -94,8 +94,15 @@ void TargetLowering::computeRegisterProperties() {
// larger type.
SetValueTypeAction((MVT::ValueType)IntReg, 1, *this, TransformToType,
ValueTypeActions);
+ else
+ TransformToType[(MVT::ValueType)IntReg] = (MVT::ValueType)IntReg;
// If the target does not have native support for F32, promote it to F64.
if (!hasNativeSupportFor(MVT::f32))
SetValueTypeAction(MVT::f32, 1, *this, TransformToType, ValueTypeActions);
+ else
+ TransformToType[MVT::f32] = MVT::f32;
+
+ assert(hasNativeSupportFor(MVT::f64) && "Target does not support FP?");
+ TransformToType[MVT::f64] = MVT::f64;
}