]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/R600/llvm.floor.ll
Vendor import of llvm release_34 branch r197841 (effectively, 3.4 RC3):
[FreeBSD/FreeBSD.git] / test / CodeGen / R600 / llvm.floor.ll
1 ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=R600-CHECK
2 ; RUN: llc < %s -march=r600 -mcpu=SI -verify-machineinstrs | FileCheck %s --check-prefix=SI-CHECK
3
4 ; R600-CHECK: @f32
5 ; R600-CHECK: FLOOR
6 ; SI-CHECK: @f32
7 ; SI-CHECK: V_FLOOR_F32_e32
8 define void @f32(float addrspace(1)* %out, float %in) {
9 entry:
10   %0 = call float @llvm.floor.f32(float %in)
11   store float %0, float addrspace(1)* %out
12   ret void
13 }
14
15 ; R600-CHECK: @v2f32
16 ; R600-CHECK: FLOOR
17 ; R600-CHECK: FLOOR
18 ; SI-CHECK: @v2f32
19 ; SI-CHECK: V_FLOOR_F32_e32
20 ; SI-CHECK: V_FLOOR_F32_e32
21 define void @v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) {
22 entry:
23   %0 = call <2 x float> @llvm.floor.v2f32(<2 x float> %in)
24   store <2 x float> %0, <2 x float> addrspace(1)* %out
25   ret void
26 }
27
28 ; R600-CHECK: @v4f32
29 ; R600-CHECK: FLOOR
30 ; R600-CHECK: FLOOR
31 ; R600-CHECK: FLOOR
32 ; R600-CHECK: FLOOR
33 ; SI-CHECK: @v4f32
34 ; SI-CHECK: V_FLOOR_F32_e32
35 ; SI-CHECK: V_FLOOR_F32_e32
36 ; SI-CHECK: V_FLOOR_F32_e32
37 ; SI-CHECK: V_FLOOR_F32_e32
38 define void @v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) {
39 entry:
40   %0 = call <4 x float> @llvm.floor.v4f32(<4 x float> %in)
41   store <4 x float> %0, <4 x float> addrspace(1)* %out
42   ret void
43 }
44
45 ; Function Attrs: nounwind readonly
46 declare float @llvm.floor.f32(float) #0
47
48 ; Function Attrs: nounwind readonly
49 declare <2 x float> @llvm.floor.v2f32(<2 x float>) #0
50
51 ; Function Attrs: nounwind readonly
52 declare <4 x float> @llvm.floor.v4f32(<4 x float>) #0
53
54 attributes #0 = { nounwind readonly }