1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -O2 -mtriple=x86_64-linux-android \
3; RUN:     -enable-legalize-types-checking \
4; RUN:     | FileCheck %s
5; RUN: llc < %s -O2 -mtriple=x86_64-linux-gnu \
6; RUN:     -enable-legalize-types-checking \
7; RUN:     | FileCheck %s
8; RUN: llc < %s -O2 -mtriple=i686-linux-gnu -mattr=+sse2 \
9; RUN:     -enable-legalize-types-checking \
10; RUN:     | FileCheck %s --check-prefix=X86
11
12; Check all soft floating point library function calls.
13
14define fp128 @add(fp128 %x, fp128 %y) nounwind strictfp {
15; CHECK-LABEL: add:
16; CHECK:       # %bb.0: # %entry
17; CHECK-NEXT:    pushq %rax
18; CHECK-NEXT:    callq __addtf3@PLT
19; CHECK-NEXT:    popq %rax
20; CHECK-NEXT:    retq
21;
22; X86-LABEL: add:
23; X86:       # %bb.0: # %entry
24; X86-NEXT:    pushl %edi
25; X86-NEXT:    pushl %esi
26; X86-NEXT:    subl $20, %esp
27; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
28; X86-NEXT:    subl $12, %esp
29; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
30; X86-NEXT:    pushl {{[0-9]+}}(%esp)
31; X86-NEXT:    pushl {{[0-9]+}}(%esp)
32; X86-NEXT:    pushl {{[0-9]+}}(%esp)
33; X86-NEXT:    pushl {{[0-9]+}}(%esp)
34; X86-NEXT:    pushl {{[0-9]+}}(%esp)
35; X86-NEXT:    pushl {{[0-9]+}}(%esp)
36; X86-NEXT:    pushl {{[0-9]+}}(%esp)
37; X86-NEXT:    pushl {{[0-9]+}}(%esp)
38; X86-NEXT:    pushl %eax
39; X86-NEXT:    calll __addtf3
40; X86-NEXT:    addl $44, %esp
41; X86-NEXT:    movl (%esp), %eax
42; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
43; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
44; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
45; X86-NEXT:    movl %edi, 8(%esi)
46; X86-NEXT:    movl %edx, 12(%esi)
47; X86-NEXT:    movl %eax, (%esi)
48; X86-NEXT:    movl %ecx, 4(%esi)
49; X86-NEXT:    movl %esi, %eax
50; X86-NEXT:    addl $20, %esp
51; X86-NEXT:    popl %esi
52; X86-NEXT:    popl %edi
53; X86-NEXT:    retl $4
54entry:
55  %add = call fp128 @llvm.experimental.constrained.fadd.f128(fp128 %x, fp128 %y,  metadata !"round.dynamic", metadata !"fpexcept.strict") #0
56  ret fp128 %add
57}
58
59define fp128 @sub(fp128 %x, fp128 %y) nounwind strictfp {
60; CHECK-LABEL: sub:
61; CHECK:       # %bb.0: # %entry
62; CHECK-NEXT:    pushq %rax
63; CHECK-NEXT:    callq __subtf3@PLT
64; CHECK-NEXT:    popq %rax
65; CHECK-NEXT:    retq
66;
67; X86-LABEL: sub:
68; X86:       # %bb.0: # %entry
69; X86-NEXT:    pushl %edi
70; X86-NEXT:    pushl %esi
71; X86-NEXT:    subl $20, %esp
72; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
73; X86-NEXT:    subl $12, %esp
74; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
75; X86-NEXT:    pushl {{[0-9]+}}(%esp)
76; X86-NEXT:    pushl {{[0-9]+}}(%esp)
77; X86-NEXT:    pushl {{[0-9]+}}(%esp)
78; X86-NEXT:    pushl {{[0-9]+}}(%esp)
79; X86-NEXT:    pushl {{[0-9]+}}(%esp)
80; X86-NEXT:    pushl {{[0-9]+}}(%esp)
81; X86-NEXT:    pushl {{[0-9]+}}(%esp)
82; X86-NEXT:    pushl {{[0-9]+}}(%esp)
83; X86-NEXT:    pushl %eax
84; X86-NEXT:    calll __subtf3
85; X86-NEXT:    addl $44, %esp
86; X86-NEXT:    movl (%esp), %eax
87; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
88; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
89; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
90; X86-NEXT:    movl %edi, 8(%esi)
91; X86-NEXT:    movl %edx, 12(%esi)
92; X86-NEXT:    movl %eax, (%esi)
93; X86-NEXT:    movl %ecx, 4(%esi)
94; X86-NEXT:    movl %esi, %eax
95; X86-NEXT:    addl $20, %esp
96; X86-NEXT:    popl %esi
97; X86-NEXT:    popl %edi
98; X86-NEXT:    retl $4
99entry:
100  %sub = call fp128 @llvm.experimental.constrained.fsub.f128(fp128 %x, fp128 %y,  metadata !"round.dynamic", metadata !"fpexcept.strict") #0
101  ret fp128 %sub
102}
103
104define fp128 @mul(fp128 %x, fp128 %y) nounwind strictfp {
105; CHECK-LABEL: mul:
106; CHECK:       # %bb.0: # %entry
107; CHECK-NEXT:    pushq %rax
108; CHECK-NEXT:    callq __multf3@PLT
109; CHECK-NEXT:    popq %rax
110; CHECK-NEXT:    retq
111;
112; X86-LABEL: mul:
113; X86:       # %bb.0: # %entry
114; X86-NEXT:    pushl %edi
115; X86-NEXT:    pushl %esi
116; X86-NEXT:    subl $20, %esp
117; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
118; X86-NEXT:    subl $12, %esp
119; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
120; X86-NEXT:    pushl {{[0-9]+}}(%esp)
121; X86-NEXT:    pushl {{[0-9]+}}(%esp)
122; X86-NEXT:    pushl {{[0-9]+}}(%esp)
123; X86-NEXT:    pushl {{[0-9]+}}(%esp)
124; X86-NEXT:    pushl {{[0-9]+}}(%esp)
125; X86-NEXT:    pushl {{[0-9]+}}(%esp)
126; X86-NEXT:    pushl {{[0-9]+}}(%esp)
127; X86-NEXT:    pushl {{[0-9]+}}(%esp)
128; X86-NEXT:    pushl %eax
129; X86-NEXT:    calll __multf3
130; X86-NEXT:    addl $44, %esp
131; X86-NEXT:    movl (%esp), %eax
132; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
133; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
134; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
135; X86-NEXT:    movl %edi, 8(%esi)
136; X86-NEXT:    movl %edx, 12(%esi)
137; X86-NEXT:    movl %eax, (%esi)
138; X86-NEXT:    movl %ecx, 4(%esi)
139; X86-NEXT:    movl %esi, %eax
140; X86-NEXT:    addl $20, %esp
141; X86-NEXT:    popl %esi
142; X86-NEXT:    popl %edi
143; X86-NEXT:    retl $4
144entry:
145  %mul = call fp128 @llvm.experimental.constrained.fmul.f128(fp128 %x, fp128 %y,  metadata !"round.dynamic", metadata !"fpexcept.strict") #0
146  ret fp128 %mul
147}
148
149define fp128 @div(fp128 %x, fp128 %y) nounwind strictfp {
150; CHECK-LABEL: div:
151; CHECK:       # %bb.0: # %entry
152; CHECK-NEXT:    pushq %rax
153; CHECK-NEXT:    callq __divtf3@PLT
154; CHECK-NEXT:    popq %rax
155; CHECK-NEXT:    retq
156;
157; X86-LABEL: div:
158; X86:       # %bb.0: # %entry
159; X86-NEXT:    pushl %edi
160; X86-NEXT:    pushl %esi
161; X86-NEXT:    subl $20, %esp
162; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
163; X86-NEXT:    subl $12, %esp
164; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
165; X86-NEXT:    pushl {{[0-9]+}}(%esp)
166; X86-NEXT:    pushl {{[0-9]+}}(%esp)
167; X86-NEXT:    pushl {{[0-9]+}}(%esp)
168; X86-NEXT:    pushl {{[0-9]+}}(%esp)
169; X86-NEXT:    pushl {{[0-9]+}}(%esp)
170; X86-NEXT:    pushl {{[0-9]+}}(%esp)
171; X86-NEXT:    pushl {{[0-9]+}}(%esp)
172; X86-NEXT:    pushl {{[0-9]+}}(%esp)
173; X86-NEXT:    pushl %eax
174; X86-NEXT:    calll __divtf3
175; X86-NEXT:    addl $44, %esp
176; X86-NEXT:    movl (%esp), %eax
177; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
178; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
179; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
180; X86-NEXT:    movl %edi, 8(%esi)
181; X86-NEXT:    movl %edx, 12(%esi)
182; X86-NEXT:    movl %eax, (%esi)
183; X86-NEXT:    movl %ecx, 4(%esi)
184; X86-NEXT:    movl %esi, %eax
185; X86-NEXT:    addl $20, %esp
186; X86-NEXT:    popl %esi
187; X86-NEXT:    popl %edi
188; X86-NEXT:    retl $4
189entry:
190  %div = call fp128 @llvm.experimental.constrained.fdiv.f128(fp128 %x, fp128 %y,  metadata !"round.dynamic", metadata !"fpexcept.strict") #0
191  ret fp128 %div
192}
193
194define fp128 @fma(fp128 %x, fp128 %y, fp128 %z) nounwind strictfp {
195; CHECK-LABEL: fma:
196; CHECK:       # %bb.0: # %entry
197; CHECK-NEXT:    pushq %rax
198; CHECK-NEXT:    callq fmal@PLT
199; CHECK-NEXT:    popq %rax
200; CHECK-NEXT:    retq
201;
202; X86-LABEL: fma:
203; X86:       # %bb.0: # %entry
204; X86-NEXT:    pushl %edi
205; X86-NEXT:    pushl %esi
206; X86-NEXT:    subl $20, %esp
207; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
208; X86-NEXT:    subl $12, %esp
209; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
210; X86-NEXT:    pushl {{[0-9]+}}(%esp)
211; X86-NEXT:    pushl {{[0-9]+}}(%esp)
212; X86-NEXT:    pushl {{[0-9]+}}(%esp)
213; X86-NEXT:    pushl {{[0-9]+}}(%esp)
214; X86-NEXT:    pushl {{[0-9]+}}(%esp)
215; X86-NEXT:    pushl {{[0-9]+}}(%esp)
216; X86-NEXT:    pushl {{[0-9]+}}(%esp)
217; X86-NEXT:    pushl {{[0-9]+}}(%esp)
218; X86-NEXT:    pushl {{[0-9]+}}(%esp)
219; X86-NEXT:    pushl {{[0-9]+}}(%esp)
220; X86-NEXT:    pushl {{[0-9]+}}(%esp)
221; X86-NEXT:    pushl {{[0-9]+}}(%esp)
222; X86-NEXT:    pushl %eax
223; X86-NEXT:    calll fmal
224; X86-NEXT:    addl $60, %esp
225; X86-NEXT:    movl (%esp), %eax
226; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
227; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
228; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
229; X86-NEXT:    movl %edi, 8(%esi)
230; X86-NEXT:    movl %edx, 12(%esi)
231; X86-NEXT:    movl %eax, (%esi)
232; X86-NEXT:    movl %ecx, 4(%esi)
233; X86-NEXT:    movl %esi, %eax
234; X86-NEXT:    addl $20, %esp
235; X86-NEXT:    popl %esi
236; X86-NEXT:    popl %edi
237; X86-NEXT:    retl $4
238entry:
239  %fma = call fp128 @llvm.experimental.constrained.fma.f128(fp128 %x, fp128 %y,  fp128 %z, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
240  ret fp128 %fma
241}
242
243define fp128 @frem(fp128 %x, fp128 %y) nounwind strictfp {
244; CHECK-LABEL: frem:
245; CHECK:       # %bb.0: # %entry
246; CHECK-NEXT:    pushq %rax
247; CHECK-NEXT:    callq fmodl@PLT
248; CHECK-NEXT:    popq %rax
249; CHECK-NEXT:    retq
250;
251; X86-LABEL: frem:
252; X86:       # %bb.0: # %entry
253; X86-NEXT:    pushl %edi
254; X86-NEXT:    pushl %esi
255; X86-NEXT:    subl $20, %esp
256; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
257; X86-NEXT:    subl $12, %esp
258; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
259; X86-NEXT:    pushl {{[0-9]+}}(%esp)
260; X86-NEXT:    pushl {{[0-9]+}}(%esp)
261; X86-NEXT:    pushl {{[0-9]+}}(%esp)
262; X86-NEXT:    pushl {{[0-9]+}}(%esp)
263; X86-NEXT:    pushl {{[0-9]+}}(%esp)
264; X86-NEXT:    pushl {{[0-9]+}}(%esp)
265; X86-NEXT:    pushl {{[0-9]+}}(%esp)
266; X86-NEXT:    pushl {{[0-9]+}}(%esp)
267; X86-NEXT:    pushl %eax
268; X86-NEXT:    calll fmodl
269; X86-NEXT:    addl $44, %esp
270; X86-NEXT:    movl (%esp), %eax
271; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
272; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
273; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
274; X86-NEXT:    movl %edi, 8(%esi)
275; X86-NEXT:    movl %edx, 12(%esi)
276; X86-NEXT:    movl %eax, (%esi)
277; X86-NEXT:    movl %ecx, 4(%esi)
278; X86-NEXT:    movl %esi, %eax
279; X86-NEXT:    addl $20, %esp
280; X86-NEXT:    popl %esi
281; X86-NEXT:    popl %edi
282; X86-NEXT:    retl $4
283entry:
284  %div = call fp128 @llvm.experimental.constrained.frem.f128(fp128 %x, fp128 %y,  metadata !"round.dynamic", metadata !"fpexcept.strict") #0
285  ret fp128 %div
286}
287
288define fp128 @ceil(fp128 %x) nounwind strictfp {
289; CHECK-LABEL: ceil:
290; CHECK:       # %bb.0: # %entry
291; CHECK-NEXT:    pushq %rax
292; CHECK-NEXT:    callq ceill@PLT
293; CHECK-NEXT:    popq %rax
294; CHECK-NEXT:    retq
295;
296; X86-LABEL: ceil:
297; X86:       # %bb.0: # %entry
298; X86-NEXT:    pushl %edi
299; X86-NEXT:    pushl %esi
300; X86-NEXT:    subl $20, %esp
301; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
302; X86-NEXT:    subl $12, %esp
303; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
304; X86-NEXT:    pushl {{[0-9]+}}(%esp)
305; X86-NEXT:    pushl {{[0-9]+}}(%esp)
306; X86-NEXT:    pushl {{[0-9]+}}(%esp)
307; X86-NEXT:    pushl {{[0-9]+}}(%esp)
308; X86-NEXT:    pushl %eax
309; X86-NEXT:    calll ceill
310; X86-NEXT:    addl $28, %esp
311; X86-NEXT:    movl (%esp), %eax
312; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
313; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
314; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
315; X86-NEXT:    movl %edi, 8(%esi)
316; X86-NEXT:    movl %edx, 12(%esi)
317; X86-NEXT:    movl %eax, (%esi)
318; X86-NEXT:    movl %ecx, 4(%esi)
319; X86-NEXT:    movl %esi, %eax
320; X86-NEXT:    addl $20, %esp
321; X86-NEXT:    popl %esi
322; X86-NEXT:    popl %edi
323; X86-NEXT:    retl $4
324entry:
325  %ceil = call fp128 @llvm.experimental.constrained.ceil.f128(fp128 %x, metadata !"fpexcept.strict") #0
326  ret fp128 %ceil
327}
328
329define fp128 @cos(fp128 %x) nounwind strictfp {
330; CHECK-LABEL: cos:
331; CHECK:       # %bb.0: # %entry
332; CHECK-NEXT:    pushq %rax
333; CHECK-NEXT:    callq cosl@PLT
334; CHECK-NEXT:    popq %rax
335; CHECK-NEXT:    retq
336;
337; X86-LABEL: cos:
338; X86:       # %bb.0: # %entry
339; X86-NEXT:    pushl %edi
340; X86-NEXT:    pushl %esi
341; X86-NEXT:    subl $20, %esp
342; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
343; X86-NEXT:    subl $12, %esp
344; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
345; X86-NEXT:    pushl {{[0-9]+}}(%esp)
346; X86-NEXT:    pushl {{[0-9]+}}(%esp)
347; X86-NEXT:    pushl {{[0-9]+}}(%esp)
348; X86-NEXT:    pushl {{[0-9]+}}(%esp)
349; X86-NEXT:    pushl %eax
350; X86-NEXT:    calll cosl
351; X86-NEXT:    addl $28, %esp
352; X86-NEXT:    movl (%esp), %eax
353; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
354; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
355; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
356; X86-NEXT:    movl %edi, 8(%esi)
357; X86-NEXT:    movl %edx, 12(%esi)
358; X86-NEXT:    movl %eax, (%esi)
359; X86-NEXT:    movl %ecx, 4(%esi)
360; X86-NEXT:    movl %esi, %eax
361; X86-NEXT:    addl $20, %esp
362; X86-NEXT:    popl %esi
363; X86-NEXT:    popl %edi
364; X86-NEXT:    retl $4
365entry:
366  %cos = call fp128 @llvm.experimental.constrained.cos.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
367  ret fp128 %cos
368}
369
370define fp128 @exp(fp128 %x) nounwind strictfp {
371; CHECK-LABEL: exp:
372; CHECK:       # %bb.0: # %entry
373; CHECK-NEXT:    pushq %rax
374; CHECK-NEXT:    callq expl@PLT
375; CHECK-NEXT:    popq %rax
376; CHECK-NEXT:    retq
377;
378; X86-LABEL: exp:
379; X86:       # %bb.0: # %entry
380; X86-NEXT:    pushl %edi
381; X86-NEXT:    pushl %esi
382; X86-NEXT:    subl $20, %esp
383; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
384; X86-NEXT:    subl $12, %esp
385; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
386; X86-NEXT:    pushl {{[0-9]+}}(%esp)
387; X86-NEXT:    pushl {{[0-9]+}}(%esp)
388; X86-NEXT:    pushl {{[0-9]+}}(%esp)
389; X86-NEXT:    pushl {{[0-9]+}}(%esp)
390; X86-NEXT:    pushl %eax
391; X86-NEXT:    calll expl
392; X86-NEXT:    addl $28, %esp
393; X86-NEXT:    movl (%esp), %eax
394; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
395; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
396; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
397; X86-NEXT:    movl %edi, 8(%esi)
398; X86-NEXT:    movl %edx, 12(%esi)
399; X86-NEXT:    movl %eax, (%esi)
400; X86-NEXT:    movl %ecx, 4(%esi)
401; X86-NEXT:    movl %esi, %eax
402; X86-NEXT:    addl $20, %esp
403; X86-NEXT:    popl %esi
404; X86-NEXT:    popl %edi
405; X86-NEXT:    retl $4
406entry:
407  %exp = call fp128 @llvm.experimental.constrained.exp.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
408  ret fp128 %exp
409}
410
411define fp128 @exp2(fp128 %x) nounwind strictfp {
412; CHECK-LABEL: exp2:
413; CHECK:       # %bb.0: # %entry
414; CHECK-NEXT:    pushq %rax
415; CHECK-NEXT:    callq exp2l@PLT
416; CHECK-NEXT:    popq %rax
417; CHECK-NEXT:    retq
418;
419; X86-LABEL: exp2:
420; X86:       # %bb.0: # %entry
421; X86-NEXT:    pushl %edi
422; X86-NEXT:    pushl %esi
423; X86-NEXT:    subl $20, %esp
424; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
425; X86-NEXT:    subl $12, %esp
426; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
427; X86-NEXT:    pushl {{[0-9]+}}(%esp)
428; X86-NEXT:    pushl {{[0-9]+}}(%esp)
429; X86-NEXT:    pushl {{[0-9]+}}(%esp)
430; X86-NEXT:    pushl {{[0-9]+}}(%esp)
431; X86-NEXT:    pushl %eax
432; X86-NEXT:    calll exp2l
433; X86-NEXT:    addl $28, %esp
434; X86-NEXT:    movl (%esp), %eax
435; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
436; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
437; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
438; X86-NEXT:    movl %edi, 8(%esi)
439; X86-NEXT:    movl %edx, 12(%esi)
440; X86-NEXT:    movl %eax, (%esi)
441; X86-NEXT:    movl %ecx, 4(%esi)
442; X86-NEXT:    movl %esi, %eax
443; X86-NEXT:    addl $20, %esp
444; X86-NEXT:    popl %esi
445; X86-NEXT:    popl %edi
446; X86-NEXT:    retl $4
447entry:
448  %exp2 = call fp128 @llvm.experimental.constrained.exp2.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
449  ret fp128 %exp2
450}
451
452define fp128 @floor(fp128 %x) nounwind strictfp {
453; CHECK-LABEL: floor:
454; CHECK:       # %bb.0: # %entry
455; CHECK-NEXT:    pushq %rax
456; CHECK-NEXT:    callq floorl@PLT
457; CHECK-NEXT:    popq %rax
458; CHECK-NEXT:    retq
459;
460; X86-LABEL: floor:
461; X86:       # %bb.0: # %entry
462; X86-NEXT:    pushl %edi
463; X86-NEXT:    pushl %esi
464; X86-NEXT:    subl $20, %esp
465; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
466; X86-NEXT:    subl $12, %esp
467; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
468; X86-NEXT:    pushl {{[0-9]+}}(%esp)
469; X86-NEXT:    pushl {{[0-9]+}}(%esp)
470; X86-NEXT:    pushl {{[0-9]+}}(%esp)
471; X86-NEXT:    pushl {{[0-9]+}}(%esp)
472; X86-NEXT:    pushl %eax
473; X86-NEXT:    calll floorl
474; X86-NEXT:    addl $28, %esp
475; X86-NEXT:    movl (%esp), %eax
476; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
477; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
478; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
479; X86-NEXT:    movl %edi, 8(%esi)
480; X86-NEXT:    movl %edx, 12(%esi)
481; X86-NEXT:    movl %eax, (%esi)
482; X86-NEXT:    movl %ecx, 4(%esi)
483; X86-NEXT:    movl %esi, %eax
484; X86-NEXT:    addl $20, %esp
485; X86-NEXT:    popl %esi
486; X86-NEXT:    popl %edi
487; X86-NEXT:    retl $4
488entry:
489  %floor = call fp128 @llvm.experimental.constrained.floor.f128(fp128 %x, metadata !"fpexcept.strict") #0
490  ret fp128 %floor
491}
492
493define fp128 @log(fp128 %x) nounwind strictfp {
494; CHECK-LABEL: log:
495; CHECK:       # %bb.0: # %entry
496; CHECK-NEXT:    pushq %rax
497; CHECK-NEXT:    callq logl@PLT
498; CHECK-NEXT:    popq %rax
499; CHECK-NEXT:    retq
500;
501; X86-LABEL: log:
502; X86:       # %bb.0: # %entry
503; X86-NEXT:    pushl %edi
504; X86-NEXT:    pushl %esi
505; X86-NEXT:    subl $20, %esp
506; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
507; X86-NEXT:    subl $12, %esp
508; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
509; X86-NEXT:    pushl {{[0-9]+}}(%esp)
510; X86-NEXT:    pushl {{[0-9]+}}(%esp)
511; X86-NEXT:    pushl {{[0-9]+}}(%esp)
512; X86-NEXT:    pushl {{[0-9]+}}(%esp)
513; X86-NEXT:    pushl %eax
514; X86-NEXT:    calll logl
515; X86-NEXT:    addl $28, %esp
516; X86-NEXT:    movl (%esp), %eax
517; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
518; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
519; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
520; X86-NEXT:    movl %edi, 8(%esi)
521; X86-NEXT:    movl %edx, 12(%esi)
522; X86-NEXT:    movl %eax, (%esi)
523; X86-NEXT:    movl %ecx, 4(%esi)
524; X86-NEXT:    movl %esi, %eax
525; X86-NEXT:    addl $20, %esp
526; X86-NEXT:    popl %esi
527; X86-NEXT:    popl %edi
528; X86-NEXT:    retl $4
529entry:
530  %log = call fp128 @llvm.experimental.constrained.log.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
531  ret fp128 %log
532}
533
534define fp128 @log10(fp128 %x) nounwind strictfp {
535; CHECK-LABEL: log10:
536; CHECK:       # %bb.0: # %entry
537; CHECK-NEXT:    pushq %rax
538; CHECK-NEXT:    callq log10l@PLT
539; CHECK-NEXT:    popq %rax
540; CHECK-NEXT:    retq
541;
542; X86-LABEL: log10:
543; X86:       # %bb.0: # %entry
544; X86-NEXT:    pushl %edi
545; X86-NEXT:    pushl %esi
546; X86-NEXT:    subl $20, %esp
547; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
548; X86-NEXT:    subl $12, %esp
549; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
550; X86-NEXT:    pushl {{[0-9]+}}(%esp)
551; X86-NEXT:    pushl {{[0-9]+}}(%esp)
552; X86-NEXT:    pushl {{[0-9]+}}(%esp)
553; X86-NEXT:    pushl {{[0-9]+}}(%esp)
554; X86-NEXT:    pushl %eax
555; X86-NEXT:    calll log10l
556; X86-NEXT:    addl $28, %esp
557; X86-NEXT:    movl (%esp), %eax
558; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
559; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
560; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
561; X86-NEXT:    movl %edi, 8(%esi)
562; X86-NEXT:    movl %edx, 12(%esi)
563; X86-NEXT:    movl %eax, (%esi)
564; X86-NEXT:    movl %ecx, 4(%esi)
565; X86-NEXT:    movl %esi, %eax
566; X86-NEXT:    addl $20, %esp
567; X86-NEXT:    popl %esi
568; X86-NEXT:    popl %edi
569; X86-NEXT:    retl $4
570entry:
571  %log10 = call fp128 @llvm.experimental.constrained.log10.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
572  ret fp128 %log10
573}
574
575define fp128 @log2(fp128 %x) nounwind strictfp {
576; CHECK-LABEL: log2:
577; CHECK:       # %bb.0: # %entry
578; CHECK-NEXT:    pushq %rax
579; CHECK-NEXT:    callq log2l@PLT
580; CHECK-NEXT:    popq %rax
581; CHECK-NEXT:    retq
582;
583; X86-LABEL: log2:
584; X86:       # %bb.0: # %entry
585; X86-NEXT:    pushl %edi
586; X86-NEXT:    pushl %esi
587; X86-NEXT:    subl $20, %esp
588; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
589; X86-NEXT:    subl $12, %esp
590; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
591; X86-NEXT:    pushl {{[0-9]+}}(%esp)
592; X86-NEXT:    pushl {{[0-9]+}}(%esp)
593; X86-NEXT:    pushl {{[0-9]+}}(%esp)
594; X86-NEXT:    pushl {{[0-9]+}}(%esp)
595; X86-NEXT:    pushl %eax
596; X86-NEXT:    calll log2l
597; X86-NEXT:    addl $28, %esp
598; X86-NEXT:    movl (%esp), %eax
599; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
600; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
601; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
602; X86-NEXT:    movl %edi, 8(%esi)
603; X86-NEXT:    movl %edx, 12(%esi)
604; X86-NEXT:    movl %eax, (%esi)
605; X86-NEXT:    movl %ecx, 4(%esi)
606; X86-NEXT:    movl %esi, %eax
607; X86-NEXT:    addl $20, %esp
608; X86-NEXT:    popl %esi
609; X86-NEXT:    popl %edi
610; X86-NEXT:    retl $4
611entry:
612  %log2 = call fp128 @llvm.experimental.constrained.log2.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
613  ret fp128 %log2
614}
615
616define fp128 @maxnum(fp128 %x, fp128 %y) nounwind strictfp {
617; CHECK-LABEL: maxnum:
618; CHECK:       # %bb.0: # %entry
619; CHECK-NEXT:    pushq %rax
620; CHECK-NEXT:    callq fmaxl@PLT
621; CHECK-NEXT:    popq %rax
622; CHECK-NEXT:    retq
623;
624; X86-LABEL: maxnum:
625; X86:       # %bb.0: # %entry
626; X86-NEXT:    pushl %edi
627; X86-NEXT:    pushl %esi
628; X86-NEXT:    subl $20, %esp
629; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
630; X86-NEXT:    subl $12, %esp
631; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
632; X86-NEXT:    pushl {{[0-9]+}}(%esp)
633; X86-NEXT:    pushl {{[0-9]+}}(%esp)
634; X86-NEXT:    pushl {{[0-9]+}}(%esp)
635; X86-NEXT:    pushl {{[0-9]+}}(%esp)
636; X86-NEXT:    pushl {{[0-9]+}}(%esp)
637; X86-NEXT:    pushl {{[0-9]+}}(%esp)
638; X86-NEXT:    pushl {{[0-9]+}}(%esp)
639; X86-NEXT:    pushl {{[0-9]+}}(%esp)
640; X86-NEXT:    pushl %eax
641; X86-NEXT:    calll fmaxl
642; X86-NEXT:    addl $44, %esp
643; X86-NEXT:    movl (%esp), %eax
644; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
645; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
646; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
647; X86-NEXT:    movl %edi, 8(%esi)
648; X86-NEXT:    movl %edx, 12(%esi)
649; X86-NEXT:    movl %eax, (%esi)
650; X86-NEXT:    movl %ecx, 4(%esi)
651; X86-NEXT:    movl %esi, %eax
652; X86-NEXT:    addl $20, %esp
653; X86-NEXT:    popl %esi
654; X86-NEXT:    popl %edi
655; X86-NEXT:    retl $4
656entry:
657  %maxnum = call fp128 @llvm.experimental.constrained.maxnum.f128(fp128 %x, fp128 %y, metadata !"fpexcept.strict") #0
658  ret fp128 %maxnum
659}
660
661define fp128 @minnum(fp128 %x, fp128 %y) nounwind strictfp {
662; CHECK-LABEL: minnum:
663; CHECK:       # %bb.0: # %entry
664; CHECK-NEXT:    pushq %rax
665; CHECK-NEXT:    callq fminl@PLT
666; CHECK-NEXT:    popq %rax
667; CHECK-NEXT:    retq
668;
669; X86-LABEL: minnum:
670; X86:       # %bb.0: # %entry
671; X86-NEXT:    pushl %edi
672; X86-NEXT:    pushl %esi
673; X86-NEXT:    subl $20, %esp
674; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
675; X86-NEXT:    subl $12, %esp
676; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
677; X86-NEXT:    pushl {{[0-9]+}}(%esp)
678; X86-NEXT:    pushl {{[0-9]+}}(%esp)
679; X86-NEXT:    pushl {{[0-9]+}}(%esp)
680; X86-NEXT:    pushl {{[0-9]+}}(%esp)
681; X86-NEXT:    pushl {{[0-9]+}}(%esp)
682; X86-NEXT:    pushl {{[0-9]+}}(%esp)
683; X86-NEXT:    pushl {{[0-9]+}}(%esp)
684; X86-NEXT:    pushl {{[0-9]+}}(%esp)
685; X86-NEXT:    pushl %eax
686; X86-NEXT:    calll fminl
687; X86-NEXT:    addl $44, %esp
688; X86-NEXT:    movl (%esp), %eax
689; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
690; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
691; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
692; X86-NEXT:    movl %edi, 8(%esi)
693; X86-NEXT:    movl %edx, 12(%esi)
694; X86-NEXT:    movl %eax, (%esi)
695; X86-NEXT:    movl %ecx, 4(%esi)
696; X86-NEXT:    movl %esi, %eax
697; X86-NEXT:    addl $20, %esp
698; X86-NEXT:    popl %esi
699; X86-NEXT:    popl %edi
700; X86-NEXT:    retl $4
701entry:
702  %minnum = call fp128 @llvm.experimental.constrained.minnum.f128(fp128 %x, fp128 %y, metadata !"fpexcept.strict") #0
703  ret fp128 %minnum
704}
705
706define fp128 @nearbyint(fp128 %x) nounwind strictfp {
707; CHECK-LABEL: nearbyint:
708; CHECK:       # %bb.0: # %entry
709; CHECK-NEXT:    pushq %rax
710; CHECK-NEXT:    callq nearbyintl@PLT
711; CHECK-NEXT:    popq %rax
712; CHECK-NEXT:    retq
713;
714; X86-LABEL: nearbyint:
715; X86:       # %bb.0: # %entry
716; X86-NEXT:    pushl %edi
717; X86-NEXT:    pushl %esi
718; X86-NEXT:    subl $20, %esp
719; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
720; X86-NEXT:    subl $12, %esp
721; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
722; X86-NEXT:    pushl {{[0-9]+}}(%esp)
723; X86-NEXT:    pushl {{[0-9]+}}(%esp)
724; X86-NEXT:    pushl {{[0-9]+}}(%esp)
725; X86-NEXT:    pushl {{[0-9]+}}(%esp)
726; X86-NEXT:    pushl %eax
727; X86-NEXT:    calll nearbyintl
728; X86-NEXT:    addl $28, %esp
729; X86-NEXT:    movl (%esp), %eax
730; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
731; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
732; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
733; X86-NEXT:    movl %edi, 8(%esi)
734; X86-NEXT:    movl %edx, 12(%esi)
735; X86-NEXT:    movl %eax, (%esi)
736; X86-NEXT:    movl %ecx, 4(%esi)
737; X86-NEXT:    movl %esi, %eax
738; X86-NEXT:    addl $20, %esp
739; X86-NEXT:    popl %esi
740; X86-NEXT:    popl %edi
741; X86-NEXT:    retl $4
742entry:
743  %nearbyint = call fp128 @llvm.experimental.constrained.nearbyint.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
744  ret fp128 %nearbyint
745}
746
747define fp128 @pow(fp128 %x, fp128 %y) nounwind strictfp {
748; CHECK-LABEL: pow:
749; CHECK:       # %bb.0: # %entry
750; CHECK-NEXT:    pushq %rax
751; CHECK-NEXT:    callq powl@PLT
752; CHECK-NEXT:    popq %rax
753; CHECK-NEXT:    retq
754;
755; X86-LABEL: pow:
756; X86:       # %bb.0: # %entry
757; X86-NEXT:    pushl %edi
758; X86-NEXT:    pushl %esi
759; X86-NEXT:    subl $20, %esp
760; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
761; X86-NEXT:    subl $12, %esp
762; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
763; X86-NEXT:    pushl {{[0-9]+}}(%esp)
764; X86-NEXT:    pushl {{[0-9]+}}(%esp)
765; X86-NEXT:    pushl {{[0-9]+}}(%esp)
766; X86-NEXT:    pushl {{[0-9]+}}(%esp)
767; X86-NEXT:    pushl {{[0-9]+}}(%esp)
768; X86-NEXT:    pushl {{[0-9]+}}(%esp)
769; X86-NEXT:    pushl {{[0-9]+}}(%esp)
770; X86-NEXT:    pushl {{[0-9]+}}(%esp)
771; X86-NEXT:    pushl %eax
772; X86-NEXT:    calll powl
773; X86-NEXT:    addl $44, %esp
774; X86-NEXT:    movl (%esp), %eax
775; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
776; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
777; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
778; X86-NEXT:    movl %edi, 8(%esi)
779; X86-NEXT:    movl %edx, 12(%esi)
780; X86-NEXT:    movl %eax, (%esi)
781; X86-NEXT:    movl %ecx, 4(%esi)
782; X86-NEXT:    movl %esi, %eax
783; X86-NEXT:    addl $20, %esp
784; X86-NEXT:    popl %esi
785; X86-NEXT:    popl %edi
786; X86-NEXT:    retl $4
787entry:
788  %pow = call fp128 @llvm.experimental.constrained.pow.f128(fp128 %x, fp128 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
789  ret fp128 %pow
790}
791
792define fp128 @powi(fp128 %x, i32 %y) nounwind strictfp {
793; CHECK-LABEL: powi:
794; CHECK:       # %bb.0: # %entry
795; CHECK-NEXT:    pushq %rax
796; CHECK-NEXT:    callq __powitf2@PLT
797; CHECK-NEXT:    popq %rax
798; CHECK-NEXT:    retq
799;
800; X86-LABEL: powi:
801; X86:       # %bb.0: # %entry
802; X86-NEXT:    pushl %edi
803; X86-NEXT:    pushl %esi
804; X86-NEXT:    subl $20, %esp
805; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
806; X86-NEXT:    subl $8, %esp
807; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
808; X86-NEXT:    pushl {{[0-9]+}}(%esp)
809; X86-NEXT:    pushl {{[0-9]+}}(%esp)
810; X86-NEXT:    pushl {{[0-9]+}}(%esp)
811; X86-NEXT:    pushl {{[0-9]+}}(%esp)
812; X86-NEXT:    pushl {{[0-9]+}}(%esp)
813; X86-NEXT:    pushl %eax
814; X86-NEXT:    calll __powitf2
815; X86-NEXT:    addl $28, %esp
816; X86-NEXT:    movl (%esp), %eax
817; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
818; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
819; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
820; X86-NEXT:    movl %edi, 8(%esi)
821; X86-NEXT:    movl %edx, 12(%esi)
822; X86-NEXT:    movl %eax, (%esi)
823; X86-NEXT:    movl %ecx, 4(%esi)
824; X86-NEXT:    movl %esi, %eax
825; X86-NEXT:    addl $20, %esp
826; X86-NEXT:    popl %esi
827; X86-NEXT:    popl %edi
828; X86-NEXT:    retl $4
829entry:
830  %powi = call fp128 @llvm.experimental.constrained.powi.f128(fp128 %x, i32 %y, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
831  ret fp128 %powi
832}
833
834define fp128 @rint(fp128 %x) nounwind strictfp {
835; CHECK-LABEL: rint:
836; CHECK:       # %bb.0: # %entry
837; CHECK-NEXT:    pushq %rax
838; CHECK-NEXT:    callq rintl@PLT
839; CHECK-NEXT:    popq %rax
840; CHECK-NEXT:    retq
841;
842; X86-LABEL: rint:
843; X86:       # %bb.0: # %entry
844; X86-NEXT:    pushl %edi
845; X86-NEXT:    pushl %esi
846; X86-NEXT:    subl $20, %esp
847; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
848; X86-NEXT:    subl $12, %esp
849; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
850; X86-NEXT:    pushl {{[0-9]+}}(%esp)
851; X86-NEXT:    pushl {{[0-9]+}}(%esp)
852; X86-NEXT:    pushl {{[0-9]+}}(%esp)
853; X86-NEXT:    pushl {{[0-9]+}}(%esp)
854; X86-NEXT:    pushl %eax
855; X86-NEXT:    calll rintl
856; X86-NEXT:    addl $28, %esp
857; X86-NEXT:    movl (%esp), %eax
858; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
859; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
860; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
861; X86-NEXT:    movl %edi, 8(%esi)
862; X86-NEXT:    movl %edx, 12(%esi)
863; X86-NEXT:    movl %eax, (%esi)
864; X86-NEXT:    movl %ecx, 4(%esi)
865; X86-NEXT:    movl %esi, %eax
866; X86-NEXT:    addl $20, %esp
867; X86-NEXT:    popl %esi
868; X86-NEXT:    popl %edi
869; X86-NEXT:    retl $4
870entry:
871  %rint = call fp128 @llvm.experimental.constrained.rint.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
872  ret fp128 %rint
873}
874
875define fp128 @round(fp128 %x) nounwind strictfp {
876; CHECK-LABEL: round:
877; CHECK:       # %bb.0: # %entry
878; CHECK-NEXT:    pushq %rax
879; CHECK-NEXT:    callq roundl@PLT
880; CHECK-NEXT:    popq %rax
881; CHECK-NEXT:    retq
882;
883; X86-LABEL: round:
884; X86:       # %bb.0: # %entry
885; X86-NEXT:    pushl %edi
886; X86-NEXT:    pushl %esi
887; X86-NEXT:    subl $20, %esp
888; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
889; X86-NEXT:    subl $12, %esp
890; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
891; X86-NEXT:    pushl {{[0-9]+}}(%esp)
892; X86-NEXT:    pushl {{[0-9]+}}(%esp)
893; X86-NEXT:    pushl {{[0-9]+}}(%esp)
894; X86-NEXT:    pushl {{[0-9]+}}(%esp)
895; X86-NEXT:    pushl %eax
896; X86-NEXT:    calll roundl
897; X86-NEXT:    addl $28, %esp
898; X86-NEXT:    movl (%esp), %eax
899; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
900; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
901; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
902; X86-NEXT:    movl %edi, 8(%esi)
903; X86-NEXT:    movl %edx, 12(%esi)
904; X86-NEXT:    movl %eax, (%esi)
905; X86-NEXT:    movl %ecx, 4(%esi)
906; X86-NEXT:    movl %esi, %eax
907; X86-NEXT:    addl $20, %esp
908; X86-NEXT:    popl %esi
909; X86-NEXT:    popl %edi
910; X86-NEXT:    retl $4
911entry:
912  %round = call fp128 @llvm.experimental.constrained.round.f128(fp128 %x, metadata !"fpexcept.strict") #0
913  ret fp128 %round
914}
915
916define fp128 @roundeven(fp128 %x) nounwind strictfp {
917; CHECK-LABEL: roundeven:
918; CHECK:       # %bb.0: # %entry
919; CHECK-NEXT:    pushq %rax
920; CHECK-NEXT:    callq roundevenl@PLT
921; CHECK-NEXT:    popq %rax
922; CHECK-NEXT:    retq
923;
924; X86-LABEL: roundeven:
925; X86:       # %bb.0: # %entry
926; X86-NEXT:    pushl %edi
927; X86-NEXT:    pushl %esi
928; X86-NEXT:    subl $20, %esp
929; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
930; X86-NEXT:    subl $12, %esp
931; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
932; X86-NEXT:    pushl {{[0-9]+}}(%esp)
933; X86-NEXT:    pushl {{[0-9]+}}(%esp)
934; X86-NEXT:    pushl {{[0-9]+}}(%esp)
935; X86-NEXT:    pushl {{[0-9]+}}(%esp)
936; X86-NEXT:    pushl %eax
937; X86-NEXT:    calll roundevenl
938; X86-NEXT:    addl $28, %esp
939; X86-NEXT:    movl (%esp), %eax
940; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
941; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
942; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
943; X86-NEXT:    movl %edi, 8(%esi)
944; X86-NEXT:    movl %edx, 12(%esi)
945; X86-NEXT:    movl %eax, (%esi)
946; X86-NEXT:    movl %ecx, 4(%esi)
947; X86-NEXT:    movl %esi, %eax
948; X86-NEXT:    addl $20, %esp
949; X86-NEXT:    popl %esi
950; X86-NEXT:    popl %edi
951; X86-NEXT:    retl $4
952entry:
953  %roundeven = call fp128 @llvm.experimental.constrained.roundeven.f128(fp128 %x, metadata !"fpexcept.strict") #0
954  ret fp128 %roundeven
955}
956
957define fp128 @sin(fp128 %x) nounwind strictfp {
958; CHECK-LABEL: sin:
959; CHECK:       # %bb.0: # %entry
960; CHECK-NEXT:    pushq %rax
961; CHECK-NEXT:    callq sinl@PLT
962; CHECK-NEXT:    popq %rax
963; CHECK-NEXT:    retq
964;
965; X86-LABEL: sin:
966; X86:       # %bb.0: # %entry
967; X86-NEXT:    pushl %edi
968; X86-NEXT:    pushl %esi
969; X86-NEXT:    subl $20, %esp
970; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
971; X86-NEXT:    subl $12, %esp
972; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
973; X86-NEXT:    pushl {{[0-9]+}}(%esp)
974; X86-NEXT:    pushl {{[0-9]+}}(%esp)
975; X86-NEXT:    pushl {{[0-9]+}}(%esp)
976; X86-NEXT:    pushl {{[0-9]+}}(%esp)
977; X86-NEXT:    pushl %eax
978; X86-NEXT:    calll sinl
979; X86-NEXT:    addl $28, %esp
980; X86-NEXT:    movl (%esp), %eax
981; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
982; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
983; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
984; X86-NEXT:    movl %edi, 8(%esi)
985; X86-NEXT:    movl %edx, 12(%esi)
986; X86-NEXT:    movl %eax, (%esi)
987; X86-NEXT:    movl %ecx, 4(%esi)
988; X86-NEXT:    movl %esi, %eax
989; X86-NEXT:    addl $20, %esp
990; X86-NEXT:    popl %esi
991; X86-NEXT:    popl %edi
992; X86-NEXT:    retl $4
993entry:
994  %sin = call fp128 @llvm.experimental.constrained.sin.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
995  ret fp128 %sin
996}
997
998define fp128 @sqrt(fp128 %x) nounwind strictfp {
999; CHECK-LABEL: sqrt:
1000; CHECK:       # %bb.0: # %entry
1001; CHECK-NEXT:    pushq %rax
1002; CHECK-NEXT:    callq sqrtl@PLT
1003; CHECK-NEXT:    popq %rax
1004; CHECK-NEXT:    retq
1005;
1006; X86-LABEL: sqrt:
1007; X86:       # %bb.0: # %entry
1008; X86-NEXT:    pushl %edi
1009; X86-NEXT:    pushl %esi
1010; X86-NEXT:    subl $20, %esp
1011; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
1012; X86-NEXT:    subl $12, %esp
1013; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
1014; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1015; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1016; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1017; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1018; X86-NEXT:    pushl %eax
1019; X86-NEXT:    calll sqrtl
1020; X86-NEXT:    addl $28, %esp
1021; X86-NEXT:    movl (%esp), %eax
1022; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
1023; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
1024; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
1025; X86-NEXT:    movl %edi, 8(%esi)
1026; X86-NEXT:    movl %edx, 12(%esi)
1027; X86-NEXT:    movl %eax, (%esi)
1028; X86-NEXT:    movl %ecx, 4(%esi)
1029; X86-NEXT:    movl %esi, %eax
1030; X86-NEXT:    addl $20, %esp
1031; X86-NEXT:    popl %esi
1032; X86-NEXT:    popl %edi
1033; X86-NEXT:    retl $4
1034entry:
1035  %sqrt = call fp128 @llvm.experimental.constrained.sqrt.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
1036  ret fp128 %sqrt
1037}
1038
1039define fp128 @trunc(fp128 %x) nounwind strictfp {
1040; CHECK-LABEL: trunc:
1041; CHECK:       # %bb.0: # %entry
1042; CHECK-NEXT:    pushq %rax
1043; CHECK-NEXT:    callq truncl@PLT
1044; CHECK-NEXT:    popq %rax
1045; CHECK-NEXT:    retq
1046;
1047; X86-LABEL: trunc:
1048; X86:       # %bb.0: # %entry
1049; X86-NEXT:    pushl %edi
1050; X86-NEXT:    pushl %esi
1051; X86-NEXT:    subl $20, %esp
1052; X86-NEXT:    movl {{[0-9]+}}(%esp), %esi
1053; X86-NEXT:    subl $12, %esp
1054; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
1055; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1056; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1057; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1058; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1059; X86-NEXT:    pushl %eax
1060; X86-NEXT:    calll truncl
1061; X86-NEXT:    addl $28, %esp
1062; X86-NEXT:    movl (%esp), %eax
1063; X86-NEXT:    movl {{[0-9]+}}(%esp), %ecx
1064; X86-NEXT:    movl {{[0-9]+}}(%esp), %edx
1065; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
1066; X86-NEXT:    movl %edi, 8(%esi)
1067; X86-NEXT:    movl %edx, 12(%esi)
1068; X86-NEXT:    movl %eax, (%esi)
1069; X86-NEXT:    movl %ecx, 4(%esi)
1070; X86-NEXT:    movl %esi, %eax
1071; X86-NEXT:    addl $20, %esp
1072; X86-NEXT:    popl %esi
1073; X86-NEXT:    popl %edi
1074; X86-NEXT:    retl $4
1075entry:
1076  %trunc = call fp128 @llvm.experimental.constrained.trunc.f128(fp128 %x, metadata !"fpexcept.strict") #0
1077  ret fp128 %trunc
1078}
1079
1080define i32 @lrint(fp128 %x) nounwind strictfp {
1081; CHECK-LABEL: lrint:
1082; CHECK:       # %bb.0: # %entry
1083; CHECK-NEXT:    pushq %rax
1084; CHECK-NEXT:    callq lrintl@PLT
1085; CHECK-NEXT:    popq %rcx
1086; CHECK-NEXT:    retq
1087;
1088; X86-LABEL: lrint:
1089; X86:       # %bb.0: # %entry
1090; X86-NEXT:    subl $12, %esp
1091; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1092; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1093; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1094; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1095; X86-NEXT:    calll lrintl
1096; X86-NEXT:    addl $28, %esp
1097; X86-NEXT:    retl
1098entry:
1099  %rint = call i32 @llvm.experimental.constrained.lrint.i32.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
1100  ret i32 %rint
1101}
1102
1103define i64 @llrint(fp128 %x) nounwind strictfp {
1104; CHECK-LABEL: llrint:
1105; CHECK:       # %bb.0: # %entry
1106; CHECK-NEXT:    pushq %rax
1107; CHECK-NEXT:    callq llrintl@PLT
1108; CHECK-NEXT:    popq %rcx
1109; CHECK-NEXT:    retq
1110;
1111; X86-LABEL: llrint:
1112; X86:       # %bb.0: # %entry
1113; X86-NEXT:    subl $12, %esp
1114; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1115; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1116; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1117; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1118; X86-NEXT:    calll llrintl
1119; X86-NEXT:    addl $28, %esp
1120; X86-NEXT:    retl
1121entry:
1122  %rint = call i64 @llvm.experimental.constrained.llrint.i64.f128(fp128 %x, metadata !"round.dynamic", metadata !"fpexcept.strict") #0
1123  ret i64 %rint
1124}
1125
1126define i32 @lround(fp128 %x) nounwind strictfp {
1127; CHECK-LABEL: lround:
1128; CHECK:       # %bb.0: # %entry
1129; CHECK-NEXT:    pushq %rax
1130; CHECK-NEXT:    callq lroundl@PLT
1131; CHECK-NEXT:    popq %rcx
1132; CHECK-NEXT:    retq
1133;
1134; X86-LABEL: lround:
1135; X86:       # %bb.0: # %entry
1136; X86-NEXT:    subl $12, %esp
1137; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1138; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1139; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1140; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1141; X86-NEXT:    calll lroundl
1142; X86-NEXT:    addl $28, %esp
1143; X86-NEXT:    retl
1144entry:
1145  %round = call i32 @llvm.experimental.constrained.lround.i32.f128(fp128 %x, metadata !"fpexcept.strict") #0
1146  ret i32 %round
1147}
1148
1149define i64 @llround(fp128 %x) nounwind strictfp {
1150; CHECK-LABEL: llround:
1151; CHECK:       # %bb.0: # %entry
1152; CHECK-NEXT:    pushq %rax
1153; CHECK-NEXT:    callq llroundl@PLT
1154; CHECK-NEXT:    popq %rcx
1155; CHECK-NEXT:    retq
1156;
1157; X86-LABEL: llround:
1158; X86:       # %bb.0: # %entry
1159; X86-NEXT:    subl $12, %esp
1160; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1161; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1162; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1163; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1164; X86-NEXT:    calll llroundl
1165; X86-NEXT:    addl $28, %esp
1166; X86-NEXT:    retl
1167entry:
1168  %round = call i64 @llvm.experimental.constrained.llround.i64.f128(fp128 %x, metadata !"fpexcept.strict") #0
1169  ret i64 %round
1170}
1171
1172define i64 @cmp(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1173; CHECK-LABEL: cmp:
1174; CHECK:       # %bb.0:
1175; CHECK-NEXT:    pushq %r14
1176; CHECK-NEXT:    pushq %rbx
1177; CHECK-NEXT:    pushq %rax
1178; CHECK-NEXT:    movq %rsi, %r14
1179; CHECK-NEXT:    movq %rdi, %rbx
1180; CHECK-NEXT:    callq __eqtf2@PLT
1181; CHECK-NEXT:    testl %eax, %eax
1182; CHECK-NEXT:    cmovneq %r14, %rbx
1183; CHECK-NEXT:    movq %rbx, %rax
1184; CHECK-NEXT:    addq $8, %rsp
1185; CHECK-NEXT:    popq %rbx
1186; CHECK-NEXT:    popq %r14
1187; CHECK-NEXT:    retq
1188;
1189; X86-LABEL: cmp:
1190; X86:       # %bb.0:
1191; X86-NEXT:    subl $12, %esp
1192; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1193; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1194; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1195; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1196; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1197; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1198; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1199; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1200; X86-NEXT:    calll __eqtf2
1201; X86-NEXT:    addl $32, %esp
1202; X86-NEXT:    testl %eax, %eax
1203; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
1204; X86-NEXT:    leal {{[0-9]+}}(%esp), %ecx
1205; X86-NEXT:    cmovel %eax, %ecx
1206; X86-NEXT:    movl (%ecx), %eax
1207; X86-NEXT:    movl 4(%ecx), %edx
1208; X86-NEXT:    addl $12, %esp
1209; X86-NEXT:    retl
1210  %cond = call i1 @llvm.experimental.constrained.fcmp.f128(
1211                                               fp128 %x, fp128 %y,
1212                                               metadata !"oeq",
1213                                               metadata !"fpexcept.strict") #0
1214  %res = select i1 %cond, i64 %a, i64 %b
1215  ret i64 %res
1216}
1217
1218define i64 @cmps(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1219; CHECK-LABEL: cmps:
1220; CHECK:       # %bb.0:
1221; CHECK-NEXT:    pushq %r14
1222; CHECK-NEXT:    pushq %rbx
1223; CHECK-NEXT:    pushq %rax
1224; CHECK-NEXT:    movq %rsi, %r14
1225; CHECK-NEXT:    movq %rdi, %rbx
1226; CHECK-NEXT:    callq __eqtf2@PLT
1227; CHECK-NEXT:    testl %eax, %eax
1228; CHECK-NEXT:    cmovneq %r14, %rbx
1229; CHECK-NEXT:    movq %rbx, %rax
1230; CHECK-NEXT:    addq $8, %rsp
1231; CHECK-NEXT:    popq %rbx
1232; CHECK-NEXT:    popq %r14
1233; CHECK-NEXT:    retq
1234;
1235; X86-LABEL: cmps:
1236; X86:       # %bb.0:
1237; X86-NEXT:    subl $12, %esp
1238; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1239; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1240; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1241; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1242; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1243; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1244; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1245; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1246; X86-NEXT:    calll __eqtf2
1247; X86-NEXT:    addl $32, %esp
1248; X86-NEXT:    testl %eax, %eax
1249; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
1250; X86-NEXT:    leal {{[0-9]+}}(%esp), %ecx
1251; X86-NEXT:    cmovel %eax, %ecx
1252; X86-NEXT:    movl (%ecx), %eax
1253; X86-NEXT:    movl 4(%ecx), %edx
1254; X86-NEXT:    addl $12, %esp
1255; X86-NEXT:    retl
1256  %cond = call i1 @llvm.experimental.constrained.fcmps.f128(
1257                                               fp128 %x, fp128 %y,
1258                                               metadata !"oeq",
1259                                               metadata !"fpexcept.strict") #0
1260  %res = select i1 %cond, i64 %a, i64 %b
1261  ret i64 %res
1262}
1263
1264define i64 @cmp_ueq_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1265; CHECK-LABEL: cmp_ueq_q:
1266; CHECK:       # %bb.0:
1267; CHECK-NEXT:    pushq %rbp
1268; CHECK-NEXT:    pushq %r14
1269; CHECK-NEXT:    pushq %rbx
1270; CHECK-NEXT:    subq $32, %rsp
1271; CHECK-NEXT:    movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1272; CHECK-NEXT:    movaps %xmm0, (%rsp) # 16-byte Spill
1273; CHECK-NEXT:    movq %rsi, %r14
1274; CHECK-NEXT:    movq %rdi, %rbx
1275; CHECK-NEXT:    callq __eqtf2@PLT
1276; CHECK-NEXT:    testl %eax, %eax
1277; CHECK-NEXT:    sete %bpl
1278; CHECK-NEXT:    movaps (%rsp), %xmm0 # 16-byte Reload
1279; CHECK-NEXT:    movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
1280; CHECK-NEXT:    callq __unordtf2@PLT
1281; CHECK-NEXT:    testl %eax, %eax
1282; CHECK-NEXT:    setne %al
1283; CHECK-NEXT:    orb %bpl, %al
1284; CHECK-NEXT:    cmoveq %r14, %rbx
1285; CHECK-NEXT:    movq %rbx, %rax
1286; CHECK-NEXT:    addq $32, %rsp
1287; CHECK-NEXT:    popq %rbx
1288; CHECK-NEXT:    popq %r14
1289; CHECK-NEXT:    popq %rbp
1290; CHECK-NEXT:    retq
1291;
1292; X86-LABEL: cmp_ueq_q:
1293; X86:       # %bb.0:
1294; X86-NEXT:    pushl %ebp
1295; X86-NEXT:    pushl %ebx
1296; X86-NEXT:    pushl %edi
1297; X86-NEXT:    pushl %esi
1298; X86-NEXT:    subl $12, %esp
1299; X86-NEXT:    movl {{[0-9]+}}(%esp), %ebp
1300; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
1301; X86-NEXT:    movl {{[0-9]+}}(%esp), %ebx
1302; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1303; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1304; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1305; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1306; X86-NEXT:    pushl %ebx
1307; X86-NEXT:    movl %ebx, %esi
1308; X86-NEXT:    pushl %edi
1309; X86-NEXT:    pushl %ebp
1310; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1311; X86-NEXT:    calll __eqtf2
1312; X86-NEXT:    addl $32, %esp
1313; X86-NEXT:    testl %eax, %eax
1314; X86-NEXT:    sete %bl
1315; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1316; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1317; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1318; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1319; X86-NEXT:    pushl %esi
1320; X86-NEXT:    pushl %edi
1321; X86-NEXT:    pushl %ebp
1322; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1323; X86-NEXT:    calll __unordtf2
1324; X86-NEXT:    addl $32, %esp
1325; X86-NEXT:    testl %eax, %eax
1326; X86-NEXT:    setne %al
1327; X86-NEXT:    orb %bl, %al
1328; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
1329; X86-NEXT:    leal {{[0-9]+}}(%esp), %ecx
1330; X86-NEXT:    cmovnel %eax, %ecx
1331; X86-NEXT:    movl (%ecx), %eax
1332; X86-NEXT:    movl 4(%ecx), %edx
1333; X86-NEXT:    addl $12, %esp
1334; X86-NEXT:    popl %esi
1335; X86-NEXT:    popl %edi
1336; X86-NEXT:    popl %ebx
1337; X86-NEXT:    popl %ebp
1338; X86-NEXT:    retl
1339  %cond = call i1 @llvm.experimental.constrained.fcmp.f128(
1340                                               fp128 %x, fp128 %y,
1341                                               metadata !"ueq",
1342                                               metadata !"fpexcept.strict") #0
1343  %res = select i1 %cond, i64 %a, i64 %b
1344  ret i64 %res
1345}
1346
1347define i64 @cmp_one_q(i64 %a, i64 %b, fp128 %x, fp128 %y) #0 {
1348; CHECK-LABEL: cmp_one_q:
1349; CHECK:       # %bb.0:
1350; CHECK-NEXT:    pushq %rbp
1351; CHECK-NEXT:    pushq %r14
1352; CHECK-NEXT:    pushq %rbx
1353; CHECK-NEXT:    subq $32, %rsp
1354; CHECK-NEXT:    movaps %xmm1, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill
1355; CHECK-NEXT:    movaps %xmm0, (%rsp) # 16-byte Spill
1356; CHECK-NEXT:    movq %rsi, %r14
1357; CHECK-NEXT:    movq %rdi, %rbx
1358; CHECK-NEXT:    callq __eqtf2@PLT
1359; CHECK-NEXT:    testl %eax, %eax
1360; CHECK-NEXT:    setne %bpl
1361; CHECK-NEXT:    movaps (%rsp), %xmm0 # 16-byte Reload
1362; CHECK-NEXT:    movaps {{[-0-9]+}}(%r{{[sb]}}p), %xmm1 # 16-byte Reload
1363; CHECK-NEXT:    callq __unordtf2@PLT
1364; CHECK-NEXT:    testl %eax, %eax
1365; CHECK-NEXT:    sete %al
1366; CHECK-NEXT:    testb %bpl, %al
1367; CHECK-NEXT:    cmoveq %r14, %rbx
1368; CHECK-NEXT:    movq %rbx, %rax
1369; CHECK-NEXT:    addq $32, %rsp
1370; CHECK-NEXT:    popq %rbx
1371; CHECK-NEXT:    popq %r14
1372; CHECK-NEXT:    popq %rbp
1373; CHECK-NEXT:    retq
1374;
1375; X86-LABEL: cmp_one_q:
1376; X86:       # %bb.0:
1377; X86-NEXT:    pushl %ebp
1378; X86-NEXT:    pushl %ebx
1379; X86-NEXT:    pushl %edi
1380; X86-NEXT:    pushl %esi
1381; X86-NEXT:    subl $12, %esp
1382; X86-NEXT:    movl {{[0-9]+}}(%esp), %ebp
1383; X86-NEXT:    movl {{[0-9]+}}(%esp), %edi
1384; X86-NEXT:    movl {{[0-9]+}}(%esp), %ebx
1385; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1386; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1387; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1388; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1389; X86-NEXT:    pushl %ebx
1390; X86-NEXT:    movl %ebx, %esi
1391; X86-NEXT:    pushl %edi
1392; X86-NEXT:    pushl %ebp
1393; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1394; X86-NEXT:    calll __eqtf2
1395; X86-NEXT:    addl $32, %esp
1396; X86-NEXT:    testl %eax, %eax
1397; X86-NEXT:    setne %bl
1398; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1399; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1400; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1401; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1402; X86-NEXT:    pushl %esi
1403; X86-NEXT:    pushl %edi
1404; X86-NEXT:    pushl %ebp
1405; X86-NEXT:    pushl {{[0-9]+}}(%esp)
1406; X86-NEXT:    calll __unordtf2
1407; X86-NEXT:    addl $32, %esp
1408; X86-NEXT:    testl %eax, %eax
1409; X86-NEXT:    sete %al
1410; X86-NEXT:    testb %bl, %al
1411; X86-NEXT:    leal {{[0-9]+}}(%esp), %eax
1412; X86-NEXT:    leal {{[0-9]+}}(%esp), %ecx
1413; X86-NEXT:    cmovnel %eax, %ecx
1414; X86-NEXT:    movl (%ecx), %eax
1415; X86-NEXT:    movl 4(%ecx), %edx
1416; X86-NEXT:    addl $12, %esp
1417; X86-NEXT:    popl %esi
1418; X86-NEXT:    popl %edi
1419; X86-NEXT:    popl %ebx
1420; X86-NEXT:    popl %ebp
1421; X86-NEXT:    retl
1422  %cond = call i1 @llvm.experimental.constrained.fcmp.f128(
1423                                               fp128 %x, fp128 %y,
1424                                               metadata !"one",
1425                                               metadata !"fpexcept.strict") #0
1426  %res = select i1 %cond, i64 %a, i64 %b
1427  ret i64 %res
1428}
1429
1430attributes #0 = { nounwind strictfp }
1431
1432declare fp128 @llvm.experimental.constrained.fadd.f128(fp128, fp128, metadata, metadata)
1433declare fp128 @llvm.experimental.constrained.fsub.f128(fp128, fp128, metadata, metadata)
1434declare fp128 @llvm.experimental.constrained.fmul.f128(fp128, fp128, metadata, metadata)
1435declare fp128 @llvm.experimental.constrained.fdiv.f128(fp128, fp128, metadata, metadata)
1436declare fp128 @llvm.experimental.constrained.fma.f128(fp128, fp128, fp128, metadata, metadata)
1437declare fp128 @llvm.experimental.constrained.frem.f128(fp128, fp128, metadata, metadata)
1438declare fp128 @llvm.experimental.constrained.ceil.f128(fp128, metadata)
1439declare fp128 @llvm.experimental.constrained.cos.f128(fp128, metadata, metadata)
1440declare fp128 @llvm.experimental.constrained.exp.f128(fp128, metadata, metadata)
1441declare fp128 @llvm.experimental.constrained.exp2.f128(fp128, metadata, metadata)
1442declare fp128 @llvm.experimental.constrained.floor.f128(fp128, metadata)
1443declare fp128 @llvm.experimental.constrained.log.f128(fp128, metadata, metadata)
1444declare fp128 @llvm.experimental.constrained.log10.f128(fp128, metadata, metadata)
1445declare fp128 @llvm.experimental.constrained.log2.f128(fp128, metadata, metadata)
1446declare fp128 @llvm.experimental.constrained.maxnum.f128(fp128, fp128, metadata)
1447declare fp128 @llvm.experimental.constrained.minnum.f128(fp128, fp128, metadata)
1448declare fp128 @llvm.experimental.constrained.nearbyint.f128(fp128, metadata, metadata)
1449declare fp128 @llvm.experimental.constrained.pow.f128(fp128, fp128, metadata, metadata)
1450declare fp128 @llvm.experimental.constrained.powi.f128(fp128, i32, metadata, metadata)
1451declare fp128 @llvm.experimental.constrained.rint.f128(fp128, metadata, metadata)
1452declare fp128 @llvm.experimental.constrained.round.f128(fp128, metadata)
1453declare fp128 @llvm.experimental.constrained.roundeven.f128(fp128, metadata)
1454declare fp128 @llvm.experimental.constrained.sin.f128(fp128, metadata, metadata)
1455declare fp128 @llvm.experimental.constrained.sqrt.f128(fp128, metadata, metadata)
1456declare fp128 @llvm.experimental.constrained.trunc.f128(fp128, metadata)
1457declare i32 @llvm.experimental.constrained.lrint.i32.f128(fp128, metadata, metadata)
1458declare i64 @llvm.experimental.constrained.llrint.i64.f128(fp128, metadata, metadata)
1459declare i32 @llvm.experimental.constrained.lround.i32.f128(fp128, metadata)
1460declare i64 @llvm.experimental.constrained.llround.i64.f128(fp128, metadata)
1461declare i1 @llvm.experimental.constrained.fcmp.f128(fp128, fp128, metadata, metadata)
1462declare i1 @llvm.experimental.constrained.fcmps.f128(fp128, fp128, metadata, metadata)
1463