[PATCH] D38163: [X86] Updating the test case for FMF propagation.
Jatin Bhateja via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 22:50:05 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL313964: [X86] Updating the test case for FMF propagation. (authored by jbhateja).
Repository:
rL LLVM
https://reviews.llvm.org/D38163
Files:
llvm/trunk/test/CodeGen/X86/fmf-flags.ll
Index: llvm/trunk/test/CodeGen/X86/fmf-flags.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/fmf-flags.ll
+++ llvm/trunk/test/CodeGen/X86/fmf-flags.ll
@@ -48,45 +48,57 @@
; The multiply is strict.
+ at mul1 = common global double 0.000000e+00, align 4
+
define double @not_so_fast_mul_add(double %x) {
; X64-LABEL: not_so_fast_mul_add:
; X64: # BB#0:
; X64-NEXT: movsd {{.*#+}} xmm1 = mem[0],zero
; X64-NEXT: mulsd %xmm0, %xmm1
; X64-NEXT: addsd %xmm1, %xmm0
+; X64-NEXT: movsd %xmm1, {{.*}}(%rip)
; X64-NEXT: retq
;
; X86-LABEL: not_so_fast_mul_add:
; X86: # BB#0:
; X86-NEXT: fldl {{[0-9]+}}(%esp)
; X86-NEXT: fld %st(0)
; X86-NEXT: fmull {{\.LCPI.*}}
-; X86-NEXT: faddp %st(1)
+; X86-NEXT: fadd %st(0), %st(1)
+; X86-NEXT: fstpl mul1
; X86-NEXT: retl
%m = fmul double %x, 4.2
%a = fadd fast double %m, %x
+ store double %m, double* @mul1, align 4
ret double %a
}
; The sqrt is strict.
+ at sqrt1 = common global float 0.000000e+00, align 4
+
define float @not_so_fast_recip_sqrt(float %x) {
; X64-LABEL: not_so_fast_recip_sqrt:
; X64: # BB#0:
; X64-NEXT: sqrtss %xmm0, %xmm1
; X64-NEXT: movss {{.*#+}} xmm0 = mem[0],zero,zero,zero
; X64-NEXT: divss %xmm1, %xmm0
+; X64-NEXT: movss %xmm1, {{.*}}(%rip)
; X64-NEXT: retq
;
; X86-LABEL: not_so_fast_recip_sqrt:
; X86: # BB#0:
; X86-NEXT: flds {{[0-9]+}}(%esp)
; X86-NEXT: fsqrt
; X86-NEXT: fld1
-; X86-NEXT: fdivp %st(1)
+; X86-NEXT: fdiv %st(1)
+; X86-NEXT: fxch %st(1)
+; X86-NEXT: fstps sqrt1
; X86-NEXT: retl
%y = call float @llvm.sqrt.f32(float %x)
%z = fdiv fast float 1.0, %y
+ store float %y, float* @sqrt1, align 4
+ %ret = fadd float %z , 14.5
ret float %z
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38163.116304.patch
Type: text/x-patch
Size: 1829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170922/f0c961a8/attachment.bin>
More information about the llvm-commits
mailing list