Fixed issue with aliasing local variables

ISPC++ now produces valid code, or an appropriate error message, for all
of my test cases.
This commit is contained in:
2017-05-11 15:42:11 -04:00
parent bfe723e1b7
commit 5e6f06cf59
12 changed files with 135 additions and 25 deletions

14
tests_ispcpp/varying.ispc Normal file
View File

@@ -0,0 +1,14 @@
floating foo(const uniform int a, floating b) {
floating out = b;
for (int i = 1; i<a; i++) {
out *= b;
}
return out;
}
export void square(uniform int N, uniform floating b[], uniform double out[]) {
foreach (i = 0 ... N) {
out[i] = foo(2, b[i]);
}
}