OSDN Git Service

[X86] Autogenerate complete checks. NFC
authorCraig Topper <craig.topper@intel.com>
Wed, 23 Jan 2019 18:25:49 +0000 (18:25 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 23 Jan 2019 18:25:49 +0000 (18:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351970 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/X86/fmf-flags.ll

index 4fb2040..440756f 100644 (file)
@@ -8,11 +8,11 @@ define float @fast_recip_sqrt(float %x) {
 ; X64-LABEL: fast_recip_sqrt:
 ; X64:       # %bb.0:
 ; X64-NEXT:    rsqrtss %xmm0, %xmm1
-; X64-NEXT:    mulss   %xmm1, %xmm0
-; X64-NEXT:    mulss   %xmm1, %xmm0
-; X64-NEXT:    addss   {{.*}}(%rip), %xmm0
-; X64-NEXT:    mulss   {{.*}}(%rip), %xmm1
-; X64-NEXT:    mulss   %xmm1, %xmm0
+; X64-NEXT:    mulss %xmm1, %xmm0
+; X64-NEXT:    mulss %xmm1, %xmm0
+; X64-NEXT:    addss {{.*}}(%rip), %xmm0
+; X64-NEXT:    mulss {{.*}}(%rip), %xmm1
+; X64-NEXT:    mulss %xmm1, %xmm0
 ; X64-NEXT:    retq
 ;
 ; X86-LABEL: fast_recip_sqrt:
@@ -38,7 +38,7 @@ define float @fast_fmuladd_opts(float %a , float %b , float %c) {
 ; X86-LABEL: fast_fmuladd_opts:
 ; X86:       # %bb.0:
 ; X86-NEXT:    flds {{[0-9]+}}(%esp)
-; X86-NEXT:    fmuls {{.*}}
+; X86-NEXT:    fmuls {{\.LCPI.*}}
 ; X86-NEXT:    retl
   %res = call fast float @llvm.fmuladd.f32(float %a, float 2.0, float %a)
   ret float %res
@@ -51,7 +51,7 @@ define float @fast_fmuladd_opts(float %a , float %b , float %c) {
 define double @not_so_fast_mul_add(double %x) {
 ; X64-LABEL: not_so_fast_mul_add:
 ; X64:       # %bb.0:
-; X64-NEXT:    movsd {{.*}}(%rip), %xmm1
+; X64-NEXT:    movsd {{.*#+}} xmm1 = mem[0],zero
 ; X64-NEXT:    mulsd %xmm0, %xmm1
 ; X64-NEXT:    mulsd {{.*}}(%rip), %xmm0
 ; X64-NEXT:    movsd %xmm1, {{.*}}(%rip)
@@ -81,13 +81,13 @@ define float @not_so_fast_recip_sqrt(float %x) {
 ; X64-LABEL: not_so_fast_recip_sqrt:
 ; X64:       # %bb.0:
 ; X64-NEXT:    rsqrtss %xmm0, %xmm1
-; X64-NEXT:    sqrtss  %xmm0, %xmm2
-; X64-NEXT:    mulss   %xmm1, %xmm0
-; X64-NEXT:    mulss   %xmm1, %xmm0
-; X64-NEXT:    addss   {{.*}}(%rip), %xmm0
-; X64-NEXT:    mulss   {{.*}}(%rip), %xmm1
-; X64-NEXT:    mulss   %xmm1, %xmm0
-; X64-NEXT:    movss   %xmm2, sqrt1(%rip)
+; X64-NEXT:    sqrtss %xmm0, %xmm2
+; X64-NEXT:    mulss %xmm1, %xmm0
+; X64-NEXT:    mulss %xmm1, %xmm0
+; X64-NEXT:    addss {{.*}}(%rip), %xmm0
+; X64-NEXT:    mulss {{.*}}(%rip), %xmm1
+; X64-NEXT:    mulss %xmm1, %xmm0
+; X64-NEXT:    movss %xmm2, {{.*}}(%rip)
 ; X64-NEXT:    retq
 ;
 ; X86-LABEL: not_so_fast_recip_sqrt:
@@ -107,17 +107,32 @@ define float @not_so_fast_recip_sqrt(float %x) {
 }
 
 define float @div_arcp_by_const(half %x) {
-; X64-LABEL: .LCPI4_0:
-; X64-NEXT:  .long 1036828672
 ; X64-LABEL: div_arcp_by_const:
-; X64:       movzwl %ax, %edi
-; X64:       mulss .LCPI4_0(%rip), %xmm0 
+; X64:       # %bb.0:
+; X64-NEXT:    pushq %rax
+; X64-NEXT:    .cfi_def_cfa_offset 16
+; X64-NEXT:    callq __gnu_f2h_ieee
+; X64-NEXT:    movzwl %ax, %edi
+; X64-NEXT:    callq __gnu_h2f_ieee
+; X64-NEXT:    mulss {{.*}}(%rip), %xmm0
+; X64-NEXT:    popq %rax
+; X64-NEXT:    .cfi_def_cfa_offset 8
+; X64-NEXT:    retq
 ;
-; X86-LABEL: .LCPI4_0:
-; X86-NEXT:  .long 1036828672
 ; X86-LABEL: div_arcp_by_const:
-; X86:       movzwl %ax, %eax
-; X86:       fmuls .LCPI4_0
+; X86:       # %bb.0:
+; X86-NEXT:    pushl %eax
+; X86-NEXT:    .cfi_def_cfa_offset 8
+; X86-NEXT:    flds {{[0-9]+}}(%esp)
+; X86-NEXT:    fstps (%esp)
+; X86-NEXT:    calll __gnu_f2h_ieee
+; X86-NEXT:    movzwl %ax, %eax
+; X86-NEXT:    movl %eax, (%esp)
+; X86-NEXT:    calll __gnu_h2f_ieee
+; X86-NEXT:    fmuls {{\.LCPI.*}}
+; X86-NEXT:    popl %eax
+; X86-NEXT:    .cfi_def_cfa_offset 4
+; X86-NEXT:    retl
   %rcp = fdiv arcp half %x, 10.0
   %z = fpext half %rcp to float
   ret float %z