1
1
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2
2
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel=0 | FileCheck %s --check-prefixes=X86,SDAG-X86
3
- ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel=0 | FileCheck %s --check-prefixes=X64, SDAG-X64
4
- ; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=X86,GISEL-X86
5
- ; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=X64, GISEL-X64
3
+ ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel=0 | FileCheck %s --check-prefixes=SDAG-X64
4
+ ; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=X86,GISEL-X86
5
+ ; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X64
6
6
7
7
define float @use_acosf32 (float %a ) nounwind {
8
- ; X86-LABEL: use_acosf32:
9
- ; X86: # %bb.0:
10
- ; X86-NEXT: subl $12, %esp
11
- ; X86-NEXT: flds {{[0-9]+}}(%esp)
12
- ; X86-NEXT: fstps (%esp)
13
- ; X86-NEXT: calll acosf
14
- ; X86-NEXT: addl $12, %esp
15
- ; X86-NEXT: retl
8
+ ; SDAG- X86-LABEL: use_acosf32:
9
+ ; SDAG- X86: # %bb.0:
10
+ ; SDAG- X86-NEXT: subl $12, %esp
11
+ ; SDAG- X86-NEXT: flds {{[0-9]+}}(%esp)
12
+ ; SDAG- X86-NEXT: fstps (%esp)
13
+ ; SDAG- X86-NEXT: calll acosf
14
+ ; SDAG- X86-NEXT: addl $12, %esp
15
+ ; SDAG- X86-NEXT: retl
16
16
;
17
- ; X64-LABEL: use_acosf32:
18
- ; X64: # %bb.0:
19
- ; X64-NEXT: jmp acosf@PLT # TAILCALL
17
+ ; SDAG-X64-LABEL: use_acosf32:
18
+ ; SDAG-X64: # %bb.0:
19
+ ; SDAG-X64-NEXT: jmp acosf@PLT # TAILCALL
20
+ ;
21
+ ; GISEL-X86-LABEL: use_acosf32:
22
+ ; GISEL-X86: # %bb.0:
23
+ ; GISEL-X86-NEXT: subl $12, %esp
24
+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
25
+ ; GISEL-X86-NEXT: movl %eax, (%esp)
26
+ ; GISEL-X86-NEXT: calll acosf
27
+ ; GISEL-X86-NEXT: addl $12, %esp
28
+ ; GISEL-X86-NEXT: retl
29
+ ;
30
+ ; GISEL-X64-LABEL: use_acosf32:
31
+ ; GISEL-X64: # %bb.0:
32
+ ; GISEL-X64-NEXT: pushq %rax
33
+ ; GISEL-X64-NEXT: callq acosf
34
+ ; GISEL-X64-NEXT: popq %rax
35
+ ; GISEL-X64-NEXT: retq
20
36
%x = call float @llvm.acos.f32 (float %a )
21
37
ret float %x
22
38
}
23
39
24
40
define double @use_acosf64 (double %a ) nounwind {
25
- ; X86-LABEL: use_acosf64:
26
- ; X86: # %bb.0:
27
- ; X86-NEXT: subl $12, %esp
28
- ; X86-NEXT: fldl {{[0-9]+}}(%esp)
29
- ; X86-NEXT: fstpl (%esp)
30
- ; X86-NEXT: calll acos
31
- ; X86-NEXT: addl $12, %esp
32
- ; X86-NEXT: retl
41
+ ; SDAG- X86-LABEL: use_acosf64:
42
+ ; SDAG- X86: # %bb.0:
43
+ ; SDAG- X86-NEXT: subl $12, %esp
44
+ ; SDAG- X86-NEXT: fldl {{[0-9]+}}(%esp)
45
+ ; SDAG- X86-NEXT: fstpl (%esp)
46
+ ; SDAG- X86-NEXT: calll acos
47
+ ; SDAG- X86-NEXT: addl $12, %esp
48
+ ; SDAG- X86-NEXT: retl
33
49
;
34
- ; X64-LABEL: use_acosf64:
35
- ; X64: # %bb.0:
36
- ; X64-NEXT: jmp acos@PLT # TAILCALL
50
+ ; SDAG-X64-LABEL: use_acosf64:
51
+ ; SDAG-X64: # %bb.0:
52
+ ; SDAG-X64-NEXT: jmp acos@PLT # TAILCALL
53
+ ;
54
+ ; GISEL-X86-LABEL: use_acosf64:
55
+ ; GISEL-X86: # %bb.0:
56
+ ; GISEL-X86-NEXT: subl $12, %esp
57
+ ; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax
58
+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
59
+ ; GISEL-X86-NEXT: movl 4(%eax), %eax
60
+ ; GISEL-X86-NEXT: xorl %edx, %edx
61
+ ; GISEL-X86-NEXT: addl %esp, %edx
62
+ ; GISEL-X86-NEXT: movl %ecx, (%esp)
63
+ ; GISEL-X86-NEXT: movl %eax, 4(%edx)
64
+ ; GISEL-X86-NEXT: calll acos
65
+ ; GISEL-X86-NEXT: addl $12, %esp
66
+ ; GISEL-X86-NEXT: retl
67
+ ;
68
+ ; GISEL-X64-LABEL: use_acosf64:
69
+ ; GISEL-X64: # %bb.0:
70
+ ; GISEL-X64-NEXT: pushq %rax
71
+ ; GISEL-X64-NEXT: callq acos
72
+ ; GISEL-X64-NEXT: popq %rax
73
+ ; GISEL-X64-NEXT: retq
37
74
%x = call double @llvm.acos.f64 (double %a )
38
75
ret double %x
39
76
}
@@ -48,23 +85,27 @@ define x86_fp80 @use_acosf80(x86_fp80 %a) nounwind {
48
85
; X86-NEXT: addl $12, %esp
49
86
; X86-NEXT: retl
50
87
;
51
- ; X64-LABEL: use_acosf80:
52
- ; X64: # %bb.0:
53
- ; X64-NEXT: subq $24, %rsp
54
- ; X64-NEXT: fldt {{[0-9]+}}(%rsp)
55
- ; X64-NEXT: fstpt (%rsp)
56
- ; X64-NEXT: callq acosl@PLT
57
- ; X64-NEXT: addq $24, %rsp
58
- ; X64-NEXT: retq
88
+ ; SDAG-X64-LABEL: use_acosf80:
89
+ ; SDAG-X64: # %bb.0:
90
+ ; SDAG-X64-NEXT: subq $24, %rsp
91
+ ; SDAG-X64-NEXT: fldt {{[0-9]+}}(%rsp)
92
+ ; SDAG-X64-NEXT: fstpt (%rsp)
93
+ ; SDAG-X64-NEXT: callq acosl@PLT
94
+ ; SDAG-X64-NEXT: addq $24, %rsp
95
+ ; SDAG-X64-NEXT: retq
96
+ ;
97
+ ; GISEL-X64-LABEL: use_acosf80:
98
+ ; GISEL-X64: # %bb.0:
99
+ ; GISEL-X64-NEXT: subq $24, %rsp
100
+ ; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)
101
+ ; GISEL-X64-NEXT: fstpt (%rsp)
102
+ ; GISEL-X64-NEXT: callq acosl
103
+ ; GISEL-X64-NEXT: addq $24, %rsp
104
+ ; GISEL-X64-NEXT: retq
59
105
%x = call x86_fp80 @llvm.acos.f80 (x86_fp80 %a )
60
106
ret x86_fp80 %x
61
107
}
62
108
63
109
declare float @llvm.acos.f32 (float )
64
110
declare double @llvm.acos.f64 (double )
65
111
declare x86_fp80 @llvm.acos.f80 (x86_fp80 )
66
- ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
67
- ; GISEL-X64: {{.*}}
68
- ; GISEL-X86: {{.*}}
69
- ; SDAG-X64: {{.*}}
70
- ; SDAG-X86: {{.*}}
0 commit comments