These instructions have special lowering that may lower them to SSE
instructions. Prevent that if we don't want implicit uses of SSE. llvm-svn: 66877
This commit is contained in:
parent
afc74e2326
commit
798fd56d0f
|
@ -113,23 +113,26 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
|
||||||
setOperationAction(ISD::UINT_TO_FP , MVT::i16 , Promote);
|
setOperationAction(ISD::UINT_TO_FP , MVT::i16 , Promote);
|
||||||
|
|
||||||
if (Subtarget->is64Bit()) {
|
if (Subtarget->is64Bit()) {
|
||||||
setOperationAction(ISD::UINT_TO_FP , MVT::i64 , Expand);
|
|
||||||
setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote);
|
setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote);
|
||||||
|
setOperationAction(ISD::UINT_TO_FP , MVT::i64 , Expand);
|
||||||
} else {
|
} else {
|
||||||
if (X86ScalarSSEf64) {
|
if (!UseSoftFloat && !NoImplicitFloat && X86ScalarSSEf64) {
|
||||||
// We have an impenetrably clever algorithm for ui64->double only.
|
// We have an impenetrably clever algorithm for ui64->double only.
|
||||||
setOperationAction(ISD::UINT_TO_FP , MVT::i64 , Custom);
|
setOperationAction(ISD::UINT_TO_FP , MVT::i64 , Custom);
|
||||||
|
|
||||||
// We have faster algorithm for ui32->single only.
|
// We have faster algorithm for ui32->single only.
|
||||||
setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Custom);
|
setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Custom);
|
||||||
} else
|
} else {
|
||||||
setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote);
|
setOperationAction(ISD::UINT_TO_FP , MVT::i32 , Promote);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Promote i1/i8 SINT_TO_FP to larger SINT_TO_FP's, as X86 doesn't have
|
// Promote i1/i8 SINT_TO_FP to larger SINT_TO_FP's, as X86 doesn't have
|
||||||
// this operation.
|
// this operation.
|
||||||
setOperationAction(ISD::SINT_TO_FP , MVT::i1 , Promote);
|
setOperationAction(ISD::SINT_TO_FP , MVT::i1 , Promote);
|
||||||
setOperationAction(ISD::SINT_TO_FP , MVT::i8 , Promote);
|
setOperationAction(ISD::SINT_TO_FP , MVT::i8 , Promote);
|
||||||
|
|
||||||
|
if (!UseSoftFloat && !NoImplicitFloat) {
|
||||||
// SSE has no i16 to fp conversion, only i32
|
// SSE has no i16 to fp conversion, only i32
|
||||||
if (X86ScalarSSEf32) {
|
if (X86ScalarSSEf32) {
|
||||||
setOperationAction(ISD::SINT_TO_FP , MVT::i16 , Promote);
|
setOperationAction(ISD::SINT_TO_FP , MVT::i16 , Promote);
|
||||||
|
@ -139,6 +142,10 @@ X86TargetLowering::X86TargetLowering(X86TargetMachine &TM)
|
||||||
setOperationAction(ISD::SINT_TO_FP , MVT::i16 , Custom);
|
setOperationAction(ISD::SINT_TO_FP , MVT::i16 , Custom);
|
||||||
setOperationAction(ISD::SINT_TO_FP , MVT::i32 , Custom);
|
setOperationAction(ISD::SINT_TO_FP , MVT::i32 , Custom);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
setOperationAction(ISD::SINT_TO_FP , MVT::i16 , Promote);
|
||||||
|
setOperationAction(ISD::SINT_TO_FP , MVT::i32 , Promote);
|
||||||
|
}
|
||||||
|
|
||||||
// In 32-bit mode these are custom lowered. In 64-bit mode F32 and F64
|
// In 32-bit mode these are custom lowered. In 64-bit mode F32 and F64
|
||||||
// are Legal, f80 is custom lowered.
|
// are Legal, f80 is custom lowered.
|
||||||
|
|
Loading…
Reference in New Issue