From 2904777ccde80560a2e5878d3203cf70ede94b7d Mon Sep 17 00:00:00 2001 From: Faith Ekstrand Date: Sun, 10 May 2026 00:17:18 -0400 Subject: [PATCH] nak: Allow SSA value 0 again We no longer need the index to be non-zero because we add 17. Reviewed-by: Mel Henning Acked-by: Karol Herbst --- src/nouveau/compiler/nak/ssa_value.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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.