aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/X86/scalar-fp-to-i32.ll')
-rw-r--r--llvm/test/CodeGen/X86/scalar-fp-to-i32.ll76
1 files changed, 54 insertions, 22 deletions
diff --git a/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll b/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
index 50a967e..ce9723b 100644
--- a/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
+++ b/llvm/test/CodeGen/X86/scalar-fp-to-i32.ll
@@ -762,11 +762,15 @@ define i32 @x_to_s32(x86_fp80 %a) nounwind {
define i32 @t_to_u32(fp128 %a) nounwind {
; X86-AVX512-WIN-LABEL: t_to_u32:
; X86-AVX512-WIN: # %bb.0:
-; X86-AVX512-WIN-NEXT: subl $16, %esp
-; X86-AVX512-WIN-NEXT: vmovups {{[0-9]+}}(%esp), %xmm0
+; X86-AVX512-WIN-NEXT: pushl %ebp
+; X86-AVX512-WIN-NEXT: movl %esp, %ebp
+; X86-AVX512-WIN-NEXT: andl $-16, %esp
+; X86-AVX512-WIN-NEXT: subl $32, %esp
+; X86-AVX512-WIN-NEXT: vmovups 8(%ebp), %xmm0
; X86-AVX512-WIN-NEXT: vmovups %xmm0, (%esp)
; X86-AVX512-WIN-NEXT: calll ___fixunstfsi
-; X86-AVX512-WIN-NEXT: addl $16, %esp
+; X86-AVX512-WIN-NEXT: movl %ebp, %esp
+; X86-AVX512-WIN-NEXT: popl %ebp
; X86-AVX512-WIN-NEXT: retl
;
; X86-AVX512-LIN-LABEL: t_to_u32:
@@ -797,12 +801,18 @@ define i32 @t_to_u32(fp128 %a) nounwind {
;
; X86-SSE-WIN-LABEL: t_to_u32:
; X86-SSE-WIN: # %bb.0:
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
+; X86-SSE-WIN-NEXT: pushl %ebp
+; X86-SSE-WIN-NEXT: movl %esp, %ebp
+; X86-SSE-WIN-NEXT: andl $-16, %esp
+; X86-SSE-WIN-NEXT: subl $16, %esp
+; X86-SSE-WIN-NEXT: pushl 20(%ebp)
+; X86-SSE-WIN-NEXT: pushl 16(%ebp)
+; X86-SSE-WIN-NEXT: pushl 12(%ebp)
+; X86-SSE-WIN-NEXT: pushl 8(%ebp)
; X86-SSE-WIN-NEXT: calll ___fixunstfsi
; X86-SSE-WIN-NEXT: addl $16, %esp
+; X86-SSE-WIN-NEXT: movl %ebp, %esp
+; X86-SSE-WIN-NEXT: popl %ebp
; X86-SSE-WIN-NEXT: retl
;
; X86-SSE-LIN-LABEL: t_to_u32:
@@ -835,12 +845,18 @@ define i32 @t_to_u32(fp128 %a) nounwind {
;
; X87-WIN-LABEL: t_to_u32:
; X87-WIN: # %bb.0:
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
+; X87-WIN-NEXT: pushl %ebp
+; X87-WIN-NEXT: movl %esp, %ebp
+; X87-WIN-NEXT: andl $-16, %esp
+; X87-WIN-NEXT: subl $16, %esp
+; X87-WIN-NEXT: pushl 20(%ebp)
+; X87-WIN-NEXT: pushl 16(%ebp)
+; X87-WIN-NEXT: pushl 12(%ebp)
+; X87-WIN-NEXT: pushl 8(%ebp)
; X87-WIN-NEXT: calll ___fixunstfsi
; X87-WIN-NEXT: addl $16, %esp
+; X87-WIN-NEXT: movl %ebp, %esp
+; X87-WIN-NEXT: popl %ebp
; X87-WIN-NEXT: retl
;
; X87-LIN-LABEL: t_to_u32:
@@ -860,11 +876,15 @@ define i32 @t_to_u32(fp128 %a) nounwind {
define i32 @t_to_s32(fp128 %a) nounwind {
; X86-AVX512-WIN-LABEL: t_to_s32:
; X86-AVX512-WIN: # %bb.0:
-; X86-AVX512-WIN-NEXT: subl $16, %esp
-; X86-AVX512-WIN-NEXT: vmovups {{[0-9]+}}(%esp), %xmm0
+; X86-AVX512-WIN-NEXT: pushl %ebp
+; X86-AVX512-WIN-NEXT: movl %esp, %ebp
+; X86-AVX512-WIN-NEXT: andl $-16, %esp
+; X86-AVX512-WIN-NEXT: subl $32, %esp
+; X86-AVX512-WIN-NEXT: vmovups 8(%ebp), %xmm0
; X86-AVX512-WIN-NEXT: vmovups %xmm0, (%esp)
; X86-AVX512-WIN-NEXT: calll ___fixtfsi
-; X86-AVX512-WIN-NEXT: addl $16, %esp
+; X86-AVX512-WIN-NEXT: movl %ebp, %esp
+; X86-AVX512-WIN-NEXT: popl %ebp
; X86-AVX512-WIN-NEXT: retl
;
; X86-AVX512-LIN-LABEL: t_to_s32:
@@ -895,12 +915,18 @@ define i32 @t_to_s32(fp128 %a) nounwind {
;
; X86-SSE-WIN-LABEL: t_to_s32:
; X86-SSE-WIN: # %bb.0:
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X86-SSE-WIN-NEXT: pushl {{[0-9]+}}(%esp)
+; X86-SSE-WIN-NEXT: pushl %ebp
+; X86-SSE-WIN-NEXT: movl %esp, %ebp
+; X86-SSE-WIN-NEXT: andl $-16, %esp
+; X86-SSE-WIN-NEXT: subl $16, %esp
+; X86-SSE-WIN-NEXT: pushl 20(%ebp)
+; X86-SSE-WIN-NEXT: pushl 16(%ebp)
+; X86-SSE-WIN-NEXT: pushl 12(%ebp)
+; X86-SSE-WIN-NEXT: pushl 8(%ebp)
; X86-SSE-WIN-NEXT: calll ___fixtfsi
; X86-SSE-WIN-NEXT: addl $16, %esp
+; X86-SSE-WIN-NEXT: movl %ebp, %esp
+; X86-SSE-WIN-NEXT: popl %ebp
; X86-SSE-WIN-NEXT: retl
;
; X86-SSE-LIN-LABEL: t_to_s32:
@@ -933,12 +959,18 @@ define i32 @t_to_s32(fp128 %a) nounwind {
;
; X87-WIN-LABEL: t_to_s32:
; X87-WIN: # %bb.0:
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
-; X87-WIN-NEXT: pushl {{[0-9]+}}(%esp)
+; X87-WIN-NEXT: pushl %ebp
+; X87-WIN-NEXT: movl %esp, %ebp
+; X87-WIN-NEXT: andl $-16, %esp
+; X87-WIN-NEXT: subl $16, %esp
+; X87-WIN-NEXT: pushl 20(%ebp)
+; X87-WIN-NEXT: pushl 16(%ebp)
+; X87-WIN-NEXT: pushl 12(%ebp)
+; X87-WIN-NEXT: pushl 8(%ebp)
; X87-WIN-NEXT: calll ___fixtfsi
; X87-WIN-NEXT: addl $16, %esp
+; X87-WIN-NEXT: movl %ebp, %esp
+; X87-WIN-NEXT: popl %ebp
; X87-WIN-NEXT: retl
;
; X87-LIN-LABEL: t_to_s32: