R600/SI: Enable all tests that pass on VI without changes
[oota-llvm.git] / test / CodeGen / R600 / ffloor.ll
1 ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga -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
8 define void @floor_f32(float addrspace(1)* %out, float %in) {
9   %tmp = call float @llvm.floor.f32(float %in) #0
10   store float %tmp, float addrspace(1)* %out
11   ret void
12 }
13
14 ; FUNC-LABEL: {{^}}floor_v2f32:
15 ; SI: v_floor_f32_e32
16 ; SI: v_floor_f32_e32
17
18 ; R600: FLOOR
19 ; R600: FLOOR
20 define void @floor_v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) {
21   %tmp = call <2 x float> @llvm.floor.v2f32(<2 x float> %in) #0
22   store <2 x float> %tmp, <2 x float> addrspace(1)* %out
23   ret void
24 }
25
26 ; FUNC-LABEL: {{^}}floor_v4f32:
27 ; SI: v_floor_f32_e32
28 ; SI: v_floor_f32_e32
29 ; SI: v_floor_f32_e32
30 ; SI: v_floor_f32_e32
31
32 ; R600: FLOOR
33 ; R600: FLOOR
34 ; R600: FLOOR
35 ; R600: FLOOR
36 define void @floor_v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) {
37   %tmp = call <4 x float> @llvm.floor.v4f32(<4 x float> %in) #0
38   store <4 x float> %tmp, <4 x float> addrspace(1)* %out
39   ret void
40 }
41
42 ; Function Attrs: nounwind readonly
43 declare float @llvm.floor.f32(float) #0
44
45 ; Function Attrs: nounwind readonly
46 declare <2 x float> @llvm.floor.v2f32(<2 x float>) #0
47
48 ; Function Attrs: nounwind readonly
49 declare <4 x float> @llvm.floor.v4f32(<4 x float>) #0
50
51 attributes #0 = { nounwind readnone }