1 ; RUN: llc -march=x86 -mtriple=i386-linux-gnu -mattr=+sse,+sse2 < %s | FileCheck %s
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)
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>)
15 ; CHECK-LABEL: @test_fminf
17 define float @test_fminf(float %x, float %y) {
18 %z = call float @fminf(float %x, float %y) readnone
22 ; CHECK-LABEL: @test_fmin
24 define double @test_fmin(double %x, double %y) {
25 %z = call double @fmin(double %x, double %y) readnone
29 ; CHECK-LABEL: @test_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
36 ; CHECK-LABEL: @test_intrinsic_fminf
38 define float @test_intrinsic_fminf(float %x, float %y) {
39 %z = call float @llvm.minnum.f32(float %x, float %y) readnone
43 ; CHECK-LABEL: @test_intrinsic_fmin
45 define double @test_intrinsic_fmin(double %x, double %y) {
46 %z = call double @llvm.minnum.f64(double %x, double %y) readnone
50 ; CHECK-LABEL: @test_intrinsic_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
57 ; CHECK-LABEL: @test_intrinsic_fmin_v2f32
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
65 ; CHECK-LABEL: @test_intrinsic_fmin_v4f32
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
75 ; CHECK-LABEL: @test_intrinsic_fmin_v2f64
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
83 ; CHECK-LABEL: @test_intrinsic_fmin_v8f64
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