summaryrefslogtreecommitdiff
path: root/tests/ir/loop.slang.expected
blob: 2b8bff7322da2175616e2972c3e8ce7736ba2e5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
result code = 0
standard error = {
}
standard output = {
let  %63	: Ptr<Array<Vec<Float32,4>,64>,1>	= var()
let  %90	: Ptr<StructuredBuffer<Vec<Float32,4>>,0>	= var()
let  %268	: Ptr<RWStructuredBuffer<Vec<Float32,4>>,0>	= var()

func %1(
	param %7	: UInt32,
	param %18	: UInt32,
	param %28	: UInt32)
{
block %4:
	let  %13	: Ptr<UInt32,0>	= var()
	store(%13, %7)
	let  %23	: Ptr<UInt32,0>	= var()
	store(%23, %18)
	let  %33	: Ptr<UInt32,0>	= var()
	store(%33, %28)
	let  %64	: UInt32	= load(%23)
	let  %69	: Ptr<Vec<Float32,4>,0>	= getElementPtr(%63, %64)
	let  %91	: StructuredBuffer<Vec<Float32,4>>	= load(%90)
	let  %94	: UInt32	= load(%13)
	let  %95	: Vec<Float32,4>	= bufferLoad(%91, %94)
	store(%69, %95)
	let  %104	: Ptr<UInt32,0>	= var()
	let  %112	: UInt32	= construct(1)
	store(%104, %112)
	loop(%117, %123, %126)

block %117:
	let  %133	: UInt32	= load(%104)
	let  %142	: UInt32	= construct(64)
	let  %143	: Bool	= cmpLT(%133, %142)
	loopTest(%143, %120, %123)

block %120:
	GroupMemoryBarrierWithGroupSync()
	let  %166	: UInt32	= load(%23)
	let  %171	: Ptr<Vec<Float32,4>,0>	= getElementPtr(%63, %166)
	let  %176	: Ptr<Vec<Float32,4>,0>	= var()
	let  %177	: Vec<Float32,4>	= load(%171)
	store(%176, %177)
	let  %196	: UInt32	= load(%23)
	let  %199	: UInt32	= load(%104)
	let  %200	: UInt32	= sub(%196, %199)
	let  %205	: Ptr<Vec<Float32,4>,0>	= getElementPtr(%63, %200)
	let  %206	: Vec<Float32,4>	= load(%205)
	let  %207	: Vec<Float32,4>	= load(%176)
	let  %208	: Vec<Float32,4>	= add(%207, %206)
	store(%176, %208)
	let  %211	: Vec<Float32,4>	= load(%176)
	store(%171, %211)
	unconditionalBranch(%126)

block %126:
	let  %224	: Ptr<UInt32,0>	= var()
	let  %225	: UInt32	= load(%104)
	store(%224, %225)
	let  %236	: UInt32	= construct(1)
	let  %237	: UInt32	= load(%224)
	let  %238	: UInt32	= shl(%237, %236)
	store(%224, %238)
	let  %241	: UInt32	= load(%224)
	store(%104, %241)
	unconditionalBranch(%117)

block %123:
	GroupMemoryBarrierWithGroupSync()
	let  %269	: RWStructuredBuffer<Vec<Float32,4>>	= load(%268)
	let  %272	: UInt32	= load(%13)
	let  %286	: Ptr<Vec<Float32,4>,0>	= getElementPtr(%63, 0)
	let  %287	: Vec<Float32,4>	= load(%286)
	bufferStore(%269, %272, %287)
	return_void()
}
}