On Fri Apr 5 11:40:02 2024 +0000, Zebediah Figura wrote:
This is _correct_, but it leads to copy prop invalidating `i` and
therefore not propagating it to subsequent iterations. I suppose I'll have to see, but I'm not sure this is the way we want to solve that problem. In any case it's only an optimization, so I would leave it out for now.
Notice that native too might become unable to unroll a loop if you force it to lose the information of what is the iteration instruction. Compare for example https://shader-playground.timjones.io/5e211ad0eacd7f37429eed7821208dec and https://shader-playground.timjones.io/bbdbef08299b83cc0427884d49d656fc.