diff --git a/src/nouveau/compiler/nak/assign_regs.rs b/src/nouveau/compiler/nak/assign_regs.rs index 8ff732ba69b..7cfbfa2351b 100644 --- a/src/nouveau/compiler/nak/assign_regs.rs +++ b/src/nouveau/compiler/nak/assign_regs.rs @@ -1387,14 +1387,14 @@ impl AssignRegsBlock { pcopy.push(dst.into(), src.into()); } - if DEBUG.annotate() { - b.instrs.push(Instr::new_boxed(OpAnnotate { - annotation: "generated by assign_regs".into(), - })); - } + let ann = OpAnnotate { + annotation: "generated by assign_regs".into(), + }; if b.branch().is_some() { + b.instrs.insert(b.instrs.len() - 1, Instr::new_boxed(ann)); b.instrs.insert(b.instrs.len() - 1, Instr::new_boxed(pcopy)); } else { + b.instrs.push(Instr::new_boxed(ann)); b.instrs.push(Instr::new_boxed(pcopy)); } }