Matt Arsenault | 7c93690 | 2014-10-21 23:01:01 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=x86 -mtriple=i386-linux-gnu < %s | FileCheck %s |
| 2 | |
| 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) |
| 9 | |
| 10 | ; CHECK-LABEL: @test_fmaxf |
| 11 | ; CHECK: calll fmaxf |
| 12 | define float @test_fmaxf(float %x, float %y) { |
| 13 | %z = call float @fmaxf(float %x, float %y) readnone |
| 14 | ret float %z |
| 15 | } |
| 16 | |
| 17 | ; CHECK-LABEL: @test_fmax |
| 18 | ; CHECK: calll fmax |
| 19 | define double @test_fmax(double %x, double %y) { |
| 20 | %z = call double @fmax(double %x, double %y) readnone |
| 21 | ret double %z |
| 22 | } |
| 23 | |
| 24 | ; CHECK-LABEL: @test_fmaxl |
| 25 | ; CHECK: calll 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 |
| 28 | ret x86_fp80 %z |
| 29 | } |
| 30 | |
| 31 | ; CHECK-LABEL: @test_intrinsic_fmaxf |
| 32 | ; CHECK: calll fmaxf |
| 33 | define float @test_intrinsic_fmaxf(float %x, float %y) { |
| 34 | %z = call float @llvm.maxnum.f32(float %x, float %y) readnone |
| 35 | ret float %z |
| 36 | } |
| 37 | |
| 38 | ; CHECK-LABEL: @test_intrinsic_fmax |
| 39 | ; CHECK: calll fmax |
| 40 | define double @test_intrinsic_fmax(double %x, double %y) { |
| 41 | %z = call double @llvm.maxnum.f64(double %x, double %y) readnone |
| 42 | ret double %z |
| 43 | } |
| 44 | |
| 45 | ; CHECK-LABEL: @test_intrinsic_fmaxl |
| 46 | ; CHECK: calll 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 |
| 49 | ret x86_fp80 %z |
| 50 | } |