Chad Rosier | b1bbf6f | 2014-08-15 21:38:16 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -mtriple=armv8-linux-gnueabihf -mattr=+fp-armv8 | FileCheck %s |
| 2 | |
| 3 | ; CHECK-LABEL: test1 |
| 4 | ; CHECK: vrintm.f32 |
| 5 | define float @test1(float %a) { |
| 6 | entry: |
| 7 | %call = call float @floorf(float %a) nounwind readnone |
| 8 | ret float %call |
| 9 | } |
| 10 | |
| 11 | ; CHECK-LABEL: test2 |
| 12 | ; CHECK: vrintm.f64 |
| 13 | define double @test2(double %a) { |
| 14 | entry: |
| 15 | %call = call double @floor(double %a) nounwind readnone |
| 16 | ret double %call |
| 17 | } |
| 18 | |
| 19 | ; CHECK-LABEL: test3 |
| 20 | ; CHECK: vrintp.f32 |
| 21 | define float @test3(float %a) { |
| 22 | entry: |
| 23 | %call = call float @ceilf(float %a) nounwind readnone |
| 24 | ret float %call |
| 25 | } |
| 26 | |
| 27 | ; CHECK-LABEL: test4 |
| 28 | ; CHECK: vrintp.f64 |
| 29 | define double @test4(double %a) { |
| 30 | entry: |
| 31 | %call = call double @ceil(double %a) nounwind readnone |
| 32 | ret double %call |
| 33 | } |
| 34 | |
| 35 | ; CHECK-LABEL: test5 |
| 36 | ; CHECK: vrinta.f32 |
| 37 | define float @test5(float %a) { |
| 38 | entry: |
| 39 | %call = call float @roundf(float %a) nounwind readnone |
| 40 | ret float %call |
| 41 | } |
| 42 | |
| 43 | ; CHECK-LABEL: test6 |
| 44 | ; CHECK: vrinta.f64 |
| 45 | define double @test6(double %a) { |
| 46 | entry: |
| 47 | %call = call double @round(double %a) nounwind readnone |
| 48 | ret double %call |
| 49 | } |
| 50 | |
| 51 | ; CHECK-LABEL: test7 |
| 52 | ; CHECK: vrintz.f32 |
| 53 | define float @test7(float %a) { |
| 54 | entry: |
| 55 | %call = call float @truncf(float %a) nounwind readnone |
| 56 | ret float %call |
| 57 | } |
| 58 | |
| 59 | ; CHECK-LABEL: test8 |
| 60 | ; CHECK: vrintz.f64 |
| 61 | define double @test8(double %a) { |
| 62 | entry: |
| 63 | %call = call double @trunc(double %a) nounwind readnone |
| 64 | ret double %call |
| 65 | } |
| 66 | |
| 67 | ; CHECK-LABEL: test9 |
| 68 | ; CHECK: vrintr.f32 |
| 69 | define float @test9(float %a) { |
| 70 | entry: |
| 71 | %call = call float @nearbyintf(float %a) nounwind readnone |
| 72 | ret float %call |
| 73 | } |
| 74 | |
| 75 | ; CHECK-LABEL: test10 |
| 76 | ; CHECK: vrintr.f64 |
| 77 | define double @test10(double %a) { |
| 78 | entry: |
| 79 | %call = call double @nearbyint(double %a) nounwind readnone |
| 80 | ret double %call |
| 81 | } |
| 82 | |
| 83 | ; CHECK-LABEL: test11 |
| 84 | ; CHECK: vrintx.f32 |
| 85 | define float @test11(float %a) { |
| 86 | entry: |
| 87 | %call = call float @rintf(float %a) nounwind readnone |
| 88 | ret float %call |
| 89 | } |
| 90 | |
| 91 | ; CHECK-LABEL: test12 |
| 92 | ; CHECK: vrintx.f64 |
| 93 | define double @test12(double %a) { |
| 94 | entry: |
| 95 | %call = call double @rint(double %a) nounwind readnone |
| 96 | ret double %call |
| 97 | } |
| 98 | |
| 99 | declare float @floorf(float) nounwind readnone |
| 100 | declare double @floor(double) nounwind readnone |
| 101 | declare float @ceilf(float) nounwind readnone |
| 102 | declare double @ceil(double) nounwind readnone |
| 103 | declare float @roundf(float) nounwind readnone |
| 104 | declare double @round(double) nounwind readnone |
| 105 | declare float @truncf(float) nounwind readnone |
| 106 | declare double @trunc(double) nounwind readnone |
| 107 | declare float @nearbyintf(float) nounwind readnone |
| 108 | declare double @nearbyint(double) nounwind readnone |
| 109 | declare float @rintf(float) nounwind readnone |
| 110 | declare double @rint(double) nounwind readnone |