summaryrefslogtreecommitdiffstats
path: root/tests/experimental
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-01-23 06:59:25 -0800
committerGitHub <noreply@github.com>2023-01-23 06:59:25 -0800
commit46a4d98baa1d43b33717b4377aefeeaf46b9c2ff (patch)
treec89f3a1c416330f859887d00f896b18bcc7488a5 /tests/experimental
parent263ca18ea516cfce43fda703c0a411aaf1938e42 (diff)
Full address insts elimination for backward autodiff. (#2604)
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/experimental')
-rw-r--r--tests/experimental/liveness/liveness-6.slang.expected33
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/experimental/liveness/liveness-6.slang.expected b/tests/experimental/liveness/liveness-6.slang.expected
index ac1894f95..26a537330 100644
--- a/tests/experimental/liveness/liveness-6.slang.expected
+++ b/tests/experimental/liveness/liveness-6.slang.expected
@@ -60,15 +60,16 @@ int calcThing_0(int offset_0)
i_0 = i_0 + 1;
}
livenessEnd_0(i_0, 0);
- int _S3 = another_0[k_0 & 1];
- int _S4 = total_0;
+ int _S3 = k_0 & 1;
+ int _S4 = another_0[_S3];
+ int _S5 = total_0;
livenessEnd_0(total_0, 0);
- int total_1 = _S4 + _S3;
- int _S5 = arr_0[k_0 & 1];
+ int total_1 = _S5 + _S4;
+ int _S6 = arr_0[_S3];
livenessEnd_1(arr_0, 0);
- int total_2 = total_1 + _S5;
- int _S6 = (k_0 + 7) % 5;
- if(_S6 == 4)
+ int total_2 = total_1 + _S6;
+ int _S7 = (k_0 + 7) % 5;
+ if(_S7 == 4)
{
livenessEnd_0(k_0, 0);
livenessEnd_1(another_0, 0);
@@ -83,32 +84,32 @@ int calcThing_0(int offset_0)
int total_3;
if(total_0 > 4)
{
- int _S7 = total_0;
+ int _S8 = total_0;
livenessEnd_0(total_0, 0);
- int _S8 = - _S7;
+ int _S9 = - _S8;
livenessStart_1(total_3, 0);
- total_3 = _S8;
+ total_3 = _S9;
}
else
{
- int _S9 = total_0;
+ int _S10 = total_0;
livenessEnd_0(total_0, 0);
livenessStart_1(total_3, 0);
- total_3 = _S9;
+ total_3 = _S10;
}
return total_3;
}
-layout(std430, binding = 0) buffer _S10 {
+layout(std430, binding = 0) buffer _S11 {
int _data[];
} outputBuffer_0;
layout(local_size_x = 4, local_size_y = 1, local_size_z = 1) in;
void main()
{
int index_0 = int(gl_GlobalInvocationID.x);
- uint _S11 = uint(index_0);
- int _S12 = calcThing_0(index_0);
- ((outputBuffer_0)._data[(_S11)]) = _S12;
+ uint _S12 = uint(index_0);
+ int _S13 = calcThing_0(index_0);
+ ((outputBuffer_0)._data[(_S12)]) = _S13;
return;
}