1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple powerpc64le-unknown-linux | FileCheck %s 3; RUN: llc < %s -mtriple powerpc64le-unknown-linux -debug-only=machine-scheduler \ 4; RUN: 2>&1 | FileCheck %s --check-prefix=LOG 5; REQUIRES: DEBUG 6 7define double @in_nostrict(double %a, double %b, double %c, double %d) { 8; CHECK-LABEL: in_nostrict: 9; CHECK: # %bb.0: # %entry 10; CHECK-NEXT: mffs 0 11; CHECK-NEXT: xsdivdp 1, 1, 2 12; CHECK-NEXT: xsadddp 1, 1, 3 13; CHECK-NEXT: xsadddp 0, 1, 0 14; CHECK-NEXT: mtfsf 255, 4 15; CHECK-NEXT: xsdivdp 1, 3, 4 16; CHECK-NEXT: xsadddp 1, 1, 2 17; CHECK-NEXT: xsadddp 1, 0, 1 18; CHECK-NEXT: blr 19; 20; LOG: *** MI Scheduling *** 21; LOG-NEXT: in_nostrict:%bb.0 entry 22; LOG: ExitSU: MTFSF 255, %{{[0-9]+}}:f8rc, 0, 0 23; LOG: *** MI Scheduling *** 24; LOG-NEXT: in_nostrict:%bb.0 entry 25; LOG: ExitSU: %{{[0-9]+}}:f8rc = MFFS implicit $rm 26; 27; LOG: *** MI Scheduling *** 28; LOG-NEXT: in_nostrict:%bb.0 entry 29; LOG: ExitSU: MTFSF 255, renamable $f{{[0-9]+}}, 0, 0 30entry: 31 %0 = tail call double @llvm.ppc.readflm() 32 %1 = fdiv double %a, %b 33 %2 = fadd double %1, %c 34 %3 = fadd double %2, %0 35 call double @llvm.ppc.setflm(double %d) 36 %5 = fdiv double %c, %d 37 %6 = fadd double %5, %b 38 %7 = fadd double %3, %6 39 ret double %7 40} 41 42define double @in_strict(double %a, double %b, double %c, double %d) #0 { 43; CHECK-LABEL: in_strict: 44; CHECK: # %bb.0: # %entry 45; CHECK-NEXT: mffs 0 46; CHECK-NEXT: xsdivdp 1, 1, 2 47; CHECK-NEXT: xsadddp 1, 1, 3 48; CHECK-NEXT: xsadddp 0, 1, 0 49; CHECK-NEXT: mtfsf 255, 4 50; CHECK-NEXT: xsdivdp 1, 3, 4 51; CHECK-NEXT: xsadddp 1, 1, 2 52; CHECK-NEXT: xsadddp 1, 0, 1 53; CHECK-NEXT: blr 54; 55; LOG: ***** MI Scheduling ***** 56; LOG-NEXT: in_strict:%bb.0 entry 57; LOG: ExitSU: MTFSF 255, %{{[0-9]+}}:f8rc, 0, 0 58; LOG: ***** MI Scheduling ***** 59; LOG-NEXT: in_strict:%bb.0 entry 60; LOG: ExitSU: %{{[0-9]+}}:f8rc = MFFS implicit $rm 61; 62; LOG: ***** MI Scheduling ***** 63; LOG-NEXT: in_strict:%bb.0 entry 64; LOG: ExitSU: MTFSF 255, renamable $f{{[0-9]+}}, 0, 0 65entry: 66 %0 = tail call double @llvm.ppc.readflm() 67 %1 = call double @llvm.experimental.constrained.fdiv.f64(double %a, double %b, metadata !"round.dynamic", metadata !"fpexcept.strict") #0 68 %2 = call double @llvm.experimental.constrained.fadd.f64(double %1, double %c, metadata !"round.dynamic", metadata !"fpexcept.strict") #0 69 %3 = call double @llvm.experimental.constrained.fadd.f64(double %2, double %0, metadata !"round.dynamic", metadata !"fpexcept.strict") #0 70 call double @llvm.ppc.setflm(double %d) 71 %5 = call double @llvm.experimental.constrained.fdiv.f64(double %c, double %d, metadata !"round.dynamic", metadata !"fpexcept.strict") #0 72 %6 = call double @llvm.experimental.constrained.fadd.f64(double %5, double %b, metadata !"round.dynamic", metadata !"fpexcept.strict") #0 73 %7 = call double @llvm.experimental.constrained.fadd.f64(double %3, double %6, metadata !"round.dynamic", metadata !"fpexcept.strict") #0 74 ret double %7 75} 76 77declare double @llvm.ppc.readflm() 78declare double @llvm.ppc.setflm(double) 79declare double @llvm.experimental.constrained.fadd.f64(double, double, metadata, metadata) 80declare double @llvm.experimental.constrained.fdiv.f64(double, double, metadata, metadata) 81 82attributes #0 = { strictfp } 83