Comment by xnacly

2 hours ago

Hi, no it doesnt, this example of course breaks using temporary registers used after the optimisation. But thats why peephole is a fallback to ir optimisation, since they are only local.

I honestly didnt think of this possibility while building the optimisation. Since constant folding is done as an ir pass i will remove the peephole pass, thanks for noticing :)