From 899824eb3dbb327f3fd8479ca9bc01f8ea49ed98 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 4 Jun 2020 14:07:30 -0700 Subject: Add missing loop-attribs.slang.hlsl for the test case --- tests/cross-compile/loop-attribs.slang.hlsl | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tests/cross-compile/loop-attribs.slang.hlsl diff --git a/tests/cross-compile/loop-attribs.slang.hlsl b/tests/cross-compile/loop-attribs.slang.hlsl new file mode 100644 index 000000000..5d53f51e0 --- /dev/null +++ b/tests/cross-compile/loop-attribs.slang.hlsl @@ -0,0 +1,55 @@ +#pragma pack_matrix(column_major) + +#line 6 "tests/cross-compile/loop-attribs.slang" +vector main() : SV_TARGET +{ + int i_0; + float sum_0; + int j_0; + float sum_1; + i_0 = int(0); + sum_0 = 0.00000000000000000000; + [loop] + for(;;) + { + +#line 11 + if(i_0 < int(100)) + { + } + else + { + break; + } + float _S1 = sum_0 + (float) i_0; + +#line 11 + int _S2 = i_0 + (int) int(1); + i_0 = _S2; + sum_0 = _S1; + } + j_0 = int(0); + sum_1 = sum_0; + [unroll] + for(;;) + { + +#line 15 + if(j_0 < int(100)) + { + } + else + { + break; + } + float _S3 = sum_1 + (float) j_0; + +#line 15 + int _S4 = j_0 + (int) int(1); + j_0 = _S4; + sum_1 = _S3; + } + +#line 18 + return vector(sum_1, (float) int(0), (float) int(0), (float) int(0)); +} \ No newline at end of file -- cgit v1.2.3