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 -fast-isel | FileCheck %s --check-prefixes=FAST-X86
3
3
; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel=0 -fast-isel=0 | FileCheck %s --check-prefixes=SDAG-X86
4
- ; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=GISEL-X86
4
+ ; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X86
5
5
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -fast-isel | FileCheck %s --check-prefixes=FAST-X64
6
6
; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel=0 -fast-isel=0 | FileCheck %s --check-prefixes=SDAG-X64
7
- ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefixes=GISEL-X64
7
+ ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefixes=GISEL-X64
8
8
9
9
define float @test_powi_f32_i32 (float %Val , i32 %x ) nounwind {
10
10
; FAST-X86-LABEL: test_powi_f32_i32:
@@ -32,10 +32,10 @@ define float @test_powi_f32_i32(float %Val, i32 %x) nounwind {
32
32
; GISEL-X86-LABEL: test_powi_f32_i32:
33
33
; GISEL-X86: # %bb.0:
34
34
; GISEL-X86-NEXT: subl $12, %esp
35
- ; GISEL-X86-NEXT: flds {{[0-9]+}}(%esp)
36
35
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
37
- ; GISEL-X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
38
- ; GISEL-X86-NEXT: fstps (%esp)
36
+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
37
+ ; GISEL-X86-NEXT: movl %eax, (%esp)
38
+ ; GISEL-X86-NEXT: movl %ecx, {{[0-9]+}}(%esp)
39
39
; GISEL-X86-NEXT: calll __powisf2
40
40
; GISEL-X86-NEXT: addl $12, %esp
41
41
; GISEL-X86-NEXT: retl
@@ -53,7 +53,10 @@ define float @test_powi_f32_i32(float %Val, i32 %x) nounwind {
53
53
;
54
54
; GISEL-X64-LABEL: test_powi_f32_i32:
55
55
; GISEL-X64: # %bb.0:
56
- ; GISEL-X64-NEXT: jmp __powisf2@PLT # TAILCALL
56
+ ; GISEL-X64-NEXT: pushq %rax
57
+ ; GISEL-X64-NEXT: callq __powisf2
58
+ ; GISEL-X64-NEXT: popq %rax
59
+ ; GISEL-X64-NEXT: retq
57
60
%res = call float @llvm.powi.f32.i32 (float %Val , i32 %x )
58
61
ret float %res
59
62
}
@@ -83,13 +86,20 @@ define double @test_powi_f64_i32(double %Val, i32 %x) nounwind {
83
86
;
84
87
; GISEL-X86-LABEL: test_powi_f64_i32:
85
88
; GISEL-X86: # %bb.0:
86
- ; GISEL-X86-NEXT: subl $12, %esp
87
- ; GISEL-X86-NEXT: fldl {{[0-9]+}}(%esp)
88
- ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
89
- ; GISEL-X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
90
- ; GISEL-X86-NEXT: fstpl (%esp)
89
+ ; GISEL-X86-NEXT: pushl %esi
90
+ ; GISEL-X86-NEXT: subl $24, %esp
91
+ ; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax
92
+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
93
+ ; GISEL-X86-NEXT: movl 4(%eax), %eax
94
+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %edx
95
+ ; GISEL-X86-NEXT: xorl %esi, %esi
96
+ ; GISEL-X86-NEXT: addl %esp, %esi
97
+ ; GISEL-X86-NEXT: movl %ecx, (%esp)
98
+ ; GISEL-X86-NEXT: movl %eax, 4(%esi)
99
+ ; GISEL-X86-NEXT: movl %edx, {{[0-9]+}}(%esp)
91
100
; GISEL-X86-NEXT: calll __powidf2
92
- ; GISEL-X86-NEXT: addl $12, %esp
101
+ ; GISEL-X86-NEXT: addl $24, %esp
102
+ ; GISEL-X86-NEXT: popl %esi
93
103
; GISEL-X86-NEXT: retl
94
104
;
95
105
; FAST-X64-LABEL: test_powi_f64_i32:
@@ -105,7 +115,10 @@ define double @test_powi_f64_i32(double %Val, i32 %x) nounwind {
105
115
;
106
116
; GISEL-X64-LABEL: test_powi_f64_i32:
107
117
; GISEL-X64: # %bb.0:
108
- ; GISEL-X64-NEXT: jmp __powidf2@PLT # TAILCALL
118
+ ; GISEL-X64-NEXT: pushq %rax
119
+ ; GISEL-X64-NEXT: callq __powidf2
120
+ ; GISEL-X64-NEXT: popq %rax
121
+ ; GISEL-X64-NEXT: retq
109
122
%res = call double @llvm.powi.f64.i32 (double %Val , i32 %x )
110
123
ret double %res
111
124
}
@@ -138,8 +151,8 @@ define x86_fp80 @test_powi_f80_i32(x86_fp80 %Val, i32 %x) nounwind {
138
151
; GISEL-X86-NEXT: subl $28, %esp
139
152
; GISEL-X86-NEXT: fldt {{[0-9]+}}(%esp)
140
153
; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
141
- ; GISEL-X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
142
154
; GISEL-X86-NEXT: fstpt (%esp)
155
+ ; GISEL-X86-NEXT: movl %eax, {{[0-9]+}}(%esp)
143
156
; GISEL-X86-NEXT: calll __powixf2
144
157
; GISEL-X86-NEXT: addl $28, %esp
145
158
; GISEL-X86-NEXT: retl
@@ -167,7 +180,7 @@ define x86_fp80 @test_powi_f80_i32(x86_fp80 %Val, i32 %x) nounwind {
167
180
; GISEL-X64-NEXT: subq $24, %rsp
168
181
; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)
169
182
; GISEL-X64-NEXT: fstpt (%rsp)
170
- ; GISEL-X64-NEXT: callq __powixf2@PLT
183
+ ; GISEL-X64-NEXT: callq __powixf2
171
184
; GISEL-X64-NEXT: addq $24, %rsp
172
185
; GISEL-X64-NEXT: retq
173
186
%res = call x86_fp80 @llvm.powi.f80.i32 (x86_fp80 %Val , i32 %x )
0 commit comments