ppcf128sf.ll
4.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
; RUN: llc -verify-machineinstrs -mtriple=powerpc-unknown-linux-gnu -O0 < %s | FileCheck %s
@ld = common global ppc_fp128 0xM00000000000000000000000000000000, align 16
@ld2 = common global ppc_fp128 0xM00000000000000000000000000000000, align 16
@d = common global double 0.000000e+00, align 8
@f = common global float 0.000000e+00, align 4
@i = common global i32 0, align 4
@ui = common global i32 0, align 4
@var = common global i8 0, align 1
define void @foo() #0 {
entry:
%c = alloca ppc_fp128, align 16
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%add = fadd ppc_fp128 %0, %1
store volatile ppc_fp128 %add, ppc_fp128* %c, align 16
%2 = load ppc_fp128, ppc_fp128* @ld, align 16
%3 = load ppc_fp128, ppc_fp128* @ld2, align 16
%sub = fsub ppc_fp128 %2, %3
store volatile ppc_fp128 %sub, ppc_fp128* %c, align 16
%4 = load ppc_fp128, ppc_fp128* @ld, align 16
%5 = load ppc_fp128, ppc_fp128* @ld2, align 16
%mul = fmul ppc_fp128 %4, %5
store volatile ppc_fp128 %mul, ppc_fp128* %c, align 16
%6 = load ppc_fp128, ppc_fp128* @ld, align 16
%7 = load ppc_fp128, ppc_fp128* @ld2, align 16
%div = fdiv ppc_fp128 %6, %7
store volatile ppc_fp128 %div, ppc_fp128* %c, align 16
ret void
; CHECK-LABEL: __gcc_qadd
; CHECK-LABEL: __gcc_qsub
; CHECK-LABEL: __gcc_qmul
; CHECK-LABEL: __gcc_qdiv
}
define void @foo1() #0 {
entry:
%0 = load double, double* @d, align 8
%conv = fpext double %0 to ppc_fp128
store ppc_fp128 %conv, ppc_fp128* @ld, align 16
ret void
; CHECK-LABEL: __gcc_dtoq
}
define void @foo2() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%conv = fptrunc ppc_fp128 %0 to double
store double %conv, double* @d, align 8
ret void
; CHECK-LABEL: __gcc_qtod
}
define void @foo3() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%conv = fptrunc ppc_fp128 %0 to float
store float %conv, float* @f, align 4
ret void
; CHECK-LABEL: __gcc_qtos
}
define void @foo4() #0 {
entry:
%0 = load i32, i32* @i, align 4
%conv = sitofp i32 %0 to ppc_fp128
store ppc_fp128 %conv, ppc_fp128* @ld, align 16
ret void
; CHECK-LABEL: __gcc_itoq
}
define void @foo5() #0 {
entry:
%0 = load i32, i32* @ui, align 4
%conv = uitofp i32 %0 to ppc_fp128
store ppc_fp128 %conv, ppc_fp128* @ld, align 16
ret void
; CHECK-LABEL: __gcc_utoq
}
define void @foo6() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%cmp = fcmp oeq ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qeq
}
define void @foo7() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%cmp = fcmp une ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qne
}
define void @foo8() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%cmp = fcmp ogt ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qgt
}
define void @foo9() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%cmp = fcmp olt ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qlt
}
define void @foo10() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%cmp = fcmp ole ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qle
}
define void @foo11() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld, align 16
%cmp = fcmp une ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qunord
}
define void @foo12() #0 {
entry:
%0 = load ppc_fp128, ppc_fp128* @ld, align 16
%1 = load ppc_fp128, ppc_fp128* @ld2, align 16
%cmp = fcmp oge ppc_fp128 %0, %1
%conv = zext i1 %cmp to i32
%conv1 = trunc i32 %conv to i8
store i8 %conv1, i8* @var, align 1
ret void
; CHECK-LABEL: __gcc_qge
}
attributes #0 = { "use-soft-float"="true" }