Improve gather->vector load optimization to detect <linear sequence>-<uniform> case.
Previously, we didn't handle subtraction ops when deciphering offsets in order to try to change gathers t evictor loads.
This commit is contained in:
13
tests/gather-to-vload-neg-offset.ispc
Normal file
13
tests/gather-to-vload-neg-offset.ispc
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
|
||||
float a = aFOO[programIndex];
|
||||
int index = programIndex + 5;
|
||||
RET[index-b] = a;
|
||||
}
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 1 + programIndex;
|
||||
}
|
||||
Reference in New Issue
Block a user