1 ; RUN: llc -march=x86 -mtriple=i386-linux-gnu < %s | FileCheck %s
3 declare float @fmaxf(float, float)
4 declare double @fmax(double, double)
5 declare x86_fp80 @fmaxl(x86_fp80, x86_fp80)
6 declare float @llvm.maxnum.f32(float, float)
7 declare double @llvm.maxnum.f64(double, double)
8 declare x86_fp80 @llvm.maxnum.f80(x86_fp80, x86_fp80)
10 declare <2 x float> @llvm.maxnum.v2f32(<2 x float>, <2 x float>)
11 declare <4 x float> @llvm.maxnum.v4f32(<4 x float>, <4 x float>)
12 declare <2 x double> @llvm.maxnum.v2f64(<2 x double>, <2 x double>)
13 declare <8 x double> @llvm.maxnum.v8f64(<8 x double>, <8 x double>)
16 ; CHECK-LABEL: @test_fmaxf
18 define float @test_fmaxf(float %x, float %y) {
19 %z = call float @fmaxf(float %x, float %y) readnone
23 ; CHECK-LABEL: @test_fmax
25 define double @test_fmax(double %x, double %y) {
26 %z = call double @fmax(double %x, double %y) readnone
30 ; CHECK-LABEL: @test_fmaxl
32 define x86_fp80 @test_fmaxl(x86_fp80 %x, x86_fp80 %y) {
33 %z = call x86_fp80 @fmaxl(x86_fp80 %x, x86_fp80 %y) readnone
37 ; CHECK-LABEL: @test_intrinsic_fmaxf
39 define float @test_intrinsic_fmaxf(float %x, float %y) {
40 %z = call float @llvm.maxnum.f32(float %x, float %y) readnone
44 ; CHECK-LABEL: @test_intrinsic_fmax
46 define double @test_intrinsic_fmax(double %x, double %y) {
47 %z = call double @llvm.maxnum.f64(double %x, double %y) readnone
51 ; CHECK-LABEL: @test_intrinsic_fmaxl
53 define x86_fp80 @test_intrinsic_fmaxl(x86_fp80 %x, x86_fp80 %y) {
54 %z = call x86_fp80 @llvm.maxnum.f80(x86_fp80 %x, x86_fp80 %y) readnone
58 ; CHECK-LABEL: @test_intrinsic_fmax_v2f32
61 define <2 x float> @test_intrinsic_fmax_v2f32(<2 x float> %x, <2 x float> %y) {
62 %z = call <2 x float> @llvm.maxnum.v2f32(<2 x float> %x, <2 x float> %y) readnone
66 ; CHECK-LABEL: @test_intrinsic_fmax_v4f32
71 define <4 x float> @test_intrinsic_fmax_v4f32(<4 x float> %x, <4 x float> %y) {
72 %z = call <4 x float> @llvm.maxnum.v4f32(<4 x float> %x, <4 x float> %y) readnone
76 ; CHECK-LABEL: @test_intrinsic_fmax_v2f64
79 define <2 x double> @test_intrinsic_fmax_v2f64(<2 x double> %x, <2 x double> %y) {
80 %z = call <2 x double> @llvm.maxnum.v2f64(<2 x double> %x, <2 x double> %y) readnone
84 ; CHECK-LABEL: @test_intrinsic_fmax_v8f64
93 define <8 x double> @test_intrinsic_fmax_v8f64(<8 x double> %x, <8 x double> %y) {
94 %z = call <8 x double> @llvm.maxnum.v8f64(<8 x double> %x, <8 x double> %y) readnone