Remove redundant special case for resume argument

The special case is subsumed by the check for always live locals that
follows it.
This commit is contained in:
Tomasz Miąsko 2023-12-10 00:00:00 +00:00
parent ef1831a21f
commit eaaa290dbc

View File

@ -1510,13 +1510,6 @@ fn create_cases<'tcx>(
// Create StorageLive instructions for locals with live storage
for i in 0..(body.local_decls.len()) {
if i == 2 {
// The resume argument is live on function entry. Don't insert a
// `StorageLive`, or the following `Assign` will read from uninitialized
// memory.
continue;
}
let l = Local::new(i);
let needs_storage_live = point.storage_liveness.contains(l)
&& !transform.remap.contains_key(&l)