nak: Allow SSA value 0 again

We no longer need the index to be non-zero because we add 17.

Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Acked-by: Karol Herbst <kherbst@redhat.com>
This commit is contained in:
Faith Ekstrand 2026-05-10 00:17:18 -04:00
parent 23ea5bb09b
commit 2904777ccd

View file

@ -306,8 +306,9 @@ impl SSAValueAllocator {
/// Allocates an SSA value. /// Allocates an SSA value.
pub fn alloc(&mut self, file: RegFile) -> SSAValue { pub fn alloc(&mut self, file: RegFile) -> SSAValue {
let idx = self.count;
self.count += 1; self.count += 1;
SSAValue::new(file, self.count) SSAValue::new(file, idx)
} }
/// Allocates multiple SSA values and returns them as an SSA reference. /// Allocates multiple SSA values and returns them as an SSA reference.