Analogous bugfix at another site.

This commit is contained in:
Chris Fallin 2022-11-29 22:31:12 -08:00
parent 7da027a51d
commit 50b83525e1
No known key found for this signature in database
GPG key ID: 31649E4FE65EB465

View file

@ -460,10 +460,14 @@ impl LocalTracker {
let placeholder = body.add_placeholder(ty); let placeholder = body.add_placeholder(ty);
body.mark_value_as_local(placeholder, local); body.mark_value_as_local(placeholder, local);
if at_block == self.cur_block {
self.in_cur_block.insert(local, placeholder);
} else {
self.block_end self.block_end
.entry(at_block) .get_mut(&at_block)
.or_insert_with(|| FxHashMap::default()) .unwrap()
.insert(local, placeholder); .insert(local, placeholder);
}
log::trace!( log::trace!(
" -> created placeholder and added as incomplete phi: {:?}", " -> created placeholder and added as incomplete phi: {:?}",
placeholder placeholder