blob: c6855fc03fec182705a2040c1f03e306ab813149 [file] [log] [blame]
Daniel Sanders8008de52015-10-15 14:34:23 +00001; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___fixunsdfsi
Reed Kotler4cdaa7d2014-02-14 19:16:39 +00002
Daniel Sanders8008de52015-10-15 14:34:23 +00003; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___floatdidf
Reed Kotler4cdaa7d2014-02-14 19:16:39 +00004
Daniel Sanders8008de52015-10-15 14:34:23 +00005; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___floatdisf
Reed Kotler4cdaa7d2014-02-14 19:16:39 +00006
Daniel Sanders8008de52015-10-15 14:34:23 +00007; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___floatundidf
Reed Kotler4cdaa7d2014-02-14 19:16:39 +00008
Daniel Sanders8008de52015-10-15 14:34:23 +00009; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___fixsfdi
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000010
Daniel Sanders8008de52015-10-15 14:34:23 +000011; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___fixunsdfdi
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000012
Daniel Sanders8008de52015-10-15 14:34:23 +000013; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___fixdfdi
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000014
Daniel Sanders8008de52015-10-15 14:34:23 +000015; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___fixunssfsi
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000016
Daniel Sanders8008de52015-10-15 14:34:23 +000017; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___fixunssfdi
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000018
Daniel Sanders8008de52015-10-15 14:34:23 +000019; RUN: llc -mtriple=mipsel-linux-gnu -march=mipsel -mattr=mips16 -mattr=+soft-float -mips16-hard-float -relocation-model=static < %s | FileCheck %s -check-prefix=__call_stub_fp___floatundisf
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000020
21@ll1 = global i64 0, align 8
22@ll2 = global i64 0, align 8
23@ll3 = global i64 0, align 8
24@l1 = global i32 0, align 4
25@l2 = global i32 0, align 4
26@l3 = global i32 0, align 4
27@ull1 = global i64 0, align 8
28@ull2 = global i64 0, align 8
29@ull3 = global i64 0, align 8
30@ul1 = global i32 0, align 4
31@ul2 = global i32 0, align 4
32@ul3 = global i32 0, align 4
33@d1 = global double 0.000000e+00, align 8
34@d2 = global double 0.000000e+00, align 8
35@d3 = global double 0.000000e+00, align 8
36@d4 = global double 0.000000e+00, align 8
37@f1 = global float 0.000000e+00, align 4
38@f2 = global float 0.000000e+00, align 4
39@f3 = global float 0.000000e+00, align 4
40@f4 = global float 0.000000e+00, align 4
41
42; Function Attrs: nounwind
43define void @_Z3foov() #0 {
44entry:
David Blaikiea79ac142015-02-27 21:17:42 +000045 %0 = load double, double* @d1, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000046 %conv = fptosi double %0 to i64
47 store i64 %conv, i64* @ll1, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000048 %1 = load double, double* @d2, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000049 %conv1 = fptoui double %1 to i64
50 store i64 %conv1, i64* @ull1, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000051 %2 = load float, float* @f1, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000052 %conv2 = fptosi float %2 to i64
53 store i64 %conv2, i64* @ll2, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000054 %3 = load float, float* @f2, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000055 %conv3 = fptoui float %3 to i64
56 store i64 %conv3, i64* @ull2, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000057 %4 = load double, double* @d3, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000058 %conv4 = fptosi double %4 to i32
59 store i32 %conv4, i32* @l1, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000060 %5 = load double, double* @d4, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000061 %conv5 = fptoui double %5 to i32
62 store i32 %conv5, i32* @ul1, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000063 %6 = load float, float* @f3, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000064 %conv6 = fptosi float %6 to i32
65 store i32 %conv6, i32* @l2, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000066 %7 = load float, float* @f4, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000067 %conv7 = fptoui float %7 to i32
68 store i32 %conv7, i32* @ul2, align 4
69 ret void
70}
71
72; Function Attrs: nounwind
73define void @_Z3goov() #0 {
74entry:
David Blaikiea79ac142015-02-27 21:17:42 +000075 %0 = load i64, i64* @ll1, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000076 %conv = sitofp i64 %0 to double
77 store double %conv, double* @d1, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000078 %1 = load i64, i64* @ull1, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000079 %conv1 = uitofp i64 %1 to double
80 store double %conv1, double* @d2, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000081 %2 = load i64, i64* @ll2, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000082 %conv2 = sitofp i64 %2 to float
83 store float %conv2, float* @f1, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000084 %3 = load i64, i64* @ull2, align 8
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000085 %conv3 = uitofp i64 %3 to float
86 store float %conv3, float* @f2, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000087 %4 = load i32, i32* @l1, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000088 %conv4 = sitofp i32 %4 to double
89 store double %conv4, double* @d3, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000090 %5 = load i32, i32* @ul1, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000091 %conv5 = uitofp i32 %5 to double
92 store double %conv5, double* @d4, align 8
David Blaikiea79ac142015-02-27 21:17:42 +000093 %6 = load i32, i32* @l2, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000094 %conv6 = sitofp i32 %6 to float
95 store float %conv6, float* @f3, align 4
David Blaikiea79ac142015-02-27 21:17:42 +000096 %7 = load i32, i32* @ul2, align 4
Reed Kotler4cdaa7d2014-02-14 19:16:39 +000097 %conv7 = uitofp i32 %7 to float
98 store float %conv7, float* @f4, align 4
99 ret void
100}
101
102attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
103
104; __call_stub_fp___fixunsdfsi: __call_stub_fp___fixunsdfsi:
105; __call_stub_fp___floatdidf: __call_stub_fp___floatdidf:
106; __call_stub_fp___floatdisf: __call_stub_fp___floatdisf:
107; __call_stub_fp___floatundidf: __call_stub_fp___floatundidf:
108; __call_stub_fp___fixsfdi: __call_stub_fp___fixsfdi:
109; __call_stub_fp___fixunsdfdi: __call_stub_fp___fixunsdfdi:
110; __call_stub_fp___fixdfdi: __call_stub_fp___fixdfdi:
111; __call_stub_fp___fixunssfsi: __call_stub_fp___fixunssfsi:
112; __call_stub_fp___fixunssfdi: __call_stub_fp___fixunssfdi:
113; __call_stub_fp___floatundisf: __call_stub_fp___floatundisf:
114