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 ; CHECK-LABEL: @test_fmaxf
12 define float @test_fmaxf(float %x, float %y) {
13 %z = call float @fmaxf(float %x, float %y) readnone
17 ; CHECK-LABEL: @test_fmax
19 define double @test_fmax(double %x, double %y) {
20 %z = call double @fmax(double %x, double %y) readnone
24 ; CHECK-LABEL: @test_fmaxl
26 define x86_fp80 @test_fmaxl(x86_fp80 %x, x86_fp80 %y) {
27 %z = call x86_fp80 @fmaxl(x86_fp80 %x, x86_fp80 %y) readnone
31 ; CHECK-LABEL: @test_intrinsic_fmaxf
33 define float @test_intrinsic_fmaxf(float %x, float %y) {
34 %z = call float @llvm.maxnum.f32(float %x, float %y) readnone
38 ; CHECK-LABEL: @test_intrinsic_fmax
40 define double @test_intrinsic_fmax(double %x, double %y) {
41 %z = call double @llvm.maxnum.f64(double %x, double %y) readnone
45 ; CHECK-LABEL: @test_intrinsic_fmaxl
47 define x86_fp80 @test_intrinsic_fmaxl(x86_fp80 %x, x86_fp80 %y) {
48 %z = call x86_fp80 @llvm.maxnum.f80(x86_fp80 %x, x86_fp80 %y) readnone