mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
[X86] Mark fp128 FMA as LibCall instead of Expand. Add STRICT_FMA as well.
The Expand code would fall back to LibCall, but this makes it more explicit.
This commit is contained in:
parent
8ec00b9e73
commit
6271249f2e
@ -674,7 +674,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
|
||||
setOperationAction(ISD::STRICT_FDIV, MVT::f128, LibCall);
|
||||
setOperationAction(ISD::FMUL, MVT::f128, LibCall);
|
||||
setOperationAction(ISD::STRICT_FMUL, MVT::f128, LibCall);
|
||||
setOperationAction(ISD::FMA, MVT::f128, Expand);
|
||||
setOperationAction(ISD::FMA, MVT::f128, LibCall);
|
||||
setOperationAction(ISD::STRICT_FMA, MVT::f128, LibCall);
|
||||
|
||||
setOperationAction(ISD::FABS, MVT::f128, Custom);
|
||||
setOperationAction(ISD::FNEG, MVT::f128, Custom);
|
||||
|
@ -54,9 +54,22 @@ entry:
|
||||
ret fp128 %div
|
||||
}
|
||||
|
||||
define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
|
||||
; CHECK-LABEL: fma:
|
||||
; CHECK: # %bb.0: # %entry
|
||||
; CHECK-NEXT: pushq %rax
|
||||
; CHECK-NEXT: callq fmal
|
||||
; CHECK-NEXT: popq %rax
|
||||
; CHECK-NEXT: retq
|
||||
entry:
|
||||
%fma = call fp128 @llvm.experimental.constrained.fma.f128(fp128 %x, fp128 %y, fp128 %z, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
|
||||
ret fp128 %fma
|
||||
}
|
||||
|
||||
attributes #0 = { strictfp }
|
||||
|
||||
declare fp128 @llvm.experimental.constrained.fadd.f128(fp128, fp128, metadata, metadata)
|
||||
declare fp128 @llvm.experimental.constrained.fsub.f128(fp128, fp128, metadata, metadata)
|
||||
declare fp128 @llvm.experimental.constrained.fmul.f128(fp128, fp128, metadata, metadata)
|
||||
declare fp128 @llvm.experimental.constrained.fdiv.f128(fp128, fp128, metadata, metadata)
|
||||
declare fp128 @llvm.experimental.constrained.fma.f128(fp128, fp128, fp128, metadata, metadata)
|
||||
|
Loading…
Reference in New Issue
Block a user