| Hal Finkel | c93a9a2 | 2015-02-25 01:06:45 +0000 | [diff] [blame] | 1 | ; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2q | FileCheck %s | 
|  | 2 | ; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu -mcpu=a2q -enable-unsafe-fp-math | FileCheck -check-prefix=CHECK-FM %s | 
|  | 3 | target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64" | 
|  | 4 | target triple = "powerpc64-unknown-linux-gnu" | 
|  | 5 |  | 
|  | 6 | define <4 x float> @test1(<4 x float> %x) nounwind  { | 
|  | 7 | %call = tail call <4 x float> @llvm.floor.v4f32(<4 x float> %x) nounwind readnone | 
|  | 8 | ret <4 x float> %call | 
|  | 9 |  | 
|  | 10 | ; CHECK: test1: | 
|  | 11 | ; CHECK: qvfrim 1, 1 | 
|  | 12 |  | 
|  | 13 | ; CHECK-FM: test1: | 
|  | 14 | ; CHECK-FM: qvfrim 1, 1 | 
|  | 15 | } | 
|  | 16 |  | 
|  | 17 | declare <4 x float> @llvm.floor.v4f32(<4 x float>) nounwind readnone | 
|  | 18 |  | 
|  | 19 | define <4 x double> @test2(<4 x double> %x) nounwind  { | 
|  | 20 | %call = tail call <4 x double> @llvm.floor.v4f64(<4 x double> %x) nounwind readnone | 
|  | 21 | ret <4 x double> %call | 
|  | 22 |  | 
|  | 23 | ; CHECK: test2: | 
|  | 24 | ; CHECK: qvfrim 1, 1 | 
|  | 25 |  | 
|  | 26 | ; CHECK-FM: test2: | 
|  | 27 | ; CHECK-FM: qvfrim 1, 1 | 
|  | 28 | } | 
|  | 29 |  | 
|  | 30 | declare <4 x double> @llvm.floor.v4f64(<4 x double>) nounwind readnone | 
|  | 31 |  | 
|  | 32 | define <4 x float> @test3(<4 x float> %x) nounwind  { | 
|  | 33 | %call = tail call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %x) nounwind readnone | 
|  | 34 | ret <4 x float> %call | 
|  | 35 |  | 
|  | 36 | ; CHECK: test3: | 
|  | 37 | ; CHECK-NOT: qvfrin | 
|  | 38 |  | 
|  | 39 | ; CHECK-FM: test3: | 
|  | 40 | ; CHECK-FM-NOT: qvfrin | 
|  | 41 | } | 
|  | 42 |  | 
|  | 43 | declare <4 x float> @llvm.nearbyint.v4f32(<4 x float>) nounwind readnone | 
|  | 44 |  | 
|  | 45 | define <4 x double> @test4(<4 x double> %x) nounwind  { | 
|  | 46 | %call = tail call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %x) nounwind readnone | 
|  | 47 | ret <4 x double> %call | 
|  | 48 |  | 
|  | 49 | ; CHECK: test4: | 
|  | 50 | ; CHECK-NOT: qvfrin | 
|  | 51 |  | 
|  | 52 | ; CHECK-FM: test4: | 
|  | 53 | ; CHECK-FM-NOT: qvfrin | 
|  | 54 | } | 
|  | 55 |  | 
|  | 56 | declare <4 x double> @llvm.nearbyint.v4f64(<4 x double>) nounwind readnone | 
|  | 57 |  | 
|  | 58 | define <4 x float> @test5(<4 x float> %x) nounwind  { | 
|  | 59 | %call = tail call <4 x float> @llvm.ceil.v4f32(<4 x float> %x) nounwind readnone | 
|  | 60 | ret <4 x float> %call | 
|  | 61 |  | 
|  | 62 | ; CHECK: test5: | 
|  | 63 | ; CHECK: qvfrip 1, 1 | 
|  | 64 |  | 
|  | 65 | ; CHECK-FM: test5: | 
|  | 66 | ; CHECK-FM: qvfrip 1, 1 | 
|  | 67 | } | 
|  | 68 |  | 
|  | 69 | declare <4 x float> @llvm.ceil.v4f32(<4 x float>) nounwind readnone | 
|  | 70 |  | 
|  | 71 | define <4 x double> @test6(<4 x double> %x) nounwind  { | 
|  | 72 | %call = tail call <4 x double> @llvm.ceil.v4f64(<4 x double> %x) nounwind readnone | 
|  | 73 | ret <4 x double> %call | 
|  | 74 |  | 
|  | 75 | ; CHECK: test6: | 
|  | 76 | ; CHECK: qvfrip 1, 1 | 
|  | 77 |  | 
|  | 78 | ; CHECK-FM: test6: | 
|  | 79 | ; CHECK-FM: qvfrip 1, 1 | 
|  | 80 | } | 
|  | 81 |  | 
|  | 82 | declare <4 x double> @llvm.ceil.v4f64(<4 x double>) nounwind readnone | 
|  | 83 |  | 
|  | 84 | define <4 x float> @test9(<4 x float> %x) nounwind  { | 
|  | 85 | %call = tail call <4 x float> @llvm.trunc.v4f32(<4 x float> %x) nounwind readnone | 
|  | 86 | ret <4 x float> %call | 
|  | 87 |  | 
|  | 88 | ; CHECK: test9: | 
|  | 89 | ; CHECK: qvfriz 1, 1 | 
|  | 90 |  | 
|  | 91 | ; CHECK-FM: test9: | 
|  | 92 | ; CHECK-FM: qvfriz 1, 1 | 
|  | 93 | } | 
|  | 94 |  | 
|  | 95 | declare <4 x float> @llvm.trunc.v4f32(<4 x float>) nounwind readnone | 
|  | 96 |  | 
|  | 97 | define <4 x double> @test10(<4 x double> %x) nounwind  { | 
|  | 98 | %call = tail call <4 x double> @llvm.trunc.v4f64(<4 x double> %x) nounwind readnone | 
|  | 99 | ret <4 x double> %call | 
|  | 100 |  | 
|  | 101 | ; CHECK: test10: | 
|  | 102 | ; CHECK: qvfriz 1, 1 | 
|  | 103 |  | 
|  | 104 | ; CHECK-FM: test10: | 
|  | 105 | ; CHECK-FM: qvfriz 1, 1 | 
|  | 106 | } | 
|  | 107 |  | 
|  | 108 | declare <4 x double> @llvm.trunc.v4f64(<4 x double>) nounwind readnone | 
|  | 109 |  |