forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#59290 - oli-obk:trivial_move_prop, r=davidtwco
Run branch cleanup after copy prop This is preliminary work for rust-lang#59288 (comment) which gets rid of `if` in the HIR. cc @rust-lang/wg-mir-opt @Centril
- Loading branch information
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
fn main() { | ||
match { let x = false; x } { | ||
true => println!("hello world!"), | ||
false => {}, | ||
} | ||
} | ||
|
||
// END RUST SOURCE | ||
// START rustc.main.SimplifyBranches-after-copy-prop.before.mir | ||
// bb0: { | ||
// ... | ||
// switchInt(const false) -> [false: bb3, otherwise: bb1]; | ||
// } | ||
// bb1: { | ||
// END rustc.main.SimplifyBranches-after-copy-prop.before.mir | ||
// START rustc.main.SimplifyBranches-after-copy-prop.after.mir | ||
// bb0: { | ||
// ... | ||
// goto -> bb3; | ||
// } | ||
// bb1: { | ||
// END rustc.main.SimplifyBranches-after-copy-prop.after.mir |