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