nir/gcm: be more conservative about moving instructions from loops