diff --git a/src/nouveau/compiler/nak/ssa_value.rs b/src/nouveau/compiler/nak/ssa_value.rs index 6796b7d2a7b..cb3f89c001a 100644 --- a/src/nouveau/compiler/nak/ssa_value.rs +++ b/src/nouveau/compiler/nak/ssa_value.rs @@ -306,8 +306,9 @@ impl SSAValueAllocator { /// Allocates an SSA value. pub fn alloc(&mut self, file: RegFile) -> SSAValue { + let idx = self.count; self.count += 1; - SSAValue::new(file, self.count) + SSAValue::new(file, idx) } /// Allocates multiple SSA values and returns them as an SSA reference.