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);
self.block_end if at_block == self.cur_block {
.entry(at_block) self.in_cur_block.insert(local, placeholder);
.or_insert_with(|| FxHashMap::default()) } else {
.insert(local, placeholder); self.block_end
.get_mut(&at_block)
.unwrap()
.insert(local, placeholder);
}
log::trace!( log::trace!(
" -> created placeholder and added as incomplete phi: {:?}", " -> created placeholder and added as incomplete phi: {:?}",
placeholder placeholder