145bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=rv710 | FileCheck %s
245bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=rv730 | FileCheck %s
345bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=rv770 | FileCheck %s
445bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=cedar | FileCheck %s
545bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
645bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=sumo | FileCheck %s
745bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=juniper | FileCheck %s
845bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=cypress | FileCheck %s
945bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=barts | FileCheck %s
1045bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=turks | FileCheck %s
1145bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=caicos | FileCheck %s
1245bb48eaSTom Stellard; RUN: llc < %s -march=r600 -mcpu=cayman | FileCheck %s
1345bb48eaSTom Stellard
1445bb48eaSTom Stellard; r700+ supports 16 fetches in a clause
1545bb48eaSTom Stellard; CHECK: {{^}}fetch_limits_r700:
1645bb48eaSTom Stellard; CHECK: Fetch clause
1745bb48eaSTom Stellard; CHECK: Fetch clause
1845bb48eaSTom Stellard
19df3a20cdSNicolai Haehnledefine amdgpu_ps void @fetch_limits_r700() {
2045bb48eaSTom Stellardentry:
2145bb48eaSTom Stellard  %0 = load <4 x float>, <4 x float> addrspace(8)* null
2245bb48eaSTom Stellard  %1 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 1)
2345bb48eaSTom Stellard  %2 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 2)
2445bb48eaSTom Stellard  %3 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 3)
2545bb48eaSTom Stellard  %4 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 4)
2645bb48eaSTom Stellard  %5 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 5)
2745bb48eaSTom Stellard  %6 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 6)
2845bb48eaSTom Stellard  %7 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 7)
2945bb48eaSTom Stellard  %8 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 8)
3045bb48eaSTom Stellard  %9 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 9)
3145bb48eaSTom Stellard  %10 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 10)
3245bb48eaSTom Stellard  %11 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 11)
3345bb48eaSTom Stellard  %12 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 12)
3445bb48eaSTom Stellard  %13 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 13)
3545bb48eaSTom Stellard  %14 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 14)
3645bb48eaSTom Stellard  %15 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 15)
3745bb48eaSTom Stellard  %16 = load <4 x float>, <4 x float> addrspace(8)* getelementptr ([1024 x <4 x float>], [1024 x <4 x float>] addrspace(8)* null, i64 0, i32 16)
38ca7f5701SMatt Arsenault  %17 = shufflevector <4 x float> %0, <4 x float> %0, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
39ca7f5701SMatt Arsenault  %18 = call <4 x float> @llvm.r600.tex(<4 x float> %17, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
40ca7f5701SMatt Arsenault  %19 = shufflevector <4 x float> %1, <4 x float> %1, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
41ca7f5701SMatt Arsenault  %20 = call <4 x float> @llvm.r600.tex(<4 x float> %19, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
42ca7f5701SMatt Arsenault  %21 = shufflevector <4 x float> %2, <4 x float> %2, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
43ca7f5701SMatt Arsenault  %22 = call <4 x float> @llvm.r600.tex(<4 x float> %21, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
44ca7f5701SMatt Arsenault  %23 = shufflevector <4 x float> %3, <4 x float> %3, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
45ca7f5701SMatt Arsenault  %24 = call <4 x float> @llvm.r600.tex(<4 x float> %23, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
46ca7f5701SMatt Arsenault  %25 = shufflevector <4 x float> %4, <4 x float> %4, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
47ca7f5701SMatt Arsenault  %26 = call <4 x float> @llvm.r600.tex(<4 x float> %25, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
48ca7f5701SMatt Arsenault  %27 = shufflevector <4 x float> %5, <4 x float> %5, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
49ca7f5701SMatt Arsenault  %28 = call <4 x float> @llvm.r600.tex(<4 x float> %27, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
50ca7f5701SMatt Arsenault  %29 = shufflevector <4 x float> %6, <4 x float> %6, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
51ca7f5701SMatt Arsenault  %30 = call <4 x float> @llvm.r600.tex(<4 x float> %29, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
52ca7f5701SMatt Arsenault  %31 = shufflevector <4 x float> %7, <4 x float> %7, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
53ca7f5701SMatt Arsenault  %32 = call <4 x float> @llvm.r600.tex(<4 x float> %31, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
54ca7f5701SMatt Arsenault  %33 = shufflevector <4 x float> %8, <4 x float> %8, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
55ca7f5701SMatt Arsenault  %34 = call <4 x float> @llvm.r600.tex(<4 x float> %33, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
56ca7f5701SMatt Arsenault  %35 = shufflevector <4 x float> %9, <4 x float> %9, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
57ca7f5701SMatt Arsenault  %36 = call <4 x float> @llvm.r600.tex(<4 x float> %35, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
58ca7f5701SMatt Arsenault  %37 = shufflevector <4 x float> %10, <4 x float> %10, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
59ca7f5701SMatt Arsenault  %38 = call <4 x float> @llvm.r600.tex(<4 x float> %37, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
60ca7f5701SMatt Arsenault  %39 = shufflevector <4 x float> %11, <4 x float> %11, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
61ca7f5701SMatt Arsenault  %40 = call <4 x float> @llvm.r600.tex(<4 x float> %39, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
62ca7f5701SMatt Arsenault  %41 = shufflevector <4 x float> %12, <4 x float> %12, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
63ca7f5701SMatt Arsenault  %42 = call <4 x float> @llvm.r600.tex(<4 x float> %41, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
64ca7f5701SMatt Arsenault  %43 = shufflevector <4 x float> %13, <4 x float> %13, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
65ca7f5701SMatt Arsenault  %44 = call <4 x float> @llvm.r600.tex(<4 x float> %43, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
66ca7f5701SMatt Arsenault  %45 = shufflevector <4 x float> %14, <4 x float> %14, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
67ca7f5701SMatt Arsenault  %46 = call <4 x float> @llvm.r600.tex(<4 x float> %45, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
68ca7f5701SMatt Arsenault  %47 = shufflevector <4 x float> %15, <4 x float> %15, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
69ca7f5701SMatt Arsenault  %48 = call <4 x float> @llvm.r600.tex(<4 x float> %47, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
70ca7f5701SMatt Arsenault  %49 = shufflevector <4 x float> %16, <4 x float> %16, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
71ca7f5701SMatt Arsenault  %50 = call <4 x float> @llvm.r600.tex(<4 x float> %49, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1)
72ca7f5701SMatt Arsenault  %a = fadd <4 x float> %18, %20
73ca7f5701SMatt Arsenault  %b = fadd <4 x float> %22, %24
74ca7f5701SMatt Arsenault  %c = fadd <4 x float> %26, %28
75ca7f5701SMatt Arsenault  %d = fadd <4 x float> %30, %32
76ca7f5701SMatt Arsenault  %e = fadd <4 x float> %34, %36
77ca7f5701SMatt Arsenault  %f = fadd <4 x float> %38, %40
78ca7f5701SMatt Arsenault  %g = fadd <4 x float> %42, %44
79ca7f5701SMatt Arsenault  %h = fadd <4 x float> %46, %48
80ca7f5701SMatt Arsenault  %i = fadd <4 x float> %50, %a
8145bb48eaSTom Stellard  %bc = fadd <4 x float> %b, %c
8245bb48eaSTom Stellard  %de = fadd <4 x float> %d, %e
8345bb48eaSTom Stellard  %fg = fadd <4 x float> %f, %g
8445bb48eaSTom Stellard  %hi = fadd <4 x float> %h, %i
8545bb48eaSTom Stellard  %bcde = fadd <4 x float> %bc, %de
8645bb48eaSTom Stellard  %fghi = fadd <4 x float> %fg, %hi
8745bb48eaSTom Stellard  %bcdefghi = fadd <4 x float> %bcde, %fghi
88*82e5e1e5SMatt Arsenault  call void @llvm.r600.store.swizzle(<4 x float> %bcdefghi, i32 0, i32 1)
8945bb48eaSTom Stellard  ret void
9045bb48eaSTom Stellard}
9145bb48eaSTom Stellard
92*82e5e1e5SMatt Arsenaultdeclare void @llvm.r600.store.swizzle(<4 x float>, i32, i32)
93ca7f5701SMatt Arsenault
94ca7f5701SMatt Arsenault; Function Attrs: readnone
95ca7f5701SMatt Arsenaultdeclare <4 x float> @llvm.r600.tex(<4 x float>, i32, i32, i32, i32, i32, i32, i32, i32, i32) #0
96ca7f5701SMatt Arsenault
97ca7f5701SMatt Arsenaultattributes #0 = { readnone }
98