blob: d8f76bb989e75cfe3275815e2c1b18aa0c39ae8d [file] [log] [blame]
Nemanja Ivanovicf02def62015-05-21 19:32:49 +00001; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
2; RUN: llc < %s -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
3@a = global float 3.000000e+00, align 4
4@b = global float 4.000000e+00, align 4
5@c = global double 3.000000e+00, align 8
6@d = global double 4.000000e+00, align 8
7
8; Function Attrs: nounwind
9define float @emit_xsaddsp() {
10entry:
11 %0 = load float, float* @a, align 4
12 %1 = load float, float* @b, align 4
13 %add = fadd float %0, %1
14 ret float %add
15; CHECK-LABEL: @emit_xsaddsp
16; CHECK: xsaddsp {{[0-9]+}}
17}
18
19; Function Attrs: nounwind
20define float @emit_xssubsp() {
21entry:
22 %0 = load float, float* @a, align 4
23 %1 = load float, float* @b, align 4
24 %sub = fsub float %0, %1
25 ret float %sub
26; CHECK-LABEL: @emit_xssubsp
27; CHECK: xssubsp {{[0-9]+}}
28}
29
30; Function Attrs: nounwind
31define float @emit_xsdivsp() {
32entry:
33 %0 = load float, float* @a, align 4
34 %1 = load float, float* @b, align 4
35 %div = fdiv float %0, %1
36 ret float %div
37; CHECK-LABEL: @emit_xsdivsp
38; CHECK: xsdivsp {{[0-9]+}}
39}
40
41; Function Attrs: nounwind
42define float @emit_xsmulsp() {
43entry:
44 %0 = load float, float* @a, align 4
45 %1 = load float, float* @b, align 4
46 %mul = fmul float %0, %1
47 ret float %mul
48; CHECK-LABEL: @emit_xsmulsp
49; CHECK: xsmulsp {{[0-9]+}}
50}
51
52; Function Attrs: nounwind
53define float @emit_xssqrtsp() {
54entry:
55 %0 = load float, float* @b, align 4
56 %call = call float @sqrtf(float %0)
57 ret float %call
58; CHECK-LABEL: @emit_xssqrtsp
59; CHECK: xssqrtsp {{[0-9]+}}
60}
61
62; Function Attrs: nounwind
63declare float @sqrtf(float)
64
65; Function Attrs: nounwind
66define double @emit_xsadddp() {
67entry:
68 %0 = load double, double* @c, align 8
69 %1 = load double, double* @d, align 8
70 %add = fadd double %0, %1
71 ret double %add
72; CHECK-LABEL: @emit_xsadddp
73; CHECK: xsadddp {{[0-9]+}}
74}
75
76; Function Attrs: nounwind
77define double @emit_xssubdp() {
78entry:
79 %0 = load double, double* @c, align 8
80 %1 = load double, double* @d, align 8
81 %sub = fsub double %0, %1
82 ret double %sub
83; CHECK-LABEL: @emit_xssubdp
84; CHECK: xssubdp {{[0-9]+}}
85}
86
87; Function Attrs: nounwind
88define double @emit_xsdivdp() {
89entry:
90 %0 = load double, double* @c, align 8
91 %1 = load double, double* @d, align 8
92 %div = fdiv double %0, %1
93 ret double %div
94; CHECK-LABEL: @emit_xsdivdp
95; CHECK: xsdivdp {{[0-9]+}}
96}
97
98; Function Attrs: nounwind
99define double @emit_xsmuldp() {
100entry:
101 %0 = load double, double* @c, align 8
102 %1 = load double, double* @d, align 8
103 %mul = fmul double %0, %1
104 ret double %mul
105; CHECK-LABEL: @emit_xsmuldp
106; CHECK: xsmuldp {{[0-9]+}}
107}
108
109; Function Attrs: nounwind
110define double @emit_xssqrtdp() {
111entry:
112 %0 = load double, double* @d, align 8
113 %call = call double @sqrt(double %0)
114 ret double %call
115; CHECK-LABEL: @emit_xssqrtdp
116; CHECK: xssqrtdp {{[0-9]+}}
117}
118
119; Function Attrs: nounwind
120declare double @sqrt(double)