diff --git a/ykllvm b/ykllvm index 547a4928a..9be9a1df3 160000 --- a/ykllvm +++ b/ykllvm @@ -1 +1 @@ -Subproject commit 547a4928a2a1e79dad168e05dda3f54227c9e417 +Subproject commit 9be9a1df34c6096ef4e7a9b2c70f275289cd9753 diff --git a/ykrt/src/compile/jitc_yk/aot_ir.rs b/ykrt/src/compile/jitc_yk/aot_ir.rs index 95abe2a99..689c8e036 100644 --- a/ykrt/src/compile/jitc_yk/aot_ir.rs +++ b/ykrt/src/compile/jitc_yk/aot_ir.rs @@ -917,6 +917,7 @@ pub(crate) enum Inst { }, #[deku(id = "14")] Phi { + tyidx: TyIdx, #[deku(temp)] num_incoming: usize, #[deku(count = "num_incoming")] @@ -1014,9 +1015,9 @@ impl Inst { Self::Store { .. } => None, Self::Cast { dest_tyidx, .. } => Some(m.type_(*dest_tyidx)), Self::Switch { .. } => None, - Self::Phi { incoming_vals, .. } => { + Self::Phi { tyidx, .. } => { // Indexing cannot crash: correct PHI nodes have at least one incoming value. - Some(incoming_vals[0].type_(m)) + Some(m.type_(*tyidx)) } Self::IndirectCall { ftyidx, .. } => { // The type of the newly-defined local is the return type of the callee. @@ -1276,6 +1277,7 @@ impl fmt::Display for DisplayableInst<'_> { Inst::Phi { incoming_vals, incoming_bbs, + .. } => { let args = incoming_bbs .iter() diff --git a/ykrt/src/compile/jitc_yk/trace_builder.rs b/ykrt/src/compile/jitc_yk/trace_builder.rs index 89b527da5..1ff6975d1 100644 --- a/ykrt/src/compile/jitc_yk/trace_builder.rs +++ b/ykrt/src/compile/jitc_yk/trace_builder.rs @@ -232,6 +232,7 @@ impl TraceBuilder { aot_ir::Inst::Phi { incoming_bbs, incoming_vals, + .. } => { debug_assert_eq!(prevbb.as_ref().unwrap().funcidx(), bid.funcidx()); self.handle_phi(