blob: 81fd43d4692ee5359ae39bb9e32f7457c2080cff [file] [log] [blame]
Michel Danzer51d5eb22013-02-14 07:43:51 +00001;RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
2
Vincent Lejeune4ebef182013-05-17 16:50:09 +00003;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 1
4;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 2
5;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 3
6;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 4
7;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 5
8;CHECK: TEX_SAMPLE_CT{{[0-9]+, T[0-9]+}}, 0, 0, 6
9;CHECK: TEX_SAMPLE_CT{{[0-9]+, T[0-9]+}}, 0, 0, 7
10;CHECK: TEX_SAMPLE_CT{{[0-9]+, T[0-9]+}}, 0, 0, 8
11;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 9
12;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 10
13;CHECK: TEX_SAMPLE_CT{{[0-9]+, T[0-9]+}}, 0, 0, 11
14;CHECK: TEX_SAMPLE_CT{{[0-9]+, T[0-9]+}}, 0, 0, 12
15;CHECK: TEX_SAMPLE_CT{{[0-9]+, T[0-9]+}}, 0, 0, 13
16;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 14
17;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 15
18;CHECK: TEX_SAMPLET{{[0-9]+, T[0-9]+}}, 0, 0, 16
Michel Danzer51d5eb22013-02-14 07:43:51 +000019
20define void @test(<4 x float> addrspace(1)* %out, <4 x float> addrspace(1)* %in) {
21 %addr = load <4 x float> addrspace(1)* %in
22 %res1 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %addr, i32 0, i32 0, i32 1)
23 %res2 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res1, i32 0, i32 0, i32 2)
24 %res3 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res2, i32 0, i32 0, i32 3)
25 %res4 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res3, i32 0, i32 0, i32 4)
26 %res5 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res4, i32 0, i32 0, i32 5)
27 %res6 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res5, i32 0, i32 0, i32 6)
28 %res7 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res6, i32 0, i32 0, i32 7)
29 %res8 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res7, i32 0, i32 0, i32 8)
30 %res9 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res8, i32 0, i32 0, i32 9)
31 %res10 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res9, i32 0, i32 0, i32 10)
32 %res11 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res10, i32 0, i32 0, i32 11)
33 %res12 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res11, i32 0, i32 0, i32 12)
34 %res13 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res12, i32 0, i32 0, i32 13)
35 %res14 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res13, i32 0, i32 0, i32 14)
36 %res15 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res14, i32 0, i32 0, i32 15)
37 %res16 = call <4 x float> @llvm.AMDGPU.tex(<4 x float> %res15, i32 0, i32 0, i32 16)
38 store <4 x float> %res16, <4 x float> addrspace(1)* %out
39 ret void
40}
41
42declare <4 x float> @llvm.AMDGPU.tex(<4 x float>, i32, i32, i32) readnone