nir/algebraic: support for power-of-two optimizations