1010; RUN: llc -mtriple=x86_64-apple-xros8.0 < %s | FileCheck -check-prefix=APPLE %s
1111; RUN: llc -mtriple=x86_64-apple-driverkit < %s | FileCheck -check-prefix=APPLE %s
1212; RUN: llc -mtriple=x86_64-apple-driverkit24.0 < %s | FileCheck -check-prefix=APPLE %s
13- ; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefix=GISEL-X86
14- ; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=2 | FileCheck %s --check-prefix=GISEL-X64
13+ ; RUN: llc < %s -mtriple=i686-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL-X86
14+ ; RUN: llc < %s -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=1 | FileCheck %s --check-prefix=GISEL-X64
1515
1616; RUN: not llc -mtriple=x86_64-apple-macos10.8 -filetype=null %s 2>&1 | FileCheck -check-prefix=ERR %s
1717; Check exp10/exp10f is emitted as __exp10/__exp10f on assorted systems.
@@ -30,15 +30,18 @@ define float @test_exp10_f32(float %x) nounwind {
3030; GISEL-X86-LABEL: test_exp10_f32:
3131; GISEL-X86: # %bb.0:
3232; GISEL-X86-NEXT: subl $12, %esp
33- ; GISEL-X86-NEXT: flds {{[0-9]+}}(%esp)
34- ; GISEL-X86-NEXT: fstps (%esp)
33+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %eax
34+ ; GISEL-X86-NEXT: movl %eax, (%esp)
3535; GISEL-X86-NEXT: calll exp10f
3636; GISEL-X86-NEXT: addl $12, %esp
3737; GISEL-X86-NEXT: retl
3838;
3939; GISEL-X64-LABEL: test_exp10_f32:
4040; GISEL-X64: # %bb.0:
41- ; GISEL-X64-NEXT: jmp exp10f@PLT # TAILCALL
41+ ; GISEL-X64-NEXT: pushq %rax
42+ ; GISEL-X64-NEXT: callq exp10f
43+ ; GISEL-X64-NEXT: popq %rax
44+ ; GISEL-X64-NEXT: retq
4245 %ret = call float @llvm.exp10.f32 (float %x )
4346 ret float %ret
4447}
@@ -55,15 +58,23 @@ define double @test_exp10_f64(double %x) nounwind {
5558; GISEL-X86-LABEL: test_exp10_f64:
5659; GISEL-X86: # %bb.0:
5760; GISEL-X86-NEXT: subl $12, %esp
58- ; GISEL-X86-NEXT: fldl {{[0-9]+}}(%esp)
59- ; GISEL-X86-NEXT: fstpl (%esp)
61+ ; GISEL-X86-NEXT: leal {{[0-9]+}}(%esp), %eax
62+ ; GISEL-X86-NEXT: movl {{[0-9]+}}(%esp), %ecx
63+ ; GISEL-X86-NEXT: movl 4(%eax), %eax
64+ ; GISEL-X86-NEXT: xorl %edx, %edx
65+ ; GISEL-X86-NEXT: addl %esp, %edx
66+ ; GISEL-X86-NEXT: movl %ecx, (%esp)
67+ ; GISEL-X86-NEXT: movl %eax, 4(%edx)
6068; GISEL-X86-NEXT: calll exp10
6169; GISEL-X86-NEXT: addl $12, %esp
6270; GISEL-X86-NEXT: retl
6371;
6472; GISEL-X64-LABEL: test_exp10_f64:
6573; GISEL-X64: # %bb.0:
66- ; GISEL-X64-NEXT: jmp exp10@PLT # TAILCALL
74+ ; GISEL-X64-NEXT: pushq %rax
75+ ; GISEL-X64-NEXT: callq exp10
76+ ; GISEL-X64-NEXT: popq %rax
77+ ; GISEL-X64-NEXT: retq
6778 %ret = call double @llvm.exp10.f64 (double %x )
6879 ret double %ret
6980}
@@ -101,7 +112,7 @@ define x86_fp80 @test_exp10_f80(x86_fp80 %x) nounwind {
101112; GISEL-X64-NEXT: subq $24, %rsp
102113; GISEL-X64-NEXT: fldt {{[0-9]+}}(%rsp)
103114; GISEL-X64-NEXT: fstpt (%rsp)
104- ; GISEL-X64-NEXT: callq exp10l@PLT
115+ ; GISEL-X64-NEXT: callq exp10l
105116; GISEL-X64-NEXT: addq $24, %rsp
106117; GISEL-X64-NEXT: retq
107118 %ret = call x86_fp80 @llvm.exp10.f80 (x86_fp80 %x )
0 commit comments