150
|
1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
|
2 ; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
|
3 ; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=R600 -check-prefix=FUNC %s
|
|
4
|
|
5 ; FUNC-LABEL: {{^}}floor_f32:
|
|
6 ; SI: v_floor_f32_e32
|
|
7 ; R600: FLOOR
|
252
|
8 define amdgpu_kernel void @floor_f32(ptr addrspace(1) %out, float %in) {
|
150
|
9 %tmp = call float @llvm.floor.f32(float %in) #0
|
252
|
10 store float %tmp, ptr addrspace(1) %out
|
150
|
11 ret void
|
|
12 }
|
|
13
|
|
14 ; FUNC-LABEL: {{^}}floor_v2f32:
|
|
15 ; SI: v_floor_f32_e32
|
|
16 ; SI: v_floor_f32_e32
|
|
17
|
252
|
18 define amdgpu_kernel void @floor_v2f32(ptr addrspace(1) %out, <2 x float> %in) {
|
150
|
19 %tmp = call <2 x float> @llvm.floor.v2f32(<2 x float> %in) #0
|
252
|
20 store <2 x float> %tmp, ptr addrspace(1) %out
|
150
|
21 ret void
|
|
22 }
|
|
23
|
|
24 ; FUNC-LABEL: {{^}}floor_v4f32:
|
|
25 ; SI: v_floor_f32_e32
|
|
26 ; SI: v_floor_f32_e32
|
|
27 ; SI: v_floor_f32_e32
|
|
28 ; SI: v_floor_f32_e32
|
|
29
|
|
30 ; R600: FLOOR
|
|
31 ; R600: FLOOR
|
|
32 ; R600: FLOOR
|
|
33 ; R600: FLOOR
|
252
|
34 define amdgpu_kernel void @floor_v4f32(ptr addrspace(1) %out, <4 x float> %in) {
|
150
|
35 %tmp = call <4 x float> @llvm.floor.v4f32(<4 x float> %in) #0
|
252
|
36 store <4 x float> %tmp, ptr addrspace(1) %out
|
150
|
37 ret void
|
|
38 }
|
|
39
|
|
40 ; Function Attrs: nounwind readonly
|
|
41 declare float @llvm.floor.f32(float) #0
|
|
42
|
|
43 ; Function Attrs: nounwind readonly
|
|
44 declare <2 x float> @llvm.floor.v2f32(<2 x float>) #0
|
|
45
|
|
46 ; Function Attrs: nounwind readonly
|
|
47 declare <4 x float> @llvm.floor.v4f32(<4 x float>) #0
|
|
48
|
|
49 attributes #0 = { nounwind readnone }
|