1 ; RUN: llc -march=ppc32 -mtriple=powerpc-unknown-linux-gnu < %s | FileCheck %s 2 3 declare float @fminf(float, float) 4 declare double @fmin(double, double) 5 declare ppc_fp128 @fminl(ppc_fp128, ppc_fp128) 6 declare float @llvm.minnum.f32(float, float) 7 declare double @llvm.minnum.f64(double, double) 8 declare ppc_fp128 @llvm.minnum.ppcf128(ppc_fp128, ppc_fp128) 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 <8 x float> @llvm.minnum.v8f32(<8 x float>, <8 x float>) 13 14 ; CHECK-LABEL: @test_fminf 15 ; CHECK: bl fminf 16 define float @test_fminf(float %x, float %y) { 17 %z = call float @fminf(float %x, float %y) readnone 18 ret float %z 19 } 20 21 ; CHECK-LABEL: @test_fmin 22 ; CHECK: bl fmin 23 define double @test_fmin(double %x, double %y) { 24 %z = call double @fmin(double %x, double %y) readnone 25 ret double %z 26 } 27 28 ; CHECK-LABEL: @test_fminl 29 ; CHECK: bl fminl 30 define ppc_fp128 @test_fminl(ppc_fp128 %x, ppc_fp128 %y) { 31 %z = call ppc_fp128 @fminl(ppc_fp128 %x, ppc_fp128 %y) readnone 32 ret ppc_fp128 %z 33 } 34 35 ; CHECK-LABEL: @test_intrinsic_fmin_f32 36 ; CHECK: bl fminf 37 define float @test_intrinsic_fmin_f32(float %x, float %y) { 38 %z = call float @llvm.minnum.f32(float %x, float %y) readnone 39 ret float %z 40 } 41 42 ; CHECK-LABEL: @test_intrinsic_fmin_f64 43 ; CHECK: bl fmin 44 define double @test_intrinsic_fmin_f64(double %x, double %y) { 45 %z = call double @llvm.minnum.f64(double %x, double %y) readnone 46 ret double %z 47 } 48 49 ; CHECK-LABEL: @test_intrinsic_fmin_f128 50 ; CHECK: bl fminl 51 define ppc_fp128 @test_intrinsic_fmin_f128(ppc_fp128 %x, ppc_fp128 %y) { 52 %z = call ppc_fp128 @llvm.minnum.ppcf128(ppc_fp128 %x, ppc_fp128 %y) readnone 53 ret ppc_fp128 %z 54 } 55 56 ; CHECK-LABEL: @test_intrinsic_fminf_v2f32 57 ; CHECK: bl fminf 58 ; CHECK: bl fminf 59 define <2 x float> @test_intrinsic_fminf_v2f32(<2 x float> %x, <2 x float> %y) { 60 %z = call <2 x float> @llvm.minnum.v2f32(<2 x float> %x, <2 x float> %y) readnone 61 ret <2 x float> %z 62 } 63 64 ; CHECK-LABEL: @test_intrinsic_fmin_v4f32 65 ; CHECK: bl fminf 66 ; CHECK: bl fminf 67 ; CHECK: bl fminf 68 ; CHECK: bl fminf 69 define <4 x float> @test_intrinsic_fmin_v4f32(<4 x float> %x, <4 x float> %y) { 70 %z = call <4 x float> @llvm.minnum.v4f32(<4 x float> %x, <4 x float> %y) readnone 71 ret <4 x float> %z 72 } 73 74 ; CHECK-LABEL: @test_intrinsic_fmin_v8f32 75 ; CHECK: bl fminf 76 ; CHECK: bl fminf 77 ; CHECK: bl fminf 78 ; CHECK: bl fminf 79 ; CHECK: bl fminf 80 ; CHECK: bl fminf 81 ; CHECK: bl fminf 82 ; CHECK: bl fminf 83 define <8 x float> @test_intrinsic_fmin_v8f32(<8 x float> %x, <8 x float> %y) { 84 %z = call <8 x float> @llvm.minnum.v8f32(<8 x float> %x, <8 x float> %y) readnone 85 ret <8 x float> %z 86 } 87