[TwoAddressInstructionPass] When looking for a 3 addr conversion after commuting...
[oota-llvm.git] / test / CodeGen / X86 / fminnum.ll
1 ; RUN: llc  -march=x86 -mtriple=i386-linux-gnu -mattr=+sse,+sse2 < %s | FileCheck %s
2
3 declare float @fminf(float, float)
4 declare double @fmin(double, double)
5 declare x86_fp80 @fminl(x86_fp80, x86_fp80)
6 declare float @llvm.minnum.f32(float, float)
7 declare double @llvm.minnum.f64(double, double)
8 declare x86_fp80 @llvm.minnum.f80(x86_fp80, x86_fp80)
9
10 declare <2 x float> @llvm.minnum.v2f32(<2 x float>, <2 x float>)
11 declare <4 x float> @llvm.minnum.v4f32(<4 x float>, <4 x float>)
12 declare <2 x double> @llvm.minnum.v2f64(<2 x double>, <2 x double>)
13 declare <8 x double> @llvm.minnum.v8f64(<8 x double>, <8 x double>)
14
15 ; CHECK-LABEL: @test_fminf
16 ; CHECK: jmp fminf
17 define float @test_fminf(float %x, float %y) {
18   %z = call float @fminf(float %x, float %y) readnone
19   ret float %z
20 }
21
22 ; CHECK-LABEL: @test_fmin
23 ; CHECK: jmp fmin
24 define double @test_fmin(double %x, double %y) {
25   %z = call double @fmin(double %x, double %y) readnone
26   ret double %z
27 }
28
29 ; CHECK-LABEL: @test_fminl
30 ; CHECK: calll fminl
31 define x86_fp80 @test_fminl(x86_fp80 %x, x86_fp80 %y) {
32   %z = call x86_fp80 @fminl(x86_fp80 %x, x86_fp80 %y) readnone
33   ret x86_fp80 %z
34 }
35
36 ; CHECK-LABEL: @test_intrinsic_fminf
37 ; CHECK: jmp fminf
38 define float @test_intrinsic_fminf(float %x, float %y) {
39   %z = call float @llvm.minnum.f32(float %x, float %y) readnone
40   ret float %z
41 }
42
43 ; CHECK-LABEL: @test_intrinsic_fmin
44 ; CHECK: jmp fmin
45 define double @test_intrinsic_fmin(double %x, double %y) {
46   %z = call double @llvm.minnum.f64(double %x, double %y) readnone
47   ret double %z
48 }
49
50 ; CHECK-LABEL: @test_intrinsic_fminl
51 ; CHECK: calll fminl
52 define x86_fp80 @test_intrinsic_fminl(x86_fp80 %x, x86_fp80 %y) {
53   %z = call x86_fp80 @llvm.minnum.f80(x86_fp80 %x, x86_fp80 %y) readnone
54   ret x86_fp80 %z
55 }
56
57 ; CHECK-LABEL: @test_intrinsic_fmin_v2f32
58 ; CHECK: calll fminf
59 ; CHECK: calll fminf
60 define <2 x float> @test_intrinsic_fmin_v2f32(<2 x float> %x, <2 x float> %y) {
61   %z = call <2 x float> @llvm.minnum.v2f32(<2 x float> %x, <2 x float> %y) readnone
62   ret <2 x float> %z
63 }
64
65 ; CHECK-LABEL: @test_intrinsic_fmin_v4f32
66 ; CHECK: calll fminf
67 ; CHECK: calll fminf
68 ; CHECK: calll fminf
69 ; CHECK: calll fminf
70 define <4 x float> @test_intrinsic_fmin_v4f32(<4 x float> %x, <4 x float> %y) {
71   %z = call <4 x float> @llvm.minnum.v4f32(<4 x float> %x, <4 x float> %y) readnone
72   ret <4 x float> %z
73 }
74
75 ; CHECK-LABEL: @test_intrinsic_fmin_v2f64
76 ; CHECK: calll fmin
77 ; CHECK: calll fmin
78 define <2 x double> @test_intrinsic_fmin_v2f64(<2 x double> %x, <2 x double> %y) {
79   %z = call <2 x double> @llvm.minnum.v2f64(<2 x double> %x, <2 x double> %y) readnone
80   ret <2 x double> %z
81 }
82
83 ; CHECK-LABEL: @test_intrinsic_fmin_v8f64
84 ; CHECK: calll fmin
85 ; CHECK: calll fmin
86 ; CHECK: calll fmin
87 ; CHECK: calll fmin
88 ; CHECK: calll fmin
89 ; CHECK: calll fmin
90 ; CHECK: calll fmin
91 ; CHECK: calll fmin
92 define <8 x double> @test_intrinsic_fmin_v8f64(<8 x double> %x, <8 x double> %y) {
93   %z = call <8 x double> @llvm.minnum.v8f64(<8 x double> %x, <8 x double> %y) readnone
94   ret <8 x double> %z
95 }