diff --git a/src/nouveau/compiler/nak/assign_regs.rs b/src/nouveau/compiler/nak/assign_regs.rs index 242ae46d2a5..bc4e5c071f2 100644 --- a/src/nouveau/compiler/nak/assign_regs.rs +++ b/src/nouveau/compiler/nak/assign_regs.rs @@ -1202,11 +1202,8 @@ impl Shader { live = SimpleLiveness::for_function(f); max_live = live.calc_max_live(f); - match file { - RegFile::Bar => { - tmp_gprs = max(tmp_gprs, 2); - } - _ => (), + if file == RegFile::Bar { + tmp_gprs = max(tmp_gprs, 2); } } } diff --git a/src/nouveau/compiler/nak/encode_sm70.rs b/src/nouveau/compiler/nak/encode_sm70.rs index 44b7d657dfa..36e6981a570 100644 --- a/src/nouveau/compiler/nak/encode_sm70.rs +++ b/src/nouveau/compiler/nak/encode_sm70.rs @@ -2088,13 +2088,10 @@ impl Shader { for b in &func.blocks { labels.insert(b.label, ip); for instr in &b.instrs { - match &instr.op { - Op::Nop(op) => { - if let Some(label) = op.label { - labels.insert(label, ip); - } + if let Op::Nop(op) = &instr.op { + if let Some(label) = op.label { + labels.insert(label, ip); } - _ => (), } ip += 4; }