-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preserve unused pointer to address casts
- Loading branch information
Showing
6 changed files
with
65 additions
and
11 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
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
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
21 changes: 21 additions & 0 deletions
21
src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff
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,21 @@ | ||
- // MIR for `expose_addr` before SimplifyLocals | ||
+ // MIR for `expose_addr` after SimplifyLocals | ||
|
||
fn expose_addr(_1: *const usize) -> () { | ||
debug p => _1; // in scope 0 at $DIR/simplify-locals.rs:66:16: 66:17 | ||
let mut _0: (); // return place in scope 0 at $DIR/simplify-locals.rs:66:33: 66:33 | ||
let _2: usize; // in scope 0 at $DIR/simplify-locals.rs:68:5: 68:15 | ||
let mut _3: *const usize; // in scope 0 at $DIR/simplify-locals.rs:68:5: 68:6 | ||
|
||
bb0: { | ||
StorageLive(_2); // scope 0 at $DIR/simplify-locals.rs:68:5: 68:15 | ||
StorageLive(_3); // scope 0 at $DIR/simplify-locals.rs:68:5: 68:6 | ||
_3 = _1; // scope 0 at $DIR/simplify-locals.rs:68:5: 68:6 | ||
_2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/simplify-locals.rs:68:5: 68:15 | ||
StorageDead(_3); // scope 0 at $DIR/simplify-locals.rs:68:14: 68:15 | ||
StorageDead(_2); // scope 0 at $DIR/simplify-locals.rs:68:15: 68:16 | ||
_0 = const (); // scope 0 at $DIR/simplify-locals.rs:66:33: 69:2 | ||
return; // scope 0 at $DIR/simplify-locals.rs:69:2: 69:2 | ||
} | ||
} | ||
|