From a9d0dd56fbc4fc0758c35445b7b52d8329480ea3 Mon Sep 17 00:00:00 2001 From: T0b1 Date: Tue, 23 May 2023 13:38:01 +0200 Subject: [PATCH] fix --- cranelift/codegen/src/machinst/reg.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cranelift/codegen/src/machinst/reg.rs b/cranelift/codegen/src/machinst/reg.rs index 2d727559c9..3bf4ca6f9d 100644 --- a/cranelift/codegen/src/machinst/reg.rs +++ b/cranelift/codegen/src/machinst/reg.rs @@ -496,7 +496,12 @@ impl<'a> AllocationConsumer<'a> { ) }); - assert_eq!(preg, alloc.unwrap().to_real_reg().unwrap().into()); + match alloc { + Some(alloc) => { + assert_eq!(preg, alloc.to_real_reg().unwrap().into()); + }, + None => {} + } } pub fn next(&mut self, pre_regalloc_reg: Reg) -> Reg {