blob: f8de85810c2bb32677ce07a6b4677d00e1337729 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
//TEST:SIMPLE(filecheck=CHECK): -target hlsl -stage compute -entry main
RWStructuredBuffer<float> result;
// CHECK-NOT: result{{.*}}[int(0)] = 1
// CHECK: result{{.*}}[int(0)] = 2
// CHECK-NOT: result{{.*}}[int(0)] = 1
[numthreads(1,1,1)]
void main()
{
int ic = -1;
uint a = 2;
if (ic < a)
{
result[0] = 1;
}
else
{
// Should pick this branch according to C spec.
result[0] = 2;
}
}
|