mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[X86] Roll some loops. NFCI.
This commit is contained in:
parent
1e0d9ddb20
commit
5e69ec1678
@ -191,12 +191,10 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
|||||||
setTruncStoreAction(MVT::f64, MVT::f32, Expand);
|
setTruncStoreAction(MVT::f64, MVT::f32, Expand);
|
||||||
|
|
||||||
// SETOEQ and SETUNE require checking two conditions.
|
// SETOEQ and SETUNE require checking two conditions.
|
||||||
setCondCodeAction(ISD::SETOEQ, MVT::f32, Expand);
|
for (auto VT : {MVT::f32, MVT::f64, MVT::f80}) {
|
||||||
setCondCodeAction(ISD::SETOEQ, MVT::f64, Expand);
|
setCondCodeAction(ISD::SETOEQ, VT, Expand);
|
||||||
setCondCodeAction(ISD::SETOEQ, MVT::f80, Expand);
|
setCondCodeAction(ISD::SETUNE, VT, Expand);
|
||||||
setCondCodeAction(ISD::SETUNE, MVT::f32, Expand);
|
}
|
||||||
setCondCodeAction(ISD::SETUNE, MVT::f64, Expand);
|
|
||||||
setCondCodeAction(ISD::SETUNE, MVT::f80, Expand);
|
|
||||||
|
|
||||||
// Integer absolute.
|
// Integer absolute.
|
||||||
if (Subtarget.hasCMov()) {
|
if (Subtarget.hasCMov()) {
|
||||||
@ -361,47 +359,28 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
|||||||
setOperationPromotedToType(ISD::CTLZ , MVT::i8 , MVT::i32);
|
setOperationPromotedToType(ISD::CTLZ , MVT::i8 , MVT::i32);
|
||||||
setOperationPromotedToType(ISD::CTLZ_ZERO_UNDEF, MVT::i8 , MVT::i32);
|
setOperationPromotedToType(ISD::CTLZ_ZERO_UNDEF, MVT::i8 , MVT::i32);
|
||||||
} else {
|
} else {
|
||||||
setOperationAction(ISD::CTLZ , MVT::i8 , Custom);
|
for (auto VT : {MVT::i8, MVT::i16, MVT::i32, MVT::i64}) {
|
||||||
setOperationAction(ISD::CTLZ , MVT::i16 , Custom);
|
if (VT == MVT::i64 && !Subtarget.is64Bit())
|
||||||
setOperationAction(ISD::CTLZ , MVT::i32 , Custom);
|
continue;
|
||||||
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i8 , Custom);
|
setOperationAction(ISD::CTLZ , VT, Custom);
|
||||||
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i16 , Custom);
|
setOperationAction(ISD::CTLZ_ZERO_UNDEF, VT, Custom);
|
||||||
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i32 , Custom);
|
|
||||||
if (Subtarget.is64Bit()) {
|
|
||||||
setOperationAction(ISD::CTLZ , MVT::i64 , Custom);
|
|
||||||
setOperationAction(ISD::CTLZ_ZERO_UNDEF, MVT::i64, Custom);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special handling for half-precision floating point conversions.
|
for (auto Op : {ISD::FP16_TO_FP, ISD::STRICT_FP16_TO_FP, ISD::FP_TO_FP16,
|
||||||
// If we don't have F16C support, then lower half float conversions
|
ISD::STRICT_FP_TO_FP16}) {
|
||||||
// into library calls.
|
// Special handling for half-precision floating point conversions.
|
||||||
if (!Subtarget.useSoftFloat() && Subtarget.hasF16C()) {
|
// If we don't have F16C support, then lower half float conversions
|
||||||
setOperationAction(ISD::FP16_TO_FP, MVT::f32, Custom);
|
// into library calls.
|
||||||
setOperationAction(ISD::STRICT_FP16_TO_FP, MVT::f32, Custom);
|
setOperationAction(
|
||||||
setOperationAction(ISD::FP_TO_FP16, MVT::f32, Custom);
|
Op, MVT::f32,
|
||||||
setOperationAction(ISD::STRICT_FP_TO_FP16, MVT::f32, Custom);
|
(!Subtarget.useSoftFloat() && Subtarget.hasF16C()) ? Custom : Expand);
|
||||||
} else {
|
// There's never any support for operations beyond MVT::f32.
|
||||||
setOperationAction(ISD::FP16_TO_FP, MVT::f32, Expand);
|
setOperationAction(Op, MVT::f64, Expand);
|
||||||
setOperationAction(ISD::STRICT_FP16_TO_FP, MVT::f32, Expand);
|
setOperationAction(Op, MVT::f80, Expand);
|
||||||
setOperationAction(ISD::FP_TO_FP16, MVT::f32, Expand);
|
setOperationAction(Op, MVT::f128, Expand);
|
||||||
setOperationAction(ISD::STRICT_FP_TO_FP16, MVT::f32, Expand);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// There's never any support for operations beyond MVT::f32.
|
|
||||||
setOperationAction(ISD::FP16_TO_FP, MVT::f64, Expand);
|
|
||||||
setOperationAction(ISD::FP16_TO_FP, MVT::f80, Expand);
|
|
||||||
setOperationAction(ISD::FP16_TO_FP, MVT::f128, Expand);
|
|
||||||
setOperationAction(ISD::STRICT_FP16_TO_FP, MVT::f64, Expand);
|
|
||||||
setOperationAction(ISD::STRICT_FP16_TO_FP, MVT::f80, Expand);
|
|
||||||
setOperationAction(ISD::STRICT_FP16_TO_FP, MVT::f128, Expand);
|
|
||||||
setOperationAction(ISD::FP_TO_FP16, MVT::f64, Expand);
|
|
||||||
setOperationAction(ISD::FP_TO_FP16, MVT::f80, Expand);
|
|
||||||
setOperationAction(ISD::FP_TO_FP16, MVT::f128, Expand);
|
|
||||||
setOperationAction(ISD::STRICT_FP_TO_FP16, MVT::f64, Expand);
|
|
||||||
setOperationAction(ISD::STRICT_FP_TO_FP16, MVT::f80, Expand);
|
|
||||||
setOperationAction(ISD::STRICT_FP_TO_FP16, MVT::f128, Expand);
|
|
||||||
|
|
||||||
setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::f16, Expand);
|
setLoadExtAction(ISD::EXTLOAD, MVT::f32, MVT::f16, Expand);
|
||||||
setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f16, Expand);
|
setLoadExtAction(ISD::EXTLOAD, MVT::f64, MVT::f16, Expand);
|
||||||
setLoadExtAction(ISD::EXTLOAD, MVT::f80, MVT::f16, Expand);
|
setLoadExtAction(ISD::EXTLOAD, MVT::f80, MVT::f16, Expand);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user