nir: unroll loops, based on non-add incrementation
If loop iterator is incremented with something other than regular addition, it would be more error prone to calculate the number of iterations theoretically. What we can do instead, is try to emulate the loop, and determine the number of iterations empirically.
These operations are covered:
- imul
- fmul
- ishl
- ishr
- ushr
Also add unit tests for loop unrollment.
No shaderdb changes.
Signed-off-by: Yevhenii Kolesnikov yevhenii.kolesnikov@globallogic.com
This is a rework of !1935 (closed)
Edited by Jordan Justen