Move StorageDead
/StorageLive
around to allow more optimizations to trigger
#78285
Labels
A-mir-opt
Area: MIR optimizations
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
#78191 fixes a bug in MatchBranchSimplification but causes it to create some "boilerplate". We should try to optimize it away again. One example is
for which we should make sure that copy prop still manages to remove
_9
.Other situations are
which are more complex. But since it is always safe (haha, uh, I think) to move a
StorageDead
further down and aStorageLive
further up, we should be able to move theStorageDead(_3)
after_1 = Ne(_10, const false);
, thus allowing copy prop to handle this again.The text was updated successfully, but these errors were encountered: