diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ir/loop-unroll-simplify.slang | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ir/loop-unroll-simplify.slang b/tests/ir/loop-unroll-simplify.slang new file mode 100644 index 000000000..f935b8b1e --- /dev/null +++ b/tests/ir/loop-unroll-simplify.slang @@ -0,0 +1,14 @@ +//TEST:SIMPLE(filecheck=CHECK): -entry main -target hlsl -profile cs_6_3 + +RWStructuredBuffer<int> output; + +void main() +{ + // Test that the unrolled code does not have trivial single iteration loops. + // CHECK-NOT: break + [ForceUnroll] + for (int i = 0; i < 2; i++) + { + output[i] = i; + } +} |
