From c380b0d979345f4ba13c9e46102599fd98de030a Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Sun, 9 May 2021 01:51:00 -0700 Subject: [PATCH] assert fix: RegClass doesn't need to match for spillslots (can be reused across classes) --- src/ion/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ion/mod.rs b/src/ion/mod.rs index a7029d7..b1d47bf 100644 --- a/src/ion/mod.rs +++ b/src/ion/mod.rs @@ -4154,7 +4154,9 @@ impl<'a, F: Function> Env<'a, F> { let mut float_moves: SmallVec<[InsertedMove; 8]> = smallvec![]; for m in moves { - assert_eq!(m.from_alloc.class(), m.to_alloc.class()); + if m.from_alloc.is_reg() && m.to_alloc.is_reg() { + assert_eq!(m.from_alloc.class(), m.to_alloc.class()); + } match m.from_alloc.class() { RegClass::Int => { int_moves.push(m.clone());