1 ; RUN: llc -verify-machineinstrs -mcpu=pwr6 -mattr=+altivec < %s | FileCheck %s
3 ; Check vector round to single-precision toward -infinity (vrfim)
4 ; instruction generation using Altivec.
6 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-v128:128:128-n32:64"
7 target triple = "powerpc64-unknown-linux-gnu"
9 declare <2 x double> @llvm.floor.v2f64(<2 x double> %p)
10 define <2 x double> @floor_v2f64(<2 x double> %p)
12 %t = call <2 x double> @llvm.floor.v2f64(<2 x double> %p)
15 ; CHECK-LABEL: floor_v2f64:
19 declare <4 x double> @llvm.floor.v4f64(<4 x double> %p)
20 define <4 x double> @floor_v4f64(<4 x double> %p)
22 %t = call <4 x double> @llvm.floor.v4f64(<4 x double> %p)
25 ; CHECK-LABEL: floor_v4f64:
31 declare <2 x double> @llvm.ceil.v2f64(<2 x double> %p)
32 define <2 x double> @ceil_v2f64(<2 x double> %p)
34 %t = call <2 x double> @llvm.ceil.v2f64(<2 x double> %p)
37 ; CHECK-LABEL: ceil_v2f64:
41 declare <4 x double> @llvm.ceil.v4f64(<4 x double> %p)
42 define <4 x double> @ceil_v4f64(<4 x double> %p)
44 %t = call <4 x double> @llvm.ceil.v4f64(<4 x double> %p)
47 ; CHECK-LABEL: ceil_v4f64:
53 declare <2 x double> @llvm.trunc.v2f64(<2 x double> %p)
54 define <2 x double> @trunc_v2f64(<2 x double> %p)
56 %t = call <2 x double> @llvm.trunc.v2f64(<2 x double> %p)
59 ; CHECK-LABEL: trunc_v2f64:
63 declare <4 x double> @llvm.trunc.v4f64(<4 x double> %p)
64 define <4 x double> @trunc_v4f64(<4 x double> %p)
66 %t = call <4 x double> @llvm.trunc.v4f64(<4 x double> %p)
69 ; CHECK-LABEL: trunc_v4f64:
75 declare <2 x double> @llvm.nearbyint.v2f64(<2 x double> %p)
76 define <2 x double> @nearbyint_v2f64(<2 x double> %p)
78 %t = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> %p)
81 ; CHECK-LABEL: nearbyint_v2f64:
85 declare <4 x double> @llvm.nearbyint.v4f64(<4 x double> %p)
86 define <4 x double> @nearbyint_v4f64(<4 x double> %p)
88 %t = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> %p)
91 ; CHECK-LABEL: nearbyint_v4f64:
98 declare <4 x float> @llvm.floor.v4f32(<4 x float> %p)
99 define <4 x float> @floor_v4f32(<4 x float> %p)
101 %t = call <4 x float> @llvm.floor.v4f32(<4 x float> %p)
104 ; CHECK-LABEL: floor_v4f32:
107 declare <8 x float> @llvm.floor.v8f32(<8 x float> %p)
108 define <8 x float> @floor_v8f32(<8 x float> %p)
110 %t = call <8 x float> @llvm.floor.v8f32(<8 x float> %p)
113 ; CHECK-LABEL: floor_v8f32:
117 declare <4 x float> @llvm.ceil.v4f32(<4 x float> %p)
118 define <4 x float> @ceil_v4f32(<4 x float> %p)
120 %t = call <4 x float> @llvm.ceil.v4f32(<4 x float> %p)
123 ; CHECK-LABEL: ceil_v4f32:
126 declare <8 x float> @llvm.ceil.v8f32(<8 x float> %p)
127 define <8 x float> @ceil_v8f32(<8 x float> %p)
129 %t = call <8 x float> @llvm.ceil.v8f32(<8 x float> %p)
132 ; CHECK-LABEL: ceil_v8f32:
136 declare <4 x float> @llvm.trunc.v4f32(<4 x float> %p)
137 define <4 x float> @trunc_v4f32(<4 x float> %p)
139 %t = call <4 x float> @llvm.trunc.v4f32(<4 x float> %p)
142 ; CHECK-LABEL: trunc_v4f32:
145 declare <8 x float> @llvm.trunc.v8f32(<8 x float> %p)
146 define <8 x float> @trunc_v8f32(<8 x float> %p)
148 %t = call <8 x float> @llvm.trunc.v8f32(<8 x float> %p)
151 ; CHECK-LABEL: trunc_v8f32:
155 declare <4 x float> @llvm.nearbyint.v4f32(<4 x float> %p)
156 define <4 x float> @nearbyint_v4f32(<4 x float> %p)
158 %t = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %p)
161 ; CHECK-LABEL: nearbyint_v4f32:
164 declare <8 x float> @llvm.nearbyint.v8f32(<8 x float> %p)
165 define <8 x float> @nearbyint_v8f32(<8 x float> %p)
167 %t = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> %p)
170 ; CHECK-LABEL: nearbyint_v8f32: