1; RUN: llc -march=r600 -mcpu=redwood -mtriple=r600-- < %s | FileCheck %s 2 3; We want all MULLO_INT inst to be last in their instruction group 4;CHECK: {{^}}fill3d: 5;CHECK-NOT: MULLO_INT T[0-9]+ 6 7define void @fill3d(i32 addrspace(1)* nocapture %out) #0 { 8entry: 9 %x.i = tail call i32 @llvm.r600.read.global.size.x() #1 10 %y.i18 = tail call i32 @llvm.r600.read.global.size.y() #1 11 %mul = mul i32 %y.i18, %x.i 12 %z.i17 = tail call i32 @llvm.r600.read.global.size.z() #1 13 %mul3 = mul i32 %mul, %z.i17 14 %x.i.i = tail call i32 @llvm.r600.read.tgid.x() #1 15 %x.i12.i = tail call i32 @llvm.r600.read.local.size.x() #1 16 %mul26.i = mul i32 %x.i12.i, %x.i.i 17 %x.i4.i = tail call i32 @llvm.r600.read.tidig.x() #1 18 %add.i16 = add i32 %x.i4.i, %mul26.i 19 %mul7 = mul i32 %add.i16, %y.i18 20 %y.i.i = tail call i32 @llvm.r600.read.tgid.y() #1 21 %y.i14.i = tail call i32 @llvm.r600.read.local.size.y() #1 22 %mul30.i = mul i32 %y.i14.i, %y.i.i 23 %y.i6.i = tail call i32 @llvm.r600.read.tidig.y() #1 24 %add.i14 = add i32 %mul30.i, %mul7 25 %mul819 = add i32 %add.i14, %y.i6.i 26 %add = mul i32 %mul819, %z.i17 27 %z.i.i = tail call i32 @llvm.r600.read.tgid.z() #1 28 %z.i16.i = tail call i32 @llvm.r600.read.local.size.z() #1 29 %mul33.i = mul i32 %z.i16.i, %z.i.i 30 %z.i8.i = tail call i32 @llvm.r600.read.tidig.z() #1 31 %add.i = add i32 %z.i8.i, %mul33.i 32 %add13 = add i32 %add.i, %add 33 %arrayidx = getelementptr inbounds i32, i32 addrspace(1)* %out, i32 %add13 34 store i32 %mul3, i32 addrspace(1)* %arrayidx, align 4 35 ret void 36} 37 38; Function Attrs: nounwind readnone 39declare i32 @llvm.r600.read.tgid.x() #1 40 41; Function Attrs: nounwind readnone 42declare i32 @llvm.r600.read.tgid.y() #1 43 44; Function Attrs: nounwind readnone 45declare i32 @llvm.r600.read.tgid.z() #1 46 47; Function Attrs: nounwind readnone 48declare i32 @llvm.r600.read.local.size.x() #1 49 50; Function Attrs: nounwind readnone 51declare i32 @llvm.r600.read.local.size.y() #1 52 53; Function Attrs: nounwind readnone 54declare i32 @llvm.r600.read.local.size.z() #1 55 56; Function Attrs: nounwind readnone 57declare i32 @llvm.r600.read.tidig.x() #1 58 59; Function Attrs: nounwind readnone 60declare i32 @llvm.r600.read.tidig.y() #1 61 62; Function Attrs: nounwind readnone 63declare i32 @llvm.r600.read.tidig.z() #1 64 65; Function Attrs: nounwind readnone 66declare i32 @llvm.r600.read.global.size.x() #1 67 68; Function Attrs: nounwind readnone 69declare i32 @llvm.r600.read.global.size.y() #1 70 71; Function Attrs: nounwind readnone 72declare i32 @llvm.r600.read.global.size.z() #1 73 74attributes #0 = { nounwind } 75attributes #1 = { nounwind readnone } 76 77!opencl.kernels = !{!0, !1, !2} 78 79!0 = !{null} 80!1 = !{null} 81!2 = !{void (i32 addrspace(1)*)* @fill3d} 82