Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes:
58bd9a379ef ("aco/ra: fix live-range splits of phi definitions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16454>
}
/* find registers for phis where the register was blocked or no operand was assigned */
- for (aco_ptr<Instruction>& phi : instructions) {
+
+ /* Don't use iterators because get_reg_phi() can add phis to the end of the vector. */
+ for (unsigned i = 0; i < instructions.size(); i++) {
+ aco_ptr<Instruction>& phi = instructions[i];
Definition& definition = phi->definitions[0];
if (definition.isFixed())
continue;