Skip to content

Commit 3cce02f

Browse files
author
mattarde
committed
fix tesT
1 parent 193fb0b commit 3cce02f

File tree

2 files changed

+62
-5
lines changed

2 files changed

+62
-5
lines changed

llvm/test/CodeGen/X86/isel-floor.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,3 @@ define x86_fp80 @floor_f80(x86_fp80 %a) nounwind readnone {
139139
%c = call x86_fp80 @llvm.floor.f80(x86_fp80 %a)
140140
ret x86_fp80 %c
141141
}
142-

llvm/test/CodeGen/X86/isel-ftrunc.ll

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
22
; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s --check-prefixes=X64,DAG-X64
33
; RUN: llc < %s -mtriple=x86_64-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X64,FASTISEL-X64
4-
; RUN: llc < %s -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86
5-
; RUN: llc < %s -mtriple=i686-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X86
4+
; RUN: llc < %s -mtriple=i686-linux-gnu | FileCheck %s --check-prefixes=X86,DAG-X86
5+
; RUN: llc < %s -mtriple=i686-linux-gnu -fast-isel | FileCheck %s --check-prefixes=X86,FASTISEL-X86
66
; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X64
7-
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X86
7+
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X86,GISEL-X86
88

99
define float @trunc_f32(float %a) nounwind readnone {
1010
; DAG-X64-LABEL: trunc_f32:
@@ -18,12 +18,39 @@ define float @trunc_f32(float %a) nounwind readnone {
1818
; FASTISEL-X64-NEXT: popq %rax
1919
; FASTISEL-X64-NEXT: retq
2020
;
21+
; DAG-X86-LABEL: trunc_f32:
22+
; DAG-X86: # %bb.0:
23+
; DAG-X86-NEXT: subl $12, %esp
24+
; DAG-X86-NEXT: flds {{[0-9]+}}(%esp)
25+
; DAG-X86-NEXT: fstps (%esp)
26+
; DAG-X86-NEXT: calll truncf
27+
; DAG-X86-NEXT: addl $12, %esp
28+
; DAG-X86-NEXT: retl
29+
;
30+
; FASTISEL-X86-LABEL: trunc_f32:
31+
; FASTISEL-X86: # %bb.0:
32+
; FASTISEL-X86-NEXT: subl $12, %esp
33+
; FASTISEL-X86-NEXT: flds {{[0-9]+}}(%esp)
34+
; FASTISEL-X86-NEXT: fstps (%esp)
35+
; FASTISEL-X86-NEXT: calll truncf
36+
; FASTISEL-X86-NEXT: addl $12, %esp
37+
; FASTISEL-X86-NEXT: retl
38+
;
2139
; GISEL-X64-LABEL: trunc_f32:
2240
; GISEL-X64: # %bb.0:
2341
; GISEL-X64-NEXT: pushq %rax
2442
; GISEL-X64-NEXT: callq truncf
2543
; GISEL-X64-NEXT: popq %rax
2644
; GISEL-X64-NEXT: retq
45+
;
46+
; GISEL-X86-LABEL: trunc_f32:
47+
; GISEL-X86: # %bb.0:
48+
; GISEL-X86-NEXT: subl $12, %esp
49+
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
50+
; GISEL-X86-NEXT: movl %eax, (%esp)
51+
; GISEL-X86-NEXT: calll truncf
52+
; GISEL-X86-NEXT: addl $12, %esp
53+
; GISEL-X86-NEXT: retl
2754
%c = call float @llvm.trunc.f32(float %a)
2855
ret float %c
2956
}
@@ -40,12 +67,44 @@ define double @trunc_f64(double %a) nounwind readnone {
4067
; FASTISEL-X64-NEXT: popq %rax
4168
; FASTISEL-X64-NEXT: retq
4269
;
70+
; DAG-X86-LABEL: trunc_f64:
71+
; DAG-X86: # %bb.0:
72+
; DAG-X86-NEXT: subl $12, %esp
73+
; DAG-X86-NEXT: fldl {{[0-9]+}}(%esp)
74+
; DAG-X86-NEXT: fstpl (%esp)
75+
; DAG-X86-NEXT: calll trunc
76+
; DAG-X86-NEXT: addl $12, %esp
77+
; DAG-X86-NEXT: retl
78+
;
79+
; FASTISEL-X86-LABEL: trunc_f64:
80+
; FASTISEL-X86: # %bb.0:
81+
; FASTISEL-X86-NEXT: subl $12, %esp
82+
; FASTISEL-X86-NEXT: fldl {{[0-9]+}}(%esp)
83+
; FASTISEL-X86-NEXT: fstpl (%esp)
84+
; FASTISEL-X86-NEXT: calll trunc
85+
; FASTISEL-X86-NEXT: addl $12, %esp
86+
; FASTISEL-X86-NEXT: retl
87+
;
4388
; GISEL-X64-LABEL: trunc_f64:
4489
; GISEL-X64: # %bb.0:
4590
; GISEL-X64-NEXT: pushq %rax
4691
; GISEL-X64-NEXT: callq trunc
4792
; GISEL-X64-NEXT: popq %rax
4893
; GISEL-X64-NEXT: retq
94+
;
95+
; GISEL-X86-LABEL: trunc_f64:
96+
; GISEL-X86: # %bb.0:
97+
; GISEL-X86-NEXT: subl $12, %esp
98+
; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax
99+
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
100+
; GISEL-X86-NEXT: movl 4(%eax), %eax
101+
; GISEL-X86-NEXT: xorl %edx, %edx
102+
; GISEL-X86-NEXT: addl %esp, %edx
103+
; GISEL-X86-NEXT: movl %ecx, (%esp)
104+
; GISEL-X86-NEXT: movl %eax, 4(%edx)
105+
; GISEL-X86-NEXT: calll trunc
106+
; GISEL-X86-NEXT: addl $12, %esp
107+
; GISEL-X86-NEXT: retl
49108
%c = call double @llvm.trunc.f64(double %a)
50109
ret double %c
51110
}
@@ -80,4 +139,3 @@ define x86_fp80 @trunc_f80(x86_fp80 %a) nounwind readnone {
80139
%c = call x86_fp80 @llvm.trunc.f80(x86_fp80 %a)
81140
ret x86_fp80 %c
82141
}
83-

0 commit comments

Comments
 (0)