This pass should be backwards in order to reach the fixed point
in linear time.
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11411>
nir_builder b;
nir_builder_init(&b, function->impl);
- nir_foreach_block(block, function->impl) {
- nir_foreach_instr(instr, block) {
+ nir_foreach_block_reverse(block, function->impl) {
+ nir_foreach_instr_reverse(instr, block) {
progress |= opt_shrink_vectors_instr(&b, instr, shrink_image_store);
}
}