[llvm] r351970 - [X86] Autogenerate complete checks. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 23 10:25:49 PST 2019
Author: ctopper
Date: Wed Jan 23 10:25:49 2019
New Revision: 351970
URL: http://llvm.org/viewvc/llvm-project?rev=351970&view=rev
Log:
[X86] Autogenerate complete checks. NFC
Modified:
llvm/trunk/test/CodeGen/X86/fmf-flags.ll
Modified: llvm/trunk/test/CodeGen/X86/fmf-flags.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fmf-flags.ll?rev=351970&r1=351969&r2=351970&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/fmf-flags.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fmf-flags.ll Wed Jan 23 10:25:49 2019
@@ -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
; 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
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(flo
; 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(flo
}
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
More information about the llvm-commits
mailing list