mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
Auto merge of #99780 - Nilstrieb:mir-opt-test-line-no, r=oli-obk
Use line numbers relative to the function in mir-opt tests As shown in #99770, the line numbers can be a big source of needless and confusing diffs. This PR adds a new flag `-Zmir-pretty-relative-line-numbers` to make them relative to the function declaration, which avoids most needless diffs from attribute changes. `@JakobDegen` told me that there has been a zulip conversation about disabling line numbers with mixed opinions, so I'd like to get some feedback here, for this hopefully better solution. r? rust-lang/wg-mir-opt
This commit is contained in:
commit
36f4f4aa38
@ -670,6 +670,7 @@ fn test_unstable_options_tracking_hash() {
|
||||
untracked!(ls, true);
|
||||
untracked!(macro_backtrace, true);
|
||||
untracked!(meta_stats, true);
|
||||
untracked!(mir_pretty_relative_line_numbers, true);
|
||||
untracked!(nll_facts, true);
|
||||
untracked!(no_analysis, true);
|
||||
untracked!(no_interleave_lints, true);
|
||||
|
@ -360,7 +360,7 @@ where
|
||||
"{:A$} // {}{}",
|
||||
indented_body,
|
||||
if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() },
|
||||
comment(tcx, statement.source_info),
|
||||
comment(tcx, statement.source_info, body.span),
|
||||
A = ALIGN,
|
||||
)?;
|
||||
|
||||
@ -381,7 +381,7 @@ where
|
||||
"{:A$} // {}{}",
|
||||
indented_terminator,
|
||||
if tcx.sess.verbose() { format!("{:?}: ", current_location) } else { String::new() },
|
||||
comment(tcx, data.terminator().source_info),
|
||||
comment(tcx, data.terminator().source_info, body.span),
|
||||
A = ALIGN,
|
||||
)?;
|
||||
|
||||
@ -518,8 +518,14 @@ impl<'tcx> Visitor<'tcx> for ExtraComments<'tcx> {
|
||||
}
|
||||
}
|
||||
|
||||
fn comment(tcx: TyCtxt<'_>, SourceInfo { span, scope }: SourceInfo) -> String {
|
||||
format!("scope {} at {}", scope.index(), tcx.sess.source_map().span_to_embeddable_string(span))
|
||||
fn comment(tcx: TyCtxt<'_>, SourceInfo { span, scope }: SourceInfo, function_span: Span) -> String {
|
||||
let location = if tcx.sess.opts.unstable_opts.mir_pretty_relative_line_numbers {
|
||||
tcx.sess.source_map().span_to_relative_line_string(span, function_span)
|
||||
} else {
|
||||
tcx.sess.source_map().span_to_embeddable_string(span)
|
||||
};
|
||||
|
||||
format!("scope {} at {}", scope.index(), location,)
|
||||
}
|
||||
|
||||
/// Prints local variables in a scope tree.
|
||||
@ -550,7 +556,7 @@ fn write_scope_tree(
|
||||
"{0:1$} // in {2}",
|
||||
indented_debug_info,
|
||||
ALIGN,
|
||||
comment(tcx, var_debug_info.source_info),
|
||||
comment(tcx, var_debug_info.source_info, body.span),
|
||||
)?;
|
||||
}
|
||||
|
||||
@ -585,7 +591,7 @@ fn write_scope_tree(
|
||||
indented_decl,
|
||||
ALIGN,
|
||||
local_name,
|
||||
comment(tcx, local_decl.source_info),
|
||||
comment(tcx, local_decl.source_info, body.span),
|
||||
)?;
|
||||
}
|
||||
|
||||
|
@ -1379,6 +1379,8 @@ options! {
|
||||
"use like `-Zmir-enable-passes=+DestProp,-InstCombine`. Forces the specified passes to be \
|
||||
enabled, overriding all other checks. Passes that are not specified are enabled or \
|
||||
disabled by other flags as usual."),
|
||||
mir_pretty_relative_line_numbers: bool = (false, parse_bool, [UNTRACKED],
|
||||
"use line numbers relative to the function in mir pretty printing"),
|
||||
#[cfg_attr(not(bootstrap), rustc_lint_opt_deny_field_access("use `Session::mir_opt_level` instead of this field"))]
|
||||
mir_opt_level: Option<usize> = (None, parse_opt_number, [TRACKED],
|
||||
"MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)"),
|
||||
|
@ -463,6 +463,33 @@ impl SourceMap {
|
||||
self.span_to_string(sp, FileNameDisplayPreference::Remapped)
|
||||
}
|
||||
|
||||
/// Format the span location suitable for pretty printing anotations with relative line numbers
|
||||
pub fn span_to_relative_line_string(&self, sp: Span, relative_to: Span) -> String {
|
||||
if self.files.borrow().source_files.is_empty() || sp.is_dummy() || relative_to.is_dummy() {
|
||||
return "no-location".to_string();
|
||||
}
|
||||
|
||||
let lo = self.lookup_char_pos(sp.lo());
|
||||
let hi = self.lookup_char_pos(sp.hi());
|
||||
let offset = self.lookup_char_pos(relative_to.lo());
|
||||
|
||||
if lo.file.name != offset.file.name {
|
||||
return self.span_to_embeddable_string(sp);
|
||||
}
|
||||
|
||||
let lo_line = lo.line.saturating_sub(offset.line);
|
||||
let hi_line = hi.line.saturating_sub(offset.line);
|
||||
|
||||
format!(
|
||||
"{}:+{}:{}: +{}:{}",
|
||||
lo.file.name.display(FileNameDisplayPreference::Remapped),
|
||||
lo_line,
|
||||
lo.col.to_usize() + 1,
|
||||
hi_line,
|
||||
hi.col.to_usize() + 1,
|
||||
)
|
||||
}
|
||||
|
||||
/// Format the span location to be printed in diagnostics. Must not be emitted
|
||||
/// to build artifacts as this may leak local file paths. Use span_to_embeddable_string
|
||||
/// for string suitable for embedding.
|
||||
|
@ -2,28 +2,28 @@
|
||||
+ // MIR for `encode` after SimplifyBranchSame
|
||||
|
||||
fn encode(_1: Type) -> Type {
|
||||
debug v => _1; // in scope 0 at $DIR/76803_regression.rs:10:15: 10:16
|
||||
let mut _0: Type; // return place in scope 0 at $DIR/76803_regression.rs:10:27: 10:31
|
||||
let mut _2: isize; // in scope 0 at $DIR/76803_regression.rs:12:9: 12:16
|
||||
debug v => _1; // in scope 0 at $DIR/76803_regression.rs:+0:15: +0:16
|
||||
let mut _0: Type; // return place in scope 0 at $DIR/76803_regression.rs:+0:27: +0:31
|
||||
let mut _2: isize; // in scope 0 at $DIR/76803_regression.rs:+2:9: +2:16
|
||||
|
||||
bb0: {
|
||||
_2 = discriminant(_1); // scope 0 at $DIR/76803_regression.rs:11:11: 11:12
|
||||
switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/76803_regression.rs:11:5: 11:12
|
||||
_2 = discriminant(_1); // scope 0 at $DIR/76803_regression.rs:+1:11: +1:12
|
||||
switchInt(move _2) -> [0_isize: bb2, otherwise: bb1]; // scope 0 at $DIR/76803_regression.rs:+1:5: +1:12
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = move _1; // scope 0 at $DIR/76803_regression.rs:13:14: 13:15
|
||||
goto -> bb3; // scope 0 at $DIR/76803_regression.rs:13:14: 13:15
|
||||
_0 = move _1; // scope 0 at $DIR/76803_regression.rs:+3:14: +3:15
|
||||
goto -> bb3; // scope 0 at $DIR/76803_regression.rs:+3:14: +3:15
|
||||
}
|
||||
|
||||
bb2: {
|
||||
Deinit(_0); // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
|
||||
discriminant(_0) = 1; // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
|
||||
goto -> bb3; // scope 0 at $DIR/76803_regression.rs:12:20: 12:27
|
||||
Deinit(_0); // scope 0 at $DIR/76803_regression.rs:+2:20: +2:27
|
||||
discriminant(_0) = 1; // scope 0 at $DIR/76803_regression.rs:+2:20: +2:27
|
||||
goto -> bb3; // scope 0 at $DIR/76803_regression.rs:+2:20: +2:27
|
||||
}
|
||||
|
||||
bb3: {
|
||||
return; // scope 0 at $DIR/76803_regression.rs:15:2: 15:2
|
||||
return; // scope 0 at $DIR/76803_regression.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,83 +33,83 @@
|
||||
| 29: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address-of.rs:36:12: 36:22, inferred_ty: *mut [i32]
|
||||
|
|
||||
fn address_of_reborrow() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/address-of.rs:3:26: 3:26
|
||||
let _1: &[i32; 10]; // in scope 0 at $DIR/address-of.rs:4:9: 4:10
|
||||
let _2: [i32; 10]; // in scope 0 at $DIR/address-of.rs:4:14: 4:21
|
||||
let mut _4: [i32; 10]; // in scope 0 at $DIR/address-of.rs:5:22: 5:29
|
||||
let _5: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:7:5: 7:18
|
||||
let mut _6: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:7:5: 7:18
|
||||
let _7: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:8:5: 8:26
|
||||
let _8: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:9:5: 9:25
|
||||
let mut _9: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:9:5: 9:25
|
||||
let mut _10: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:9:5: 9:6
|
||||
let _11: *const [i32]; // in scope 0 at $DIR/address-of.rs:10:5: 10:22
|
||||
let mut _12: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:10:5: 10:6
|
||||
let _13: *const i32; // in scope 0 at $DIR/address-of.rs:11:5: 11:20
|
||||
let mut _14: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:11:5: 11:6
|
||||
let mut _18: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:15:30: 15:31
|
||||
let mut _20: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:16:27: 16:28
|
||||
let _21: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:18:5: 18:18
|
||||
let mut _22: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:18:5: 18:18
|
||||
let _23: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:19:5: 19:26
|
||||
let _24: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:20:5: 20:25
|
||||
let mut _25: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:20:5: 20:25
|
||||
let mut _26: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:20:5: 20:6
|
||||
let _27: *const [i32]; // in scope 0 at $DIR/address-of.rs:21:5: 21:22
|
||||
let mut _28: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:21:5: 21:6
|
||||
let mut _32: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:25:30: 25:31
|
||||
let mut _34: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:26:27: 26:28
|
||||
let _35: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:28:5: 28:16
|
||||
let mut _36: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:28:5: 28:16
|
||||
let _37: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:29:5: 29:24
|
||||
let _38: *mut dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:30:5: 30:23
|
||||
let mut _39: *mut dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:30:5: 30:23
|
||||
let mut _40: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:30:5: 30:6
|
||||
let _41: *mut [i32]; // in scope 0 at $DIR/address-of.rs:31:5: 31:20
|
||||
let mut _42: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:31:5: 31:6
|
||||
let mut _46: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:35:28: 35:29
|
||||
let mut _48: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:36:25: 36:26
|
||||
let mut _0: (); // return place in scope 0 at $DIR/address-of.rs:+0:26: +0:26
|
||||
let _1: &[i32; 10]; // in scope 0 at $DIR/address-of.rs:+1:9: +1:10
|
||||
let _2: [i32; 10]; // in scope 0 at $DIR/address-of.rs:+1:14: +1:21
|
||||
let mut _4: [i32; 10]; // in scope 0 at $DIR/address-of.rs:+2:22: +2:29
|
||||
let _5: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+4:5: +4:18
|
||||
let mut _6: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+4:5: +4:18
|
||||
let _7: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+5:5: +5:26
|
||||
let _8: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+6:5: +6:25
|
||||
let mut _9: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+6:5: +6:25
|
||||
let mut _10: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+6:5: +6:6
|
||||
let _11: *const [i32]; // in scope 0 at $DIR/address-of.rs:+7:5: +7:22
|
||||
let mut _12: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+7:5: +7:6
|
||||
let _13: *const i32; // in scope 0 at $DIR/address-of.rs:+8:5: +8:20
|
||||
let mut _14: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+8:5: +8:6
|
||||
let mut _18: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+12:30: +12:31
|
||||
let mut _20: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+13:27: +13:28
|
||||
let _21: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+15:5: +15:18
|
||||
let mut _22: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+15:5: +15:18
|
||||
let _23: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+16:5: +16:26
|
||||
let _24: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+17:5: +17:25
|
||||
let mut _25: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+17:5: +17:25
|
||||
let mut _26: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+17:5: +17:6
|
||||
let _27: *const [i32]; // in scope 0 at $DIR/address-of.rs:+18:5: +18:22
|
||||
let mut _28: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+18:5: +18:6
|
||||
let mut _32: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+22:30: +22:31
|
||||
let mut _34: *const [i32; 10]; // in scope 0 at $DIR/address-of.rs:+23:27: +23:28
|
||||
let _35: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+25:5: +25:16
|
||||
let mut _36: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+25:5: +25:16
|
||||
let _37: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+26:5: +26:24
|
||||
let _38: *mut dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+27:5: +27:23
|
||||
let mut _39: *mut dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+27:5: +27:23
|
||||
let mut _40: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+27:5: +27:6
|
||||
let _41: *mut [i32]; // in scope 0 at $DIR/address-of.rs:+28:5: +28:20
|
||||
let mut _42: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+28:5: +28:6
|
||||
let mut _46: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+32:28: +32:29
|
||||
let mut _48: *mut [i32; 10]; // in scope 0 at $DIR/address-of.rs:+33:25: +33:26
|
||||
scope 1 {
|
||||
debug y => _1; // in scope 1 at $DIR/address-of.rs:4:9: 4:10
|
||||
let mut _3: &mut [i32; 10]; // in scope 1 at $DIR/address-of.rs:5:9: 5:14
|
||||
debug y => _1; // in scope 1 at $DIR/address-of.rs:+1:9: +1:10
|
||||
let mut _3: &mut [i32; 10]; // in scope 1 at $DIR/address-of.rs:+2:9: +2:14
|
||||
scope 2 {
|
||||
debug z => _3; // in scope 2 at $DIR/address-of.rs:5:9: 5:14
|
||||
let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at $DIR/address-of.rs:13:9: 13:10
|
||||
debug z => _3; // in scope 2 at $DIR/address-of.rs:+2:9: +2:14
|
||||
let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at $DIR/address-of.rs:+10:9: +10:10
|
||||
scope 3 {
|
||||
debug p => _15; // in scope 3 at $DIR/address-of.rs:13:9: 13:10
|
||||
let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at $DIR/address-of.rs:14:9: 14:10
|
||||
debug p => _15; // in scope 3 at $DIR/address-of.rs:+10:9: +10:10
|
||||
let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at $DIR/address-of.rs:+11:9: +11:10
|
||||
scope 4 {
|
||||
debug p => _16; // in scope 4 at $DIR/address-of.rs:14:9: 14:10
|
||||
let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] }; // in scope 4 at $DIR/address-of.rs:15:9: 15:10
|
||||
debug p => _16; // in scope 4 at $DIR/address-of.rs:+11:9: +11:10
|
||||
let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] }; // in scope 4 at $DIR/address-of.rs:+12:9: +12:10
|
||||
scope 5 {
|
||||
debug p => _17; // in scope 5 at $DIR/address-of.rs:15:9: 15:10
|
||||
let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] }; // in scope 5 at $DIR/address-of.rs:16:9: 16:10
|
||||
debug p => _17; // in scope 5 at $DIR/address-of.rs:+12:9: +12:10
|
||||
let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] }; // in scope 5 at $DIR/address-of.rs:+13:9: +13:10
|
||||
scope 6 {
|
||||
debug p => _19; // in scope 6 at $DIR/address-of.rs:16:9: 16:10
|
||||
let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] }; // in scope 6 at $DIR/address-of.rs:23:9: 23:10
|
||||
debug p => _19; // in scope 6 at $DIR/address-of.rs:+13:9: +13:10
|
||||
let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] }; // in scope 6 at $DIR/address-of.rs:+20:9: +20:10
|
||||
scope 7 {
|
||||
debug p => _29; // in scope 7 at $DIR/address-of.rs:23:9: 23:10
|
||||
let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] }; // in scope 7 at $DIR/address-of.rs:24:9: 24:10
|
||||
debug p => _29; // in scope 7 at $DIR/address-of.rs:+20:9: +20:10
|
||||
let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] }; // in scope 7 at $DIR/address-of.rs:+21:9: +21:10
|
||||
scope 8 {
|
||||
debug p => _30; // in scope 8 at $DIR/address-of.rs:24:9: 24:10
|
||||
let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] }; // in scope 8 at $DIR/address-of.rs:25:9: 25:10
|
||||
debug p => _30; // in scope 8 at $DIR/address-of.rs:+21:9: +21:10
|
||||
let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] }; // in scope 8 at $DIR/address-of.rs:+22:9: +22:10
|
||||
scope 9 {
|
||||
debug p => _31; // in scope 9 at $DIR/address-of.rs:25:9: 25:10
|
||||
let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] }; // in scope 9 at $DIR/address-of.rs:26:9: 26:10
|
||||
debug p => _31; // in scope 9 at $DIR/address-of.rs:+22:9: +22:10
|
||||
let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] }; // in scope 9 at $DIR/address-of.rs:+23:9: +23:10
|
||||
scope 10 {
|
||||
debug p => _33; // in scope 10 at $DIR/address-of.rs:26:9: 26:10
|
||||
let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] }; // in scope 10 at $DIR/address-of.rs:33:9: 33:10
|
||||
debug p => _33; // in scope 10 at $DIR/address-of.rs:+23:9: +23:10
|
||||
let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] }; // in scope 10 at $DIR/address-of.rs:+30:9: +30:10
|
||||
scope 11 {
|
||||
debug p => _43; // in scope 11 at $DIR/address-of.rs:33:9: 33:10
|
||||
let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] }; // in scope 11 at $DIR/address-of.rs:34:9: 34:10
|
||||
debug p => _43; // in scope 11 at $DIR/address-of.rs:+30:9: +30:10
|
||||
let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] }; // in scope 11 at $DIR/address-of.rs:+31:9: +31:10
|
||||
scope 12 {
|
||||
debug p => _44; // in scope 12 at $DIR/address-of.rs:34:9: 34:10
|
||||
let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] }; // in scope 12 at $DIR/address-of.rs:35:9: 35:10
|
||||
debug p => _44; // in scope 12 at $DIR/address-of.rs:+31:9: +31:10
|
||||
let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] }; // in scope 12 at $DIR/address-of.rs:+32:9: +32:10
|
||||
scope 13 {
|
||||
debug p => _45; // in scope 13 at $DIR/address-of.rs:35:9: 35:10
|
||||
let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] }; // in scope 13 at $DIR/address-of.rs:36:9: 36:10
|
||||
debug p => _45; // in scope 13 at $DIR/address-of.rs:+32:9: +32:10
|
||||
let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] }; // in scope 13 at $DIR/address-of.rs:+33:9: +33:10
|
||||
scope 14 {
|
||||
debug p => _47; // in scope 14 at $DIR/address-of.rs:36:9: 36:10
|
||||
debug p => _47; // in scope 14 at $DIR/address-of.rs:+33:9: +33:10
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -126,183 +126,183 @@ fn address_of_reborrow() -> () {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/address-of.rs:4:9: 4:10
|
||||
StorageLive(_2); // scope 0 at $DIR/address-of.rs:4:14: 4:21
|
||||
_2 = [const 0_i32; 10]; // scope 0 at $DIR/address-of.rs:4:14: 4:21
|
||||
_1 = &_2; // scope 0 at $DIR/address-of.rs:4:13: 4:21
|
||||
FakeRead(ForLet(None), _1); // scope 0 at $DIR/address-of.rs:4:9: 4:10
|
||||
StorageLive(_3); // scope 1 at $DIR/address-of.rs:5:9: 5:14
|
||||
StorageLive(_4); // scope 1 at $DIR/address-of.rs:5:22: 5:29
|
||||
_4 = [const 0_i32; 10]; // scope 1 at $DIR/address-of.rs:5:22: 5:29
|
||||
_3 = &mut _4; // scope 1 at $DIR/address-of.rs:5:17: 5:29
|
||||
FakeRead(ForLet(None), _3); // scope 1 at $DIR/address-of.rs:5:9: 5:14
|
||||
StorageLive(_5); // scope 2 at $DIR/address-of.rs:7:5: 7:18
|
||||
StorageLive(_6); // scope 2 at $DIR/address-of.rs:7:5: 7:18
|
||||
_6 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:7:5: 7:6
|
||||
AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // scope 2 at $DIR/address-of.rs:7:5: 7:18
|
||||
_5 = _6; // scope 2 at $DIR/address-of.rs:7:5: 7:18
|
||||
StorageDead(_6); // scope 2 at $DIR/address-of.rs:7:18: 7:19
|
||||
StorageDead(_5); // scope 2 at $DIR/address-of.rs:7:18: 7:19
|
||||
StorageLive(_7); // scope 2 at $DIR/address-of.rs:8:5: 8:26
|
||||
_7 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:8:5: 8:6
|
||||
StorageDead(_7); // scope 2 at $DIR/address-of.rs:8:26: 8:27
|
||||
StorageLive(_8); // scope 2 at $DIR/address-of.rs:9:5: 9:25
|
||||
StorageLive(_9); // scope 2 at $DIR/address-of.rs:9:5: 9:25
|
||||
StorageLive(_10); // scope 2 at $DIR/address-of.rs:9:5: 9:6
|
||||
_10 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:9:5: 9:6
|
||||
_9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:9:5: 9:6
|
||||
StorageDead(_10); // scope 2 at $DIR/address-of.rs:9:5: 9:6
|
||||
AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/address-of.rs:9:5: 9:25
|
||||
_8 = _9; // scope 2 at $DIR/address-of.rs:9:5: 9:25
|
||||
StorageDead(_9); // scope 2 at $DIR/address-of.rs:9:25: 9:26
|
||||
StorageDead(_8); // scope 2 at $DIR/address-of.rs:9:25: 9:26
|
||||
StorageLive(_11); // scope 2 at $DIR/address-of.rs:10:5: 10:22
|
||||
StorageLive(_12); // scope 2 at $DIR/address-of.rs:10:5: 10:6
|
||||
_12 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:10:5: 10:6
|
||||
_11 = move _12 as *const [i32] (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:10:5: 10:6
|
||||
StorageDead(_12); // scope 2 at $DIR/address-of.rs:10:5: 10:6
|
||||
StorageDead(_11); // scope 2 at $DIR/address-of.rs:10:22: 10:23
|
||||
StorageLive(_13); // scope 2 at $DIR/address-of.rs:11:5: 11:20
|
||||
StorageLive(_14); // scope 2 at $DIR/address-of.rs:11:5: 11:6
|
||||
_14 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:11:5: 11:6
|
||||
_13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // scope 2 at $DIR/address-of.rs:11:5: 11:20
|
||||
StorageDead(_14); // scope 2 at $DIR/address-of.rs:11:19: 11:20
|
||||
StorageDead(_13); // scope 2 at $DIR/address-of.rs:11:20: 11:21
|
||||
StorageLive(_15); // scope 2 at $DIR/address-of.rs:13:9: 13:10
|
||||
_15 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:13:23: 13:24
|
||||
FakeRead(ForLet(None), _15); // scope 2 at $DIR/address-of.rs:13:9: 13:10
|
||||
AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 2 at $DIR/address-of.rs:13:12: 13:20
|
||||
StorageLive(_16); // scope 3 at $DIR/address-of.rs:14:9: 14:10
|
||||
_16 = &raw const (*_1); // scope 3 at $DIR/address-of.rs:14:31: 14:32
|
||||
FakeRead(ForLet(None), _16); // scope 3 at $DIR/address-of.rs:14:9: 14:10
|
||||
AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // scope 3 at $DIR/address-of.rs:14:12: 14:28
|
||||
StorageLive(_17); // scope 4 at $DIR/address-of.rs:15:9: 15:10
|
||||
StorageLive(_18); // scope 4 at $DIR/address-of.rs:15:30: 15:31
|
||||
_18 = &raw const (*_1); // scope 4 at $DIR/address-of.rs:15:30: 15:31
|
||||
_17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 4 at $DIR/address-of.rs:15:30: 15:31
|
||||
StorageDead(_18); // scope 4 at $DIR/address-of.rs:15:30: 15:31
|
||||
FakeRead(ForLet(None), _17); // scope 4 at $DIR/address-of.rs:15:9: 15:10
|
||||
AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // scope 4 at $DIR/address-of.rs:15:12: 15:27
|
||||
StorageLive(_19); // scope 5 at $DIR/address-of.rs:16:9: 16:10
|
||||
StorageLive(_20); // scope 5 at $DIR/address-of.rs:16:27: 16:28
|
||||
_20 = &raw const (*_1); // scope 5 at $DIR/address-of.rs:16:27: 16:28
|
||||
_19 = move _20 as *const [i32] (Pointer(Unsize)); // scope 5 at $DIR/address-of.rs:16:27: 16:28
|
||||
StorageDead(_20); // scope 5 at $DIR/address-of.rs:16:27: 16:28
|
||||
FakeRead(ForLet(None), _19); // scope 5 at $DIR/address-of.rs:16:9: 16:10
|
||||
AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // scope 5 at $DIR/address-of.rs:16:12: 16:24
|
||||
StorageLive(_21); // scope 6 at $DIR/address-of.rs:18:5: 18:18
|
||||
StorageLive(_22); // scope 6 at $DIR/address-of.rs:18:5: 18:18
|
||||
_22 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:18:5: 18:6
|
||||
AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // scope 6 at $DIR/address-of.rs:18:5: 18:18
|
||||
_21 = _22; // scope 6 at $DIR/address-of.rs:18:5: 18:18
|
||||
StorageDead(_22); // scope 6 at $DIR/address-of.rs:18:18: 18:19
|
||||
StorageDead(_21); // scope 6 at $DIR/address-of.rs:18:18: 18:19
|
||||
StorageLive(_23); // scope 6 at $DIR/address-of.rs:19:5: 19:26
|
||||
_23 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:19:5: 19:6
|
||||
StorageDead(_23); // scope 6 at $DIR/address-of.rs:19:26: 19:27
|
||||
StorageLive(_24); // scope 6 at $DIR/address-of.rs:20:5: 20:25
|
||||
StorageLive(_25); // scope 6 at $DIR/address-of.rs:20:5: 20:25
|
||||
StorageLive(_26); // scope 6 at $DIR/address-of.rs:20:5: 20:6
|
||||
_26 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:20:5: 20:6
|
||||
_25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:20:5: 20:6
|
||||
StorageDead(_26); // scope 6 at $DIR/address-of.rs:20:5: 20:6
|
||||
AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // scope 6 at $DIR/address-of.rs:20:5: 20:25
|
||||
_24 = _25; // scope 6 at $DIR/address-of.rs:20:5: 20:25
|
||||
StorageDead(_25); // scope 6 at $DIR/address-of.rs:20:25: 20:26
|
||||
StorageDead(_24); // scope 6 at $DIR/address-of.rs:20:25: 20:26
|
||||
StorageLive(_27); // scope 6 at $DIR/address-of.rs:21:5: 21:22
|
||||
StorageLive(_28); // scope 6 at $DIR/address-of.rs:21:5: 21:6
|
||||
_28 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:21:5: 21:6
|
||||
_27 = move _28 as *const [i32] (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:21:5: 21:6
|
||||
StorageDead(_28); // scope 6 at $DIR/address-of.rs:21:5: 21:6
|
||||
StorageDead(_27); // scope 6 at $DIR/address-of.rs:21:22: 21:23
|
||||
StorageLive(_29); // scope 6 at $DIR/address-of.rs:23:9: 23:10
|
||||
_29 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:23:23: 23:24
|
||||
FakeRead(ForLet(None), _29); // scope 6 at $DIR/address-of.rs:23:9: 23:10
|
||||
AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // scope 6 at $DIR/address-of.rs:23:12: 23:20
|
||||
StorageLive(_30); // scope 7 at $DIR/address-of.rs:24:9: 24:10
|
||||
_30 = &raw const (*_3); // scope 7 at $DIR/address-of.rs:24:31: 24:32
|
||||
FakeRead(ForLet(None), _30); // scope 7 at $DIR/address-of.rs:24:9: 24:10
|
||||
AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // scope 7 at $DIR/address-of.rs:24:12: 24:28
|
||||
StorageLive(_31); // scope 8 at $DIR/address-of.rs:25:9: 25:10
|
||||
StorageLive(_32); // scope 8 at $DIR/address-of.rs:25:30: 25:31
|
||||
_32 = &raw const (*_3); // scope 8 at $DIR/address-of.rs:25:30: 25:31
|
||||
_31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 8 at $DIR/address-of.rs:25:30: 25:31
|
||||
StorageDead(_32); // scope 8 at $DIR/address-of.rs:25:30: 25:31
|
||||
FakeRead(ForLet(None), _31); // scope 8 at $DIR/address-of.rs:25:9: 25:10
|
||||
AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // scope 8 at $DIR/address-of.rs:25:12: 25:27
|
||||
StorageLive(_33); // scope 9 at $DIR/address-of.rs:26:9: 26:10
|
||||
StorageLive(_34); // scope 9 at $DIR/address-of.rs:26:27: 26:28
|
||||
_34 = &raw const (*_3); // scope 9 at $DIR/address-of.rs:26:27: 26:28
|
||||
_33 = move _34 as *const [i32] (Pointer(Unsize)); // scope 9 at $DIR/address-of.rs:26:27: 26:28
|
||||
StorageDead(_34); // scope 9 at $DIR/address-of.rs:26:27: 26:28
|
||||
FakeRead(ForLet(None), _33); // scope 9 at $DIR/address-of.rs:26:9: 26:10
|
||||
AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // scope 9 at $DIR/address-of.rs:26:12: 26:24
|
||||
StorageLive(_35); // scope 10 at $DIR/address-of.rs:28:5: 28:16
|
||||
StorageLive(_36); // scope 10 at $DIR/address-of.rs:28:5: 28:16
|
||||
_36 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:28:5: 28:6
|
||||
AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // scope 10 at $DIR/address-of.rs:28:5: 28:16
|
||||
_35 = _36; // scope 10 at $DIR/address-of.rs:28:5: 28:16
|
||||
StorageDead(_36); // scope 10 at $DIR/address-of.rs:28:16: 28:17
|
||||
StorageDead(_35); // scope 10 at $DIR/address-of.rs:28:16: 28:17
|
||||
StorageLive(_37); // scope 10 at $DIR/address-of.rs:29:5: 29:24
|
||||
_37 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:29:5: 29:6
|
||||
StorageDead(_37); // scope 10 at $DIR/address-of.rs:29:24: 29:25
|
||||
StorageLive(_38); // scope 10 at $DIR/address-of.rs:30:5: 30:23
|
||||
StorageLive(_39); // scope 10 at $DIR/address-of.rs:30:5: 30:23
|
||||
StorageLive(_40); // scope 10 at $DIR/address-of.rs:30:5: 30:6
|
||||
_40 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:30:5: 30:6
|
||||
_39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:30:5: 30:6
|
||||
StorageDead(_40); // scope 10 at $DIR/address-of.rs:30:5: 30:6
|
||||
AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // scope 10 at $DIR/address-of.rs:30:5: 30:23
|
||||
_38 = _39; // scope 10 at $DIR/address-of.rs:30:5: 30:23
|
||||
StorageDead(_39); // scope 10 at $DIR/address-of.rs:30:23: 30:24
|
||||
StorageDead(_38); // scope 10 at $DIR/address-of.rs:30:23: 30:24
|
||||
StorageLive(_41); // scope 10 at $DIR/address-of.rs:31:5: 31:20
|
||||
StorageLive(_42); // scope 10 at $DIR/address-of.rs:31:5: 31:6
|
||||
_42 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:31:5: 31:6
|
||||
_41 = move _42 as *mut [i32] (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:31:5: 31:6
|
||||
StorageDead(_42); // scope 10 at $DIR/address-of.rs:31:5: 31:6
|
||||
StorageDead(_41); // scope 10 at $DIR/address-of.rs:31:20: 31:21
|
||||
StorageLive(_43); // scope 10 at $DIR/address-of.rs:33:9: 33:10
|
||||
_43 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:33:21: 33:22
|
||||
FakeRead(ForLet(None), _43); // scope 10 at $DIR/address-of.rs:33:9: 33:10
|
||||
AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // scope 10 at $DIR/address-of.rs:33:12: 33:18
|
||||
StorageLive(_44); // scope 11 at $DIR/address-of.rs:34:9: 34:10
|
||||
_44 = &raw mut (*_3); // scope 11 at $DIR/address-of.rs:34:29: 34:30
|
||||
FakeRead(ForLet(None), _44); // scope 11 at $DIR/address-of.rs:34:9: 34:10
|
||||
AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // scope 11 at $DIR/address-of.rs:34:12: 34:26
|
||||
StorageLive(_45); // scope 12 at $DIR/address-of.rs:35:9: 35:10
|
||||
StorageLive(_46); // scope 12 at $DIR/address-of.rs:35:28: 35:29
|
||||
_46 = &raw mut (*_3); // scope 12 at $DIR/address-of.rs:35:28: 35:29
|
||||
_45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 12 at $DIR/address-of.rs:35:28: 35:29
|
||||
StorageDead(_46); // scope 12 at $DIR/address-of.rs:35:28: 35:29
|
||||
FakeRead(ForLet(None), _45); // scope 12 at $DIR/address-of.rs:35:9: 35:10
|
||||
AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // scope 12 at $DIR/address-of.rs:35:12: 35:25
|
||||
StorageLive(_47); // scope 13 at $DIR/address-of.rs:36:9: 36:10
|
||||
StorageLive(_48); // scope 13 at $DIR/address-of.rs:36:25: 36:26
|
||||
_48 = &raw mut (*_3); // scope 13 at $DIR/address-of.rs:36:25: 36:26
|
||||
_47 = move _48 as *mut [i32] (Pointer(Unsize)); // scope 13 at $DIR/address-of.rs:36:25: 36:26
|
||||
StorageDead(_48); // scope 13 at $DIR/address-of.rs:36:25: 36:26
|
||||
FakeRead(ForLet(None), _47); // scope 13 at $DIR/address-of.rs:36:9: 36:10
|
||||
AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // scope 13 at $DIR/address-of.rs:36:12: 36:22
|
||||
_0 = const (); // scope 0 at $DIR/address-of.rs:3:26: 37:2
|
||||
StorageDead(_47); // scope 13 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_45); // scope 12 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_44); // scope 11 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_43); // scope 10 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_33); // scope 9 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_31); // scope 8 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_30); // scope 7 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_29); // scope 6 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_19); // scope 5 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_17); // scope 4 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_16); // scope 3 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_15); // scope 2 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_4); // scope 1 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_3); // scope 1 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_2); // scope 0 at $DIR/address-of.rs:37:1: 37:2
|
||||
StorageDead(_1); // scope 0 at $DIR/address-of.rs:37:1: 37:2
|
||||
return; // scope 0 at $DIR/address-of.rs:37:2: 37:2
|
||||
StorageLive(_1); // scope 0 at $DIR/address-of.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/address-of.rs:+1:14: +1:21
|
||||
_2 = [const 0_i32; 10]; // scope 0 at $DIR/address-of.rs:+1:14: +1:21
|
||||
_1 = &_2; // scope 0 at $DIR/address-of.rs:+1:13: +1:21
|
||||
FakeRead(ForLet(None), _1); // scope 0 at $DIR/address-of.rs:+1:9: +1:10
|
||||
StorageLive(_3); // scope 1 at $DIR/address-of.rs:+2:9: +2:14
|
||||
StorageLive(_4); // scope 1 at $DIR/address-of.rs:+2:22: +2:29
|
||||
_4 = [const 0_i32; 10]; // scope 1 at $DIR/address-of.rs:+2:22: +2:29
|
||||
_3 = &mut _4; // scope 1 at $DIR/address-of.rs:+2:17: +2:29
|
||||
FakeRead(ForLet(None), _3); // scope 1 at $DIR/address-of.rs:+2:9: +2:14
|
||||
StorageLive(_5); // scope 2 at $DIR/address-of.rs:+4:5: +4:18
|
||||
StorageLive(_6); // scope 2 at $DIR/address-of.rs:+4:5: +4:18
|
||||
_6 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:+4:5: +4:6
|
||||
AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // scope 2 at $DIR/address-of.rs:+4:5: +4:18
|
||||
_5 = _6; // scope 2 at $DIR/address-of.rs:+4:5: +4:18
|
||||
StorageDead(_6); // scope 2 at $DIR/address-of.rs:+4:18: +4:19
|
||||
StorageDead(_5); // scope 2 at $DIR/address-of.rs:+4:18: +4:19
|
||||
StorageLive(_7); // scope 2 at $DIR/address-of.rs:+5:5: +5:26
|
||||
_7 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:+5:5: +5:6
|
||||
StorageDead(_7); // scope 2 at $DIR/address-of.rs:+5:26: +5:27
|
||||
StorageLive(_8); // scope 2 at $DIR/address-of.rs:+6:5: +6:25
|
||||
StorageLive(_9); // scope 2 at $DIR/address-of.rs:+6:5: +6:25
|
||||
StorageLive(_10); // scope 2 at $DIR/address-of.rs:+6:5: +6:6
|
||||
_10 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:+6:5: +6:6
|
||||
_9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:+6:5: +6:6
|
||||
StorageDead(_10); // scope 2 at $DIR/address-of.rs:+6:5: +6:6
|
||||
AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/address-of.rs:+6:5: +6:25
|
||||
_8 = _9; // scope 2 at $DIR/address-of.rs:+6:5: +6:25
|
||||
StorageDead(_9); // scope 2 at $DIR/address-of.rs:+6:25: +6:26
|
||||
StorageDead(_8); // scope 2 at $DIR/address-of.rs:+6:25: +6:26
|
||||
StorageLive(_11); // scope 2 at $DIR/address-of.rs:+7:5: +7:22
|
||||
StorageLive(_12); // scope 2 at $DIR/address-of.rs:+7:5: +7:6
|
||||
_12 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:+7:5: +7:6
|
||||
_11 = move _12 as *const [i32] (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:+7:5: +7:6
|
||||
StorageDead(_12); // scope 2 at $DIR/address-of.rs:+7:5: +7:6
|
||||
StorageDead(_11); // scope 2 at $DIR/address-of.rs:+7:22: +7:23
|
||||
StorageLive(_13); // scope 2 at $DIR/address-of.rs:+8:5: +8:20
|
||||
StorageLive(_14); // scope 2 at $DIR/address-of.rs:+8:5: +8:6
|
||||
_14 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:+8:5: +8:6
|
||||
_13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // scope 2 at $DIR/address-of.rs:+8:5: +8:20
|
||||
StorageDead(_14); // scope 2 at $DIR/address-of.rs:+8:19: +8:20
|
||||
StorageDead(_13); // scope 2 at $DIR/address-of.rs:+8:20: +8:21
|
||||
StorageLive(_15); // scope 2 at $DIR/address-of.rs:+10:9: +10:10
|
||||
_15 = &raw const (*_1); // scope 2 at $DIR/address-of.rs:+10:23: +10:24
|
||||
FakeRead(ForLet(None), _15); // scope 2 at $DIR/address-of.rs:+10:9: +10:10
|
||||
AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 2 at $DIR/address-of.rs:+10:12: +10:20
|
||||
StorageLive(_16); // scope 3 at $DIR/address-of.rs:+11:9: +11:10
|
||||
_16 = &raw const (*_1); // scope 3 at $DIR/address-of.rs:+11:31: +11:32
|
||||
FakeRead(ForLet(None), _16); // scope 3 at $DIR/address-of.rs:+11:9: +11:10
|
||||
AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // scope 3 at $DIR/address-of.rs:+11:12: +11:28
|
||||
StorageLive(_17); // scope 4 at $DIR/address-of.rs:+12:9: +12:10
|
||||
StorageLive(_18); // scope 4 at $DIR/address-of.rs:+12:30: +12:31
|
||||
_18 = &raw const (*_1); // scope 4 at $DIR/address-of.rs:+12:30: +12:31
|
||||
_17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 4 at $DIR/address-of.rs:+12:30: +12:31
|
||||
StorageDead(_18); // scope 4 at $DIR/address-of.rs:+12:30: +12:31
|
||||
FakeRead(ForLet(None), _17); // scope 4 at $DIR/address-of.rs:+12:9: +12:10
|
||||
AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // scope 4 at $DIR/address-of.rs:+12:12: +12:27
|
||||
StorageLive(_19); // scope 5 at $DIR/address-of.rs:+13:9: +13:10
|
||||
StorageLive(_20); // scope 5 at $DIR/address-of.rs:+13:27: +13:28
|
||||
_20 = &raw const (*_1); // scope 5 at $DIR/address-of.rs:+13:27: +13:28
|
||||
_19 = move _20 as *const [i32] (Pointer(Unsize)); // scope 5 at $DIR/address-of.rs:+13:27: +13:28
|
||||
StorageDead(_20); // scope 5 at $DIR/address-of.rs:+13:27: +13:28
|
||||
FakeRead(ForLet(None), _19); // scope 5 at $DIR/address-of.rs:+13:9: +13:10
|
||||
AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // scope 5 at $DIR/address-of.rs:+13:12: +13:24
|
||||
StorageLive(_21); // scope 6 at $DIR/address-of.rs:+15:5: +15:18
|
||||
StorageLive(_22); // scope 6 at $DIR/address-of.rs:+15:5: +15:18
|
||||
_22 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:+15:5: +15:6
|
||||
AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // scope 6 at $DIR/address-of.rs:+15:5: +15:18
|
||||
_21 = _22; // scope 6 at $DIR/address-of.rs:+15:5: +15:18
|
||||
StorageDead(_22); // scope 6 at $DIR/address-of.rs:+15:18: +15:19
|
||||
StorageDead(_21); // scope 6 at $DIR/address-of.rs:+15:18: +15:19
|
||||
StorageLive(_23); // scope 6 at $DIR/address-of.rs:+16:5: +16:26
|
||||
_23 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:+16:5: +16:6
|
||||
StorageDead(_23); // scope 6 at $DIR/address-of.rs:+16:26: +16:27
|
||||
StorageLive(_24); // scope 6 at $DIR/address-of.rs:+17:5: +17:25
|
||||
StorageLive(_25); // scope 6 at $DIR/address-of.rs:+17:5: +17:25
|
||||
StorageLive(_26); // scope 6 at $DIR/address-of.rs:+17:5: +17:6
|
||||
_26 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:+17:5: +17:6
|
||||
_25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:+17:5: +17:6
|
||||
StorageDead(_26); // scope 6 at $DIR/address-of.rs:+17:5: +17:6
|
||||
AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // scope 6 at $DIR/address-of.rs:+17:5: +17:25
|
||||
_24 = _25; // scope 6 at $DIR/address-of.rs:+17:5: +17:25
|
||||
StorageDead(_25); // scope 6 at $DIR/address-of.rs:+17:25: +17:26
|
||||
StorageDead(_24); // scope 6 at $DIR/address-of.rs:+17:25: +17:26
|
||||
StorageLive(_27); // scope 6 at $DIR/address-of.rs:+18:5: +18:22
|
||||
StorageLive(_28); // scope 6 at $DIR/address-of.rs:+18:5: +18:6
|
||||
_28 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:+18:5: +18:6
|
||||
_27 = move _28 as *const [i32] (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:+18:5: +18:6
|
||||
StorageDead(_28); // scope 6 at $DIR/address-of.rs:+18:5: +18:6
|
||||
StorageDead(_27); // scope 6 at $DIR/address-of.rs:+18:22: +18:23
|
||||
StorageLive(_29); // scope 6 at $DIR/address-of.rs:+20:9: +20:10
|
||||
_29 = &raw const (*_3); // scope 6 at $DIR/address-of.rs:+20:23: +20:24
|
||||
FakeRead(ForLet(None), _29); // scope 6 at $DIR/address-of.rs:+20:9: +20:10
|
||||
AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // scope 6 at $DIR/address-of.rs:+20:12: +20:20
|
||||
StorageLive(_30); // scope 7 at $DIR/address-of.rs:+21:9: +21:10
|
||||
_30 = &raw const (*_3); // scope 7 at $DIR/address-of.rs:+21:31: +21:32
|
||||
FakeRead(ForLet(None), _30); // scope 7 at $DIR/address-of.rs:+21:9: +21:10
|
||||
AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // scope 7 at $DIR/address-of.rs:+21:12: +21:28
|
||||
StorageLive(_31); // scope 8 at $DIR/address-of.rs:+22:9: +22:10
|
||||
StorageLive(_32); // scope 8 at $DIR/address-of.rs:+22:30: +22:31
|
||||
_32 = &raw const (*_3); // scope 8 at $DIR/address-of.rs:+22:30: +22:31
|
||||
_31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 8 at $DIR/address-of.rs:+22:30: +22:31
|
||||
StorageDead(_32); // scope 8 at $DIR/address-of.rs:+22:30: +22:31
|
||||
FakeRead(ForLet(None), _31); // scope 8 at $DIR/address-of.rs:+22:9: +22:10
|
||||
AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // scope 8 at $DIR/address-of.rs:+22:12: +22:27
|
||||
StorageLive(_33); // scope 9 at $DIR/address-of.rs:+23:9: +23:10
|
||||
StorageLive(_34); // scope 9 at $DIR/address-of.rs:+23:27: +23:28
|
||||
_34 = &raw const (*_3); // scope 9 at $DIR/address-of.rs:+23:27: +23:28
|
||||
_33 = move _34 as *const [i32] (Pointer(Unsize)); // scope 9 at $DIR/address-of.rs:+23:27: +23:28
|
||||
StorageDead(_34); // scope 9 at $DIR/address-of.rs:+23:27: +23:28
|
||||
FakeRead(ForLet(None), _33); // scope 9 at $DIR/address-of.rs:+23:9: +23:10
|
||||
AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // scope 9 at $DIR/address-of.rs:+23:12: +23:24
|
||||
StorageLive(_35); // scope 10 at $DIR/address-of.rs:+25:5: +25:16
|
||||
StorageLive(_36); // scope 10 at $DIR/address-of.rs:+25:5: +25:16
|
||||
_36 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:+25:5: +25:6
|
||||
AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // scope 10 at $DIR/address-of.rs:+25:5: +25:16
|
||||
_35 = _36; // scope 10 at $DIR/address-of.rs:+25:5: +25:16
|
||||
StorageDead(_36); // scope 10 at $DIR/address-of.rs:+25:16: +25:17
|
||||
StorageDead(_35); // scope 10 at $DIR/address-of.rs:+25:16: +25:17
|
||||
StorageLive(_37); // scope 10 at $DIR/address-of.rs:+26:5: +26:24
|
||||
_37 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:+26:5: +26:6
|
||||
StorageDead(_37); // scope 10 at $DIR/address-of.rs:+26:24: +26:25
|
||||
StorageLive(_38); // scope 10 at $DIR/address-of.rs:+27:5: +27:23
|
||||
StorageLive(_39); // scope 10 at $DIR/address-of.rs:+27:5: +27:23
|
||||
StorageLive(_40); // scope 10 at $DIR/address-of.rs:+27:5: +27:6
|
||||
_40 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:+27:5: +27:6
|
||||
_39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:+27:5: +27:6
|
||||
StorageDead(_40); // scope 10 at $DIR/address-of.rs:+27:5: +27:6
|
||||
AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // scope 10 at $DIR/address-of.rs:+27:5: +27:23
|
||||
_38 = _39; // scope 10 at $DIR/address-of.rs:+27:5: +27:23
|
||||
StorageDead(_39); // scope 10 at $DIR/address-of.rs:+27:23: +27:24
|
||||
StorageDead(_38); // scope 10 at $DIR/address-of.rs:+27:23: +27:24
|
||||
StorageLive(_41); // scope 10 at $DIR/address-of.rs:+28:5: +28:20
|
||||
StorageLive(_42); // scope 10 at $DIR/address-of.rs:+28:5: +28:6
|
||||
_42 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:+28:5: +28:6
|
||||
_41 = move _42 as *mut [i32] (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:+28:5: +28:6
|
||||
StorageDead(_42); // scope 10 at $DIR/address-of.rs:+28:5: +28:6
|
||||
StorageDead(_41); // scope 10 at $DIR/address-of.rs:+28:20: +28:21
|
||||
StorageLive(_43); // scope 10 at $DIR/address-of.rs:+30:9: +30:10
|
||||
_43 = &raw mut (*_3); // scope 10 at $DIR/address-of.rs:+30:21: +30:22
|
||||
FakeRead(ForLet(None), _43); // scope 10 at $DIR/address-of.rs:+30:9: +30:10
|
||||
AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // scope 10 at $DIR/address-of.rs:+30:12: +30:18
|
||||
StorageLive(_44); // scope 11 at $DIR/address-of.rs:+31:9: +31:10
|
||||
_44 = &raw mut (*_3); // scope 11 at $DIR/address-of.rs:+31:29: +31:30
|
||||
FakeRead(ForLet(None), _44); // scope 11 at $DIR/address-of.rs:+31:9: +31:10
|
||||
AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // scope 11 at $DIR/address-of.rs:+31:12: +31:26
|
||||
StorageLive(_45); // scope 12 at $DIR/address-of.rs:+32:9: +32:10
|
||||
StorageLive(_46); // scope 12 at $DIR/address-of.rs:+32:28: +32:29
|
||||
_46 = &raw mut (*_3); // scope 12 at $DIR/address-of.rs:+32:28: +32:29
|
||||
_45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 12 at $DIR/address-of.rs:+32:28: +32:29
|
||||
StorageDead(_46); // scope 12 at $DIR/address-of.rs:+32:28: +32:29
|
||||
FakeRead(ForLet(None), _45); // scope 12 at $DIR/address-of.rs:+32:9: +32:10
|
||||
AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // scope 12 at $DIR/address-of.rs:+32:12: +32:25
|
||||
StorageLive(_47); // scope 13 at $DIR/address-of.rs:+33:9: +33:10
|
||||
StorageLive(_48); // scope 13 at $DIR/address-of.rs:+33:25: +33:26
|
||||
_48 = &raw mut (*_3); // scope 13 at $DIR/address-of.rs:+33:25: +33:26
|
||||
_47 = move _48 as *mut [i32] (Pointer(Unsize)); // scope 13 at $DIR/address-of.rs:+33:25: +33:26
|
||||
StorageDead(_48); // scope 13 at $DIR/address-of.rs:+33:25: +33:26
|
||||
FakeRead(ForLet(None), _47); // scope 13 at $DIR/address-of.rs:+33:9: +33:10
|
||||
AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // scope 13 at $DIR/address-of.rs:+33:12: +33:22
|
||||
_0 = const (); // scope 0 at $DIR/address-of.rs:+0:26: +34:2
|
||||
StorageDead(_47); // scope 13 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_45); // scope 12 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_44); // scope 11 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_43); // scope 10 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_33); // scope 9 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_31); // scope 8 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_30); // scope 7 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_29); // scope 6 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_19); // scope 5 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_17); // scope 4 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_16); // scope 3 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_15); // scope 2 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_4); // scope 1 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_3); // scope 1 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_2); // scope 0 at $DIR/address-of.rs:+34:1: +34:2
|
||||
StorageDead(_1); // scope 0 at $DIR/address-of.rs:+34:1: +34:2
|
||||
return; // scope 0 at $DIR/address-of.rs:+34:2: +34:2
|
||||
}
|
||||
}
|
||||
|
@ -1,47 +1,47 @@
|
||||
// MIR for `borrow_and_cast` after SimplifyCfg-initial
|
||||
|
||||
fn borrow_and_cast(_1: i32) -> () {
|
||||
debug x => _1; // in scope 0 at $DIR/address-of.rs:41:20: 41:25
|
||||
let mut _0: (); // return place in scope 0 at $DIR/address-of.rs:41:32: 41:32
|
||||
let _2: *const i32; // in scope 0 at $DIR/address-of.rs:42:9: 42:10
|
||||
let _3: &i32; // in scope 0 at $DIR/address-of.rs:42:13: 42:15
|
||||
let _5: &mut i32; // in scope 0 at $DIR/address-of.rs:43:13: 43:19
|
||||
let mut _7: &mut i32; // in scope 0 at $DIR/address-of.rs:44:13: 44:19
|
||||
debug x => _1; // in scope 0 at $DIR/address-of.rs:+0:20: +0:25
|
||||
let mut _0: (); // return place in scope 0 at $DIR/address-of.rs:+0:32: +0:32
|
||||
let _2: *const i32; // in scope 0 at $DIR/address-of.rs:+1:9: +1:10
|
||||
let _3: &i32; // in scope 0 at $DIR/address-of.rs:+1:13: +1:15
|
||||
let _5: &mut i32; // in scope 0 at $DIR/address-of.rs:+2:13: +2:19
|
||||
let mut _7: &mut i32; // in scope 0 at $DIR/address-of.rs:+3:13: +3:19
|
||||
scope 1 {
|
||||
debug p => _2; // in scope 1 at $DIR/address-of.rs:42:9: 42:10
|
||||
let _4: *const i32; // in scope 1 at $DIR/address-of.rs:43:9: 43:10
|
||||
debug p => _2; // in scope 1 at $DIR/address-of.rs:+1:9: +1:10
|
||||
let _4: *const i32; // in scope 1 at $DIR/address-of.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug q => _4; // in scope 2 at $DIR/address-of.rs:43:9: 43:10
|
||||
let _6: *mut i32; // in scope 2 at $DIR/address-of.rs:44:9: 44:10
|
||||
debug q => _4; // in scope 2 at $DIR/address-of.rs:+2:9: +2:10
|
||||
let _6: *mut i32; // in scope 2 at $DIR/address-of.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug r => _6; // in scope 3 at $DIR/address-of.rs:44:9: 44:10
|
||||
debug r => _6; // in scope 3 at $DIR/address-of.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/address-of.rs:42:9: 42:10
|
||||
StorageLive(_3); // scope 0 at $DIR/address-of.rs:42:13: 42:15
|
||||
_3 = &_1; // scope 0 at $DIR/address-of.rs:42:13: 42:15
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/address-of.rs:42:13: 42:15
|
||||
FakeRead(ForLet(None), _2); // scope 0 at $DIR/address-of.rs:42:9: 42:10
|
||||
StorageDead(_3); // scope 0 at $DIR/address-of.rs:42:29: 42:30
|
||||
StorageLive(_4); // scope 1 at $DIR/address-of.rs:43:9: 43:10
|
||||
StorageLive(_5); // scope 1 at $DIR/address-of.rs:43:13: 43:19
|
||||
_5 = &mut _1; // scope 1 at $DIR/address-of.rs:43:13: 43:19
|
||||
_4 = &raw const (*_5); // scope 1 at $DIR/address-of.rs:43:13: 43:19
|
||||
FakeRead(ForLet(None), _4); // scope 1 at $DIR/address-of.rs:43:9: 43:10
|
||||
StorageDead(_5); // scope 1 at $DIR/address-of.rs:43:33: 43:34
|
||||
StorageLive(_6); // scope 2 at $DIR/address-of.rs:44:9: 44:10
|
||||
StorageLive(_7); // scope 2 at $DIR/address-of.rs:44:13: 44:19
|
||||
_7 = &mut _1; // scope 2 at $DIR/address-of.rs:44:13: 44:19
|
||||
_6 = &raw mut (*_7); // scope 2 at $DIR/address-of.rs:44:13: 44:19
|
||||
FakeRead(ForLet(None), _6); // scope 2 at $DIR/address-of.rs:44:9: 44:10
|
||||
StorageDead(_7); // scope 2 at $DIR/address-of.rs:44:31: 44:32
|
||||
_0 = const (); // scope 0 at $DIR/address-of.rs:41:32: 45:2
|
||||
StorageDead(_6); // scope 2 at $DIR/address-of.rs:45:1: 45:2
|
||||
StorageDead(_4); // scope 1 at $DIR/address-of.rs:45:1: 45:2
|
||||
StorageDead(_2); // scope 0 at $DIR/address-of.rs:45:1: 45:2
|
||||
return; // scope 0 at $DIR/address-of.rs:45:2: 45:2
|
||||
StorageLive(_2); // scope 0 at $DIR/address-of.rs:+1:9: +1:10
|
||||
StorageLive(_3); // scope 0 at $DIR/address-of.rs:+1:13: +1:15
|
||||
_3 = &_1; // scope 0 at $DIR/address-of.rs:+1:13: +1:15
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/address-of.rs:+1:13: +1:15
|
||||
FakeRead(ForLet(None), _2); // scope 0 at $DIR/address-of.rs:+1:9: +1:10
|
||||
StorageDead(_3); // scope 0 at $DIR/address-of.rs:+1:29: +1:30
|
||||
StorageLive(_4); // scope 1 at $DIR/address-of.rs:+2:9: +2:10
|
||||
StorageLive(_5); // scope 1 at $DIR/address-of.rs:+2:13: +2:19
|
||||
_5 = &mut _1; // scope 1 at $DIR/address-of.rs:+2:13: +2:19
|
||||
_4 = &raw const (*_5); // scope 1 at $DIR/address-of.rs:+2:13: +2:19
|
||||
FakeRead(ForLet(None), _4); // scope 1 at $DIR/address-of.rs:+2:9: +2:10
|
||||
StorageDead(_5); // scope 1 at $DIR/address-of.rs:+2:33: +2:34
|
||||
StorageLive(_6); // scope 2 at $DIR/address-of.rs:+3:9: +3:10
|
||||
StorageLive(_7); // scope 2 at $DIR/address-of.rs:+3:13: +3:19
|
||||
_7 = &mut _1; // scope 2 at $DIR/address-of.rs:+3:13: +3:19
|
||||
_6 = &raw mut (*_7); // scope 2 at $DIR/address-of.rs:+3:13: +3:19
|
||||
FakeRead(ForLet(None), _6); // scope 2 at $DIR/address-of.rs:+3:9: +3:10
|
||||
StorageDead(_7); // scope 2 at $DIR/address-of.rs:+3:31: +3:32
|
||||
_0 = const (); // scope 0 at $DIR/address-of.rs:+0:32: +4:2
|
||||
StorageDead(_6); // scope 2 at $DIR/address-of.rs:+4:1: +4:2
|
||||
StorageDead(_4); // scope 1 at $DIR/address-of.rs:+4:1: +4:2
|
||||
StorageDead(_2); // scope 0 at $DIR/address-of.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/address-of.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after SimplifyCfg-elaborate-drops
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array-index-is-temporary.rs:12:11: 12:11
|
||||
let mut _1: [u32; 3]; // in scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
|
||||
let mut _4: &mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
let mut _5: u32; // in scope 0 at $DIR/array-index-is-temporary.rs:16:12: 16:29
|
||||
let mut _6: *mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:25: 16:26
|
||||
let _7: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:7: 16:8
|
||||
let mut _8: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
let mut _9: bool; // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +0:11
|
||||
let mut _1: [u32; 3]; // in scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
|
||||
let mut _4: &mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
let mut _5: u32; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
|
||||
let mut _6: *mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
|
||||
let _7: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
|
||||
let mut _8: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
let mut _9: bool; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/array-index-is-temporary.rs:13:9: 13:14
|
||||
let mut _2: usize; // in scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
|
||||
debug x => _1; // in scope 1 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
|
||||
let mut _2: usize; // in scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/array-index-is-temporary.rs:14:9: 14:14
|
||||
let _3: *mut usize; // in scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
|
||||
debug y => _2; // in scope 2 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
|
||||
let _3: *mut usize; // in scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug z => _3; // in scope 3 at $DIR/array-index-is-temporary.rs:15:9: 15:10
|
||||
debug z => _3; // in scope 3 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
|
||||
scope 4 {
|
||||
}
|
||||
}
|
||||
@ -24,41 +24,41 @@ fn main() -> () {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
|
||||
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
|
||||
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
|
||||
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
|
||||
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
|
||||
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
_3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32
|
||||
StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29
|
||||
StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
|
||||
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
|
||||
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27
|
||||
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
|
||||
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:+1:17: +1:29
|
||||
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
|
||||
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:+2:17: +2:18
|
||||
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
|
||||
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
_3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:31: +3:32
|
||||
StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
|
||||
StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
|
||||
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
|
||||
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:+4:21: +4:27
|
||||
// mir::Constant
|
||||
// + span: $DIR/array-index-is-temporary.rs:16:21: 16:24
|
||||
// + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27
|
||||
StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8
|
||||
_7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8
|
||||
_8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
_9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:+4:26: +4:27
|
||||
StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
|
||||
_7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
|
||||
_8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
_9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29
|
||||
StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29
|
||||
StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30
|
||||
_0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2
|
||||
StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2
|
||||
StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2
|
||||
return; // scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2
|
||||
_1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:29
|
||||
StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:+4:28: +4:29
|
||||
StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:+4:29: +4:30
|
||||
_0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +5:2
|
||||
StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
|
||||
StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/array-index-is-temporary.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after SimplifyCfg-elaborate-drops
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array-index-is-temporary.rs:12:11: 12:11
|
||||
let mut _1: [u32; 3]; // in scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
|
||||
let mut _4: &mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
let mut _5: u32; // in scope 0 at $DIR/array-index-is-temporary.rs:16:12: 16:29
|
||||
let mut _6: *mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:25: 16:26
|
||||
let _7: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:7: 16:8
|
||||
let mut _8: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
let mut _9: bool; // in scope 0 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +0:11
|
||||
let mut _1: [u32; 3]; // in scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
|
||||
let mut _4: &mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
let mut _5: u32; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
|
||||
let mut _6: *mut usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
|
||||
let _7: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
|
||||
let mut _8: usize; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
let mut _9: bool; // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/array-index-is-temporary.rs:13:9: 13:14
|
||||
let mut _2: usize; // in scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
|
||||
debug x => _1; // in scope 1 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
|
||||
let mut _2: usize; // in scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/array-index-is-temporary.rs:14:9: 14:14
|
||||
let _3: *mut usize; // in scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
|
||||
debug y => _2; // in scope 2 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
|
||||
let _3: *mut usize; // in scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug z => _3; // in scope 3 at $DIR/array-index-is-temporary.rs:15:9: 15:10
|
||||
debug z => _3; // in scope 3 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
|
||||
scope 4 {
|
||||
}
|
||||
}
|
||||
@ -24,41 +24,41 @@ fn main() -> () {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:13:9: 13:14
|
||||
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:13:17: 13:29
|
||||
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:14:9: 14:14
|
||||
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:14:17: 14:18
|
||||
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:15:9: 15:10
|
||||
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
_3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:25: 15:31
|
||||
StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:15:31: 15:32
|
||||
StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:12: 16:29
|
||||
StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
|
||||
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:16:25: 16:26
|
||||
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:16:21: 16:27
|
||||
StorageLive(_1); // scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
|
||||
_1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:+1:17: +1:29
|
||||
StorageLive(_2); // scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
|
||||
_2 = const 1_usize; // scope 1 at $DIR/array-index-is-temporary.rs:+2:17: +2:18
|
||||
StorageLive(_3); // scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
|
||||
StorageLive(_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
_4 = &mut _2; // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
_3 = &raw mut (*_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
|
||||
StorageDead(_4); // scope 2 at $DIR/array-index-is-temporary.rs:+3:31: +3:32
|
||||
StorageLive(_5); // scope 3 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
|
||||
StorageLive(_6); // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
|
||||
_6 = _3; // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
|
||||
_5 = foo(move _6) -> bb1; // scope 4 at $DIR/array-index-is-temporary.rs:+4:21: +4:27
|
||||
// mir::Constant
|
||||
// + span: $DIR/array-index-is-temporary.rs:16:21: 16:24
|
||||
// + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:16:26: 16:27
|
||||
StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8
|
||||
_7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:16:7: 16:8
|
||||
_8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
_9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:9
|
||||
StorageDead(_6); // scope 4 at $DIR/array-index-is-temporary.rs:+4:26: +4:27
|
||||
StorageLive(_7); // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
|
||||
_7 = _2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
|
||||
_8 = Len(_1); // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
_9 = Lt(_7, _8); // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:16:5: 16:29
|
||||
StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:16:28: 16:29
|
||||
StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:16:29: 16:30
|
||||
_0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:12:11: 17:2
|
||||
StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:17:1: 17:2
|
||||
StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:17:1: 17:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:17:1: 17:2
|
||||
return; // scope 0 at $DIR/array-index-is-temporary.rs:17:2: 17:2
|
||||
_1[_7] = move _5; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:29
|
||||
StorageDead(_5); // scope 3 at $DIR/array-index-is-temporary.rs:+4:28: +4:29
|
||||
StorageDead(_7); // scope 3 at $DIR/array-index-is-temporary.rs:+4:29: +4:30
|
||||
_0 = const (); // scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +5:2
|
||||
StorageDead(_3); // scope 2 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
|
||||
StorageDead(_2); // scope 1 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/array-index-is-temporary.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
@ -1,24 +1,24 @@
|
||||
// MIR for `main` after AbortUnwindingCalls
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/asm_unwind_panic_abort.rs:12:11: 12:11
|
||||
let _1: (); // in scope 0 at $DIR/asm_unwind_panic_abort.rs:14:9: 14:49
|
||||
let mut _0: (); // return place in scope 0 at $DIR/asm_unwind_panic_abort.rs:+0:11: +0:11
|
||||
let _1: (); // in scope 0 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
|
||||
scope 1 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:14:9: 14:49
|
||||
_1 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:14:9: 14:49
|
||||
asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind: bb2]; // scope 1 at $DIR/asm_unwind_panic_abort.rs:14:9: 14:49
|
||||
StorageLive(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
|
||||
_1 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
|
||||
asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind: bb2]; // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:9: +2:49
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:14:48: 14:49
|
||||
_0 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:13:5: 15:6
|
||||
return; // scope 0 at $DIR/asm_unwind_panic_abort.rs:16:2: 16:2
|
||||
StorageDead(_1); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+2:48: +2:49
|
||||
_0 = const (); // scope 1 at $DIR/asm_unwind_panic_abort.rs:+1:5: +3:6
|
||||
return; // scope 0 at $DIR/asm_unwind_panic_abort.rs:+4:2: +4:2
|
||||
}
|
||||
|
||||
bb2 (cleanup): {
|
||||
abort; // scope 0 at $DIR/asm_unwind_panic_abort.rs:12:1: 16:2
|
||||
abort; // scope 0 at $DIR/asm_unwind_panic_abort.rs:+0:1: +4:2
|
||||
}
|
||||
}
|
||||
|
@ -5,80 +5,80 @@
|
||||
| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<std::boxed::Box<u32>>) }, span: $DIR/basic_assignment.rs:18:17: 18:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
|
||||
|
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/basic_assignment.rs:10:11: 10:11
|
||||
let _1: bool; // in scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
|
||||
let mut _3: bool; // in scope 0 at $DIR/basic_assignment.rs:16:16: 16:24
|
||||
let mut _6: std::option::Option<std::boxed::Box<u32>>; // in scope 0 at $DIR/basic_assignment.rs:23:14: 23:20
|
||||
let mut _0: (); // return place in scope 0 at $DIR/basic_assignment.rs:+0:11: +0:11
|
||||
let _1: bool; // in scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
|
||||
let mut _3: bool; // in scope 0 at $DIR/basic_assignment.rs:+6:16: +6:24
|
||||
let mut _6: std::option::Option<std::boxed::Box<u32>>; // in scope 0 at $DIR/basic_assignment.rs:+13:14: +13:20
|
||||
scope 1 {
|
||||
debug nodrop_x => _1; // in scope 1 at $DIR/basic_assignment.rs:11:9: 11:17
|
||||
let _2: bool; // in scope 1 at $DIR/basic_assignment.rs:12:9: 12:17
|
||||
debug nodrop_x => _1; // in scope 1 at $DIR/basic_assignment.rs:+1:9: +1:17
|
||||
let _2: bool; // in scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
|
||||
scope 2 {
|
||||
debug nodrop_y => _2; // in scope 2 at $DIR/basic_assignment.rs:12:9: 12:17
|
||||
let _4: std::option::Option<std::boxed::Box<u32>> as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 2 at $DIR/basic_assignment.rs:18:9: 18:15
|
||||
debug nodrop_y => _2; // in scope 2 at $DIR/basic_assignment.rs:+2:9: +2:17
|
||||
let _4: std::option::Option<std::boxed::Box<u32>> as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
|
||||
scope 3 {
|
||||
debug drop_x => _4; // in scope 3 at $DIR/basic_assignment.rs:18:9: 18:15
|
||||
let _5: std::option::Option<std::boxed::Box<u32>>; // in scope 3 at $DIR/basic_assignment.rs:19:9: 19:15
|
||||
debug drop_x => _4; // in scope 3 at $DIR/basic_assignment.rs:+8:9: +8:15
|
||||
let _5: std::option::Option<std::boxed::Box<u32>>; // in scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
|
||||
scope 4 {
|
||||
debug drop_y => _5; // in scope 4 at $DIR/basic_assignment.rs:19:9: 19:15
|
||||
debug drop_y => _5; // in scope 4 at $DIR/basic_assignment.rs:+9:9: +9:15
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
|
||||
_1 = const false; // scope 0 at $DIR/basic_assignment.rs:11:20: 11:25
|
||||
FakeRead(ForLet(None), _1); // scope 0 at $DIR/basic_assignment.rs:11:9: 11:17
|
||||
StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:12:9: 12:17
|
||||
StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:16:16: 16:24
|
||||
_3 = _1; // scope 2 at $DIR/basic_assignment.rs:16:16: 16:24
|
||||
_2 = move _3; // scope 2 at $DIR/basic_assignment.rs:16:5: 16:24
|
||||
StorageDead(_3); // scope 2 at $DIR/basic_assignment.rs:16:23: 16:24
|
||||
StorageLive(_4); // scope 2 at $DIR/basic_assignment.rs:18:9: 18:15
|
||||
_4 = Option::<Box<u32>>::None; // scope 2 at $DIR/basic_assignment.rs:18:36: 18:40
|
||||
FakeRead(ForLet(None), _4); // scope 2 at $DIR/basic_assignment.rs:18:9: 18:15
|
||||
AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/basic_assignment.rs:18:17: 18:33
|
||||
StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:19:9: 19:15
|
||||
StorageLive(_6); // scope 4 at $DIR/basic_assignment.rs:23:14: 23:20
|
||||
_6 = move _4; // scope 4 at $DIR/basic_assignment.rs:23:14: 23:20
|
||||
replace(_5 <- move _6) -> [return: bb1, unwind: bb5]; // scope 4 at $DIR/basic_assignment.rs:23:5: 23:11
|
||||
StorageLive(_1); // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
|
||||
_1 = const false; // scope 0 at $DIR/basic_assignment.rs:+1:20: +1:25
|
||||
FakeRead(ForLet(None), _1); // scope 0 at $DIR/basic_assignment.rs:+1:9: +1:17
|
||||
StorageLive(_2); // scope 1 at $DIR/basic_assignment.rs:+2:9: +2:17
|
||||
StorageLive(_3); // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
|
||||
_3 = _1; // scope 2 at $DIR/basic_assignment.rs:+6:16: +6:24
|
||||
_2 = move _3; // scope 2 at $DIR/basic_assignment.rs:+6:5: +6:24
|
||||
StorageDead(_3); // scope 2 at $DIR/basic_assignment.rs:+6:23: +6:24
|
||||
StorageLive(_4); // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
|
||||
_4 = Option::<Box<u32>>::None; // scope 2 at $DIR/basic_assignment.rs:+8:36: +8:40
|
||||
FakeRead(ForLet(None), _4); // scope 2 at $DIR/basic_assignment.rs:+8:9: +8:15
|
||||
AscribeUserType(_4, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/basic_assignment.rs:+8:17: +8:33
|
||||
StorageLive(_5); // scope 3 at $DIR/basic_assignment.rs:+9:9: +9:15
|
||||
StorageLive(_6); // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
|
||||
_6 = move _4; // scope 4 at $DIR/basic_assignment.rs:+13:14: +13:20
|
||||
replace(_5 <- move _6) -> [return: bb1, unwind: bb5]; // scope 4 at $DIR/basic_assignment.rs:+13:5: +13:11
|
||||
}
|
||||
|
||||
bb1: {
|
||||
drop(_6) -> [return: bb2, unwind: bb6]; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
|
||||
drop(_6) -> [return: bb2, unwind: bb6]; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_6); // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
|
||||
_0 = const (); // scope 0 at $DIR/basic_assignment.rs:10:11: 24:2
|
||||
drop(_5) -> [return: bb3, unwind: bb7]; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
StorageDead(_6); // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
|
||||
_0 = const (); // scope 0 at $DIR/basic_assignment.rs:+0:11: +14:2
|
||||
drop(_5) -> [return: bb3, unwind: bb7]; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_5); // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
drop(_4) -> [return: bb4, unwind: bb8]; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
StorageDead(_5); // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
drop(_4) -> [return: bb4, unwind: bb8]; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_4); // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
StorageDead(_2); // scope 1 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
StorageDead(_1); // scope 0 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
return; // scope 0 at $DIR/basic_assignment.rs:24:2: 24:2
|
||||
StorageDead(_4); // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
StorageDead(_2); // scope 1 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
StorageDead(_1); // scope 0 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
return; // scope 0 at $DIR/basic_assignment.rs:+14:2: +14:2
|
||||
}
|
||||
|
||||
bb5 (cleanup): {
|
||||
drop(_6) -> bb6; // scope 4 at $DIR/basic_assignment.rs:23:19: 23:20
|
||||
drop(_6) -> bb6; // scope 4 at $DIR/basic_assignment.rs:+13:19: +13:20
|
||||
}
|
||||
|
||||
bb6 (cleanup): {
|
||||
drop(_5) -> bb7; // scope 3 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
drop(_5) -> bb7; // scope 3 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
}
|
||||
|
||||
bb7 (cleanup): {
|
||||
drop(_4) -> bb8; // scope 2 at $DIR/basic_assignment.rs:24:1: 24:2
|
||||
drop(_4) -> bb8; // scope 2 at $DIR/basic_assignment.rs:+14:1: +14:2
|
||||
}
|
||||
|
||||
bb8 (cleanup): {
|
||||
resume; // scope 0 at $DIR/basic_assignment.rs:10:1: 24:2
|
||||
resume; // scope 0 at $DIR/basic_assignment.rs:+0:1: +14:2
|
||||
}
|
||||
}
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `opt1` after InstCombine
|
||||
|
||||
fn opt1(_1: bool) -> u32 {
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:2:9: 2:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:2:21: 2:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:3:8: 3:9
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:3:8: 3:9
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:3:8: 3:9
|
||||
- _2 = Ne(move _3, const true); // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:3:16: 3:17
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:3:8: 3:17
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
|
||||
- _2 = Ne(move _3, const true); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:3:20: 3:21
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:3:5: 3:34
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:20: +1:21
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:3:31: 3:32
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:3:5: 3:34
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:31: +1:32
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:3:33: 3:34
|
||||
return; // scope 0 at $DIR/bool_compare.rs:4:2: 4:2
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:33: +1:34
|
||||
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `opt2` after InstCombine
|
||||
|
||||
fn opt2(_1: bool) -> u32 {
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:7:9: 7:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:7:21: 7:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:8:8: 8:17
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:8:16: 8:17
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:8:8: 8:17
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:8:16: 8:17
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:8:16: 8:17
|
||||
- _2 = Ne(const true, move _3); // scope 0 at $DIR/bool_compare.rs:8:8: 8:17
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:8:8: 8:17
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:8:16: 8:17
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:8:8: 8:17
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
|
||||
- _2 = Ne(const true, move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:16: +1:17
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:17
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:8:20: 8:21
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:8:5: 8:34
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:20: +1:21
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:8:31: 8:32
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:8:5: 8:34
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:31: +1:32
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:34
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:8:33: 8:34
|
||||
return; // scope 0 at $DIR/bool_compare.rs:9:2: 9:2
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:33: +1:34
|
||||
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `opt3` after InstCombine
|
||||
|
||||
fn opt3(_1: bool) -> u32 {
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:12:9: 12:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:12:21: 12:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:13:8: 13:18
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:13:8: 13:9
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:13:8: 13:18
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:13:8: 13:9
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:13:8: 13:9
|
||||
- _2 = Eq(move _3, const false); // scope 0 at $DIR/bool_compare.rs:13:8: 13:18
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:13:8: 13:18
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:13:17: 13:18
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:13:8: 13:18
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:9
|
||||
- _2 = Eq(move _3, const false); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:13:21: 13:22
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:13:5: 13:35
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:21: +1:22
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:13:32: 13:33
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:13:5: 13:35
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:32: +1:33
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:13:34: 13:35
|
||||
return; // scope 0 at $DIR/bool_compare.rs:14:2: 14:2
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:34: +1:35
|
||||
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `opt4` after InstCombine
|
||||
|
||||
fn opt4(_1: bool) -> u32 {
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:17:9: 17:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:17:21: 17:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:18:8: 18:18
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:18:17: 18:18
|
||||
debug x => _1; // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/bool_compare.rs:+0:21: +0:24
|
||||
let mut _2: bool; // in scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
let mut _3: bool; // in scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:18:8: 18:18
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:18:17: 18:18
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:18:17: 18:18
|
||||
- _2 = Eq(const false, move _3); // scope 0 at $DIR/bool_compare.rs:18:8: 18:18
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:18:8: 18:18
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:18:17: 18:18
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:18:8: 18:18
|
||||
StorageLive(_2); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
StorageLive(_3); // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
|
||||
_3 = _1; // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
|
||||
- _2 = Eq(const false, move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
+ _2 = Not(move _3); // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
StorageDead(_3); // scope 0 at $DIR/bool_compare.rs:+1:17: +1:18
|
||||
switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/bool_compare.rs:+1:8: +1:18
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:18:21: 18:22
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:18:5: 18:35
|
||||
_0 = const 0_u32; // scope 0 at $DIR/bool_compare.rs:+1:21: +1:22
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:18:32: 18:33
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:18:5: 18:35
|
||||
_0 = const 1_u32; // scope 0 at $DIR/bool_compare.rs:+1:32: +1:33
|
||||
goto -> bb3; // scope 0 at $DIR/bool_compare.rs:+1:5: +1:35
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:18:34: 18:35
|
||||
return; // scope 0 at $DIR/bool_compare.rs:19:2: 19:2
|
||||
StorageDead(_2); // scope 0 at $DIR/bool_compare.rs:+1:34: +1:35
|
||||
return; // scope 0 at $DIR/bool_compare.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,80 +1,80 @@
|
||||
// MIR for `main` before ElaborateDrops
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/box_expr.rs:6:11: 6:11
|
||||
let _1: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:7:9: 7:10
|
||||
let mut _2: usize; // in scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
let mut _3: usize; // in scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
let mut _4: *mut u8; // in scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
let mut _5: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
let _6: (); // in scope 0 at $DIR/box_expr.rs:8:5: 8:12
|
||||
let mut _7: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:8:10: 8:11
|
||||
let mut _0: (); // return place in scope 0 at $DIR/box_expr.rs:+0:11: +0:11
|
||||
let _1: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+1:9: +1:10
|
||||
let mut _2: usize; // in scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
let mut _3: usize; // in scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
let mut _4: *mut u8; // in scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
let mut _5: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
let _6: (); // in scope 0 at $DIR/box_expr.rs:+2:5: +2:12
|
||||
let mut _7: std::boxed::Box<S>; // in scope 0 at $DIR/box_expr.rs:+2:10: +2:11
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/box_expr.rs:7:9: 7:10
|
||||
debug x => _1; // in scope 1 at $DIR/box_expr.rs:+1:9: +1:10
|
||||
}
|
||||
scope 2 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/box_expr.rs:7:9: 7:10
|
||||
_2 = SizeOf(S); // scope 2 at $DIR/box_expr.rs:7:13: 7:25
|
||||
_3 = AlignOf(S); // scope 2 at $DIR/box_expr.rs:7:13: 7:25
|
||||
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/box_expr.rs:7:13: 7:25
|
||||
StorageLive(_1); // scope 0 at $DIR/box_expr.rs:+1:9: +1:10
|
||||
_2 = SizeOf(S); // scope 2 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
_3 = AlignOf(S); // scope 2 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
// mir::Constant
|
||||
// + span: $DIR/box_expr.rs:7:13: 7:25
|
||||
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_5); // scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
_5 = ShallowInitBox(move _4, S); // scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
(*_5) = S::new() -> [return: bb2, unwind: bb8]; // scope 0 at $DIR/box_expr.rs:7:17: 7:25
|
||||
StorageLive(_5); // scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
_5 = ShallowInitBox(move _4, S); // scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
(*_5) = S::new() -> [return: bb2, unwind: bb8]; // scope 0 at $DIR/box_expr.rs:+1:17: +1:25
|
||||
// mir::Constant
|
||||
// + span: $DIR/box_expr.rs:7:17: 7:23
|
||||
// + literal: Const { ty: fn() -> S {S::new}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_1 = move _5; // scope 0 at $DIR/box_expr.rs:7:13: 7:25
|
||||
drop(_5) -> bb3; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
|
||||
_1 = move _5; // scope 0 at $DIR/box_expr.rs:+1:13: +1:25
|
||||
drop(_5) -> bb3; // scope 0 at $DIR/box_expr.rs:+1:24: +1:25
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_5); // scope 0 at $DIR/box_expr.rs:7:24: 7:25
|
||||
StorageLive(_6); // scope 1 at $DIR/box_expr.rs:8:5: 8:12
|
||||
StorageLive(_7); // scope 1 at $DIR/box_expr.rs:8:10: 8:11
|
||||
_7 = move _1; // scope 1 at $DIR/box_expr.rs:8:10: 8:11
|
||||
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6]; // scope 1 at $DIR/box_expr.rs:8:5: 8:12
|
||||
StorageDead(_5); // scope 0 at $DIR/box_expr.rs:+1:24: +1:25
|
||||
StorageLive(_6); // scope 1 at $DIR/box_expr.rs:+2:5: +2:12
|
||||
StorageLive(_7); // scope 1 at $DIR/box_expr.rs:+2:10: +2:11
|
||||
_7 = move _1; // scope 1 at $DIR/box_expr.rs:+2:10: +2:11
|
||||
_6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6]; // scope 1 at $DIR/box_expr.rs:+2:5: +2:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/box_expr.rs:8:5: 8:9
|
||||
// + literal: Const { ty: fn(Box<S>) {std::mem::drop::<Box<S>>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_7); // scope 1 at $DIR/box_expr.rs:8:11: 8:12
|
||||
StorageDead(_6); // scope 1 at $DIR/box_expr.rs:8:12: 8:13
|
||||
_0 = const (); // scope 0 at $DIR/box_expr.rs:6:11: 9:2
|
||||
drop(_1) -> bb5; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
|
||||
StorageDead(_7); // scope 1 at $DIR/box_expr.rs:+2:11: +2:12
|
||||
StorageDead(_6); // scope 1 at $DIR/box_expr.rs:+2:12: +2:13
|
||||
_0 = const (); // scope 0 at $DIR/box_expr.rs:+0:11: +3:2
|
||||
drop(_1) -> bb5; // scope 0 at $DIR/box_expr.rs:+3:1: +3:2
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/box_expr.rs:9:2: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/box_expr.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/box_expr.rs:+3:2: +3:2
|
||||
}
|
||||
|
||||
bb6 (cleanup): {
|
||||
drop(_7) -> bb7; // scope 1 at $DIR/box_expr.rs:8:11: 8:12
|
||||
drop(_7) -> bb7; // scope 1 at $DIR/box_expr.rs:+2:11: +2:12
|
||||
}
|
||||
|
||||
bb7 (cleanup): {
|
||||
drop(_1) -> bb9; // scope 0 at $DIR/box_expr.rs:9:1: 9:2
|
||||
drop(_1) -> bb9; // scope 0 at $DIR/box_expr.rs:+3:1: +3:2
|
||||
}
|
||||
|
||||
bb8 (cleanup): {
|
||||
drop(_5) -> bb9; // scope 0 at $DIR/box_expr.rs:7:24: 7:25
|
||||
drop(_5) -> bb9; // scope 0 at $DIR/box_expr.rs:+1:24: +1:25
|
||||
}
|
||||
|
||||
bb9 (cleanup): {
|
||||
resume; // scope 0 at $DIR/box_expr.rs:6:1: 9:2
|
||||
resume; // scope 0 at $DIR/box_expr.rs:+0:1: +3:2
|
||||
}
|
||||
}
|
||||
|
@ -1,28 +1,28 @@
|
||||
// MIR for `main` after SimplifyCfg-elaborate-drops
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/byte_slice.rs:4:11: 4:11
|
||||
let _1: &[u8; 3]; // in scope 0 at $DIR/byte_slice.rs:5:9: 5:10
|
||||
let mut _0: (); // return place in scope 0 at $DIR/byte_slice.rs:+0:11: +0:11
|
||||
let _1: &[u8; 3]; // in scope 0 at $DIR/byte_slice.rs:+1:9: +1:10
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/byte_slice.rs:5:9: 5:10
|
||||
let _2: [u8; 2]; // in scope 1 at $DIR/byte_slice.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/byte_slice.rs:+1:9: +1:10
|
||||
let _2: [u8; 2]; // in scope 1 at $DIR/byte_slice.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/byte_slice.rs:6:9: 6:10
|
||||
debug y => _2; // in scope 2 at $DIR/byte_slice.rs:+2:9: +2:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/byte_slice.rs:5:9: 5:10
|
||||
_1 = const b"foo"; // scope 0 at $DIR/byte_slice.rs:5:13: 5:19
|
||||
StorageLive(_1); // scope 0 at $DIR/byte_slice.rs:+1:9: +1:10
|
||||
_1 = const b"foo"; // scope 0 at $DIR/byte_slice.rs:+1:13: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/byte_slice.rs:5:13: 5:19
|
||||
// + literal: Const { ty: &[u8; 3], val: Value(Scalar(alloc1)) }
|
||||
StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:6:9: 6:10
|
||||
_2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:6:13: 6:24
|
||||
_0 = const (); // scope 0 at $DIR/byte_slice.rs:4:11: 7:2
|
||||
StorageDead(_2); // scope 1 at $DIR/byte_slice.rs:7:1: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/byte_slice.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/byte_slice.rs:7:2: 7:2
|
||||
StorageLive(_2); // scope 1 at $DIR/byte_slice.rs:+2:9: +2:10
|
||||
_2 = [const 5_u8, const 120_u8]; // scope 1 at $DIR/byte_slice.rs:+2:13: +2:24
|
||||
_0 = const (); // scope 0 at $DIR/byte_slice.rs:+0:11: +3:2
|
||||
StorageDead(_2); // scope 1 at $DIR/byte_slice.rs:+3:1: +3:2
|
||||
StorageDead(_1); // scope 0 at $DIR/byte_slice.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/byte_slice.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,76 +2,76 @@
|
||||
+ // MIR for `norm2` after InstCombine
|
||||
|
||||
fn norm2(_1: [f32; 2]) -> f32 {
|
||||
debug x => _1; // in scope 0 at $DIR/combine_array_len.rs:4:10: 4:11
|
||||
let mut _0: f32; // return place in scope 0 at $DIR/combine_array_len.rs:4:26: 4:29
|
||||
let _2: f32; // in scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
|
||||
let _3: usize; // in scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
|
||||
let mut _4: usize; // in scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
let mut _5: bool; // in scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
let _7: usize; // in scope 0 at $DIR/combine_array_len.rs:6:15: 6:16
|
||||
let mut _8: usize; // in scope 0 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
let mut _9: bool; // in scope 0 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
let mut _10: f32; // in scope 0 at $DIR/combine_array_len.rs:7:5: 7:8
|
||||
let mut _11: f32; // in scope 0 at $DIR/combine_array_len.rs:7:5: 7:6
|
||||
let mut _12: f32; // in scope 0 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
let mut _13: f32; // in scope 0 at $DIR/combine_array_len.rs:7:11: 7:14
|
||||
let mut _14: f32; // in scope 0 at $DIR/combine_array_len.rs:7:11: 7:12
|
||||
let mut _15: f32; // in scope 0 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
debug x => _1; // in scope 0 at $DIR/combine_array_len.rs:+0:10: +0:11
|
||||
let mut _0: f32; // return place in scope 0 at $DIR/combine_array_len.rs:+0:26: +0:29
|
||||
let _2: f32; // in scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
|
||||
let _3: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
|
||||
let mut _4: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
let mut _5: bool; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
let _7: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:15: +2:16
|
||||
let mut _8: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
let mut _9: bool; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
let mut _10: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:8
|
||||
let mut _11: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:6
|
||||
let mut _12: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
let mut _13: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:14
|
||||
let mut _14: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:12
|
||||
let mut _15: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
scope 1 {
|
||||
debug a => _2; // in scope 1 at $DIR/combine_array_len.rs:5:9: 5:10
|
||||
let _6: f32; // in scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
|
||||
debug a => _2; // in scope 1 at $DIR/combine_array_len.rs:+1:9: +1:10
|
||||
let _6: f32; // in scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug b => _6; // in scope 2 at $DIR/combine_array_len.rs:6:9: 6:10
|
||||
debug b => _6; // in scope 2 at $DIR/combine_array_len.rs:+2:9: +2:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
|
||||
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
|
||||
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
|
||||
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
|
||||
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
|
||||
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
|
||||
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:5:17: 5:18
|
||||
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
|
||||
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
|
||||
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
|
||||
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
_2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:+1:17: +1:18
|
||||
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
|
||||
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
|
||||
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
|
||||
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:6:17: 6:18
|
||||
StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8
|
||||
StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6
|
||||
_11 = _2; // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6
|
||||
StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
_12 = _2; // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
_10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8
|
||||
StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14
|
||||
StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12
|
||||
_14 = _6; // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12
|
||||
StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
_15 = _6; // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
_13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14
|
||||
StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
_0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:14
|
||||
StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:8:1: 8:2
|
||||
StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/combine_array_len.rs:8:2: 8:2
|
||||
_6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:+2:17: +2:18
|
||||
StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
|
||||
StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
|
||||
_11 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
|
||||
StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
_12 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
_10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
|
||||
StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
|
||||
StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
|
||||
_14 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
|
||||
StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
_15 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
_13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
|
||||
StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
_0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:14
|
||||
StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:+4:1: +4:2
|
||||
StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/combine_array_len.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,76 +2,76 @@
|
||||
+ // MIR for `norm2` after InstCombine
|
||||
|
||||
fn norm2(_1: [f32; 2]) -> f32 {
|
||||
debug x => _1; // in scope 0 at $DIR/combine_array_len.rs:4:10: 4:11
|
||||
let mut _0: f32; // return place in scope 0 at $DIR/combine_array_len.rs:4:26: 4:29
|
||||
let _2: f32; // in scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
|
||||
let _3: usize; // in scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
|
||||
let mut _4: usize; // in scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
let mut _5: bool; // in scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
let _7: usize; // in scope 0 at $DIR/combine_array_len.rs:6:15: 6:16
|
||||
let mut _8: usize; // in scope 0 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
let mut _9: bool; // in scope 0 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
let mut _10: f32; // in scope 0 at $DIR/combine_array_len.rs:7:5: 7:8
|
||||
let mut _11: f32; // in scope 0 at $DIR/combine_array_len.rs:7:5: 7:6
|
||||
let mut _12: f32; // in scope 0 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
let mut _13: f32; // in scope 0 at $DIR/combine_array_len.rs:7:11: 7:14
|
||||
let mut _14: f32; // in scope 0 at $DIR/combine_array_len.rs:7:11: 7:12
|
||||
let mut _15: f32; // in scope 0 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
debug x => _1; // in scope 0 at $DIR/combine_array_len.rs:+0:10: +0:11
|
||||
let mut _0: f32; // return place in scope 0 at $DIR/combine_array_len.rs:+0:26: +0:29
|
||||
let _2: f32; // in scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
|
||||
let _3: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
|
||||
let mut _4: usize; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
let mut _5: bool; // in scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
let _7: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:15: +2:16
|
||||
let mut _8: usize; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
let mut _9: bool; // in scope 0 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
let mut _10: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:8
|
||||
let mut _11: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:5: +3:6
|
||||
let mut _12: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
let mut _13: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:14
|
||||
let mut _14: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:11: +3:12
|
||||
let mut _15: f32; // in scope 0 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
scope 1 {
|
||||
debug a => _2; // in scope 1 at $DIR/combine_array_len.rs:5:9: 5:10
|
||||
let _6: f32; // in scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
|
||||
debug a => _2; // in scope 1 at $DIR/combine_array_len.rs:+1:9: +1:10
|
||||
let _6: f32; // in scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug b => _6; // in scope 2 at $DIR/combine_array_len.rs:6:9: 6:10
|
||||
debug b => _6; // in scope 2 at $DIR/combine_array_len.rs:+2:9: +2:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:5:9: 5:10
|
||||
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
|
||||
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:5:15: 5:16
|
||||
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
StorageLive(_2); // scope 0 at $DIR/combine_array_len.rs:+1:9: +1:10
|
||||
StorageLive(_3); // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
|
||||
_3 = const 0_usize; // scope 0 at $DIR/combine_array_len.rs:+1:15: +1:16
|
||||
- _4 = Len(_1); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
+ _4 = const 2_usize; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
_5 = Lt(_3, _4); // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:5:13: 5:17
|
||||
StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:5:17: 5:18
|
||||
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:6:9: 6:10
|
||||
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
|
||||
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:6:15: 6:16
|
||||
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
_2 = _1[_3]; // scope 0 at $DIR/combine_array_len.rs:+1:13: +1:17
|
||||
StorageDead(_3); // scope 0 at $DIR/combine_array_len.rs:+1:17: +1:18
|
||||
StorageLive(_6); // scope 1 at $DIR/combine_array_len.rs:+2:9: +2:10
|
||||
StorageLive(_7); // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
|
||||
_7 = const 1_usize; // scope 1 at $DIR/combine_array_len.rs:+2:15: +2:16
|
||||
- _8 = Len(_1); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
+ _8 = const 2_usize; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
_9 = Lt(_7, _8); // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:6:13: 6:17
|
||||
StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:6:17: 6:18
|
||||
StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8
|
||||
StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6
|
||||
_11 = _2; // scope 2 at $DIR/combine_array_len.rs:7:5: 7:6
|
||||
StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
_12 = _2; // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
_10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:8
|
||||
StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:7:7: 7:8
|
||||
StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14
|
||||
StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12
|
||||
_14 = _6; // scope 2 at $DIR/combine_array_len.rs:7:11: 7:12
|
||||
StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
_15 = _6; // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
_13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:7:11: 7:14
|
||||
StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
_0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:7:5: 7:14
|
||||
StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:7:13: 7:14
|
||||
StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:8:1: 8:2
|
||||
StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/combine_array_len.rs:8:2: 8:2
|
||||
_6 = _1[_7]; // scope 1 at $DIR/combine_array_len.rs:+2:13: +2:17
|
||||
StorageDead(_7); // scope 1 at $DIR/combine_array_len.rs:+2:17: +2:18
|
||||
StorageLive(_10); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
|
||||
StorageLive(_11); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
|
||||
_11 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:6
|
||||
StorageLive(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
_12 = _2; // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
_10 = Mul(move _11, move _12); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:8
|
||||
StorageDead(_12); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
StorageDead(_11); // scope 2 at $DIR/combine_array_len.rs:+3:7: +3:8
|
||||
StorageLive(_13); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
|
||||
StorageLive(_14); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
|
||||
_14 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:12
|
||||
StorageLive(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
_15 = _6; // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
_13 = Mul(move _14, move _15); // scope 2 at $DIR/combine_array_len.rs:+3:11: +3:14
|
||||
StorageDead(_15); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
StorageDead(_14); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
_0 = Add(move _10, move _13); // scope 2 at $DIR/combine_array_len.rs:+3:5: +3:14
|
||||
StorageDead(_13); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
StorageDead(_10); // scope 2 at $DIR/combine_array_len.rs:+3:13: +3:14
|
||||
StorageDead(_6); // scope 1 at $DIR/combine_array_len.rs:+4:1: +4:2
|
||||
StorageDead(_2); // scope 0 at $DIR/combine_array_len.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/combine_array_len.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,84 +2,84 @@
|
||||
+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstCombine
|
||||
|
||||
fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
|
||||
debug self => _1; // in scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
let mut _0: MyThing<T>; // return place in scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
let mut _2: T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
let mut _3: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
let _4: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
let mut _5: u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
let mut _6: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
let _7: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
let mut _8: [f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
let mut _9: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
let _10: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
debug self => _1; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
let mut _0: MyThing<T>; // return place in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
let mut _2: T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
let mut _3: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
let _4: &T; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
let mut _5: u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
let mut _6: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
let _7: &u64; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
let mut _8: [f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
let mut _9: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
let _10: &[f32; 3]; // in scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
StorageLive(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
StorageLive(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
_4 = &((*_1).0: T); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
- _3 = &(*_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
+ _3 = _4; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
_2 = <T as Clone>::clone(move _3) -> bb1; // scope 0 at $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
StorageLive(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
StorageLive(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
StorageLive(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
_4 = &((*_1).0: T); // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
- _3 = &(*_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
+ _3 = _4; // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
_2 = <T as Clone>::clone(move _3) -> bb1; // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:5: +2:9
|
||||
// mir::Constant
|
||||
// + span: $DIR/combine_clone_of_primitives.rs:8:5: 8:9
|
||||
// + literal: Const { ty: for<'r> fn(&'r T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:8:8: 8:9
|
||||
StorageLive(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
StorageLive(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
StorageLive(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
_7 = &((*_1).1: u64); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
- _6 = &(*_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
StorageDead(_3); // scope 0 at $DIR/combine_clone_of_primitives.rs:+2:8: +2:9
|
||||
StorageLive(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
StorageLive(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
StorageLive(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
_7 = &((*_1).1: u64); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
- _6 = &(*_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
- _5 = <u64 as Clone>::clone(move _6) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
- // + literal: Const { ty: for<'r> fn(&'r u64) -> u64 {<u64 as Clone>::clone}, val: Value(<ZST>) }
|
||||
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:9:5: 9:11
|
||||
+ _6 = _7; // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
+ _5 = (*_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
+ goto -> bb2; // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:5: +3:11
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:9:10: 9:11
|
||||
StorageLive(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
StorageLive(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
StorageLive(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
_10 = &((*_1).2: [f32; 3]); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
- _9 = &(*_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
StorageDead(_6); // scope 0 at $DIR/combine_clone_of_primitives.rs:+3:10: +3:11
|
||||
StorageLive(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
StorageLive(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
StorageLive(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
_10 = &((*_1).2: [f32; 3]); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
- _9 = &(*_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
- _8 = <[f32; 3] as Clone>::clone(move _9) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
- // + literal: Const { ty: for<'r> fn(&'r [f32; 3]) -> [f32; 3] {<[f32; 3] as Clone>::clone}, val: Value(<ZST>) }
|
||||
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:10:5: 10:16
|
||||
+ _9 = _10; // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
+ _8 = (*_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
+ goto -> bb3; // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:5: +4:16
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:10:15: 10:16
|
||||
Deinit(_0); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
(_0.0: T) = move _2; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
(_0.1: u64) = move _5; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
(_0.2: [f32; 3]) = move _8; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
StorageDead(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
StorageDead(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
StorageDead(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
StorageDead(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
StorageDead(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
StorageDead(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
return; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:15: 6:15
|
||||
StorageDead(_9); // scope 0 at $DIR/combine_clone_of_primitives.rs:+4:15: +4:16
|
||||
Deinit(_0); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
(_0.0: T) = move _2; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
(_0.1: u64) = move _5; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
(_0.2: [f32; 3]) = move _8; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
StorageDead(_8); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
StorageDead(_5); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
StorageDead(_2); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
StorageDead(_10); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
StorageDead(_7); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
StorageDead(_4); // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
return; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:15: +0:15
|
||||
}
|
||||
|
||||
bb4 (cleanup): {
|
||||
drop(_2) -> bb5; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:14: 6:15
|
||||
drop(_2) -> bb5; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:14: +0:15
|
||||
}
|
||||
|
||||
bb5 (cleanup): {
|
||||
resume; // scope 0 at $DIR/combine_clone_of_primitives.rs:6:10: 6:15
|
||||
resume; // scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation.rs:7:11: 7:11
|
||||
let _1: &[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation.rs:+0:11: +0:11
|
||||
let _1: &[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation.rs:8:5: 8:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
|
||||
nop; // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
|
||||
return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation.rs:7:11: 7:11
|
||||
let _1: &[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation.rs:+0:11: +0:11
|
||||
let _1: &[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&str])]; // in scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&str])]}; // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation.rs:8:5: 8:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&str])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:8:5: 8:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:8:8: 8:9
|
||||
nop; // scope 0 at $DIR/const_allocation.rs:7:11: 9:2
|
||||
return; // scope 0 at $DIR/const_allocation.rs:9:2: 9:2
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation2.rs:4:11: 4:11
|
||||
let _1: &[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation2.rs:+0:11: +0:11
|
||||
let _1: &[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation2.rs:5:5: 5:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
|
||||
nop; // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation2.rs:4:11: 4:11
|
||||
let _1: &[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation2.rs:+0:11: +0:11
|
||||
let _1: &[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
let mut _2: &&[(std::option::Option<i32>, &[&u8])]; // in scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&[(Option<i32>, &[&u8])]}; // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation2.rs:5:5: 5:8
|
||||
// + literal: Const { ty: &&[(Option<i32>, &[&u8])], val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:5:5: 5:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:5:8: 5:9
|
||||
nop; // scope 0 at $DIR/const_allocation2.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/const_allocation2.rs:6:2: 6:2
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation2.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation2.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation2.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation2.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation3.rs:4:11: 4:11
|
||||
let _1: &Packed; // in scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation3.rs:+0:11: +0:11
|
||||
let _1: &Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation3.rs:5:5: 5:8
|
||||
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
|
||||
nop; // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
// MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation3.rs:4:11: 4:11
|
||||
let _1: &Packed; // in scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_allocation3.rs:+0:11: +0:11
|
||||
let _1: &Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
let mut _2: &&Packed; // in scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
StorageLive(_1); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
StorageLive(_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
_2 = const {alloc1: &&Packed}; // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_allocation3.rs:5:5: 5:8
|
||||
// + literal: Const { ty: &&Packed, val: Value(Scalar(alloc1)) }
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:5:5: 5:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:5:8: 5:9
|
||||
nop; // scope 0 at $DIR/const_allocation3.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/const_allocation3.rs:6:2: 6:2
|
||||
_1 = (*_2); // scope 0 at $DIR/const_allocation3.rs:+1:5: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
StorageDead(_1); // scope 0 at $DIR/const_allocation3.rs:+1:8: +1:9
|
||||
nop; // scope 0 at $DIR/const_allocation3.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/const_allocation3.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,46 +2,46 @@
|
||||
+ // MIR for `main` after ConstDebugInfo
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_debuginfo.rs:8:11: 8:11
|
||||
let _1: u8; // in scope 0 at $DIR/const_debuginfo.rs:9:9: 9:10
|
||||
let mut _5: u8; // in scope 0 at $DIR/const_debuginfo.rs:12:15: 12:20
|
||||
let mut _6: u8; // in scope 0 at $DIR/const_debuginfo.rs:12:15: 12:16
|
||||
let mut _7: u8; // in scope 0 at $DIR/const_debuginfo.rs:12:19: 12:20
|
||||
let mut _8: u8; // in scope 0 at $DIR/const_debuginfo.rs:12:23: 12:24
|
||||
let mut _14: u32; // in scope 0 at $DIR/const_debuginfo.rs:21:13: 21:16
|
||||
let mut _15: u32; // in scope 0 at $DIR/const_debuginfo.rs:21:19: 21:22
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_debuginfo.rs:+0:11: +0:11
|
||||
let _1: u8; // in scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
|
||||
let mut _5: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:20
|
||||
let mut _6: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:15: +4:16
|
||||
let mut _7: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:19: +4:20
|
||||
let mut _8: u8; // in scope 0 at $DIR/const_debuginfo.rs:+4:23: +4:24
|
||||
let mut _14: u32; // in scope 0 at $DIR/const_debuginfo.rs:+13:13: +13:16
|
||||
let mut _15: u32; // in scope 0 at $DIR/const_debuginfo.rs:+13:19: +13:22
|
||||
scope 1 {
|
||||
- debug x => _1; // in scope 1 at $DIR/const_debuginfo.rs:9:9: 9:10
|
||||
+ debug x => const 1_u8; // in scope 1 at $DIR/const_debuginfo.rs:9:9: 9:10
|
||||
let _2: u8; // in scope 1 at $DIR/const_debuginfo.rs:10:9: 10:10
|
||||
- debug x => _1; // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
|
||||
+ debug x => const 1_u8; // in scope 1 at $DIR/const_debuginfo.rs:+1:9: +1:10
|
||||
let _2: u8; // in scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
- debug y => _2; // in scope 2 at $DIR/const_debuginfo.rs:10:9: 10:10
|
||||
+ debug y => const 2_u8; // in scope 2 at $DIR/const_debuginfo.rs:10:9: 10:10
|
||||
let _3: u8; // in scope 2 at $DIR/const_debuginfo.rs:11:9: 11:10
|
||||
- debug y => _2; // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
|
||||
+ debug y => const 2_u8; // in scope 2 at $DIR/const_debuginfo.rs:+2:9: +2:10
|
||||
let _3: u8; // in scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
- debug z => _3; // in scope 3 at $DIR/const_debuginfo.rs:11:9: 11:10
|
||||
+ debug z => const 3_u8; // in scope 3 at $DIR/const_debuginfo.rs:11:9: 11:10
|
||||
let _4: u8; // in scope 3 at $DIR/const_debuginfo.rs:12:9: 12:12
|
||||
- debug z => _3; // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
|
||||
+ debug z => const 3_u8; // in scope 3 at $DIR/const_debuginfo.rs:+3:9: +3:10
|
||||
let _4: u8; // in scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
|
||||
scope 4 {
|
||||
- debug sum => _4; // in scope 4 at $DIR/const_debuginfo.rs:12:9: 12:12
|
||||
+ debug sum => const 6_u8; // in scope 4 at $DIR/const_debuginfo.rs:12:9: 12:12
|
||||
let _9: &str; // in scope 4 at $DIR/const_debuginfo.rs:14:9: 14:10
|
||||
- debug sum => _4; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
|
||||
+ debug sum => const 6_u8; // in scope 4 at $DIR/const_debuginfo.rs:+4:9: +4:12
|
||||
let _9: &str; // in scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
|
||||
scope 5 {
|
||||
- debug s => _9; // in scope 5 at $DIR/const_debuginfo.rs:14:9: 14:10
|
||||
+ debug s => const "hello, world!"; // in scope 5 at $DIR/const_debuginfo.rs:14:9: 14:10
|
||||
let _10: (bool, bool, u32); // in scope 5 at $DIR/const_debuginfo.rs:16:9: 16:10
|
||||
- debug s => _9; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
|
||||
+ debug s => const "hello, world!"; // in scope 5 at $DIR/const_debuginfo.rs:+6:9: +6:10
|
||||
let _10: (bool, bool, u32); // in scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
|
||||
scope 6 {
|
||||
debug f => _10; // in scope 6 at $DIR/const_debuginfo.rs:16:9: 16:10
|
||||
let _11: std::option::Option<u16>; // in scope 6 at $DIR/const_debuginfo.rs:18:9: 18:10
|
||||
debug f => _10; // in scope 6 at $DIR/const_debuginfo.rs:+8:9: +8:10
|
||||
let _11: std::option::Option<u16>; // in scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
|
||||
scope 7 {
|
||||
debug o => _11; // in scope 7 at $DIR/const_debuginfo.rs:18:9: 18:10
|
||||
let _12: Point; // in scope 7 at $DIR/const_debuginfo.rs:20:9: 20:10
|
||||
debug o => _11; // in scope 7 at $DIR/const_debuginfo.rs:+10:9: +10:10
|
||||
let _12: Point; // in scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
|
||||
scope 8 {
|
||||
debug p => _12; // in scope 8 at $DIR/const_debuginfo.rs:20:9: 20:10
|
||||
let _13: u32; // in scope 8 at $DIR/const_debuginfo.rs:21:9: 21:10
|
||||
debug p => _12; // in scope 8 at $DIR/const_debuginfo.rs:+12:9: +12:10
|
||||
let _13: u32; // in scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
|
||||
scope 9 {
|
||||
- debug a => _13; // in scope 9 at $DIR/const_debuginfo.rs:21:9: 21:10
|
||||
+ debug a => const 64_u32; // in scope 9 at $DIR/const_debuginfo.rs:21:9: 21:10
|
||||
- debug a => _13; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
|
||||
+ debug a => const 64_u32; // in scope 9 at $DIR/const_debuginfo.rs:+13:9: +13:10
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -53,63 +53,63 @@
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_debuginfo.rs:9:9: 9:10
|
||||
_1 = const 1_u8; // scope 0 at $DIR/const_debuginfo.rs:9:13: 9:16
|
||||
StorageLive(_2); // scope 1 at $DIR/const_debuginfo.rs:10:9: 10:10
|
||||
_2 = const 2_u8; // scope 1 at $DIR/const_debuginfo.rs:10:13: 10:16
|
||||
StorageLive(_3); // scope 2 at $DIR/const_debuginfo.rs:11:9: 11:10
|
||||
_3 = const 3_u8; // scope 2 at $DIR/const_debuginfo.rs:11:13: 11:16
|
||||
StorageLive(_4); // scope 3 at $DIR/const_debuginfo.rs:12:9: 12:12
|
||||
StorageLive(_5); // scope 3 at $DIR/const_debuginfo.rs:12:15: 12:20
|
||||
StorageLive(_6); // scope 3 at $DIR/const_debuginfo.rs:12:15: 12:16
|
||||
_6 = const 1_u8; // scope 3 at $DIR/const_debuginfo.rs:12:15: 12:16
|
||||
StorageLive(_7); // scope 3 at $DIR/const_debuginfo.rs:12:19: 12:20
|
||||
_7 = const 2_u8; // scope 3 at $DIR/const_debuginfo.rs:12:19: 12:20
|
||||
_5 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:12:15: 12:20
|
||||
StorageDead(_7); // scope 3 at $DIR/const_debuginfo.rs:12:19: 12:20
|
||||
StorageDead(_6); // scope 3 at $DIR/const_debuginfo.rs:12:19: 12:20
|
||||
StorageLive(_8); // scope 3 at $DIR/const_debuginfo.rs:12:23: 12:24
|
||||
_8 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:12:23: 12:24
|
||||
_4 = const 6_u8; // scope 3 at $DIR/const_debuginfo.rs:12:15: 12:24
|
||||
StorageDead(_8); // scope 3 at $DIR/const_debuginfo.rs:12:23: 12:24
|
||||
StorageDead(_5); // scope 3 at $DIR/const_debuginfo.rs:12:23: 12:24
|
||||
StorageLive(_9); // scope 4 at $DIR/const_debuginfo.rs:14:9: 14:10
|
||||
_9 = const "hello, world!"; // scope 4 at $DIR/const_debuginfo.rs:14:13: 14:28
|
||||
StorageLive(_1); // scope 0 at $DIR/const_debuginfo.rs:+1:9: +1:10
|
||||
_1 = const 1_u8; // scope 0 at $DIR/const_debuginfo.rs:+1:13: +1:16
|
||||
StorageLive(_2); // scope 1 at $DIR/const_debuginfo.rs:+2:9: +2:10
|
||||
_2 = const 2_u8; // scope 1 at $DIR/const_debuginfo.rs:+2:13: +2:16
|
||||
StorageLive(_3); // scope 2 at $DIR/const_debuginfo.rs:+3:9: +3:10
|
||||
_3 = const 3_u8; // scope 2 at $DIR/const_debuginfo.rs:+3:13: +3:16
|
||||
StorageLive(_4); // scope 3 at $DIR/const_debuginfo.rs:+4:9: +4:12
|
||||
StorageLive(_5); // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
|
||||
StorageLive(_6); // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:16
|
||||
_6 = const 1_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:16
|
||||
StorageLive(_7); // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
|
||||
_7 = const 2_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
|
||||
_5 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:20
|
||||
StorageDead(_7); // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
|
||||
StorageDead(_6); // scope 3 at $DIR/const_debuginfo.rs:+4:19: +4:20
|
||||
StorageLive(_8); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
|
||||
_8 = const 3_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
|
||||
_4 = const 6_u8; // scope 3 at $DIR/const_debuginfo.rs:+4:15: +4:24
|
||||
StorageDead(_8); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
|
||||
StorageDead(_5); // scope 3 at $DIR/const_debuginfo.rs:+4:23: +4:24
|
||||
StorageLive(_9); // scope 4 at $DIR/const_debuginfo.rs:+6:9: +6:10
|
||||
_9 = const "hello, world!"; // scope 4 at $DIR/const_debuginfo.rs:+6:13: +6:28
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_debuginfo.rs:14:13: 14:28
|
||||
// + literal: Const { ty: &str, val: Value(Slice(..)) }
|
||||
StorageLive(_10); // scope 5 at $DIR/const_debuginfo.rs:16:9: 16:10
|
||||
Deinit(_10); // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
|
||||
(_10.0: bool) = const true; // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
|
||||
(_10.1: bool) = const false; // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
|
||||
(_10.2: u32) = const 123_u32; // scope 5 at $DIR/const_debuginfo.rs:16:13: 16:34
|
||||
StorageLive(_11); // scope 6 at $DIR/const_debuginfo.rs:18:9: 18:10
|
||||
Deinit(_11); // scope 6 at $DIR/const_debuginfo.rs:18:13: 18:24
|
||||
((_11 as Some).0: u16) = const 99_u16; // scope 6 at $DIR/const_debuginfo.rs:18:13: 18:24
|
||||
discriminant(_11) = 1; // scope 6 at $DIR/const_debuginfo.rs:18:13: 18:24
|
||||
StorageLive(_12); // scope 7 at $DIR/const_debuginfo.rs:20:9: 20:10
|
||||
Deinit(_12); // scope 7 at $DIR/const_debuginfo.rs:20:13: 20:35
|
||||
(_12.0: u32) = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:20:13: 20:35
|
||||
(_12.1: u32) = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:20:13: 20:35
|
||||
StorageLive(_13); // scope 8 at $DIR/const_debuginfo.rs:21:9: 21:10
|
||||
StorageLive(_14); // scope 8 at $DIR/const_debuginfo.rs:21:13: 21:16
|
||||
_14 = const 32_u32; // scope 8 at $DIR/const_debuginfo.rs:21:13: 21:16
|
||||
StorageLive(_15); // scope 8 at $DIR/const_debuginfo.rs:21:19: 21:22
|
||||
_15 = const 32_u32; // scope 8 at $DIR/const_debuginfo.rs:21:19: 21:22
|
||||
_13 = const 64_u32; // scope 8 at $DIR/const_debuginfo.rs:21:13: 21:22
|
||||
StorageDead(_15); // scope 8 at $DIR/const_debuginfo.rs:21:21: 21:22
|
||||
StorageDead(_14); // scope 8 at $DIR/const_debuginfo.rs:21:21: 21:22
|
||||
nop; // scope 0 at $DIR/const_debuginfo.rs:8:11: 22:2
|
||||
StorageDead(_13); // scope 8 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_12); // scope 7 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_11); // scope 6 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_10); // scope 5 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_9); // scope 4 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_4); // scope 3 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_3); // scope 2 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_2); // scope 1 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_debuginfo.rs:22:1: 22:2
|
||||
return; // scope 0 at $DIR/const_debuginfo.rs:22:2: 22:2
|
||||
StorageLive(_10); // scope 5 at $DIR/const_debuginfo.rs:+8:9: +8:10
|
||||
Deinit(_10); // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
|
||||
(_10.0: bool) = const true; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
|
||||
(_10.1: bool) = const false; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
|
||||
(_10.2: u32) = const 123_u32; // scope 5 at $DIR/const_debuginfo.rs:+8:13: +8:34
|
||||
StorageLive(_11); // scope 6 at $DIR/const_debuginfo.rs:+10:9: +10:10
|
||||
Deinit(_11); // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
|
||||
((_11 as Some).0: u16) = const 99_u16; // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
|
||||
discriminant(_11) = 1; // scope 6 at $DIR/const_debuginfo.rs:+10:13: +10:24
|
||||
StorageLive(_12); // scope 7 at $DIR/const_debuginfo.rs:+12:9: +12:10
|
||||
Deinit(_12); // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
|
||||
(_12.0: u32) = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
|
||||
(_12.1: u32) = const 32_u32; // scope 7 at $DIR/const_debuginfo.rs:+12:13: +12:35
|
||||
StorageLive(_13); // scope 8 at $DIR/const_debuginfo.rs:+13:9: +13:10
|
||||
StorageLive(_14); // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:16
|
||||
_14 = const 32_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:16
|
||||
StorageLive(_15); // scope 8 at $DIR/const_debuginfo.rs:+13:19: +13:22
|
||||
_15 = const 32_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:19: +13:22
|
||||
_13 = const 64_u32; // scope 8 at $DIR/const_debuginfo.rs:+13:13: +13:22
|
||||
StorageDead(_15); // scope 8 at $DIR/const_debuginfo.rs:+13:21: +13:22
|
||||
StorageDead(_14); // scope 8 at $DIR/const_debuginfo.rs:+13:21: +13:22
|
||||
nop; // scope 0 at $DIR/const_debuginfo.rs:+0:11: +14:2
|
||||
StorageDead(_13); // scope 8 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_12); // scope 7 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_11); // scope 6 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_10); // scope 5 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_9); // scope 4 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_4); // scope 3 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_3); // scope 2 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_2); // scope 1 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_debuginfo.rs:+14:1: +14:2
|
||||
return; // scope 0 at $DIR/const_debuginfo.rs:+14:2: +14:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,25 +2,25 @@
|
||||
+ // MIR for `issue_77355_opt` after ConstGoto
|
||||
|
||||
fn issue_77355_opt(_1: Foo) -> u64 {
|
||||
debug num => _1; // in scope 0 at $DIR/const_goto.rs:11:20: 11:23
|
||||
let mut _0: u64; // return place in scope 0 at $DIR/const_goto.rs:11:33: 11:36
|
||||
debug num => _1; // in scope 0 at $DIR/const_goto.rs:+0:20: +0:23
|
||||
let mut _0: u64; // return place in scope 0 at $DIR/const_goto.rs:+0:33: +0:36
|
||||
- let mut _2: bool; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
- let mut _3: isize; // in scope 0 at $DIR/const_goto.rs:12:22: 12:28
|
||||
+ let mut _2: isize; // in scope 0 at $DIR/const_goto.rs:12:22: 12:28
|
||||
- let mut _3: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
|
||||
+ let mut _2: isize; // in scope 0 at $DIR/const_goto.rs:+1:22: +1:28
|
||||
|
||||
bb0: {
|
||||
- StorageLive(_2); // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
- _3 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:12:17: 12:20
|
||||
- _3 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
|
||||
- switchInt(move _3) -> [1_isize: bb2, 2_isize: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
+ _2 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:12:17: 12:20
|
||||
+ _2 = discriminant(_1); // scope 0 at $DIR/const_goto.rs:+1:17: +1:20
|
||||
+ switchInt(move _2) -> [1_isize: bb2, 2_isize: bb2, otherwise: bb1]; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _2 = const false; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
- goto -> bb3; // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
|
||||
+ _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:12:53: 12:55
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:12:5: 12:57
|
||||
+ _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
||||
}
|
||||
|
||||
bb2: {
|
||||
@ -33,20 +33,20 @@
|
||||
- }
|
||||
-
|
||||
- bb4: {
|
||||
_0 = const 23_u64; // scope 0 at $DIR/const_goto.rs:12:41: 12:43
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:12:5: 12:57
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:12:5: 12:57
|
||||
_0 = const 23_u64; // scope 0 at $DIR/const_goto.rs:+1:41: +1:43
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
||||
}
|
||||
|
||||
- bb5: {
|
||||
- _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:12:53: 12:55
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:12:5: 12:57
|
||||
- _0 = const 42_u64; // scope 0 at $DIR/const_goto.rs:+1:53: +1:55
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto.rs:+1:5: +1:57
|
||||
- }
|
||||
-
|
||||
- bb6: {
|
||||
- StorageDead(_2); // scope 0 at $DIR/const_goto.rs:12:56: 12:57
|
||||
- StorageDead(_2); // scope 0 at $DIR/const_goto.rs:+1:56: +1:57
|
||||
+ bb3: {
|
||||
return; // scope 0 at $DIR/const_goto.rs:13:2: 13:2
|
||||
return; // scope 0 at $DIR/const_goto.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,50 +2,50 @@
|
||||
+ // MIR for `f` after ConstGoto
|
||||
|
||||
fn f() -> u64 {
|
||||
let mut _0: u64; // return place in scope 0 at $DIR/const_goto_const_eval_fail.rs:6:44: 6:47
|
||||
let mut _1: bool; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:7:11: 12:6
|
||||
let mut _2: i32; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:8:15: 8:16
|
||||
let mut _0: u64; // return place in scope 0 at $DIR/const_goto_const_eval_fail.rs:+0:44: +0:47
|
||||
let mut _1: bool; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:11: +6:6
|
||||
let mut _2: i32; // in scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:11: 12:6
|
||||
StorageLive(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:15: 8:16
|
||||
_2 = const A; // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:15: 8:16
|
||||
switchInt(_2) -> [1_i32: bb2, 2_i32: bb2, 3_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:8:9: 8:16
|
||||
StorageLive(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:11: +6:6
|
||||
StorageLive(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
|
||||
_2 = const A; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:15: +2:16
|
||||
switchInt(_2) -> [1_i32: bb2, 2_i32: bb2, 3_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+2:9: +2:16
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_1 = const true; // scope 0 at $DIR/const_goto_const_eval_fail.rs:10:18: 10:22
|
||||
goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:10:18: 10:22
|
||||
_1 = const true; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+4:18: +4:22
|
||||
goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+4:18: +4:22
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_1 = const B; // scope 0 at $DIR/const_goto_const_eval_fail.rs:9:26: 9:27
|
||||
- goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:9:26: 9:27
|
||||
+ switchInt(_1) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:5: 12:6
|
||||
_1 = const B; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+3:26: +3:27
|
||||
- goto -> bb3; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+3:26: +3:27
|
||||
+ switchInt(_1) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:5: +6:6
|
||||
}
|
||||
|
||||
bb3: {
|
||||
- switchInt(_1) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:7:5: 12:6
|
||||
- switchInt(_1) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+1:5: +6:6
|
||||
- }
|
||||
-
|
||||
- bb4: {
|
||||
_0 = const 2_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:14:17: 14:18
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:14:17: 14:18
|
||||
+ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:14:17: 14:18
|
||||
_0 = const 2_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
|
||||
+ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+8:17: +8:18
|
||||
}
|
||||
|
||||
- bb5: {
|
||||
+ bb4: {
|
||||
_0 = const 1_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:13:18: 13:19
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:13:18: 13:19
|
||||
+ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:13:18: 13:19
|
||||
_0 = const 1_u64; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
|
||||
+ goto -> bb5; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+7:18: +7:19
|
||||
}
|
||||
|
||||
- bb6: {
|
||||
+ bb5: {
|
||||
StorageDead(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:16:1: 16:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:16:1: 16:2
|
||||
return; // scope 0 at $DIR/const_goto_const_eval_fail.rs:16:2: 16:2
|
||||
StorageDead(_2); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:1: +10:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:1: +10:2
|
||||
return; // scope 0 at $DIR/const_goto_const_eval_fail.rs:+10:2: +10:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,102 +2,102 @@
|
||||
+ // MIR for `match_nested_if` after ConstGoto
|
||||
|
||||
fn match_nested_if() -> bool {
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/const_goto_storage.rs:2:25: 2:29
|
||||
let _1: bool; // in scope 0 at $DIR/const_goto_storage.rs:3:9: 3:12
|
||||
- let mut _2: (); // in scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
|
||||
- let mut _3: bool; // in scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
|
||||
- let mut _4: bool; // in scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
|
||||
- let mut _5: bool; // in scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
|
||||
- let mut _6: bool; // in scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
+ let mut _2: bool; // in scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/const_goto_storage.rs:+0:25: +0:29
|
||||
let _1: bool; // in scope 0 at $DIR/const_goto_storage.rs:+1:9: +1:12
|
||||
- let mut _2: (); // in scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
|
||||
- let mut _3: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
|
||||
- let mut _4: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
|
||||
- let mut _5: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
|
||||
- let mut _6: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
+ let mut _2: bool; // in scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
scope 1 {
|
||||
debug val => _1; // in scope 1 at $DIR/const_goto_storage.rs:3:9: 3:12
|
||||
debug val => _1; // in scope 1 at $DIR/const_goto_storage.rs:+1:9: +1:12
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_goto_storage.rs:3:9: 3:12
|
||||
- StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
|
||||
- nop; // scope 0 at $DIR/const_goto_storage.rs:3:21: 3:23
|
||||
- StorageLive(_3); // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
|
||||
- StorageLive(_4); // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
|
||||
- StorageLive(_5); // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
|
||||
- StorageLive(_6); // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
- _6 = const true; // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
- switchInt(move _6) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
+ StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
+ _2 = const true; // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
+ switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:4:24: 4:28
|
||||
StorageLive(_1); // scope 0 at $DIR/const_goto_storage.rs:+1:9: +1:12
|
||||
- StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
|
||||
- nop; // scope 0 at $DIR/const_goto_storage.rs:+1:21: +1:23
|
||||
- StorageLive(_3); // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
|
||||
- StorageLive(_4); // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
|
||||
- StorageLive(_5); // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
|
||||
- StorageLive(_6); // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
- _6 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
- switchInt(move _6) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
+ StorageLive(_2); // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
+ _2 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
+ switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/const_goto_storage.rs:+2:24: +2:28
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _5 = const true; // scope 0 at $DIR/const_goto_storage.rs:4:31: 4:35
|
||||
- goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
|
||||
- _5 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:31: +2:35
|
||||
- goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
|
||||
- }
|
||||
-
|
||||
- bb2: {
|
||||
- _5 = const false; // scope 0 at $DIR/const_goto_storage.rs:4:45: 4:50
|
||||
- goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
|
||||
- _5 = const false; // scope 0 at $DIR/const_goto_storage.rs:+2:45: +2:50
|
||||
- goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
|
||||
- }
|
||||
-
|
||||
- bb3: {
|
||||
- StorageDead(_6); // scope 0 at $DIR/const_goto_storage.rs:4:51: 4:52
|
||||
- switchInt(move _5) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_storage.rs:4:21: 4:52
|
||||
- StorageDead(_6); // scope 0 at $DIR/const_goto_storage.rs:+2:51: +2:52
|
||||
- switchInt(move _5) -> [false: bb5, otherwise: bb4]; // scope 0 at $DIR/const_goto_storage.rs:+2:21: +2:52
|
||||
- }
|
||||
-
|
||||
- bb4: {
|
||||
- _4 = const true; // scope 0 at $DIR/const_goto_storage.rs:4:55: 4:59
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
|
||||
- _4 = const true; // scope 0 at $DIR/const_goto_storage.rs:+2:55: +2:59
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
|
||||
- }
|
||||
-
|
||||
- bb5: {
|
||||
- _4 = const false; // scope 0 at $DIR/const_goto_storage.rs:4:69: 4:74
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
|
||||
- _4 = const false; // scope 0 at $DIR/const_goto_storage.rs:+2:69: +2:74
|
||||
- goto -> bb6; // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
|
||||
- }
|
||||
-
|
||||
- bb6: {
|
||||
- StorageDead(_5); // scope 0 at $DIR/const_goto_storage.rs:4:75: 4:76
|
||||
- switchInt(move _4) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/const_goto_storage.rs:4:18: 4:76
|
||||
- StorageDead(_5); // scope 0 at $DIR/const_goto_storage.rs:+2:75: +2:76
|
||||
- switchInt(move _4) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/const_goto_storage.rs:+2:18: +2:76
|
||||
- }
|
||||
-
|
||||
- bb7: {
|
||||
- _3 = const true; // scope 0 at $DIR/const_goto_storage.rs:5:13: 5:17
|
||||
- goto -> bb9; // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
|
||||
- _3 = const true; // scope 0 at $DIR/const_goto_storage.rs:+3:13: +3:17
|
||||
- goto -> bb9; // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
|
||||
- }
|
||||
-
|
||||
- bb8: {
|
||||
- _3 = const false; // scope 0 at $DIR/const_goto_storage.rs:7:13: 7:18
|
||||
- goto -> bb9; // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
|
||||
- _3 = const false; // scope 0 at $DIR/const_goto_storage.rs:+5:13: +5:18
|
||||
- goto -> bb9; // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
|
||||
- }
|
||||
-
|
||||
- bb9: {
|
||||
- switchInt(move _3) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/const_goto_storage.rs:4:15: 8:10
|
||||
- switchInt(move _3) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/const_goto_storage.rs:+2:15: +6:10
|
||||
- }
|
||||
-
|
||||
- bb10: {
|
||||
- StorageDead(_4); // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
|
||||
+ StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:4:51: 4:52
|
||||
_1 = const true; // scope 0 at $DIR/const_goto_storage.rs:10:17: 10:21
|
||||
- goto -> bb12; // scope 0 at $DIR/const_goto_storage.rs:10:17: 10:21
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:10:17: 10:21
|
||||
- StorageDead(_4); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
|
||||
+ StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:+2:51: +2:52
|
||||
_1 = const true; // scope 0 at $DIR/const_goto_storage.rs:+8:17: +8:21
|
||||
- goto -> bb12; // scope 0 at $DIR/const_goto_storage.rs:+8:17: +8:21
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+8:17: +8:21
|
||||
}
|
||||
|
||||
- bb11: {
|
||||
- StorageDead(_4); // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/const_goto_storage.rs:8:9: 8:10
|
||||
- StorageDead(_4); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/const_goto_storage.rs:+6:9: +6:10
|
||||
+ bb2: {
|
||||
+ StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:4:51: 4:52
|
||||
_1 = const false; // scope 0 at $DIR/const_goto_storage.rs:12:14: 12:19
|
||||
- goto -> bb12; // scope 0 at $DIR/const_goto_storage.rs:12:14: 12:19
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:12:14: 12:19
|
||||
+ StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:+2:51: +2:52
|
||||
_1 = const false; // scope 0 at $DIR/const_goto_storage.rs:+10:14: +10:19
|
||||
- goto -> bb12; // scope 0 at $DIR/const_goto_storage.rs:+10:14: +10:19
|
||||
+ goto -> bb3; // scope 0 at $DIR/const_goto_storage.rs:+10:14: +10:19
|
||||
}
|
||||
|
||||
- bb12: {
|
||||
- StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:13:6: 13:7
|
||||
- StorageDead(_2); // scope 0 at $DIR/const_goto_storage.rs:+11:6: +11:7
|
||||
+ bb3: {
|
||||
_0 = _1; // scope 1 at $DIR/const_goto_storage.rs:14:5: 14:8
|
||||
StorageDead(_1); // scope 0 at $DIR/const_goto_storage.rs:15:1: 15:2
|
||||
return; // scope 0 at $DIR/const_goto_storage.rs:15:2: 15:2
|
||||
_0 = _1; // scope 1 at $DIR/const_goto_storage.rs:+12:5: +12:8
|
||||
StorageDead(_1); // scope 0 at $DIR/const_goto_storage.rs:+13:1: +13:2
|
||||
return; // scope 0 at $DIR/const_goto_storage.rs:+13:2: +13:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
// MIR for `BAR::promoted[0]` after SimplifyCfg-elaborate-drops
|
||||
|
||||
promoted[0] in BAR: &[&i32; 1] = {
|
||||
let mut _0: &[&i32; 1]; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
let mut _1: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||
let mut _2: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34
|
||||
let mut _3: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
let mut _0: &[&i32; 1]; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
let mut _1: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
|
||||
let mut _2: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
|
||||
let mut _3: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
|
||||
|
||||
bb0: {
|
||||
_3 = const {alloc1: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
_3 = const {alloc1: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
|
||||
// mir::Constant
|
||||
// + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
// + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
|
||||
_2 = &(*_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34
|
||||
_1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||
_0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
_2 = &(*_3); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
|
||||
_1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
|
||||
_0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,49 +2,49 @@
|
||||
+ // MIR for `BAR` after PromoteTemps
|
||||
|
||||
static mut BAR: *const &i32 = {
|
||||
let mut _0: *const &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:9:17: 9:28
|
||||
let mut _1: &[&i32]; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
let mut _2: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
let _3: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||
let mut _4: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34
|
||||
let _5: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
+ let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
let mut _0: *const &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:17: +0:28
|
||||
let mut _1: &[&i32]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
let mut _2: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
let _3: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
|
||||
let mut _4: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
|
||||
let _5: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
|
||||
+ let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||
- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34
|
||||
- StorageLive(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
- _5 = const {alloc1: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
+ _6 = const BAR::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
|
||||
- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
|
||||
- StorageLive(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
|
||||
- _5 = const {alloc1: &i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
|
||||
+ _6 = const BAR::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
// mir::Constant
|
||||
- // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
|
||||
- // + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
|
||||
- _4 = &(*_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:32: 9:34
|
||||
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:35
|
||||
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
- _4 = &(*_5); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
|
||||
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
|
||||
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
+ // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(BAR, [], Some(promoted[0])) }
|
||||
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:9:34: 9:35
|
||||
StorageDead(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:9:34: 9:35
|
||||
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:9:31: 9:44
|
||||
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:34: +0:35
|
||||
StorageDead(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:34: +0:35
|
||||
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
|
||||
// mir::Constant
|
||||
// + span: $DIR/const-promotion-extern-static.rs:9:36: 9:42
|
||||
// + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
|
||||
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
|
||||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:9:43: 9:44
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:28
|
||||
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:43: +0:44
|
||||
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:43: +0:44
|
||||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:43: +0:44
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:28
|
||||
}
|
||||
|
||||
bb2 (cleanup): {
|
||||
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:9:1: 9:28
|
||||
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:28
|
||||
}
|
||||
- }
|
||||
-
|
||||
|
@ -1,17 +1,17 @@
|
||||
// MIR for `BOP` 0 mir_map
|
||||
|
||||
static BOP: &i32 = {
|
||||
let mut _0: &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:16:13: 16:17
|
||||
let _1: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
|
||||
let _2: i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:16:21: 16:23
|
||||
let mut _0: &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:13: +0:17
|
||||
let _1: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
|
||||
let _2: i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:21: +0:23
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
|
||||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:16:21: 16:23
|
||||
_2 = const 13_i32; // scope 0 at $DIR/const-promotion-extern-static.rs:16:21: 16:23
|
||||
_1 = &_2; // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
|
||||
_0 = &(*_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:20: 16:23
|
||||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:16:22: 16:23
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:16:1: 16:17
|
||||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
|
||||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:21: +0:23
|
||||
_2 = const 13_i32; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:21: +0:23
|
||||
_1 = &_2; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
|
||||
_0 = &(*_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
|
||||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:22: +0:23
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:17
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +1,20 @@
|
||||
// MIR for `FOO::promoted[0]` after SimplifyCfg-elaborate-drops
|
||||
|
||||
promoted[0] in FOO: &[&i32; 1] = {
|
||||
let mut _0: &[&i32; 1]; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
let mut _1: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||
let mut _2: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45
|
||||
let mut _3: *const i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
let mut _0: &[&i32; 1]; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
let mut _1: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
|
||||
let mut _2: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:45
|
||||
let mut _3: *const i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
|
||||
|
||||
bb0: {
|
||||
_3 = const {alloc3: *const i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
_3 = const {alloc3: *const i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
|
||||
// mir::Constant
|
||||
// + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
// + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
|
||||
_2 = &(*_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:41: 13:43
|
||||
_1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||
_0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
_2 = &(*_3); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:41: +0:43
|
||||
_1 = [move _2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
|
||||
_0 = &_1; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,51 +2,51 @@
|
||||
+ // MIR for `FOO` after PromoteTemps
|
||||
|
||||
static mut FOO: *const &i32 = {
|
||||
let mut _0: *const &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:13:17: 13:28
|
||||
let mut _1: &[&i32]; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
let mut _2: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
let _3: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||
let mut _4: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45
|
||||
let _5: *const i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
+ let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
let mut _0: *const &i32; // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:17: +0:28
|
||||
let mut _1: &[&i32]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
let mut _2: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
let _3: [&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
|
||||
let mut _4: &i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:45
|
||||
let _5: *const i32; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
|
||||
+ let mut _6: &[&i32; 1]; // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
scope 1 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||
- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:32: 13:45
|
||||
- StorageLive(_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
- _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
+ _6 = const FOO::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
StorageLive(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
StorageLive(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
- StorageLive(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
|
||||
- StorageLive(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:45
|
||||
- StorageLive(_5); // scope 1 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
|
||||
- _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
|
||||
+ _6 = const FOO::promoted[0]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
// mir::Constant
|
||||
- // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
|
||||
- // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
|
||||
- _4 = &(*_5); // scope 1 at $DIR/const-promotion-extern-static.rs:13:41: 13:43
|
||||
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:46
|
||||
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
- _4 = &(*_5); // scope 1 at $DIR/const-promotion-extern-static.rs:+0:41: +0:43
|
||||
- _3 = [move _4]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
|
||||
- _2 = &_3; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
+ // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
+ // + literal: Const { ty: &[&i32; 1], val: Unevaluated(FOO, [], Some(promoted[0])) }
|
||||
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:13:45: 13:46
|
||||
StorageDead(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:13:45: 13:46
|
||||
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:13:31: 13:55
|
||||
+ _2 = &(*_6); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
_1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
- StorageDead(_4); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:45: +0:46
|
||||
StorageDead(_2); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:45: +0:46
|
||||
_0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
|
||||
// mir::Constant
|
||||
// + span: $DIR/const-promotion-extern-static.rs:13:47: 13:53
|
||||
// + literal: Const { ty: for<'r> fn(&'r [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
|
||||
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
|
||||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:13:54: 13:55
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:28
|
||||
- StorageDead(_5); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:54: +0:55
|
||||
- StorageDead(_3); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:54: +0:55
|
||||
StorageDead(_1); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:54: +0:55
|
||||
return; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:28
|
||||
}
|
||||
|
||||
bb2 (cleanup): {
|
||||
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:13:1: 13:28
|
||||
resume; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:28
|
||||
}
|
||||
}
|
||||
-
|
||||
|
@ -2,31 +2,31 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/aggregate.rs:4:11: 4:11
|
||||
let _1: i32; // in scope 0 at $DIR/aggregate.rs:5:9: 5:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/aggregate.rs:5:13: 5:24
|
||||
let mut _3: (i32, i32, i32); // in scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
let mut _0: (); // return place in scope 0 at $DIR/aggregate.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/aggregate.rs:+1:9: +1:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/aggregate.rs:+1:13: +1:24
|
||||
let mut _3: (i32, i32, i32); // in scope 0 at $DIR/aggregate.rs:+1:13: +1:22
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/aggregate.rs:5:9: 5:10
|
||||
debug x => _1; // in scope 1 at $DIR/aggregate.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/aggregate.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
|
||||
StorageLive(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
Deinit(_3); // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
(_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
(_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
(_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:22
|
||||
- _2 = (_3.1: i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:24
|
||||
- _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/aggregate.rs:5:13: 5:28
|
||||
+ _2 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:24
|
||||
+ _1 = const 1_i32; // scope 0 at $DIR/aggregate.rs:5:13: 5:28
|
||||
StorageDead(_2); // scope 0 at $DIR/aggregate.rs:5:27: 5:28
|
||||
StorageDead(_3); // scope 0 at $DIR/aggregate.rs:5:28: 5:29
|
||||
nop; // scope 0 at $DIR/aggregate.rs:4:11: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/aggregate.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/aggregate.rs:6:2: 6:2
|
||||
StorageLive(_1); // scope 0 at $DIR/aggregate.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/aggregate.rs:+1:13: +1:24
|
||||
StorageLive(_3); // scope 0 at $DIR/aggregate.rs:+1:13: +1:22
|
||||
Deinit(_3); // scope 0 at $DIR/aggregate.rs:+1:13: +1:22
|
||||
(_3.0: i32) = const 0_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:22
|
||||
(_3.1: i32) = const 1_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:22
|
||||
(_3.2: i32) = const 2_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:22
|
||||
- _2 = (_3.1: i32); // scope 0 at $DIR/aggregate.rs:+1:13: +1:24
|
||||
- _1 = Add(move _2, const 0_i32); // scope 0 at $DIR/aggregate.rs:+1:13: +1:28
|
||||
+ _2 = const 1_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:24
|
||||
+ _1 = const 1_i32; // scope 0 at $DIR/aggregate.rs:+1:13: +1:28
|
||||
StorageDead(_2); // scope 0 at $DIR/aggregate.rs:+1:27: +1:28
|
||||
StorageDead(_3); // scope 0 at $DIR/aggregate.rs:+1:28: +1:29
|
||||
nop; // scope 0 at $DIR/aggregate.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/aggregate.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/aggregate.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,37 +2,37 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array_index.rs:4:11: 4:11
|
||||
let _1: u32; // in scope 0 at $DIR/array_index.rs:5:9: 5:10
|
||||
let mut _2: [u32; 4]; // in scope 0 at $DIR/array_index.rs:5:18: 5:30
|
||||
let _3: usize; // in scope 0 at $DIR/array_index.rs:5:31: 5:32
|
||||
let mut _4: usize; // in scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
let mut _5: bool; // in scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array_index.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/array_index.rs:+1:9: +1:10
|
||||
let mut _2: [u32; 4]; // in scope 0 at $DIR/array_index.rs:+1:18: +1:30
|
||||
let _3: usize; // in scope 0 at $DIR/array_index.rs:+1:31: +1:32
|
||||
let mut _4: usize; // in scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
let mut _5: bool; // in scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/array_index.rs:5:9: 5:10
|
||||
debug x => _1; // in scope 1 at $DIR/array_index.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/array_index.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/array_index.rs:5:18: 5:30
|
||||
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30
|
||||
StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32
|
||||
_3 = const 2_usize; // scope 0 at $DIR/array_index.rs:5:31: 5:32
|
||||
_4 = const 4_usize; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
+ _5 = const true; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 4_usize, const 2_usize) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
StorageLive(_1); // scope 0 at $DIR/array_index.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/array_index.rs:+1:18: +1:30
|
||||
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:+1:18: +1:30
|
||||
StorageLive(_3); // scope 0 at $DIR/array_index.rs:+1:31: +1:32
|
||||
_3 = const 2_usize; // scope 0 at $DIR/array_index.rs:+1:31: +1:32
|
||||
_4 = const 4_usize; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
+ _5 = const true; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 4_usize, const 2_usize) -> bb1; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34
|
||||
StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34
|
||||
nop; // scope 0 at $DIR/array_index.rs:4:11: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array_index.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/array_index.rs:6:2: 6:2
|
||||
- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
StorageDead(_3); // scope 0 at $DIR/array_index.rs:+1:33: +1:34
|
||||
StorageDead(_2); // scope 0 at $DIR/array_index.rs:+1:33: +1:34
|
||||
nop; // scope 0 at $DIR/array_index.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array_index.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/array_index.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,37 +2,37 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array_index.rs:4:11: 4:11
|
||||
let _1: u32; // in scope 0 at $DIR/array_index.rs:5:9: 5:10
|
||||
let mut _2: [u32; 4]; // in scope 0 at $DIR/array_index.rs:5:18: 5:30
|
||||
let _3: usize; // in scope 0 at $DIR/array_index.rs:5:31: 5:32
|
||||
let mut _4: usize; // in scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
let mut _5: bool; // in scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
let mut _0: (); // return place in scope 0 at $DIR/array_index.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/array_index.rs:+1:9: +1:10
|
||||
let mut _2: [u32; 4]; // in scope 0 at $DIR/array_index.rs:+1:18: +1:30
|
||||
let _3: usize; // in scope 0 at $DIR/array_index.rs:+1:31: +1:32
|
||||
let mut _4: usize; // in scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
let mut _5: bool; // in scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/array_index.rs:5:9: 5:10
|
||||
debug x => _1; // in scope 1 at $DIR/array_index.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/array_index.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/array_index.rs:5:18: 5:30
|
||||
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:5:18: 5:30
|
||||
StorageLive(_3); // scope 0 at $DIR/array_index.rs:5:31: 5:32
|
||||
_3 = const 2_usize; // scope 0 at $DIR/array_index.rs:5:31: 5:32
|
||||
_4 = const 4_usize; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
+ _5 = const true; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 4_usize, const 2_usize) -> bb1; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
StorageLive(_1); // scope 0 at $DIR/array_index.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/array_index.rs:+1:18: +1:30
|
||||
_2 = [const 0_u32, const 1_u32, const 2_u32, const 3_u32]; // scope 0 at $DIR/array_index.rs:+1:18: +1:30
|
||||
StorageLive(_3); // scope 0 at $DIR/array_index.rs:+1:31: +1:32
|
||||
_3 = const 2_usize; // scope 0 at $DIR/array_index.rs:+1:31: +1:32
|
||||
_4 = const 4_usize; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
+ _5 = const true; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 4_usize, const 2_usize) -> bb1; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:5:18: 5:33
|
||||
StorageDead(_3); // scope 0 at $DIR/array_index.rs:5:33: 5:34
|
||||
StorageDead(_2); // scope 0 at $DIR/array_index.rs:5:33: 5:34
|
||||
nop; // scope 0 at $DIR/array_index.rs:4:11: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array_index.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/array_index.rs:6:2: 6:2
|
||||
- _1 = _2[_3]; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/array_index.rs:+1:18: +1:33
|
||||
StorageDead(_3); // scope 0 at $DIR/array_index.rs:+1:33: +1:34
|
||||
StorageDead(_2); // scope 0 at $DIR/array_index.rs:+1:33: +1:34
|
||||
nop; // scope 0 at $DIR/array_index.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/array_index.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/array_index.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,53 +2,53 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_div_by_zero.rs:3:11: 3:11
|
||||
let _1: i32; // in scope 0 at $DIR/bad_op_div_by_zero.rs:4:9: 4:10
|
||||
let mut _3: i32; // in scope 0 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
|
||||
let mut _4: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
let mut _5: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
let mut _6: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
let mut _7: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_div_by_zero.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/bad_op_div_by_zero.rs:+1:9: +1:10
|
||||
let mut _3: i32; // in scope 0 at $DIR/bad_op_div_by_zero.rs:+2:18: +2:19
|
||||
let mut _4: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
let mut _5: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
let mut _6: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
let mut _7: bool; // in scope 0 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
scope 1 {
|
||||
debug y => _1; // in scope 1 at $DIR/bad_op_div_by_zero.rs:4:9: 4:10
|
||||
let _2: i32; // in scope 1 at $DIR/bad_op_div_by_zero.rs:5:9: 5:11
|
||||
debug y => _1; // in scope 1 at $DIR/bad_op_div_by_zero.rs:+1:9: +1:10
|
||||
let _2: i32; // in scope 1 at $DIR/bad_op_div_by_zero.rs:+2:9: +2:11
|
||||
scope 2 {
|
||||
debug _z => _2; // in scope 2 at $DIR/bad_op_div_by_zero.rs:5:9: 5:11
|
||||
debug _z => _2; // in scope 2 at $DIR/bad_op_div_by_zero.rs:+2:9: +2:11
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:4:9: 4:10
|
||||
_1 = const 0_i32; // scope 0 at $DIR/bad_op_div_by_zero.rs:4:13: 4:14
|
||||
StorageLive(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:9: 5:11
|
||||
StorageLive(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
|
||||
- _3 = _1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
|
||||
- _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
- assert(!move _4, "attempt to divide `{}` by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
|
||||
+ _4 = const true; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ assert(!const true, "attempt to divide `{}` by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:+1:9: +1:10
|
||||
_1 = const 0_i32; // scope 0 at $DIR/bad_op_div_by_zero.rs:+1:13: +1:14
|
||||
StorageLive(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:9: +2:11
|
||||
StorageLive(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:18: +2:19
|
||||
- _3 = _1; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:18: +2:19
|
||||
- _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
- assert(!move _4, "attempt to divide `{}` by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:18: +2:19
|
||||
+ _4 = const true; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ assert(!const true, "attempt to divide `{}` by zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
- _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
- _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
- assert(!move _7, "attempt to compute `{} / {}`, which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ _5 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ _6 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ _7 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ assert(!const false, "attempt to compute `{} / {}`, which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
- _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
- _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
- _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
- assert(!move _7, "attempt to compute `{} / {}`, which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ _5 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ _6 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ _7 = const false; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ assert(!const false, "attempt to compute `{} / {}`, which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- _2 = Div(const 1_i32, move _3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
+ _2 = Div(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:14: 5:19
|
||||
StorageDead(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:5:18: 5:19
|
||||
nop; // scope 0 at $DIR/bad_op_div_by_zero.rs:3:11: 6:2
|
||||
StorageDead(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:6:1: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/bad_op_div_by_zero.rs:6:2: 6:2
|
||||
- _2 = Div(const 1_i32, move _3); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
+ _2 = Div(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:14: +2:19
|
||||
StorageDead(_3); // scope 1 at $DIR/bad_op_div_by_zero.rs:+2:18: +2:19
|
||||
nop; // scope 0 at $DIR/bad_op_div_by_zero.rs:+0:11: +3:2
|
||||
StorageDead(_2); // scope 1 at $DIR/bad_op_div_by_zero.rs:+3:1: +3:2
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_div_by_zero.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/bad_op_div_by_zero.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,53 +2,53 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_mod_by_zero.rs:3:11: 3:11
|
||||
let _1: i32; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:4:9: 4:10
|
||||
let mut _3: i32; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
|
||||
let mut _4: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
let mut _5: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
let mut _6: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
let mut _7: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_mod_by_zero.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:+1:9: +1:10
|
||||
let mut _3: i32; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
|
||||
let mut _4: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
let mut _5: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
let mut _6: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
let mut _7: bool; // in scope 0 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
scope 1 {
|
||||
debug y => _1; // in scope 1 at $DIR/bad_op_mod_by_zero.rs:4:9: 4:10
|
||||
let _2: i32; // in scope 1 at $DIR/bad_op_mod_by_zero.rs:5:9: 5:11
|
||||
debug y => _1; // in scope 1 at $DIR/bad_op_mod_by_zero.rs:+1:9: +1:10
|
||||
let _2: i32; // in scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:9: +2:11
|
||||
scope 2 {
|
||||
debug _z => _2; // in scope 2 at $DIR/bad_op_mod_by_zero.rs:5:9: 5:11
|
||||
debug _z => _2; // in scope 2 at $DIR/bad_op_mod_by_zero.rs:+2:9: +2:11
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:4:9: 4:10
|
||||
_1 = const 0_i32; // scope 0 at $DIR/bad_op_mod_by_zero.rs:4:13: 4:14
|
||||
StorageLive(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:9: 5:11
|
||||
StorageLive(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
|
||||
- _3 = _1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
|
||||
- _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
- assert(!move _4, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
|
||||
+ _4 = const true; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:+1:9: +1:10
|
||||
_1 = const 0_i32; // scope 0 at $DIR/bad_op_mod_by_zero.rs:+1:13: +1:14
|
||||
StorageLive(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:9: +2:11
|
||||
StorageLive(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
|
||||
- _3 = _1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
|
||||
- _4 = Eq(_3, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
- assert(!move _4, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ _3 = const 0_i32; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
|
||||
+ _4 = const true; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
- _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
- _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
- assert(!move _7, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ _5 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ _6 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ _7 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
- _5 = Eq(_3, const -1_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
- _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
- _7 = BitAnd(move _5, move _6); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
- assert(!move _7, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ _5 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ _6 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ _7 = const false; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- _2 = Rem(const 1_i32, move _3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
+ _2 = Rem(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:14: 5:19
|
||||
StorageDead(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:5:18: 5:19
|
||||
nop; // scope 0 at $DIR/bad_op_mod_by_zero.rs:3:11: 6:2
|
||||
StorageDead(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:6:1: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/bad_op_mod_by_zero.rs:6:2: 6:2
|
||||
- _2 = Rem(const 1_i32, move _3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
+ _2 = Rem(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
|
||||
StorageDead(_3); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
|
||||
nop; // scope 0 at $DIR/bad_op_mod_by_zero.rs:+0:11: +3:2
|
||||
StorageDead(_2); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+3:1: +3:2
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_mod_by_zero.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/bad_op_mod_by_zero.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,55 +2,55 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:4:11: 4:11
|
||||
let _1: *const [i32]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:9: 5:10
|
||||
let mut _2: *const [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
let _3: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
let _4: [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:26: 5:35
|
||||
let _6: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
|
||||
let mut _7: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
let mut _8: bool; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
let mut _9: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+0:11: +0:11
|
||||
let _1: *const [i32]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
|
||||
let mut _2: *const [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
let _3: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
let _4: [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:26: +1:35
|
||||
let _6: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
|
||||
let mut _7: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
let mut _8: bool; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
let mut _9: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
scope 1 {
|
||||
debug a => _1; // in scope 1 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:9: 5:10
|
||||
debug a => _1; // in scope 1 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
|
||||
scope 2 {
|
||||
let _5: i32; // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
|
||||
let _5: i32; // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
|
||||
scope 3 {
|
||||
debug _b => _5; // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
|
||||
debug _b => _5; // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
StorageLive(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
StorageLive(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
// mir::Constant
|
||||
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
// + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
StorageDead(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:34: 5:35
|
||||
StorageDead(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:35: 5:36
|
||||
StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
|
||||
StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
|
||||
_6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
|
||||
_7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
- _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
+ _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
+ assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
StorageDead(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:34: +1:35
|
||||
StorageDead(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:35: +1:36
|
||||
StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
|
||||
StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
|
||||
_6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
|
||||
_7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
- _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
+ _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
+ assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_5 = (*_1)[_6]; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
StorageDead(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:25: 7:26
|
||||
nop; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:6:5: 8:6
|
||||
StorageDead(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:8:5: 8:6
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:2: 9:2
|
||||
_5 = (*_1)[_6]; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
StorageDead(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:25: +3:26
|
||||
nop; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+2:5: +4:6
|
||||
StorageDead(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+4:5: +4:6
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,55 +2,55 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:4:11: 4:11
|
||||
let _1: *const [i32]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:9: 5:10
|
||||
let mut _2: *const [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
let _3: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
let _4: [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:26: 5:35
|
||||
let _6: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
|
||||
let mut _7: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
let mut _8: bool; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
let mut _9: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
let mut _0: (); // return place in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+0:11: +0:11
|
||||
let _1: *const [i32]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
|
||||
let mut _2: *const [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
let _3: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
let _4: [i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:26: +1:35
|
||||
let _6: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
|
||||
let mut _7: usize; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
let mut _8: bool; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
let mut _9: &[i32; 3]; // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
scope 1 {
|
||||
debug a => _1; // in scope 1 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:9: 5:10
|
||||
debug a => _1; // in scope 1 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
|
||||
scope 2 {
|
||||
let _5: i32; // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
|
||||
let _5: i32; // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
|
||||
scope 3 {
|
||||
debug _b => _5; // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
|
||||
debug _b => _5; // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
StorageLive(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
StorageLive(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
StorageLive(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
// mir::Constant
|
||||
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
// + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:25: 5:35
|
||||
StorageDead(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:34: 5:35
|
||||
StorageDead(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:5:35: 5:36
|
||||
StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:13: 7:15
|
||||
StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
|
||||
_6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:23: 7:24
|
||||
_7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
- _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
+ _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
+ assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
_3 = _9; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
StorageDead(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:34: +1:35
|
||||
StorageDead(_3); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:35: +1:36
|
||||
StorageLive(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
|
||||
StorageLive(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
|
||||
_6 = const 3_usize; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
|
||||
_7 = Len((*_1)); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
- _8 = Lt(_6, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
+ _8 = Lt(const 3_usize, _7); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
+ assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_5 = (*_1)[_6]; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:18: 7:25
|
||||
StorageDead(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:7:25: 7:26
|
||||
nop; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:6:5: 8:6
|
||||
StorageDead(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:8:5: 8:6
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:9:2: 9:2
|
||||
_5 = (*_1)[_6]; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
|
||||
StorageDead(_6); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:25: +3:26
|
||||
nop; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+2:5: +4:6
|
||||
StorageDead(_5); // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+4:5: +4:6
|
||||
StorageDead(_1); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,32 +2,32 @@
|
||||
+ // MIR for `test` after ConstProp
|
||||
|
||||
fn test(_1: bool, _2: bool) -> bool {
|
||||
debug x => _1; // in scope 0 at $DIR/boolean_identities.rs:4:13: 4:14
|
||||
debug y => _2; // in scope 0 at $DIR/boolean_identities.rs:4:22: 4:23
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/boolean_identities.rs:4:34: 4:38
|
||||
let mut _3: bool; // in scope 0 at $DIR/boolean_identities.rs:5:5: 5:15
|
||||
let mut _4: bool; // in scope 0 at $DIR/boolean_identities.rs:5:6: 5:7
|
||||
let mut _5: bool; // in scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
|
||||
let mut _6: bool; // in scope 0 at $DIR/boolean_identities.rs:5:19: 5:20
|
||||
debug x => _1; // in scope 0 at $DIR/boolean_identities.rs:+0:13: +0:14
|
||||
debug y => _2; // in scope 0 at $DIR/boolean_identities.rs:+0:22: +0:23
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/boolean_identities.rs:+0:34: +0:38
|
||||
let mut _3: bool; // in scope 0 at $DIR/boolean_identities.rs:+1:5: +1:15
|
||||
let mut _4: bool; // in scope 0 at $DIR/boolean_identities.rs:+1:6: +1:7
|
||||
let mut _5: bool; // in scope 0 at $DIR/boolean_identities.rs:+1:18: +1:29
|
||||
let mut _6: bool; // in scope 0 at $DIR/boolean_identities.rs:+1:19: +1:20
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15
|
||||
StorageLive(_4); // scope 0 at $DIR/boolean_identities.rs:5:6: 5:7
|
||||
_4 = _2; // scope 0 at $DIR/boolean_identities.rs:5:6: 5:7
|
||||
- _3 = BitOr(move _4, const true); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15
|
||||
+ _3 = const true; // scope 0 at $DIR/boolean_identities.rs:5:5: 5:15
|
||||
StorageDead(_4); // scope 0 at $DIR/boolean_identities.rs:5:14: 5:15
|
||||
StorageLive(_5); // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
|
||||
StorageLive(_6); // scope 0 at $DIR/boolean_identities.rs:5:19: 5:20
|
||||
_6 = _1; // scope 0 at $DIR/boolean_identities.rs:5:19: 5:20
|
||||
- _5 = BitAnd(move _6, const false); // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
|
||||
+ _5 = const false; // scope 0 at $DIR/boolean_identities.rs:5:18: 5:29
|
||||
StorageDead(_6); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29
|
||||
- _0 = BitAnd(move _3, move _5); // scope 0 at $DIR/boolean_identities.rs:5:5: 5:29
|
||||
+ _0 = const false; // scope 0 at $DIR/boolean_identities.rs:5:5: 5:29
|
||||
StorageDead(_5); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29
|
||||
StorageDead(_3); // scope 0 at $DIR/boolean_identities.rs:5:28: 5:29
|
||||
return; // scope 0 at $DIR/boolean_identities.rs:6:2: 6:2
|
||||
StorageLive(_3); // scope 0 at $DIR/boolean_identities.rs:+1:5: +1:15
|
||||
StorageLive(_4); // scope 0 at $DIR/boolean_identities.rs:+1:6: +1:7
|
||||
_4 = _2; // scope 0 at $DIR/boolean_identities.rs:+1:6: +1:7
|
||||
- _3 = BitOr(move _4, const true); // scope 0 at $DIR/boolean_identities.rs:+1:5: +1:15
|
||||
+ _3 = const true; // scope 0 at $DIR/boolean_identities.rs:+1:5: +1:15
|
||||
StorageDead(_4); // scope 0 at $DIR/boolean_identities.rs:+1:14: +1:15
|
||||
StorageLive(_5); // scope 0 at $DIR/boolean_identities.rs:+1:18: +1:29
|
||||
StorageLive(_6); // scope 0 at $DIR/boolean_identities.rs:+1:19: +1:20
|
||||
_6 = _1; // scope 0 at $DIR/boolean_identities.rs:+1:19: +1:20
|
||||
- _5 = BitAnd(move _6, const false); // scope 0 at $DIR/boolean_identities.rs:+1:18: +1:29
|
||||
+ _5 = const false; // scope 0 at $DIR/boolean_identities.rs:+1:18: +1:29
|
||||
StorageDead(_6); // scope 0 at $DIR/boolean_identities.rs:+1:28: +1:29
|
||||
- _0 = BitAnd(move _3, move _5); // scope 0 at $DIR/boolean_identities.rs:+1:5: +1:29
|
||||
+ _0 = const false; // scope 0 at $DIR/boolean_identities.rs:+1:5: +1:29
|
||||
StorageDead(_5); // scope 0 at $DIR/boolean_identities.rs:+1:28: +1:29
|
||||
StorageDead(_3); // scope 0 at $DIR/boolean_identities.rs:+1:28: +1:29
|
||||
return; // scope 0 at $DIR/boolean_identities.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,66 +2,66 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/boxes.rs:11:11: 11:11
|
||||
let _1: i32; // in scope 0 at $DIR/boxes.rs:12:9: 12:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/boxes.rs:12:13: 12:22
|
||||
let mut _3: std::boxed::Box<i32>; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _4: usize; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _5: usize; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _6: *mut u8; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _7: std::boxed::Box<i32>; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _8: *const i32; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _9: *const i32; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _10: *const i32; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _11: *const i32; // in scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
let mut _0: (); // return place in scope 0 at $DIR/boxes.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/boxes.rs:+1:9: +1:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/boxes.rs:+1:13: +1:22
|
||||
let mut _3: std::boxed::Box<i32>; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _4: usize; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _5: usize; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _6: *mut u8; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _7: std::boxed::Box<i32>; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _8: *const i32; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _9: *const i32; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _10: *const i32; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
let mut _11: *const i32; // in scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/boxes.rs:12:9: 12:10
|
||||
debug x => _1; // in scope 1 at $DIR/boxes.rs:+1:9: +1:10
|
||||
}
|
||||
scope 2 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/boxes.rs:12:9: 12:10
|
||||
StorageLive(_2); // scope 0 at $DIR/boxes.rs:12:13: 12:22
|
||||
StorageLive(_3); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
- _4 = SizeOf(i32); // scope 2 at $DIR/boxes.rs:12:14: 12:22
|
||||
- _5 = AlignOf(i32); // scope 2 at $DIR/boxes.rs:12:14: 12:22
|
||||
- _6 = alloc::alloc::exchange_malloc(move _4, move _5) -> bb1; // scope 2 at $DIR/boxes.rs:12:14: 12:22
|
||||
+ _4 = const 4_usize; // scope 2 at $DIR/boxes.rs:12:14: 12:22
|
||||
+ _5 = const 4_usize; // scope 2 at $DIR/boxes.rs:12:14: 12:22
|
||||
+ _6 = alloc::alloc::exchange_malloc(const 4_usize, const 4_usize) -> bb1; // scope 2 at $DIR/boxes.rs:12:14: 12:22
|
||||
StorageLive(_1); // scope 0 at $DIR/boxes.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/boxes.rs:+1:13: +1:22
|
||||
StorageLive(_3); // scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
- _4 = SizeOf(i32); // scope 2 at $DIR/boxes.rs:+1:14: +1:22
|
||||
- _5 = AlignOf(i32); // scope 2 at $DIR/boxes.rs:+1:14: +1:22
|
||||
- _6 = alloc::alloc::exchange_malloc(move _4, move _5) -> bb1; // scope 2 at $DIR/boxes.rs:+1:14: +1:22
|
||||
+ _4 = const 4_usize; // scope 2 at $DIR/boxes.rs:+1:14: +1:22
|
||||
+ _5 = const 4_usize; // scope 2 at $DIR/boxes.rs:+1:14: +1:22
|
||||
+ _6 = alloc::alloc::exchange_malloc(const 4_usize, const 4_usize) -> bb1; // scope 2 at $DIR/boxes.rs:+1:14: +1:22
|
||||
// mir::Constant
|
||||
// + span: $DIR/boxes.rs:12:14: 12:22
|
||||
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_7); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
_7 = ShallowInitBox(move _6, i32); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
StorageLive(_8); // scope 0 at $DIR/boxes.rs:12:19: 12:21
|
||||
_8 = (((_7.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>).0: *const i32); // scope 0 at $DIR/boxes.rs:12:19: 12:21
|
||||
(*_8) = const 42_i32; // scope 0 at $DIR/boxes.rs:12:19: 12:21
|
||||
StorageDead(_8); // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
_3 = move _7; // scope 0 at $DIR/boxes.rs:12:14: 12:22
|
||||
StorageDead(_7); // scope 0 at $DIR/boxes.rs:12:21: 12:22
|
||||
StorageLive(_9); // scope 0 at $DIR/boxes.rs:12:13: 12:22
|
||||
_9 = (((_3.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>).0: *const i32); // scope 0 at $DIR/boxes.rs:12:13: 12:22
|
||||
_2 = (*_9); // scope 0 at $DIR/boxes.rs:12:13: 12:22
|
||||
StorageDead(_9); // scope 0 at $DIR/boxes.rs:12:13: 12:26
|
||||
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/boxes.rs:12:13: 12:26
|
||||
StorageDead(_2); // scope 0 at $DIR/boxes.rs:12:25: 12:26
|
||||
drop(_3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/boxes.rs:12:26: 12:27
|
||||
StorageLive(_7); // scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
_7 = ShallowInitBox(move _6, i32); // scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
StorageLive(_8); // scope 0 at $DIR/boxes.rs:+1:19: +1:21
|
||||
_8 = (((_7.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>).0: *const i32); // scope 0 at $DIR/boxes.rs:+1:19: +1:21
|
||||
(*_8) = const 42_i32; // scope 0 at $DIR/boxes.rs:+1:19: +1:21
|
||||
StorageDead(_8); // scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
_3 = move _7; // scope 0 at $DIR/boxes.rs:+1:14: +1:22
|
||||
StorageDead(_7); // scope 0 at $DIR/boxes.rs:+1:21: +1:22
|
||||
StorageLive(_9); // scope 0 at $DIR/boxes.rs:+1:13: +1:22
|
||||
_9 = (((_3.0: std::ptr::Unique<i32>).0: std::ptr::NonNull<i32>).0: *const i32); // scope 0 at $DIR/boxes.rs:+1:13: +1:22
|
||||
_2 = (*_9); // scope 0 at $DIR/boxes.rs:+1:13: +1:22
|
||||
StorageDead(_9); // scope 0 at $DIR/boxes.rs:+1:13: +1:26
|
||||
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/boxes.rs:+1:13: +1:26
|
||||
StorageDead(_2); // scope 0 at $DIR/boxes.rs:+1:25: +1:26
|
||||
drop(_3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/boxes.rs:+1:26: +1:27
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageDead(_3); // scope 0 at $DIR/boxes.rs:12:26: 12:27
|
||||
nop; // scope 0 at $DIR/boxes.rs:11:11: 13:2
|
||||
StorageDead(_1); // scope 0 at $DIR/boxes.rs:13:1: 13:2
|
||||
return; // scope 0 at $DIR/boxes.rs:13:2: 13:2
|
||||
StorageDead(_3); // scope 0 at $DIR/boxes.rs:+1:26: +1:27
|
||||
nop; // scope 0 at $DIR/boxes.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/boxes.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/boxes.rs:+2:2: +2:2
|
||||
}
|
||||
|
||||
bb3 (cleanup): {
|
||||
resume; // scope 0 at $DIR/boxes.rs:11:1: 13:2
|
||||
resume; // scope 0 at $DIR/boxes.rs:+0:1: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,27 +2,27 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/cast.rs:3:11: 3:11
|
||||
let _1: u32; // in scope 0 at $DIR/cast.rs:4:9: 4:10
|
||||
let mut _0: (); // return place in scope 0 at $DIR/cast.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/cast.rs:+1:9: +1:10
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/cast.rs:4:9: 4:10
|
||||
let _2: u8; // in scope 1 at $DIR/cast.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/cast.rs:+1:9: +1:10
|
||||
let _2: u8; // in scope 1 at $DIR/cast.rs:+3:9: +3:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/cast.rs:6:9: 6:10
|
||||
debug y => _2; // in scope 2 at $DIR/cast.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/cast.rs:4:9: 4:10
|
||||
- _1 = const 42_u8 as u32 (Misc); // scope 0 at $DIR/cast.rs:4:13: 4:24
|
||||
+ _1 = const 42_u32; // scope 0 at $DIR/cast.rs:4:13: 4:24
|
||||
StorageLive(_2); // scope 1 at $DIR/cast.rs:6:9: 6:10
|
||||
- _2 = const 42_u32 as u8 (Misc); // scope 1 at $DIR/cast.rs:6:13: 6:24
|
||||
+ _2 = const 42_u8; // scope 1 at $DIR/cast.rs:6:13: 6:24
|
||||
nop; // scope 0 at $DIR/cast.rs:3:11: 7:2
|
||||
StorageDead(_2); // scope 1 at $DIR/cast.rs:7:1: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/cast.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/cast.rs:7:2: 7:2
|
||||
StorageLive(_1); // scope 0 at $DIR/cast.rs:+1:9: +1:10
|
||||
- _1 = const 42_u8 as u32 (Misc); // scope 0 at $DIR/cast.rs:+1:13: +1:24
|
||||
+ _1 = const 42_u32; // scope 0 at $DIR/cast.rs:+1:13: +1:24
|
||||
StorageLive(_2); // scope 1 at $DIR/cast.rs:+3:9: +3:10
|
||||
- _2 = const 42_u32 as u8 (Misc); // scope 1 at $DIR/cast.rs:+3:13: +3:24
|
||||
+ _2 = const 42_u8; // scope 1 at $DIR/cast.rs:+3:13: +3:24
|
||||
nop; // scope 0 at $DIR/cast.rs:+0:11: +4:2
|
||||
StorageDead(_2); // scope 1 at $DIR/cast.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/cast.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/cast.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,27 +2,27 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/checked_add.rs:4:11: 4:11
|
||||
let _1: u32; // in scope 0 at $DIR/checked_add.rs:5:9: 5:10
|
||||
let mut _2: (u32, bool); // in scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
let mut _0: (); // return place in scope 0 at $DIR/checked_add.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/checked_add.rs:+1:9: +1:10
|
||||
let mut _2: (u32, bool); // in scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/checked_add.rs:5:9: 5:10
|
||||
debug x => _1; // in scope 1 at $DIR/checked_add.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/checked_add.rs:5:9: 5:10
|
||||
- _2 = CheckedAdd(const 1_u32, const 1_u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
+ _2 = const (2_u32, false); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
StorageLive(_1); // scope 0 at $DIR/checked_add.rs:+1:9: +1:10
|
||||
- _2 = CheckedAdd(const 1_u32, const 1_u32); // scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
+ _2 = const (2_u32, false); // scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_u32, const 1_u32) -> bb1; // scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = move (_2.0: u32); // scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/checked_add.rs:5:18: 5:23
|
||||
nop; // scope 0 at $DIR/checked_add.rs:4:11: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/checked_add.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/checked_add.rs:6:2: 6:2
|
||||
- _1 = move (_2.0: u32); // scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/checked_add.rs:+1:18: +1:23
|
||||
nop; // scope 0 at $DIR/checked_add.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/checked_add.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/checked_add.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,43 +2,43 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 5:11
|
||||
let _1: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
|
||||
let mut _2: *const i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30
|
||||
let _3: &i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||
let _4: (); // in scope 0 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
|
||||
let mut _5: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_prop_fails_gracefully.rs:+0:11: +0:11
|
||||
let _1: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:9: +2:10
|
||||
let mut _2: *const i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:30
|
||||
let _3: &i32; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:16
|
||||
let _4: (); // in scope 0 at $DIR/const_prop_fails_gracefully.rs:+3:5: +3:12
|
||||
let mut _5: usize; // in scope 0 at $DIR/const_prop_fails_gracefully.rs:+3:10: +3:11
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
|
||||
debug x => _1; // in scope 1 at $DIR/const_prop_fails_gracefully.rs:+2:9: +2:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:9: 7:10
|
||||
StorageLive(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:30
|
||||
StorageLive(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||
_3 = const FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:9: +2:10
|
||||
StorageLive(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:30
|
||||
StorageLive(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:16
|
||||
_3 = const FOO; // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:16
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||
// + literal: Const { ty: &i32, val: Unevaluated(FOO, [], None) }
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:16
|
||||
_1 = move _2 as usize (PointerExposeAddress); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:13: 7:39
|
||||
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:38: 7:39
|
||||
StorageDead(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:7:39: 7:40
|
||||
StorageLive(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
|
||||
StorageLive(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
|
||||
_5 = _1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:10: 8:11
|
||||
_4 = read(move _5) -> bb1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:5: 8:12
|
||||
_2 = &raw const (*_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:16
|
||||
_1 = move _2 as usize (PointerExposeAddress); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:39
|
||||
StorageDead(_2); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:38: +2:39
|
||||
StorageDead(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:39: +2:40
|
||||
StorageLive(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:+3:5: +3:12
|
||||
StorageLive(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:+3:10: +3:11
|
||||
_5 = _1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:+3:10: +3:11
|
||||
_4 = read(move _5) -> bb1; // scope 1 at $DIR/const_prop_fails_gracefully.rs:+3:5: +3:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_prop_fails_gracefully.rs:8:5: 8:9
|
||||
// + literal: Const { ty: fn(usize) {read}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:11: 8:12
|
||||
StorageDead(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:8:12: 8:13
|
||||
nop; // scope 0 at $DIR/const_prop_fails_gracefully.rs:5:11: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/const_prop_fails_gracefully.rs:9:2: 9:2
|
||||
StorageDead(_5); // scope 1 at $DIR/const_prop_fails_gracefully.rs:+3:11: +3:12
|
||||
StorageDead(_4); // scope 1 at $DIR/const_prop_fails_gracefully.rs:+3:12: +3:13
|
||||
nop; // scope 0 at $DIR/const_prop_fails_gracefully.rs:+0:11: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/const_prop_fails_gracefully.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,16 +2,16 @@
|
||||
+ // MIR for `hello` after ConstProp
|
||||
|
||||
fn hello() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
|
||||
let mut _1: bool; // in scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
|
||||
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:+0:14: +0:14
|
||||
let mut _1: bool; // in scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
|
||||
let mut _2: !; // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
|
||||
- _1 = const <bool as NeedsDrop>::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
|
||||
- switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
|
||||
+ _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
|
||||
+ switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:12:8: 12:21
|
||||
StorageLive(_1); // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
|
||||
- _1 = const <bool as NeedsDrop>::NEEDS; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
|
||||
- switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
|
||||
+ _1 = const false; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
|
||||
+ switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
|
||||
}
|
||||
|
||||
bb1: {
|
||||
@ -26,9 +26,9 @@
|
||||
}
|
||||
|
||||
bb2: {
|
||||
nop; // scope 0 at $DIR/control-flow-simplification.rs:14:6: 14:6
|
||||
StorageDead(_1); // scope 0 at $DIR/control-flow-simplification.rs:14:5: 14:6
|
||||
return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
|
||||
nop; // scope 0 at $DIR/control-flow-simplification.rs:+3:6: +3:6
|
||||
StorageDead(_1); // scope 0 at $DIR/control-flow-simplification.rs:+3:5: +3:6
|
||||
return; // scope 0 at $DIR/control-flow-simplification.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
// MIR for `hello` before PreCodegen
|
||||
|
||||
fn hello() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:11:14: 11:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/control-flow-simplification.rs:+0:14: +0:14
|
||||
|
||||
bb0: {
|
||||
return; // scope 0 at $DIR/control-flow-simplification.rs:15:2: 15:2
|
||||
return; // scope 0 at $DIR/control-flow-simplification.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
@ -2,51 +2,51 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/discriminant.rs:10:11: 10:11
|
||||
let _1: i32; // in scope 0 at $DIR/discriminant.rs:11:9: 11:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
let mut _4: isize; // in scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
let mut _0: (); // return place in scope 0 at $DIR/discriminant.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/discriminant.rs:+1:9: +1:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
let mut _4: isize; // in scope 0 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/discriminant.rs:11:9: 11:10
|
||||
debug x => _1; // in scope 1 at $DIR/discriminant.rs:+1:9: +1:10
|
||||
}
|
||||
scope 2 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
|
||||
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
StorageLive(_3); // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
Deinit(_3); // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
((_3 as Some).0: bool) = const true; // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
discriminant(_3) = 1; // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
- _4 = discriminant(_3); // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
- switchInt(move _4) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ _4 = const 1_isize; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ switchInt(const 1_isize) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
StorageLive(_3); // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
Deinit(_3); // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
((_3 as Some).0: bool) = const true; // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
discriminant(_3) = 1; // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
- _4 = discriminant(_3); // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
- switchInt(move _4) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
+ _4 = const 1_isize; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
+ switchInt(const 1_isize) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
}
|
||||
|
||||
bb1: {
|
||||
switchInt(((_3 as Some).0: bool)) -> [false: bb3, otherwise: bb2]; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
switchInt(((_3 as Some).0: bool)) -> [false: bb3, otherwise: bb2]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_2 = const 42_i32; // scope 2 at $DIR/discriminant.rs:11:47: 11:49
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
_2 = const 42_i32; // scope 2 at $DIR/discriminant.rs:+1:47: +1:49
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
}
|
||||
|
||||
bb3: {
|
||||
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:+1:59: +1:61
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
}
|
||||
|
||||
bb4: {
|
||||
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
|
||||
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
|
||||
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
|
||||
nop; // scope 0 at $DIR/discriminant.rs:10:11: 12:2
|
||||
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:12:1: 12:2
|
||||
return; // scope 0 at $DIR/discriminant.rs:12:2: 12:2
|
||||
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:+1:13: +1:68
|
||||
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:+1:67: +1:68
|
||||
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:+1:68: +1:69
|
||||
nop; // scope 0 at $DIR/discriminant.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/discriminant.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,51 +2,51 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/discriminant.rs:10:11: 10:11
|
||||
let _1: i32; // in scope 0 at $DIR/discriminant.rs:11:9: 11:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:11:34: 11:44
|
||||
let mut _4: isize; // in scope 0 at $DIR/discriminant.rs:11:21: 11:31
|
||||
let mut _0: (); // return place in scope 0 at $DIR/discriminant.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/discriminant.rs:+1:9: +1:10
|
||||
let mut _2: i32; // in scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
let mut _3: std::option::Option<bool>; // in scope 0 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
let mut _4: isize; // in scope 0 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/discriminant.rs:11:9: 11:10
|
||||
debug x => _1; // in scope 1 at $DIR/discriminant.rs:+1:9: +1:10
|
||||
}
|
||||
scope 2 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:11:9: 11:10
|
||||
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
StorageLive(_3); // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
Deinit(_3); // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
((_3 as Some).0: bool) = const true; // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
discriminant(_3) = 1; // scope 2 at $DIR/discriminant.rs:11:34: 11:44
|
||||
- _4 = discriminant(_3); // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
- switchInt(move _4) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ _4 = const 1_isize; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
+ switchInt(const 1_isize) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
StorageLive(_1); // scope 0 at $DIR/discriminant.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
StorageLive(_3); // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
Deinit(_3); // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
((_3 as Some).0: bool) = const true; // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
discriminant(_3) = 1; // scope 2 at $DIR/discriminant.rs:+1:34: +1:44
|
||||
- _4 = discriminant(_3); // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
- switchInt(move _4) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
+ _4 = const 1_isize; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
+ switchInt(const 1_isize) -> [1_isize: bb1, otherwise: bb3]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
}
|
||||
|
||||
bb1: {
|
||||
switchInt(((_3 as Some).0: bool)) -> [false: bb3, otherwise: bb2]; // scope 2 at $DIR/discriminant.rs:11:21: 11:31
|
||||
switchInt(((_3 as Some).0: bool)) -> [false: bb3, otherwise: bb2]; // scope 2 at $DIR/discriminant.rs:+1:21: +1:31
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_2 = const 42_i32; // scope 2 at $DIR/discriminant.rs:11:47: 11:49
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
_2 = const 42_i32; // scope 2 at $DIR/discriminant.rs:+1:47: +1:49
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
}
|
||||
|
||||
bb3: {
|
||||
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:11:59: 11:61
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:11:13: 11:64
|
||||
_2 = const 10_i32; // scope 0 at $DIR/discriminant.rs:+1:59: +1:61
|
||||
goto -> bb4; // scope 0 at $DIR/discriminant.rs:+1:13: +1:64
|
||||
}
|
||||
|
||||
bb4: {
|
||||
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:11:13: 11:68
|
||||
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:11:67: 11:68
|
||||
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:11:68: 11:69
|
||||
nop; // scope 0 at $DIR/discriminant.rs:10:11: 12:2
|
||||
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:12:1: 12:2
|
||||
return; // scope 0 at $DIR/discriminant.rs:12:2: 12:2
|
||||
_1 = Add(move _2, const 0_i32); // scope 0 at $DIR/discriminant.rs:+1:13: +1:68
|
||||
StorageDead(_2); // scope 0 at $DIR/discriminant.rs:+1:67: +1:68
|
||||
StorageDead(_3); // scope 0 at $DIR/discriminant.rs:+1:68: +1:69
|
||||
nop; // scope 0 at $DIR/discriminant.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/discriminant.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/discriminant.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,32 +2,32 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/indirect.rs:4:11: 4:11
|
||||
let _1: u8; // in scope 0 at $DIR/indirect.rs:5:9: 5:10
|
||||
let mut _2: u8; // in scope 0 at $DIR/indirect.rs:5:13: 5:25
|
||||
let mut _3: (u8, bool); // in scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
let mut _0: (); // return place in scope 0 at $DIR/indirect.rs:+0:11: +0:11
|
||||
let _1: u8; // in scope 0 at $DIR/indirect.rs:+1:9: +1:10
|
||||
let mut _2: u8; // in scope 0 at $DIR/indirect.rs:+1:13: +1:25
|
||||
let mut _3: (u8, bool); // in scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/indirect.rs:5:9: 5:10
|
||||
debug x => _1; // in scope 1 at $DIR/indirect.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/indirect.rs:5:9: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/indirect.rs:5:13: 5:25
|
||||
- _2 = const 2_u32 as u8 (Misc); // scope 0 at $DIR/indirect.rs:5:13: 5:25
|
||||
- _3 = CheckedAdd(_2, const 1_u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
- assert(!move (_3.1: bool), "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
+ _2 = const 2_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:25
|
||||
+ _3 = const (3_u8, false); // scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_u8, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
StorageLive(_1); // scope 0 at $DIR/indirect.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/indirect.rs:+1:13: +1:25
|
||||
- _2 = const 2_u32 as u8 (Misc); // scope 0 at $DIR/indirect.rs:+1:13: +1:25
|
||||
- _3 = CheckedAdd(_2, const 1_u8); // scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
- assert(!move (_3.1: bool), "attempt to compute `{} + {}`, which would overflow", move _2, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
+ _2 = const 2_u8; // scope 0 at $DIR/indirect.rs:+1:13: +1:25
|
||||
+ _3 = const (3_u8, false); // scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_u8, const 1_u8) -> bb1; // scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = move (_3.0: u8); // scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
+ _1 = const 3_u8; // scope 0 at $DIR/indirect.rs:5:13: 5:29
|
||||
StorageDead(_2); // scope 0 at $DIR/indirect.rs:5:28: 5:29
|
||||
nop; // scope 0 at $DIR/indirect.rs:4:11: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/indirect.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/indirect.rs:6:2: 6:2
|
||||
- _1 = move (_3.0: u8); // scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
+ _1 = const 3_u8; // scope 0 at $DIR/indirect.rs:+1:13: +1:29
|
||||
StorageDead(_2); // scope 0 at $DIR/indirect.rs:+1:28: +1:29
|
||||
nop; // scope 0 at $DIR/indirect.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/indirect.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/indirect.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,24 +2,24 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/invalid_constant.rs:15:11: 15:11
|
||||
let _1: char; // in scope 0 at $DIR/invalid_constant.rs:21:9: 21:22
|
||||
let mut _2: main::InvalidChar; // in scope 0 at $DIR/invalid_constant.rs:21:34: 21:63
|
||||
let mut _4: E; // in scope 0 at $DIR/invalid_constant.rs:28:25: 28:59
|
||||
let mut _5: main::InvalidTag; // in scope 0 at $DIR/invalid_constant.rs:28:34: 28:55
|
||||
let mut _7: Empty; // in scope 0 at $DIR/invalid_constant.rs:35:35: 35:73
|
||||
let mut _8: main::NoVariants; // in scope 0 at $DIR/invalid_constant.rs:35:44: 35:65
|
||||
let mut _0: (); // return place in scope 0 at $DIR/invalid_constant.rs:+0:11: +0:11
|
||||
let _1: char; // in scope 0 at $DIR/invalid_constant.rs:+6:9: +6:22
|
||||
let mut _2: main::InvalidChar; // in scope 0 at $DIR/invalid_constant.rs:+6:34: +6:63
|
||||
let mut _4: E; // in scope 0 at $DIR/invalid_constant.rs:+13:25: +13:59
|
||||
let mut _5: main::InvalidTag; // in scope 0 at $DIR/invalid_constant.rs:+13:34: +13:55
|
||||
let mut _7: Empty; // in scope 0 at $DIR/invalid_constant.rs:+20:35: +20:73
|
||||
let mut _8: main::NoVariants; // in scope 0 at $DIR/invalid_constant.rs:+20:44: +20:65
|
||||
scope 1 {
|
||||
debug _invalid_char => _1; // in scope 1 at $DIR/invalid_constant.rs:21:9: 21:22
|
||||
let _3: [E; 1]; // in scope 1 at $DIR/invalid_constant.rs:28:9: 28:21
|
||||
debug _invalid_char => _1; // in scope 1 at $DIR/invalid_constant.rs:+6:9: +6:22
|
||||
let _3: [E; 1]; // in scope 1 at $DIR/invalid_constant.rs:+13:9: +13:21
|
||||
scope 3 {
|
||||
debug _invalid_tag => _3; // in scope 3 at $DIR/invalid_constant.rs:28:9: 28:21
|
||||
let _6: [Empty; 1]; // in scope 3 at $DIR/invalid_constant.rs:35:9: 35:31
|
||||
debug _invalid_tag => _3; // in scope 3 at $DIR/invalid_constant.rs:+13:9: +13:21
|
||||
let _6: [Empty; 1]; // in scope 3 at $DIR/invalid_constant.rs:+20:9: +20:31
|
||||
scope 5 {
|
||||
debug _enum_without_variants => _6; // in scope 5 at $DIR/invalid_constant.rs:35:9: 35:31
|
||||
let _9: main::Str<"<22><><EFBFBD>">; // in scope 5 at $DIR/invalid_constant.rs:39:9: 39:22
|
||||
debug _enum_without_variants => _6; // in scope 5 at $DIR/invalid_constant.rs:+20:9: +20:31
|
||||
let _9: main::Str<"<22><><EFBFBD>">; // in scope 5 at $DIR/invalid_constant.rs:+24:9: +24:22
|
||||
scope 7 {
|
||||
debug _non_utf8_str => _9; // in scope 7 at $DIR/invalid_constant.rs:39:9: 39:22
|
||||
debug _non_utf8_str => _9; // in scope 7 at $DIR/invalid_constant.rs:+24:9: +24:22
|
||||
}
|
||||
}
|
||||
scope 6 {
|
||||
@ -32,46 +32,46 @@
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/invalid_constant.rs:21:9: 21:22
|
||||
StorageLive(_2); // scope 2 at $DIR/invalid_constant.rs:21:34: 21:63
|
||||
Deinit(_2); // scope 2 at $DIR/invalid_constant.rs:21:34: 21:63
|
||||
(_2.0: u32) = const 1114113_u32; // scope 2 at $DIR/invalid_constant.rs:21:34: 21:63
|
||||
- _1 = (_2.1: char); // scope 2 at $DIR/invalid_constant.rs:21:34: 21:67
|
||||
+ _1 = const {transmute(0x00110001): char}; // scope 2 at $DIR/invalid_constant.rs:21:34: 21:67
|
||||
StorageDead(_2); // scope 0 at $DIR/invalid_constant.rs:21:69: 21:70
|
||||
StorageLive(_3); // scope 1 at $DIR/invalid_constant.rs:28:9: 28:21
|
||||
StorageLive(_4); // scope 1 at $DIR/invalid_constant.rs:28:25: 28:59
|
||||
StorageLive(_5); // scope 4 at $DIR/invalid_constant.rs:28:34: 28:55
|
||||
Deinit(_5); // scope 4 at $DIR/invalid_constant.rs:28:34: 28:55
|
||||
(_5.0: u32) = const 4_u32; // scope 4 at $DIR/invalid_constant.rs:28:34: 28:55
|
||||
- _4 = (_5.1: E); // scope 4 at $DIR/invalid_constant.rs:28:34: 28:57
|
||||
- _3 = [move _4]; // scope 1 at $DIR/invalid_constant.rs:28:24: 28:60
|
||||
+ _4 = const Scalar(0x00000004): E; // scope 4 at $DIR/invalid_constant.rs:28:34: 28:57
|
||||
StorageLive(_1); // scope 0 at $DIR/invalid_constant.rs:+6:9: +6:22
|
||||
StorageLive(_2); // scope 2 at $DIR/invalid_constant.rs:+6:34: +6:63
|
||||
Deinit(_2); // scope 2 at $DIR/invalid_constant.rs:+6:34: +6:63
|
||||
(_2.0: u32) = const 1114113_u32; // scope 2 at $DIR/invalid_constant.rs:+6:34: +6:63
|
||||
- _1 = (_2.1: char); // scope 2 at $DIR/invalid_constant.rs:+6:34: +6:67
|
||||
+ _1 = const {transmute(0x00110001): char}; // scope 2 at $DIR/invalid_constant.rs:+6:34: +6:67
|
||||
StorageDead(_2); // scope 0 at $DIR/invalid_constant.rs:+6:69: +6:70
|
||||
StorageLive(_3); // scope 1 at $DIR/invalid_constant.rs:+13:9: +13:21
|
||||
StorageLive(_4); // scope 1 at $DIR/invalid_constant.rs:+13:25: +13:59
|
||||
StorageLive(_5); // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:55
|
||||
Deinit(_5); // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:55
|
||||
(_5.0: u32) = const 4_u32; // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:55
|
||||
- _4 = (_5.1: E); // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:57
|
||||
- _3 = [move _4]; // scope 1 at $DIR/invalid_constant.rs:+13:24: +13:60
|
||||
+ _4 = const Scalar(0x00000004): E; // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:57
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/invalid_constant.rs:28:34: 28:57
|
||||
+ // + literal: Const { ty: E, val: Value(Scalar(0x00000004)) }
|
||||
+ _3 = [const Scalar(0x00000004): E]; // scope 1 at $DIR/invalid_constant.rs:28:24: 28:60
|
||||
+ _3 = [const Scalar(0x00000004): E]; // scope 1 at $DIR/invalid_constant.rs:+13:24: +13:60
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/invalid_constant.rs:28:24: 28:60
|
||||
+ // + literal: Const { ty: E, val: Value(Scalar(0x00000004)) }
|
||||
StorageDead(_4); // scope 1 at $DIR/invalid_constant.rs:28:59: 28:60
|
||||
StorageDead(_5); // scope 1 at $DIR/invalid_constant.rs:28:60: 28:61
|
||||
StorageLive(_6); // scope 3 at $DIR/invalid_constant.rs:35:9: 35:31
|
||||
StorageLive(_7); // scope 3 at $DIR/invalid_constant.rs:35:35: 35:73
|
||||
StorageLive(_8); // scope 6 at $DIR/invalid_constant.rs:35:44: 35:65
|
||||
Deinit(_8); // scope 6 at $DIR/invalid_constant.rs:35:44: 35:65
|
||||
(_8.0: u32) = const 0_u32; // scope 6 at $DIR/invalid_constant.rs:35:44: 35:65
|
||||
nop; // scope 6 at $DIR/invalid_constant.rs:35:44: 35:71
|
||||
nop; // scope 3 at $DIR/invalid_constant.rs:35:34: 35:74
|
||||
StorageDead(_7); // scope 3 at $DIR/invalid_constant.rs:35:73: 35:74
|
||||
StorageDead(_8); // scope 3 at $DIR/invalid_constant.rs:35:74: 35:75
|
||||
StorageLive(_9); // scope 5 at $DIR/invalid_constant.rs:39:9: 39:22
|
||||
nop; // scope 0 at $DIR/invalid_constant.rs:15:11: 42:2
|
||||
StorageDead(_9); // scope 5 at $DIR/invalid_constant.rs:42:1: 42:2
|
||||
StorageDead(_6); // scope 3 at $DIR/invalid_constant.rs:42:1: 42:2
|
||||
StorageDead(_3); // scope 1 at $DIR/invalid_constant.rs:42:1: 42:2
|
||||
StorageDead(_1); // scope 0 at $DIR/invalid_constant.rs:42:1: 42:2
|
||||
return; // scope 0 at $DIR/invalid_constant.rs:42:2: 42:2
|
||||
StorageDead(_4); // scope 1 at $DIR/invalid_constant.rs:+13:59: +13:60
|
||||
StorageDead(_5); // scope 1 at $DIR/invalid_constant.rs:+13:60: +13:61
|
||||
StorageLive(_6); // scope 3 at $DIR/invalid_constant.rs:+20:9: +20:31
|
||||
StorageLive(_7); // scope 3 at $DIR/invalid_constant.rs:+20:35: +20:73
|
||||
StorageLive(_8); // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:65
|
||||
Deinit(_8); // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:65
|
||||
(_8.0: u32) = const 0_u32; // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:65
|
||||
nop; // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:71
|
||||
nop; // scope 3 at $DIR/invalid_constant.rs:+20:34: +20:74
|
||||
StorageDead(_7); // scope 3 at $DIR/invalid_constant.rs:+20:73: +20:74
|
||||
StorageDead(_8); // scope 3 at $DIR/invalid_constant.rs:+20:74: +20:75
|
||||
StorageLive(_9); // scope 5 at $DIR/invalid_constant.rs:+24:9: +24:22
|
||||
nop; // scope 0 at $DIR/invalid_constant.rs:+0:11: +27:2
|
||||
StorageDead(_9); // scope 5 at $DIR/invalid_constant.rs:+27:1: +27:2
|
||||
StorageDead(_6); // scope 3 at $DIR/invalid_constant.rs:+27:1: +27:2
|
||||
StorageDead(_3); // scope 1 at $DIR/invalid_constant.rs:+27:1: +27:2
|
||||
StorageDead(_1); // scope 0 at $DIR/invalid_constant.rs:+27:1: +27:2
|
||||
return; // scope 0 at $DIR/invalid_constant.rs:+27:2: +27:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,32 +2,32 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/issue-66971.rs:15:11: 15:11
|
||||
let _1: (); // in scope 0 at $DIR/issue-66971.rs:16:5: 16:23
|
||||
let mut _2: ((), u8, u8); // in scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
let mut _3: (); // in scope 0 at $DIR/issue-66971.rs:16:13: 16:15
|
||||
let mut _0: (); // return place in scope 0 at $DIR/issue-66971.rs:+0:11: +0:11
|
||||
let _1: (); // in scope 0 at $DIR/issue-66971.rs:+1:5: +1:23
|
||||
let mut _2: ((), u8, u8); // in scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
|
||||
let mut _3: (); // in scope 0 at $DIR/issue-66971.rs:+1:13: +1:15
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/issue-66971.rs:16:5: 16:23
|
||||
StorageLive(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
|
||||
nop; // scope 0 at $DIR/issue-66971.rs:16:13: 16:15
|
||||
Deinit(_2); // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
nop; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
(_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
(_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:16:12: 16:22
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-66971.rs:16:21: 16:22
|
||||
_1 = encode(move _2) -> bb1; // scope 0 at $DIR/issue-66971.rs:16:5: 16:23
|
||||
StorageLive(_1); // scope 0 at $DIR/issue-66971.rs:+1:5: +1:23
|
||||
StorageLive(_2); // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-66971.rs:+1:13: +1:15
|
||||
nop; // scope 0 at $DIR/issue-66971.rs:+1:13: +1:15
|
||||
Deinit(_2); // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
|
||||
nop; // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
|
||||
(_2.1: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
|
||||
(_2.2: u8) = const 0_u8; // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-66971.rs:+1:21: +1:22
|
||||
_1 = encode(move _2) -> bb1; // scope 0 at $DIR/issue-66971.rs:+1:5: +1:23
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-66971.rs:16:5: 16:11
|
||||
// + literal: Const { ty: fn(((), u8, u8)) {encode}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_2); // scope 0 at $DIR/issue-66971.rs:16:22: 16:23
|
||||
StorageDead(_1); // scope 0 at $DIR/issue-66971.rs:16:23: 16:24
|
||||
nop; // scope 0 at $DIR/issue-66971.rs:15:11: 17:2
|
||||
return; // scope 0 at $DIR/issue-66971.rs:17:2: 17:2
|
||||
StorageDead(_2); // scope 0 at $DIR/issue-66971.rs:+1:22: +1:23
|
||||
StorageDead(_1); // scope 0 at $DIR/issue-66971.rs:+1:23: +1:24
|
||||
nop; // scope 0 at $DIR/issue-66971.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/issue-66971.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,33 +2,33 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/issue-67019.rs:10:11: 10:11
|
||||
let _1: (); // in scope 0 at $DIR/issue-67019.rs:11:5: 11:20
|
||||
let mut _2: ((u8, u8),); // in scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
let mut _3: (u8, u8); // in scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
let mut _0: (); // return place in scope 0 at $DIR/issue-67019.rs:+0:11: +0:11
|
||||
let _1: (); // in scope 0 at $DIR/issue-67019.rs:+1:5: +1:20
|
||||
let mut _2: ((u8, u8),); // in scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
|
||||
let mut _3: (u8, u8); // in scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/issue-67019.rs:11:5: 11:20
|
||||
StorageLive(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
Deinit(_3); // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
(_3.0: u8) = const 1_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
(_3.1: u8) = const 2_u8; // scope 0 at $DIR/issue-67019.rs:11:11: 11:17
|
||||
Deinit(_2); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
- (_2.0: (u8, u8)) = move _3; // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
+ (_2.0: (u8, u8)) = const (1_u8, 2_u8); // scope 0 at $DIR/issue-67019.rs:11:10: 11:19
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-67019.rs:11:18: 11:19
|
||||
_1 = test(move _2) -> bb1; // scope 0 at $DIR/issue-67019.rs:11:5: 11:20
|
||||
StorageLive(_1); // scope 0 at $DIR/issue-67019.rs:+1:5: +1:20
|
||||
StorageLive(_2); // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
|
||||
StorageLive(_3); // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
|
||||
Deinit(_3); // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
|
||||
(_3.0: u8) = const 1_u8; // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
|
||||
(_3.1: u8) = const 2_u8; // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
|
||||
Deinit(_2); // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
|
||||
- (_2.0: (u8, u8)) = move _3; // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
|
||||
+ (_2.0: (u8, u8)) = const (1_u8, 2_u8); // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
|
||||
StorageDead(_3); // scope 0 at $DIR/issue-67019.rs:+1:18: +1:19
|
||||
_1 = test(move _2) -> bb1; // scope 0 at $DIR/issue-67019.rs:+1:5: +1:20
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue-67019.rs:11:5: 11:9
|
||||
// + literal: Const { ty: fn(((u8, u8),)) {test}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_2); // scope 0 at $DIR/issue-67019.rs:11:19: 11:20
|
||||
StorageDead(_1); // scope 0 at $DIR/issue-67019.rs:11:20: 11:21
|
||||
nop; // scope 0 at $DIR/issue-67019.rs:10:11: 12:2
|
||||
return; // scope 0 at $DIR/issue-67019.rs:12:2: 12:2
|
||||
StorageDead(_2); // scope 0 at $DIR/issue-67019.rs:+1:19: +1:20
|
||||
StorageDead(_1); // scope 0 at $DIR/issue-67019.rs:+1:20: +1:21
|
||||
nop; // scope 0 at $DIR/issue-67019.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/issue-67019.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,36 +2,36 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/large_array_index.rs:4:11: 4:11
|
||||
let _1: u8; // in scope 0 at $DIR/large_array_index.rs:6:9: 6:10
|
||||
let mut _2: [u8; 5000]; // in scope 0 at $DIR/large_array_index.rs:6:17: 6:29
|
||||
let _3: usize; // in scope 0 at $DIR/large_array_index.rs:6:30: 6:31
|
||||
let mut _4: usize; // in scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
let mut _5: bool; // in scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
let mut _0: (); // return place in scope 0 at $DIR/large_array_index.rs:+0:11: +0:11
|
||||
let _1: u8; // in scope 0 at $DIR/large_array_index.rs:+2:9: +2:10
|
||||
let mut _2: [u8; 5000]; // in scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
|
||||
let _3: usize; // in scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
|
||||
let mut _4: usize; // in scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
let mut _5: bool; // in scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/large_array_index.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/large_array_index.rs:+2:9: +2:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:6:9: 6:10
|
||||
StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
|
||||
_2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
|
||||
StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
|
||||
_3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
|
||||
_4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
+ _5 = const true; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:+2:9: +2:10
|
||||
StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
|
||||
_2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
|
||||
StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
|
||||
_3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
|
||||
_4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
+ _5 = const true; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_1 = _2[_3]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
StorageDead(_3); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
|
||||
StorageDead(_2); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
|
||||
nop; // scope 0 at $DIR/large_array_index.rs:4:11: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/large_array_index.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/large_array_index.rs:7:2: 7:2
|
||||
_1 = _2[_3]; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
StorageDead(_3); // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
|
||||
StorageDead(_2); // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
|
||||
nop; // scope 0 at $DIR/large_array_index.rs:+0:11: +3:2
|
||||
StorageDead(_1); // scope 0 at $DIR/large_array_index.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/large_array_index.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,36 +2,36 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/large_array_index.rs:4:11: 4:11
|
||||
let _1: u8; // in scope 0 at $DIR/large_array_index.rs:6:9: 6:10
|
||||
let mut _2: [u8; 5000]; // in scope 0 at $DIR/large_array_index.rs:6:17: 6:29
|
||||
let _3: usize; // in scope 0 at $DIR/large_array_index.rs:6:30: 6:31
|
||||
let mut _4: usize; // in scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
let mut _5: bool; // in scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
let mut _0: (); // return place in scope 0 at $DIR/large_array_index.rs:+0:11: +0:11
|
||||
let _1: u8; // in scope 0 at $DIR/large_array_index.rs:+2:9: +2:10
|
||||
let mut _2: [u8; 5000]; // in scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
|
||||
let _3: usize; // in scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
|
||||
let mut _4: usize; // in scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
let mut _5: bool; // in scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/large_array_index.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/large_array_index.rs:+2:9: +2:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:6:9: 6:10
|
||||
StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
|
||||
_2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:29
|
||||
StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
|
||||
_3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:6:30: 6:31
|
||||
_4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
+ _5 = const true; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
StorageLive(_1); // scope 0 at $DIR/large_array_index.rs:+2:9: +2:10
|
||||
StorageLive(_2); // scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
|
||||
_2 = [const 0_u8; 5000]; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
|
||||
StorageLive(_3); // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
|
||||
_3 = const 2_usize; // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
|
||||
_4 = const 5000_usize; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
- _5 = Lt(_3, _4); // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
- assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
+ _5 = const true; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_1 = _2[_3]; // scope 0 at $DIR/large_array_index.rs:6:17: 6:32
|
||||
StorageDead(_3); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
|
||||
StorageDead(_2); // scope 0 at $DIR/large_array_index.rs:6:32: 6:33
|
||||
nop; // scope 0 at $DIR/large_array_index.rs:4:11: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/large_array_index.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/large_array_index.rs:7:2: 7:2
|
||||
_1 = _2[_3]; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
|
||||
StorageDead(_3); // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
|
||||
StorageDead(_2); // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
|
||||
nop; // scope 0 at $DIR/large_array_index.rs:+0:11: +3:2
|
||||
StorageDead(_1); // scope 0 at $DIR/large_array_index.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/large_array_index.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,17 +2,17 @@
|
||||
+ // MIR for `test` after ConstProp
|
||||
|
||||
fn test(_1: i32) -> i32 {
|
||||
debug x => _1; // in scope 0 at $DIR/mult_by_zero.rs:4:9: 4:10
|
||||
let mut _0: i32; // return place in scope 0 at $DIR/mult_by_zero.rs:4:21: 4:24
|
||||
let mut _2: i32; // in scope 0 at $DIR/mult_by_zero.rs:5:3: 5:4
|
||||
debug x => _1; // in scope 0 at $DIR/mult_by_zero.rs:+0:9: +0:10
|
||||
let mut _0: i32; // return place in scope 0 at $DIR/mult_by_zero.rs:+0:21: +0:24
|
||||
let mut _2: i32; // in scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:4
|
||||
_2 = _1; // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:4
|
||||
- _0 = Mul(move _2, const 0_i32); // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:8
|
||||
+ _0 = const 0_i32; // scope 0 at $DIR/mult_by_zero.rs:5:3: 5:8
|
||||
StorageDead(_2); // scope 0 at $DIR/mult_by_zero.rs:5:7: 5:8
|
||||
return; // scope 0 at $DIR/mult_by_zero.rs:6:2: 6:2
|
||||
StorageLive(_2); // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
|
||||
_2 = _1; // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
|
||||
- _0 = Mul(move _2, const 0_i32); // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
|
||||
+ _0 = const 0_i32; // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
|
||||
StorageDead(_2); // scope 0 at $DIR/mult_by_zero.rs:+1:7: +1:8
|
||||
return; // scope 0 at $DIR/mult_by_zero.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,27 +2,27 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable.rs:4:11: 4:11
|
||||
let mut _1: i32; // in scope 0 at $DIR/mutable_variable.rs:5:9: 5:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable.rs:+0:11: +0:11
|
||||
let mut _1: i32; // in scope 0 at $DIR/mutable_variable.rs:+1:9: +1:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable.rs:5:9: 5:14
|
||||
let _2: i32; // in scope 1 at $DIR/mutable_variable.rs:7:9: 7:10
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable.rs:+1:9: +1:14
|
||||
let _2: i32; // in scope 1 at $DIR/mutable_variable.rs:+3:9: +3:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/mutable_variable.rs:7:9: 7:10
|
||||
debug y => _2; // in scope 2 at $DIR/mutable_variable.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable.rs:5:9: 5:14
|
||||
_1 = const 42_i32; // scope 0 at $DIR/mutable_variable.rs:5:17: 5:19
|
||||
_1 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:6:5: 6:11
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable.rs:7:9: 7:10
|
||||
- _2 = _1; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14
|
||||
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:7:13: 7:14
|
||||
nop; // scope 0 at $DIR/mutable_variable.rs:4:11: 8:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable.rs:8:1: 8:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/mutable_variable.rs:8:2: 8:2
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable.rs:+1:9: +1:14
|
||||
_1 = const 42_i32; // scope 0 at $DIR/mutable_variable.rs:+1:17: +1:19
|
||||
_1 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:+2:5: +2:11
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable.rs:+3:9: +3:10
|
||||
- _2 = _1; // scope 1 at $DIR/mutable_variable.rs:+3:13: +3:14
|
||||
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable.rs:+3:13: +3:14
|
||||
nop; // scope 0 at $DIR/mutable_variable.rs:+0:11: +4:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/mutable_variable.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,29 +2,29 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate.rs:4:11: 4:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate.rs:+0:11: +0:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14
|
||||
let _2: (i32, i32); // in scope 1 at $DIR/mutable_variable_aggregate.rs:7:9: 7:10
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
|
||||
let _2: (i32, i32); // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/mutable_variable_aggregate.rs:7:9: 7:10
|
||||
debug y => _2; // in scope 2 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:9: 5:14
|
||||
Deinit(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:5:17: 5:25
|
||||
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:6:5: 6:13
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:7:9: 7:10
|
||||
- _2 = _1; // scope 1 at $DIR/mutable_variable_aggregate.rs:7:13: 7:14
|
||||
+ _2 = const (42_i32, 99_i32); // scope 1 at $DIR/mutable_variable_aggregate.rs:7:13: 7:14
|
||||
nop; // scope 0 at $DIR/mutable_variable_aggregate.rs:4:11: 8:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:8:1: 8:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/mutable_variable_aggregate.rs:8:2: 8:2
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
|
||||
Deinit(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
|
||||
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
|
||||
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
|
||||
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate.rs:+2:5: +2:13
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
|
||||
- _2 = _1; // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
|
||||
+ _2 = const (42_i32, 99_i32); // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
|
||||
nop; // scope 0 at $DIR/mutable_variable_aggregate.rs:+0:11: +4:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,35 +2,35 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:4:11: 4:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+0:11: +0:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+1:9: +1:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14
|
||||
let _2: &mut (i32, i32); // in scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+1:9: +1:14
|
||||
let _2: &mut (i32, i32); // in scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug z => _2; // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:9: 6:10
|
||||
let _3: (i32, i32); // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:9: 8:10
|
||||
debug z => _2; // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
|
||||
let _3: (i32, i32); // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
|
||||
scope 3 {
|
||||
debug y => _3; // in scope 3 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:9: 8:10
|
||||
debug y => _3; // in scope 3 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:9: 5:14
|
||||
Deinit(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
|
||||
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
|
||||
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:5:17: 5:25
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:9: 6:10
|
||||
_2 = &mut _1; // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:6:13: 6:19
|
||||
((*_2).1: i32) = const 99_i32; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:7:5: 7:13
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:9: 8:10
|
||||
_3 = _1; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:8:13: 8:14
|
||||
nop; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:4:11: 9:2
|
||||
StorageDead(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:1: 9:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:1: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:9:2: 9:2
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+1:9: +1:14
|
||||
Deinit(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+1:17: +1:25
|
||||
(_1.0: i32) = const 42_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+1:17: +1:25
|
||||
(_1.1: i32) = const 43_i32; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+1:17: +1:25
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
|
||||
_2 = &mut _1; // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:13: +2:19
|
||||
((*_2).1: i32) = const 99_i32; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+3:5: +3:13
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
|
||||
_3 = _1; // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
|
||||
nop; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+0:11: +5:2
|
||||
StorageDead(_3); // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:4:11: 4:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:5:9: 5:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+0:11: +0:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:9: +1:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:5:9: 5:14
|
||||
let _2: i32; // in scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:9: 8:10
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:9: +1:14
|
||||
let _2: i32; // in scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:9: +4:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/mutable_variable_aggregate_partial_read.rs:8:9: 8:10
|
||||
debug y => _2; // in scope 2 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:9: +4:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:5:9: 5:14
|
||||
_1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:5:29: 5:34
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:9: +1:14
|
||||
_1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:29: +1:34
|
||||
// mir::Constant
|
||||
// + span: $DIR/mutable_variable_aggregate_partial_read.rs:5:29: 5:32
|
||||
// + literal: Const { ty: fn() -> (i32, i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:6:5: 6:13
|
||||
(_1.0: i32) = const 42_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:7:5: 7:13
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:9: 8:10
|
||||
- _2 = (_1.1: i32); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
|
||||
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:8:13: 8:16
|
||||
nop; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:4:11: 9:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:9:1: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:9:2: 9:2
|
||||
(_1.1: i32) = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+2:5: +2:13
|
||||
(_1.0: i32) = const 42_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+3:5: +3:13
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:9: +4:10
|
||||
- _2 = (_1.1: i32); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:13: +4:16
|
||||
+ _2 = const 99_i32; // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:13: +4:16
|
||||
nop; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+0:11: +5:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:1: +5:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,43 +2,43 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_no_prop.rs:6:11: 6:11
|
||||
let mut _1: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:7:9: 7:14
|
||||
let _2: (); // in scope 0 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6
|
||||
let mut _3: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
let mut _4: *mut u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_no_prop.rs:+0:11: +0:11
|
||||
let mut _1: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
|
||||
let _2: (); // in scope 0 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
|
||||
let mut _3: u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
|
||||
let mut _4: *mut u32; // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_no_prop.rs:7:9: 7:14
|
||||
let _5: u32; // in scope 1 at $DIR/mutable_variable_no_prop.rs:11:9: 11:10
|
||||
debug x => _1; // in scope 1 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
|
||||
let _5: u32; // in scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
|
||||
scope 2 {
|
||||
}
|
||||
scope 3 {
|
||||
debug y => _5; // in scope 3 at $DIR/mutable_variable_no_prop.rs:11:9: 11:10
|
||||
debug y => _5; // in scope 3 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:7:9: 7:14
|
||||
_1 = const 42_u32; // scope 0 at $DIR/mutable_variable_no_prop.rs:7:17: 7:19
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
StorageLive(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
_4 = const {alloc1: *mut u32}; // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
|
||||
_1 = const 42_u32; // scope 0 at $DIR/mutable_variable_no_prop.rs:+1:17: +1:19
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
|
||||
StorageLive(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
|
||||
_4 = const {alloc1: *mut u32}; // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
// + literal: Const { ty: *mut u32, val: Value(Scalar(alloc1)) }
|
||||
_3 = (*_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:13: 9:19
|
||||
_1 = move _3; // scope 2 at $DIR/mutable_variable_no_prop.rs:9:9: 9:19
|
||||
StorageDead(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:18: 9:19
|
||||
StorageDead(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:9:19: 9:20
|
||||
nop; // scope 2 at $DIR/mutable_variable_no_prop.rs:8:5: 10:6
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:10:5: 10:6
|
||||
StorageLive(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:11:9: 11:10
|
||||
_5 = _1; // scope 1 at $DIR/mutable_variable_no_prop.rs:11:13: 11:14
|
||||
nop; // scope 0 at $DIR/mutable_variable_no_prop.rs:6:11: 12:2
|
||||
StorageDead(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:12:1: 12:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:12:1: 12:2
|
||||
return; // scope 0 at $DIR/mutable_variable_no_prop.rs:12:2: 12:2
|
||||
_3 = (*_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
|
||||
_1 = move _3; // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:9: +3:19
|
||||
StorageDead(_3); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:18: +3:19
|
||||
StorageDead(_4); // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:19: +3:20
|
||||
nop; // scope 2 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_no_prop.rs:+4:5: +4:6
|
||||
StorageLive(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
|
||||
_5 = _1; // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:13: +5:14
|
||||
nop; // scope 0 at $DIR/mutable_variable_no_prop.rs:+0:11: +6:2
|
||||
StorageDead(_5); // scope 1 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
|
||||
return; // scope 0 at $DIR/mutable_variable_no_prop.rs:+6:2: +6:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,52 +2,52 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_unprop_assign.rs:4:11: 4:11
|
||||
let _1: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:5:9: 5:10
|
||||
let mut _3: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
|
||||
let mut _0: (); // return place in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
|
||||
let mut _3: i32; // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
|
||||
scope 1 {
|
||||
debug a => _1; // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:5:9: 5:10
|
||||
let mut _2: (i32, i32); // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14
|
||||
debug a => _1; // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
|
||||
let mut _2: (i32, i32); // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
|
||||
scope 2 {
|
||||
debug x => _2; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14
|
||||
let _4: i32; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:8:9: 8:10
|
||||
debug x => _2; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
|
||||
let _4: i32; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
|
||||
scope 3 {
|
||||
debug y => _4; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:8:9: 8:10
|
||||
let _5: i32; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:9:9: 9:10
|
||||
debug y => _4; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
|
||||
let _5: i32; // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
|
||||
scope 4 {
|
||||
debug z => _5; // in scope 4 at $DIR/mutable_variable_unprop_assign.rs:9:9: 9:10
|
||||
debug z => _5; // in scope 4 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:5:9: 5:10
|
||||
_1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:5:13: 5:18
|
||||
StorageLive(_1); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
|
||||
_1 = foo() -> bb1; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:13: +1:18
|
||||
// mir::Constant
|
||||
// + span: $DIR/mutable_variable_unprop_assign.rs:5:13: 5:16
|
||||
// + literal: Const { ty: fn() -> i32 {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:9: 6:14
|
||||
Deinit(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
(_2.0: i32) = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
(_2.1: i32) = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:6:29: 6:35
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
|
||||
_3 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
|
||||
(_2.1: i32) = move _3; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:5: 7:12
|
||||
StorageDead(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:7:11: 7:12
|
||||
StorageLive(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:8:9: 8:10
|
||||
_4 = (_2.1: i32); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:8:13: 8:16
|
||||
StorageLive(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:9:9: 9:10
|
||||
_5 = (_2.0: i32); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:9:13: 9:16
|
||||
nop; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:4:11: 10:2
|
||||
StorageDead(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
|
||||
StorageDead(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:10:1: 10:2
|
||||
return; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:10:2: 10:2
|
||||
StorageLive(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
|
||||
Deinit(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
|
||||
(_2.0: i32) = const 1_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
|
||||
(_2.1: i32) = const 2_i32; // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
|
||||
StorageLive(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
|
||||
_3 = _1; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
|
||||
(_2.1: i32) = move _3; // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:5: +3:12
|
||||
StorageDead(_3); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
|
||||
StorageLive(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
|
||||
_4 = (_2.1: i32); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:13: +4:16
|
||||
StorageLive(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
|
||||
_5 = (_2.0: i32); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:13: +5:16
|
||||
nop; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+0:11: +6:2
|
||||
StorageDead(_5); // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
|
||||
StorageDead(_4); // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
|
||||
StorageDead(_2); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
|
||||
return; // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+6:2: +6:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,67 +2,67 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:11:11: 11:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let mut _2: (i32, bool); // in scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
let mut _4: [i32; 6]; // in scope 0 at $DIR/optimizes_into_variable.rs:13:13: 13:31
|
||||
let _5: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:13:32: 13:33
|
||||
let mut _6: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
let mut _7: bool; // in scope 0 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
let mut _9: Point; // in scope 0 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
let mut _2: (i32, bool); // in scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
let mut _4: [i32; 6]; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:13: +2:31
|
||||
let _5: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:32: +2:33
|
||||
let mut _6: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
let mut _7: bool; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
let mut _9: Point; // in scope 0 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let _3: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
let _3: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug y => _3; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
let _8: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug y => _3; // in scope 2 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
let _8: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug z => _8; // in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug z => _8; // in scope 3 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
- _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
+ _2 = const (4_i32, false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
- _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
+ _2 = const (4_i32, false); // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
+ _1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
|
||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
|
||||
StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
|
||||
_5 = const 3_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
|
||||
_6 = const 6_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
+ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
+ _1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:31
|
||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:31
|
||||
StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:+2:32: +2:33
|
||||
_5 = const 3_usize; // scope 1 at $DIR/optimizes_into_variable.rs:+2:32: +2:33
|
||||
_6 = const 6_usize; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
+ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
+ _3 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
|
||||
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
|
||||
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
Deinit(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
|
||||
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
|
||||
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
|
||||
nop; // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
|
||||
StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
|
||||
- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
+ _3 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:+2:34: +2:35
|
||||
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:+2:34: +2:35
|
||||
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
Deinit(_9); // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:38
|
||||
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:38
|
||||
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:+3:38: +3:39
|
||||
nop; // scope 0 at $DIR/optimizes_into_variable.rs:+0:11: +4:2
|
||||
StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,67 +2,67 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:11:11: 11:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let mut _2: (i32, bool); // in scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
let mut _4: [i32; 6]; // in scope 0 at $DIR/optimizes_into_variable.rs:13:13: 13:31
|
||||
let _5: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:13:32: 13:33
|
||||
let mut _6: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
let mut _7: bool; // in scope 0 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
let mut _9: Point; // in scope 0 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
let mut _2: (i32, bool); // in scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
let mut _4: [i32; 6]; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:13: +2:31
|
||||
let _5: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:32: +2:33
|
||||
let mut _6: usize; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
let mut _7: bool; // in scope 0 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
let mut _9: Point; // in scope 0 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let _3: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
let _3: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug y => _3; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
let _8: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug y => _3; // in scope 2 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
let _8: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug z => _8; // in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug z => _8; // in scope 3 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
- _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
+ _2 = const (4_i32, false); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
- _2 = CheckedAdd(const 2_i32, const 2_i32); // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
+ _2 = const (4_i32, false); // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> bb1; // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
+ _1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:12:13: 12:18
|
||||
StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
|
||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:31
|
||||
StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
|
||||
_5 = const 3_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:32: 13:33
|
||||
_6 = const 6_usize; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
+ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
- _1 = move (_2.0: i32); // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
+ _1 = const 4_i32; // scope 0 at $DIR/optimizes_into_variable.rs:+1:13: +1:18
|
||||
StorageLive(_3); // scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
StorageLive(_4); // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:31
|
||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32]; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:31
|
||||
StorageLive(_5); // scope 1 at $DIR/optimizes_into_variable.rs:+2:32: +2:33
|
||||
_5 = const 3_usize; // scope 1 at $DIR/optimizes_into_variable.rs:+2:32: +2:33
|
||||
_6 = const 6_usize; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
- _7 = Lt(_5, _6); // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
+ _7 = const true; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> bb2; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
}
|
||||
|
||||
bb2: {
|
||||
- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
+ _3 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:13:13: 13:34
|
||||
StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
|
||||
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:13:34: 13:35
|
||||
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
Deinit(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:36
|
||||
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
|
||||
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:14:13: 14:38
|
||||
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:14:38: 14:39
|
||||
nop; // scope 0 at $DIR/optimizes_into_variable.rs:11:11: 15:2
|
||||
StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
|
||||
- _3 = _4[_5]; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
+ _3 = const 3_i32; // scope 1 at $DIR/optimizes_into_variable.rs:+2:13: +2:34
|
||||
StorageDead(_5); // scope 1 at $DIR/optimizes_into_variable.rs:+2:34: +2:35
|
||||
StorageDead(_4); // scope 1 at $DIR/optimizes_into_variable.rs:+2:34: +2:35
|
||||
StorageLive(_8); // scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
StorageLive(_9); // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
Deinit(_9); // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
(_9.0: u32) = const 12_u32; // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
(_9.1: u32) = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:36
|
||||
- _8 = (_9.1: u32); // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:38
|
||||
+ _8 = const 42_u32; // scope 2 at $DIR/optimizes_into_variable.rs:+3:13: +3:38
|
||||
StorageDead(_9); // scope 2 at $DIR/optimizes_into_variable.rs:+3:38: +3:39
|
||||
nop; // scope 0 at $DIR/optimizes_into_variable.rs:+0:11: +4:2
|
||||
StorageDead(_8); // scope 2 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_3); // scope 1 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,27 +1,27 @@
|
||||
// MIR for `main` after SimplifyLocals
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:11:11: 11:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let _2: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
let _2: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
let _3: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug y => _2; // in scope 2 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
let _3: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug z => _3; // in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug z => _3; // in scope 3 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
@ -1,27 +1,27 @@
|
||||
// MIR for `main` after SimplifyLocals
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:11:11: 11:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let mut _0: (); // return place in scope 0 at $DIR/optimizes_into_variable.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
let _2: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
debug x => _1; // in scope 1 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
let _2: i32; // in scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
let _3: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug y => _2; // in scope 2 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
let _3: u32; // in scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug z => _3; // in scope 3 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
debug z => _3; // in scope 3 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:12:9: 12:10
|
||||
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:13:9: 13:10
|
||||
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:14:9: 14:10
|
||||
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:15:1: 15:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:15:2: 15:2
|
||||
StorageLive(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 1 at $DIR/optimizes_into_variable.rs:+2:9: +2:10
|
||||
StorageLive(_3); // scope 2 at $DIR/optimizes_into_variable.rs:+3:9: +3:10
|
||||
StorageDead(_3); // scope 2 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_2); // scope 1 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/optimizes_into_variable.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/optimizes_into_variable.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
@ -2,43 +2,43 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/read_immutable_static.rs:6:11: 6:11
|
||||
let _1: u8; // in scope 0 at $DIR/read_immutable_static.rs:7:9: 7:10
|
||||
let mut _2: u8; // in scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
let mut _3: &u8; // in scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
let mut _4: u8; // in scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
let mut _5: &u8; // in scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
let mut _0: (); // return place in scope 0 at $DIR/read_immutable_static.rs:+0:11: +0:11
|
||||
let _1: u8; // in scope 0 at $DIR/read_immutable_static.rs:+1:9: +1:10
|
||||
let mut _2: u8; // in scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
let mut _3: &u8; // in scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
let mut _4: u8; // in scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
let mut _5: &u8; // in scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/read_immutable_static.rs:7:9: 7:10
|
||||
debug x => _1; // in scope 1 at $DIR/read_immutable_static.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/read_immutable_static.rs:7:9: 7:10
|
||||
StorageLive(_2); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
StorageLive(_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
_3 = const {alloc1: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
StorageLive(_1); // scope 0 at $DIR/read_immutable_static.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
StorageLive(_3); // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
_3 = const {alloc1: &u8}; // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
// mir::Constant
|
||||
// + span: $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
// + literal: Const { ty: &u8, val: Value(Scalar(alloc1)) }
|
||||
- _2 = (*_3); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
+ _2 = const 2_u8; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:16
|
||||
StorageLive(_4); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
StorageLive(_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
_5 = const {alloc1: &u8}; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
- _2 = (*_3); // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
+ _2 = const 2_u8; // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
|
||||
StorageLive(_4); // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
StorageLive(_5); // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
_5 = const {alloc1: &u8}; // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
// mir::Constant
|
||||
// + span: $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
// + literal: Const { ty: &u8, val: Value(Scalar(alloc1)) }
|
||||
- _4 = (*_5); // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
- _1 = Add(move _2, move _4); // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22
|
||||
+ _4 = const 2_u8; // scope 0 at $DIR/read_immutable_static.rs:7:19: 7:22
|
||||
+ _1 = const 4_u8; // scope 0 at $DIR/read_immutable_static.rs:7:13: 7:22
|
||||
StorageDead(_4); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22
|
||||
StorageDead(_2); // scope 0 at $DIR/read_immutable_static.rs:7:21: 7:22
|
||||
StorageDead(_5); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23
|
||||
StorageDead(_3); // scope 0 at $DIR/read_immutable_static.rs:7:22: 7:23
|
||||
nop; // scope 0 at $DIR/read_immutable_static.rs:6:11: 8:2
|
||||
StorageDead(_1); // scope 0 at $DIR/read_immutable_static.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/read_immutable_static.rs:8:2: 8:2
|
||||
- _4 = (*_5); // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
- _1 = Add(move _2, move _4); // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:22
|
||||
+ _4 = const 2_u8; // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
|
||||
+ _1 = const 4_u8; // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:22
|
||||
StorageDead(_4); // scope 0 at $DIR/read_immutable_static.rs:+1:21: +1:22
|
||||
StorageDead(_2); // scope 0 at $DIR/read_immutable_static.rs:+1:21: +1:22
|
||||
StorageDead(_5); // scope 0 at $DIR/read_immutable_static.rs:+1:22: +1:23
|
||||
StorageDead(_3); // scope 0 at $DIR/read_immutable_static.rs:+1:22: +1:23
|
||||
nop; // scope 0 at $DIR/read_immutable_static.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/read_immutable_static.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/read_immutable_static.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,26 +2,26 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref.rs:4:11: 4:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
let _3: i32; // in scope 0 at $DIR/ref_deref.rs:5:8: 5:9
|
||||
let mut _4: &i32; // in scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
let _3: i32; // in scope 0 at $DIR/ref_deref.rs:+1:8: +1:9
|
||||
let mut _4: &i32; // in scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/ref_deref.rs:5:6: 5:10
|
||||
// + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_2 = _4; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
||||
nop; // scope 0 at $DIR/ref_deref.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/ref_deref.rs:6:2: 6:2
|
||||
_2 = _4; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
- _1 = (*_2); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
+ _1 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:+1:10: +1:11
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:+1:10: +1:11
|
||||
nop; // scope 0 at $DIR/ref_deref.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/ref_deref.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,29 +2,29 @@
|
||||
+ // MIR for `main` after PromoteTemps
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref.rs:4:11: 4:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
let _3: i32; // in scope 0 at $DIR/ref_deref.rs:5:8: 5:9
|
||||
+ let mut _4: &i32; // in scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
let _3: i32; // in scope 0 at $DIR/ref_deref.rs:+1:8: +1:9
|
||||
+ let mut _4: &i32; // in scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
- StorageLive(_3); // scope 0 at $DIR/ref_deref.rs:5:8: 5:9
|
||||
- _3 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:5:8: 5:9
|
||||
- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
- StorageLive(_3); // scope 0 at $DIR/ref_deref.rs:+1:8: +1:9
|
||||
- _3 = const 4_i32; // scope 0 at $DIR/ref_deref.rs:+1:8: +1:9
|
||||
- _2 = &_3; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/ref_deref.rs:5:6: 5:10
|
||||
+ // + literal: Const { ty: &i32, val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:5:6: 5:10
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:5:5: 5:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:5:10: 5:11
|
||||
_0 = const (); // scope 0 at $DIR/ref_deref.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/ref_deref.rs:6:2: 6:2
|
||||
+ _2 = &(*_4); // scope 0 at $DIR/ref_deref.rs:+1:6: +1:10
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref.rs:+1:5: +1:10
|
||||
- StorageDead(_3); // scope 0 at $DIR/ref_deref.rs:+1:10: +1:11
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref.rs:+1:10: +1:11
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref.rs:+1:10: +1:11
|
||||
_0 = const (); // scope 0 at $DIR/ref_deref.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/ref_deref.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,25 +2,25 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref_project.rs:4:11: 4:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
let _3: (i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14
|
||||
let mut _4: &(i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref_project.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref_project.rs:+1:5: +1:17
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
let _3: (i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:+1:8: +1:14
|
||||
let mut _4: &(i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref_project.rs:+1:5: +1:17
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
_4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
// + literal: Const { ty: &(i32, i32), val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||
nop; // scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2
|
||||
_2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:+1:5: +1:17
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:+1:17: +1:18
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:+1:17: +1:18
|
||||
nop; // scope 0 at $DIR/ref_deref_project.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/ref_deref_project.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,29 +2,29 @@
|
||||
+ // MIR for `main` after PromoteTemps
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref_project.rs:4:11: 4:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
let _3: (i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14
|
||||
+ let mut _4: &(i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
let mut _0: (); // return place in scope 0 at $DIR/ref_deref_project.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/ref_deref_project.rs:+1:5: +1:17
|
||||
let mut _2: &i32; // in scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
let _3: (i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:+1:8: +1:14
|
||||
+ let mut _4: &(i32, i32); // in scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
- StorageLive(_3); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14
|
||||
- _3 = (const 4_i32, const 5_i32); // scope 0 at $DIR/ref_deref_project.rs:5:8: 5:14
|
||||
- _2 = &(_3.1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
StorageLive(_1); // scope 0 at $DIR/ref_deref_project.rs:+1:5: +1:17
|
||||
StorageLive(_2); // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
- StorageLive(_3); // scope 0 at $DIR/ref_deref_project.rs:+1:8: +1:14
|
||||
- _3 = (const 4_i32, const 5_i32); // scope 0 at $DIR/ref_deref_project.rs:+1:8: +1:14
|
||||
- _2 = &(_3.1: i32); // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
+ _4 = const main::promoted[0]; // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
+ // mir::Constant
|
||||
+ // + span: $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
+ // + literal: Const { ty: &(i32, i32), val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:5:6: 5:17
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:5:5: 5:17
|
||||
- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:5:17: 5:18
|
||||
_0 = const (); // scope 0 at $DIR/ref_deref_project.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/ref_deref_project.rs:6:2: 6:2
|
||||
+ _2 = &((*_4).1: i32); // scope 0 at $DIR/ref_deref_project.rs:+1:6: +1:17
|
||||
_1 = (*_2); // scope 0 at $DIR/ref_deref_project.rs:+1:5: +1:17
|
||||
- StorageDead(_3); // scope 0 at $DIR/ref_deref_project.rs:+1:17: +1:18
|
||||
StorageDead(_2); // scope 0 at $DIR/ref_deref_project.rs:+1:17: +1:18
|
||||
StorageDead(_1); // scope 0 at $DIR/ref_deref_project.rs:+1:17: +1:18
|
||||
_0 = const (); // scope 0 at $DIR/ref_deref_project.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/ref_deref_project.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,28 +2,28 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/reify_fn_ptr.rs:3:11: 3:11
|
||||
let mut _1: *const fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
|
||||
let mut _2: usize; // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
|
||||
let mut _3: fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
|
||||
let mut _0: (); // return place in scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +0:11
|
||||
let mut _1: *const fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
|
||||
let mut _2: usize; // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
|
||||
let mut _3: fn(); // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
|
||||
scope 1 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
|
||||
StorageLive(_2); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
|
||||
StorageLive(_3); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
|
||||
_3 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:17
|
||||
StorageLive(_1); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
|
||||
StorageLive(_2); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
|
||||
StorageLive(_3); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
|
||||
_3 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/reify_fn_ptr.rs:4:13: 4:17
|
||||
// + literal: Const { ty: fn() {main}, val: Value(<ZST>) }
|
||||
_2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:26
|
||||
StorageDead(_3); // scope 0 at $DIR/reify_fn_ptr.rs:4:25: 4:26
|
||||
_1 = move _2 as *const fn() (PointerFromExposedAddress); // scope 0 at $DIR/reify_fn_ptr.rs:4:13: 4:41
|
||||
StorageDead(_2); // scope 0 at $DIR/reify_fn_ptr.rs:4:40: 4:41
|
||||
StorageDead(_1); // scope 0 at $DIR/reify_fn_ptr.rs:4:41: 4:42
|
||||
nop; // scope 0 at $DIR/reify_fn_ptr.rs:3:11: 5:2
|
||||
return; // scope 0 at $DIR/reify_fn_ptr.rs:5:2: 5:2
|
||||
_2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
|
||||
StorageDead(_3); // scope 0 at $DIR/reify_fn_ptr.rs:+1:25: +1:26
|
||||
_1 = move _2 as *const fn() (PointerFromExposedAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
|
||||
StorageDead(_2); // scope 0 at $DIR/reify_fn_ptr.rs:+1:40: +1:41
|
||||
StorageDead(_1); // scope 0 at $DIR/reify_fn_ptr.rs:+1:41: +1:42
|
||||
nop; // scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/reify_fn_ptr.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,42 +2,42 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/repeat.rs:5:11: 5:11
|
||||
let _1: u32; // in scope 0 at $DIR/repeat.rs:6:9: 6:10
|
||||
let mut _2: u32; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
let mut _3: [u32; 8]; // in scope 0 at $DIR/repeat.rs:6:18: 6:25
|
||||
let _4: usize; // in scope 0 at $DIR/repeat.rs:6:26: 6:27
|
||||
let mut _5: usize; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
let mut _6: bool; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
let mut _0: (); // return place in scope 0 at $DIR/repeat.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/repeat.rs:+1:9: +1:10
|
||||
let mut _2: u32; // in scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
let mut _3: [u32; 8]; // in scope 0 at $DIR/repeat.rs:+1:18: +1:25
|
||||
let _4: usize; // in scope 0 at $DIR/repeat.rs:+1:26: +1:27
|
||||
let mut _5: usize; // in scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
let mut _6: bool; // in scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/repeat.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/repeat.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/repeat.rs:6:9: 6:10
|
||||
StorageLive(_2); // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
StorageLive(_3); // scope 0 at $DIR/repeat.rs:6:18: 6:25
|
||||
_3 = [const 42_u32; 8]; // scope 0 at $DIR/repeat.rs:6:18: 6:25
|
||||
StorageLive(_4); // scope 0 at $DIR/repeat.rs:6:26: 6:27
|
||||
_4 = const 2_usize; // scope 0 at $DIR/repeat.rs:6:26: 6:27
|
||||
_5 = const 8_usize; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
- assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
+ _6 = const true; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
StorageLive(_1); // scope 0 at $DIR/repeat.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
StorageLive(_3); // scope 0 at $DIR/repeat.rs:+1:18: +1:25
|
||||
_3 = [const 42_u32; 8]; // scope 0 at $DIR/repeat.rs:+1:18: +1:25
|
||||
StorageLive(_4); // scope 0 at $DIR/repeat.rs:+1:26: +1:27
|
||||
_4 = const 2_usize; // scope 0 at $DIR/repeat.rs:+1:26: +1:27
|
||||
_5 = const 8_usize; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
- assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
+ _6 = const true; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
- _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32
|
||||
+ _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
+ _1 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:32
|
||||
StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32
|
||||
StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33
|
||||
StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33
|
||||
nop; // scope 0 at $DIR/repeat.rs:5:11: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/repeat.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/repeat.rs:7:2: 7:2
|
||||
- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
- _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:+1:18: +1:32
|
||||
+ _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
+ _1 = const 42_u32; // scope 0 at $DIR/repeat.rs:+1:18: +1:32
|
||||
StorageDead(_2); // scope 0 at $DIR/repeat.rs:+1:31: +1:32
|
||||
StorageDead(_4); // scope 0 at $DIR/repeat.rs:+1:32: +1:33
|
||||
StorageDead(_3); // scope 0 at $DIR/repeat.rs:+1:32: +1:33
|
||||
nop; // scope 0 at $DIR/repeat.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/repeat.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/repeat.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,42 +2,42 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/repeat.rs:5:11: 5:11
|
||||
let _1: u32; // in scope 0 at $DIR/repeat.rs:6:9: 6:10
|
||||
let mut _2: u32; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
let mut _3: [u32; 8]; // in scope 0 at $DIR/repeat.rs:6:18: 6:25
|
||||
let _4: usize; // in scope 0 at $DIR/repeat.rs:6:26: 6:27
|
||||
let mut _5: usize; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
let mut _6: bool; // in scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
let mut _0: (); // return place in scope 0 at $DIR/repeat.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/repeat.rs:+1:9: +1:10
|
||||
let mut _2: u32; // in scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
let mut _3: [u32; 8]; // in scope 0 at $DIR/repeat.rs:+1:18: +1:25
|
||||
let _4: usize; // in scope 0 at $DIR/repeat.rs:+1:26: +1:27
|
||||
let mut _5: usize; // in scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
let mut _6: bool; // in scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/repeat.rs:6:9: 6:10
|
||||
debug x => _1; // in scope 1 at $DIR/repeat.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/repeat.rs:6:9: 6:10
|
||||
StorageLive(_2); // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
StorageLive(_3); // scope 0 at $DIR/repeat.rs:6:18: 6:25
|
||||
_3 = [const 42_u32; 8]; // scope 0 at $DIR/repeat.rs:6:18: 6:25
|
||||
StorageLive(_4); // scope 0 at $DIR/repeat.rs:6:26: 6:27
|
||||
_4 = const 2_usize; // scope 0 at $DIR/repeat.rs:6:26: 6:27
|
||||
_5 = const 8_usize; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
- assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
+ _6 = const true; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
StorageLive(_1); // scope 0 at $DIR/repeat.rs:+1:9: +1:10
|
||||
StorageLive(_2); // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
StorageLive(_3); // scope 0 at $DIR/repeat.rs:+1:18: +1:25
|
||||
_3 = [const 42_u32; 8]; // scope 0 at $DIR/repeat.rs:+1:18: +1:25
|
||||
StorageLive(_4); // scope 0 at $DIR/repeat.rs:+1:26: +1:27
|
||||
_4 = const 2_usize; // scope 0 at $DIR/repeat.rs:+1:26: +1:27
|
||||
_5 = const 8_usize; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
- _6 = Lt(_4, _5); // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
- assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
+ _6 = const true; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
- _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:6:18: 6:32
|
||||
+ _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:28
|
||||
+ _1 = const 42_u32; // scope 0 at $DIR/repeat.rs:6:18: 6:32
|
||||
StorageDead(_2); // scope 0 at $DIR/repeat.rs:6:31: 6:32
|
||||
StorageDead(_4); // scope 0 at $DIR/repeat.rs:6:32: 6:33
|
||||
StorageDead(_3); // scope 0 at $DIR/repeat.rs:6:32: 6:33
|
||||
nop; // scope 0 at $DIR/repeat.rs:5:11: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/repeat.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/repeat.rs:7:2: 7:2
|
||||
- _2 = _3[_4]; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
- _1 = Add(move _2, const 0_u32); // scope 0 at $DIR/repeat.rs:+1:18: +1:32
|
||||
+ _2 = const 42_u32; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
|
||||
+ _1 = const 42_u32; // scope 0 at $DIR/repeat.rs:+1:18: +1:32
|
||||
StorageDead(_2); // scope 0 at $DIR/repeat.rs:+1:31: +1:32
|
||||
StorageDead(_4); // scope 0 at $DIR/repeat.rs:+1:32: +1:33
|
||||
StorageDead(_3); // scope 0 at $DIR/repeat.rs:+1:32: +1:33
|
||||
nop; // scope 0 at $DIR/repeat.rs:+0:11: +2:2
|
||||
StorageDead(_1); // scope 0 at $DIR/repeat.rs:+2:1: +2:2
|
||||
return; // scope 0 at $DIR/repeat.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,20 +2,20 @@
|
||||
+ // MIR for `add` after ConstProp
|
||||
|
||||
fn add() -> u32 {
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/return_place.rs:5:13: 5:16
|
||||
let mut _1: (u32, bool); // in scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/return_place.rs:+0:13: +0:16
|
||||
let mut _1: (u32, bool); // in scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
|
||||
bb0: {
|
||||
- _1 = CheckedAdd(const 2_u32, const 2_u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
- assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
+ _1 = const (4_u32, false); // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
- _1 = CheckedAdd(const 2_u32, const 2_u32); // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
- assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
+ _1 = const (4_u32, false); // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _0 = move (_1.0: u32); // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
+ _0 = const 4_u32; // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
return; // scope 0 at $DIR/return_place.rs:7:2: 7:2
|
||||
- _0 = move (_1.0: u32); // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
+ _0 = const 4_u32; // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
return; // scope 0 at $DIR/return_place.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
// MIR for `add` before PreCodegen
|
||||
|
||||
fn add() -> u32 {
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/return_place.rs:5:13: 5:16
|
||||
let mut _0: u32; // return place in scope 0 at $DIR/return_place.rs:+0:13: +0:16
|
||||
|
||||
bb0: {
|
||||
_0 = const 4_u32; // scope 0 at $DIR/return_place.rs:6:5: 6:10
|
||||
return; // scope 0 at $DIR/return_place.rs:7:2: 7:2
|
||||
_0 = const 4_u32; // scope 0 at $DIR/return_place.rs:+1:5: +1:10
|
||||
return; // scope 0 at $DIR/return_place.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/scalar_literal_propagation.rs:2:11: 2:11
|
||||
let _1: u32; // in scope 0 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
|
||||
let _2: (); // in scope 0 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
|
||||
let mut _3: u32; // in scope 0 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/scalar_literal_propagation.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/scalar_literal_propagation.rs:+1:9: +1:10
|
||||
let _2: (); // in scope 0 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
|
||||
let mut _3: u32; // in scope 0 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
|
||||
debug x => _1; // in scope 1 at $DIR/scalar_literal_propagation.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:3:9: 3:10
|
||||
_1 = const 1_u32; // scope 0 at $DIR/scalar_literal_propagation.rs:3:13: 3:14
|
||||
StorageLive(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
|
||||
StorageLive(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
|
||||
- _3 = _1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
|
||||
- _2 = consume(move _3) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
|
||||
+ _3 = const 1_u32; // scope 1 at $DIR/scalar_literal_propagation.rs:4:13: 4:14
|
||||
+ _2 = consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:4:5: 4:15
|
||||
StorageLive(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:+1:9: +1:10
|
||||
_1 = const 1_u32; // scope 0 at $DIR/scalar_literal_propagation.rs:+1:13: +1:14
|
||||
StorageLive(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
|
||||
StorageLive(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
|
||||
- _3 = _1; // scope 1 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
|
||||
- _2 = consume(move _3) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
|
||||
+ _3 = const 1_u32; // scope 1 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
|
||||
+ _2 = consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
|
||||
// mir::Constant
|
||||
// + span: $DIR/scalar_literal_propagation.rs:4:5: 4:12
|
||||
// + literal: Const { ty: fn(u32) {consume}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:4:14: 4:15
|
||||
StorageDead(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:4:15: 4:16
|
||||
nop; // scope 0 at $DIR/scalar_literal_propagation.rs:2:11: 5:2
|
||||
StorageDead(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:5:1: 5:2
|
||||
return; // scope 0 at $DIR/scalar_literal_propagation.rs:5:2: 5:2
|
||||
StorageDead(_3); // scope 1 at $DIR/scalar_literal_propagation.rs:+2:14: +2:15
|
||||
StorageDead(_2); // scope 1 at $DIR/scalar_literal_propagation.rs:+2:15: +2:16
|
||||
nop; // scope 0 at $DIR/scalar_literal_propagation.rs:+0:11: +3:2
|
||||
StorageDead(_1); // scope 0 at $DIR/scalar_literal_propagation.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/scalar_literal_propagation.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,52 +2,52 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/slice_len.rs:4:11: 4:11
|
||||
let _1: u32; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
let mut _2: &[u32]; // in scope 0 at $DIR/slice_len.rs:5:5: 5:30
|
||||
let mut _3: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let _4: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let _5: [u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:7: 5:19
|
||||
let _6: usize; // in scope 0 at $DIR/slice_len.rs:5:31: 5:32
|
||||
let mut _7: usize; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
let mut _8: bool; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let mut _10: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let mut _0: (); // return place in scope 0 at $DIR/slice_len.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
let mut _2: &[u32]; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:30
|
||||
let mut _3: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
let _4: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
let _5: [u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:7: +1:19
|
||||
let _6: usize; // in scope 0 at $DIR/slice_len.rs:+1:31: +1:32
|
||||
let mut _7: usize; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
let mut _8: bool; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
let mut _10: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
StorageLive(_2); // scope 0 at $DIR/slice_len.rs:5:5: 5:30
|
||||
StorageLive(_3); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageLive(_1); // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
StorageLive(_2); // scope 0 at $DIR/slice_len.rs:+1:5: +1:30
|
||||
StorageLive(_3); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/slice_len.rs:5:6: 5:19
|
||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageLive(_10); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_10 = _3; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19
|
||||
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32
|
||||
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32
|
||||
_7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
StorageDead(_10); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
StorageLive(_10); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_10 = _3; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:+1:18: +1:19
|
||||
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:+1:31: +1:32
|
||||
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:+1:31: +1:32
|
||||
_7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
StorageDead(_10); // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
StorageDead(_6); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
StorageDead(_1); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
nop; // scope 0 at $DIR/slice_len.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/slice_len.rs:6:2: 6:2
|
||||
- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
StorageDead(_6); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
StorageDead(_1); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
nop; // scope 0 at $DIR/slice_len.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/slice_len.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,52 +2,52 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/slice_len.rs:4:11: 4:11
|
||||
let _1: u32; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
let mut _2: &[u32]; // in scope 0 at $DIR/slice_len.rs:5:5: 5:30
|
||||
let mut _3: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let _4: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let _5: [u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:7: 5:19
|
||||
let _6: usize; // in scope 0 at $DIR/slice_len.rs:5:31: 5:32
|
||||
let mut _7: usize; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
let mut _8: bool; // in scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let mut _10: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
let mut _0: (); // return place in scope 0 at $DIR/slice_len.rs:+0:11: +0:11
|
||||
let _1: u32; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
let mut _2: &[u32]; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:30
|
||||
let mut _3: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
let _4: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
let _5: [u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:7: +1:19
|
||||
let _6: usize; // in scope 0 at $DIR/slice_len.rs:+1:31: +1:32
|
||||
let mut _7: usize; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
let mut _8: bool; // in scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
let mut _9: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
let mut _10: &[u32; 3]; // in scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
StorageLive(_2); // scope 0 at $DIR/slice_len.rs:5:5: 5:30
|
||||
StorageLive(_3); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageLive(_1); // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
StorageLive(_2); // scope 0 at $DIR/slice_len.rs:+1:5: +1:30
|
||||
StorageLive(_3); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_9 = const main::promoted[0]; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/slice_len.rs:5:6: 5:19
|
||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageLive(_10); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_10 = _3; // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:5:6: 5:19
|
||||
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:5:18: 5:19
|
||||
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:5:31: 5:32
|
||||
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:5:31: 5:32
|
||||
_7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
StorageDead(_10); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
_4 = _9; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_3 = _4; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
StorageLive(_10); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_10 = _3; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_2 = move _3 as &[u32] (Pointer(Unsize)); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
StorageDead(_3); // scope 0 at $DIR/slice_len.rs:+1:18: +1:19
|
||||
StorageLive(_6); // scope 0 at $DIR/slice_len.rs:+1:31: +1:32
|
||||
_6 = const 1_usize; // scope 0 at $DIR/slice_len.rs:+1:31: +1:32
|
||||
_7 = const 3_usize; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
StorageDead(_10); // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
- _8 = Lt(_6, _7); // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
- assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
+ _8 = const true; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 1_usize) -> bb1; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
}
|
||||
|
||||
bb1: {
|
||||
- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/slice_len.rs:5:5: 5:33
|
||||
StorageDead(_6); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
StorageDead(_1); // scope 0 at $DIR/slice_len.rs:5:33: 5:34
|
||||
nop; // scope 0 at $DIR/slice_len.rs:4:11: 6:2
|
||||
return; // scope 0 at $DIR/slice_len.rs:6:2: 6:2
|
||||
- _1 = (*_2)[_6]; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
+ _1 = const 2_u32; // scope 0 at $DIR/slice_len.rs:+1:5: +1:33
|
||||
StorageDead(_6); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
StorageDead(_4); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
StorageDead(_2); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
StorageDead(_1); // scope 0 at $DIR/slice_len.rs:+1:33: +1:34
|
||||
nop; // scope 0 at $DIR/slice_len.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/slice_len.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,33 +2,33 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/switch_int.rs:6:11: 6:11
|
||||
let mut _1: i32; // in scope 0 at $DIR/switch_int.rs:7:11: 7:12
|
||||
let mut _0: (); // return place in scope 0 at $DIR/switch_int.rs:+0:11: +0:11
|
||||
let mut _1: i32; // in scope 0 at $DIR/switch_int.rs:+1:11: +1:12
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12
|
||||
_1 = const 1_i32; // scope 0 at $DIR/switch_int.rs:7:11: 7:12
|
||||
- switchInt(_1) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:7:5: 7:12
|
||||
+ switchInt(const 1_i32) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:7:5: 7:12
|
||||
StorageLive(_1); // scope 0 at $DIR/switch_int.rs:+1:11: +1:12
|
||||
_1 = const 1_i32; // scope 0 at $DIR/switch_int.rs:+1:11: +1:12
|
||||
- switchInt(_1) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:+1:5: +1:12
|
||||
+ switchInt(const 1_i32) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:+1:5: +1:12
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = foo(const -1_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:9:14: 9:21
|
||||
_0 = foo(const -1_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:+3:14: +3:21
|
||||
// mir::Constant
|
||||
// + span: $DIR/switch_int.rs:9:14: 9:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = foo(const 0_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:8:14: 8:20
|
||||
_0 = foo(const 0_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:+2:14: +2:20
|
||||
// mir::Constant
|
||||
// + span: $DIR/switch_int.rs:8:14: 8:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_1); // scope 0 at $DIR/switch_int.rs:11:1: 11:2
|
||||
return; // scope 0 at $DIR/switch_int.rs:11:2: 11:2
|
||||
StorageDead(_1); // scope 0 at $DIR/switch_int.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/switch_int.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,33 +2,33 @@
|
||||
+ // MIR for `main` after SimplifyConstCondition-after-const-prop
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/switch_int.rs:6:11: 6:11
|
||||
let mut _1: i32; // in scope 0 at $DIR/switch_int.rs:7:11: 7:12
|
||||
let mut _0: (); // return place in scope 0 at $DIR/switch_int.rs:+0:11: +0:11
|
||||
let mut _1: i32; // in scope 0 at $DIR/switch_int.rs:+1:11: +1:12
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/switch_int.rs:7:11: 7:12
|
||||
_1 = const 1_i32; // scope 0 at $DIR/switch_int.rs:7:11: 7:12
|
||||
- switchInt(const 1_i32) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:7:5: 7:12
|
||||
+ goto -> bb2; // scope 0 at $DIR/switch_int.rs:7:5: 7:12
|
||||
StorageLive(_1); // scope 0 at $DIR/switch_int.rs:+1:11: +1:12
|
||||
_1 = const 1_i32; // scope 0 at $DIR/switch_int.rs:+1:11: +1:12
|
||||
- switchInt(const 1_i32) -> [1_i32: bb2, otherwise: bb1]; // scope 0 at $DIR/switch_int.rs:+1:5: +1:12
|
||||
+ goto -> bb2; // scope 0 at $DIR/switch_int.rs:+1:5: +1:12
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = foo(const -1_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:9:14: 9:21
|
||||
_0 = foo(const -1_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:+3:14: +3:21
|
||||
// mir::Constant
|
||||
// + span: $DIR/switch_int.rs:9:14: 9:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_0 = foo(const 0_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:8:14: 8:20
|
||||
_0 = foo(const 0_i32) -> bb3; // scope 0 at $DIR/switch_int.rs:+2:14: +2:20
|
||||
// mir::Constant
|
||||
// + span: $DIR/switch_int.rs:8:14: 8:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_1); // scope 0 at $DIR/switch_int.rs:11:1: 11:2
|
||||
return; // scope 0 at $DIR/switch_int.rs:11:2: 11:2
|
||||
StorageDead(_1); // scope 0 at $DIR/switch_int.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/switch_int.rs:+5:2: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,35 +2,35 @@
|
||||
+ // MIR for `main` after ConstProp
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/tuple_literal_propagation.rs:2:11: 2:11
|
||||
let _1: (u32, u32); // in scope 0 at $DIR/tuple_literal_propagation.rs:3:9: 3:10
|
||||
let _2: (); // in scope 0 at $DIR/tuple_literal_propagation.rs:5:5: 5:15
|
||||
let mut _3: (u32, u32); // in scope 0 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/tuple_literal_propagation.rs:+0:11: +0:11
|
||||
let _1: (u32, u32); // in scope 0 at $DIR/tuple_literal_propagation.rs:+1:9: +1:10
|
||||
let _2: (); // in scope 0 at $DIR/tuple_literal_propagation.rs:+3:5: +3:15
|
||||
let mut _3: (u32, u32); // in scope 0 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/tuple_literal_propagation.rs:3:9: 3:10
|
||||
debug x => _1; // in scope 1 at $DIR/tuple_literal_propagation.rs:+1:9: +1:10
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:9: 3:10
|
||||
Deinit(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
(_1.0: u32) = const 1_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
(_1.1: u32) = const 2_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:3:13: 3:19
|
||||
StorageLive(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15
|
||||
StorageLive(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
|
||||
- _3 = _1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
|
||||
+ _3 = const (1_u32, 2_u32); // scope 1 at $DIR/tuple_literal_propagation.rs:5:13: 5:14
|
||||
_2 = consume(move _3) -> bb1; // scope 1 at $DIR/tuple_literal_propagation.rs:5:5: 5:15
|
||||
StorageLive(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:+1:9: +1:10
|
||||
Deinit(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:+1:13: +1:19
|
||||
(_1.0: u32) = const 1_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:+1:13: +1:19
|
||||
(_1.1: u32) = const 2_u32; // scope 0 at $DIR/tuple_literal_propagation.rs:+1:13: +1:19
|
||||
StorageLive(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:+3:5: +3:15
|
||||
StorageLive(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
|
||||
- _3 = _1; // scope 1 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
|
||||
+ _3 = const (1_u32, 2_u32); // scope 1 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
|
||||
_2 = consume(move _3) -> bb1; // scope 1 at $DIR/tuple_literal_propagation.rs:+3:5: +3:15
|
||||
// mir::Constant
|
||||
// + span: $DIR/tuple_literal_propagation.rs:5:5: 5:12
|
||||
// + literal: Const { ty: fn((u32, u32)) {consume}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:5:14: 5:15
|
||||
StorageDead(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:5:15: 5:16
|
||||
nop; // scope 0 at $DIR/tuple_literal_propagation.rs:2:11: 6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:6:1: 6:2
|
||||
return; // scope 0 at $DIR/tuple_literal_propagation.rs:6:2: 6:2
|
||||
StorageDead(_3); // scope 1 at $DIR/tuple_literal_propagation.rs:+3:14: +3:15
|
||||
StorageDead(_2); // scope 1 at $DIR/tuple_literal_propagation.rs:+3:15: +3:16
|
||||
nop; // scope 0 at $DIR/tuple_literal_propagation.rs:+0:11: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/tuple_literal_propagation.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/tuple_literal_propagation.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,41 +2,41 @@
|
||||
+ // MIR for `bar` after ConstProp
|
||||
|
||||
fn bar() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_prop_miscompile.rs:11:10: 11:10
|
||||
let mut _1: (i32,); // in scope 0 at $DIR/const_prop_miscompile.rs:12:9: 12:14
|
||||
let _2: (); // in scope 0 at $DIR/const_prop_miscompile.rs:13:5: 15:6
|
||||
let mut _3: *mut i32; // in scope 0 at $DIR/const_prop_miscompile.rs:14:10: 14:22
|
||||
let mut _5: i32; // in scope 0 at $DIR/const_prop_miscompile.rs:16:13: 16:20
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +0:10
|
||||
let mut _1: (i32,); // in scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
||||
let _2: (); // in scope 0 at $DIR/const_prop_miscompile.rs:+2:5: +4:6
|
||||
let mut _3: *mut i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
|
||||
let mut _5: i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+5:13: +5:20
|
||||
scope 1 {
|
||||
debug v => _1; // in scope 1 at $DIR/const_prop_miscompile.rs:12:9: 12:14
|
||||
let _4: bool; // in scope 1 at $DIR/const_prop_miscompile.rs:16:9: 16:10
|
||||
debug v => _1; // in scope 1 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
||||
let _4: bool; // in scope 1 at $DIR/const_prop_miscompile.rs:+5:9: +5:10
|
||||
scope 2 {
|
||||
}
|
||||
scope 3 {
|
||||
debug y => _4; // in scope 3 at $DIR/const_prop_miscompile.rs:16:9: 16:10
|
||||
debug y => _4; // in scope 3 at $DIR/const_prop_miscompile.rs:+5:9: +5:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:9: 12:14
|
||||
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
|
||||
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:12:17: 12:21
|
||||
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:13:5: 15:6
|
||||
StorageLive(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
|
||||
_3 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:14:10: 14:22
|
||||
(*_3) = const 5_i32; // scope 2 at $DIR/const_prop_miscompile.rs:14:9: 14:26
|
||||
StorageDead(_3); // scope 2 at $DIR/const_prop_miscompile.rs:14:26: 14:27
|
||||
nop; // scope 2 at $DIR/const_prop_miscompile.rs:13:5: 15:6
|
||||
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:15:5: 15:6
|
||||
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:16:9: 16:10
|
||||
StorageLive(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:20
|
||||
_5 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:15: 16:18
|
||||
_4 = Eq(move _5, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:16:13: 16:25
|
||||
StorageDead(_5); // scope 1 at $DIR/const_prop_miscompile.rs:16:24: 16:25
|
||||
nop; // scope 0 at $DIR/const_prop_miscompile.rs:11:10: 17:2
|
||||
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:17:1: 17:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:17:1: 17:2
|
||||
return; // scope 0 at $DIR/const_prop_miscompile.rs:17:2: 17:2
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
||||
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
|
||||
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
|
||||
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:+2:5: +4:6
|
||||
StorageLive(_3); // scope 2 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
|
||||
_3 = &raw mut (_1.0: i32); // scope 2 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
|
||||
(*_3) = const 5_i32; // scope 2 at $DIR/const_prop_miscompile.rs:+3:9: +3:26
|
||||
StorageDead(_3); // scope 2 at $DIR/const_prop_miscompile.rs:+3:26: +3:27
|
||||
nop; // scope 2 at $DIR/const_prop_miscompile.rs:+2:5: +4:6
|
||||
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:+4:5: +4:6
|
||||
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+5:9: +5:10
|
||||
StorageLive(_5); // scope 1 at $DIR/const_prop_miscompile.rs:+5:13: +5:20
|
||||
_5 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:+5:15: +5:18
|
||||
_4 = Eq(move _5, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:+5:13: +5:25
|
||||
StorageDead(_5); // scope 1 at $DIR/const_prop_miscompile.rs:+5:24: +5:25
|
||||
nop; // scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +6:2
|
||||
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+6:1: +6:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+6:1: +6:2
|
||||
return; // scope 0 at $DIR/const_prop_miscompile.rs:+6:2: +6:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,35 +2,35 @@
|
||||
+ // MIR for `foo` after ConstProp
|
||||
|
||||
fn foo() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_prop_miscompile.rs:4:10: 4:10
|
||||
let mut _1: (i32,); // in scope 0 at $DIR/const_prop_miscompile.rs:5:9: 5:14
|
||||
let mut _2: &mut i32; // in scope 0 at $DIR/const_prop_miscompile.rs:6:6: 6:14
|
||||
let mut _4: i32; // in scope 0 at $DIR/const_prop_miscompile.rs:7:13: 7:20
|
||||
let mut _0: (); // return place in scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +0:10
|
||||
let mut _1: (i32,); // in scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
||||
let mut _2: &mut i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
|
||||
let mut _4: i32; // in scope 0 at $DIR/const_prop_miscompile.rs:+3:13: +3:20
|
||||
scope 1 {
|
||||
debug u => _1; // in scope 1 at $DIR/const_prop_miscompile.rs:5:9: 5:14
|
||||
let _3: bool; // in scope 1 at $DIR/const_prop_miscompile.rs:7:9: 7:10
|
||||
debug u => _1; // in scope 1 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
||||
let _3: bool; // in scope 1 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
|
||||
scope 2 {
|
||||
debug y => _3; // in scope 2 at $DIR/const_prop_miscompile.rs:7:9: 7:10
|
||||
debug y => _3; // in scope 2 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:9: 5:14
|
||||
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
|
||||
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:5:17: 5:21
|
||||
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
|
||||
_2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:6:6: 6:14
|
||||
(*_2) = const 5_i32; // scope 1 at $DIR/const_prop_miscompile.rs:6:5: 6:18
|
||||
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:6:18: 6:19
|
||||
StorageLive(_3); // scope 1 at $DIR/const_prop_miscompile.rs:7:9: 7:10
|
||||
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:20
|
||||
_4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:15: 7:18
|
||||
_3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:7:13: 7:25
|
||||
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:7:24: 7:25
|
||||
nop; // scope 0 at $DIR/const_prop_miscompile.rs:4:10: 8:2
|
||||
StorageDead(_3); // scope 1 at $DIR/const_prop_miscompile.rs:8:1: 8:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:8:1: 8:2
|
||||
return; // scope 0 at $DIR/const_prop_miscompile.rs:8:2: 8:2
|
||||
StorageLive(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
|
||||
Deinit(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
|
||||
(_1.0: i32) = const 1_i32; // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
|
||||
StorageLive(_2); // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
|
||||
_2 = &mut (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
|
||||
(*_2) = const 5_i32; // scope 1 at $DIR/const_prop_miscompile.rs:+2:5: +2:18
|
||||
StorageDead(_2); // scope 1 at $DIR/const_prop_miscompile.rs:+2:18: +2:19
|
||||
StorageLive(_3); // scope 1 at $DIR/const_prop_miscompile.rs:+3:9: +3:10
|
||||
StorageLive(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+3:13: +3:20
|
||||
_4 = (_1.0: i32); // scope 1 at $DIR/const_prop_miscompile.rs:+3:15: +3:18
|
||||
_3 = Eq(move _4, const 5_i32); // scope 1 at $DIR/const_prop_miscompile.rs:+3:13: +3:25
|
||||
StorageDead(_4); // scope 1 at $DIR/const_prop_miscompile.rs:+3:24: +3:25
|
||||
nop; // scope 0 at $DIR/const_prop_miscompile.rs:+0:10: +4:2
|
||||
StorageDead(_3); // scope 1 at $DIR/const_prop_miscompile.rs:+4:1: +4:2
|
||||
StorageDead(_1); // scope 0 at $DIR/const_prop_miscompile.rs:+4:1: +4:2
|
||||
return; // scope 0 at $DIR/const_prop_miscompile.rs:+4:2: +4:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,74 +2,74 @@
|
||||
+ // MIR for `cycle` after DeadStoreElimination
|
||||
|
||||
fn cycle(_1: i32, _2: i32, _3: i32) -> () {
|
||||
debug x => _1; // in scope 0 at $DIR/cycle.rs:9:10: 9:15
|
||||
debug y => _2; // in scope 0 at $DIR/cycle.rs:9:22: 9:27
|
||||
debug z => _3; // in scope 0 at $DIR/cycle.rs:9:34: 9:39
|
||||
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:9:46: 9:46
|
||||
let mut _4: (); // in scope 0 at $DIR/cycle.rs:9:1: 18:2
|
||||
let mut _5: bool; // in scope 0 at $DIR/cycle.rs:12:11: 12:17
|
||||
let _6: i32; // in scope 0 at $DIR/cycle.rs:13:13: 13:17
|
||||
let mut _7: i32; // in scope 0 at $DIR/cycle.rs:14:13: 14:14
|
||||
let mut _8: i32; // in scope 0 at $DIR/cycle.rs:15:13: 15:14
|
||||
let mut _9: i32; // in scope 0 at $DIR/cycle.rs:16:13: 16:17
|
||||
let mut _10: !; // in scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
let _11: (); // in scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
let mut _12: !; // in scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
debug x => _1; // in scope 0 at $DIR/cycle.rs:+0:10: +0:15
|
||||
debug y => _2; // in scope 0 at $DIR/cycle.rs:+0:22: +0:27
|
||||
debug z => _3; // in scope 0 at $DIR/cycle.rs:+0:34: +0:39
|
||||
let mut _0: (); // return place in scope 0 at $DIR/cycle.rs:+0:46: +0:46
|
||||
let mut _4: (); // in scope 0 at $DIR/cycle.rs:+0:1: +9:2
|
||||
let mut _5: bool; // in scope 0 at $DIR/cycle.rs:+3:11: +3:17
|
||||
let _6: i32; // in scope 0 at $DIR/cycle.rs:+4:13: +4:17
|
||||
let mut _7: i32; // in scope 0 at $DIR/cycle.rs:+5:13: +5:14
|
||||
let mut _8: i32; // in scope 0 at $DIR/cycle.rs:+6:13: +6:14
|
||||
let mut _9: i32; // in scope 0 at $DIR/cycle.rs:+7:13: +7:17
|
||||
let mut _10: !; // in scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
let _11: (); // in scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
let mut _12: !; // in scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
scope 1 {
|
||||
debug temp => _6; // in scope 1 at $DIR/cycle.rs:13:13: 13:17
|
||||
debug temp => _6; // in scope 1 at $DIR/cycle.rs:+4:13: +4:17
|
||||
}
|
||||
|
||||
bb0: {
|
||||
goto -> bb1; // scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
goto -> bb1; // scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_5); // scope 0 at $DIR/cycle.rs:12:11: 12:17
|
||||
_5 = cond() -> bb2; // scope 0 at $DIR/cycle.rs:12:11: 12:17
|
||||
StorageLive(_5); // scope 0 at $DIR/cycle.rs:+3:11: +3:17
|
||||
_5 = cond() -> bb2; // scope 0 at $DIR/cycle.rs:+3:11: +3:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:12:11: 12:15
|
||||
// + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
switchInt(move _5) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/cycle.rs:12:11: 12:17
|
||||
switchInt(move _5) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/cycle.rs:+3:11: +3:17
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageLive(_6); // scope 0 at $DIR/cycle.rs:13:13: 13:17
|
||||
- _6 = _3; // scope 0 at $DIR/cycle.rs:13:20: 13:21
|
||||
+ nop; // scope 0 at $DIR/cycle.rs:13:20: 13:21
|
||||
StorageLive(_7); // scope 1 at $DIR/cycle.rs:14:13: 14:14
|
||||
- _7 = _2; // scope 1 at $DIR/cycle.rs:14:13: 14:14
|
||||
- _3 = move _7; // scope 1 at $DIR/cycle.rs:14:9: 14:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:14:13: 14:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:14:9: 14:14
|
||||
StorageDead(_7); // scope 1 at $DIR/cycle.rs:14:13: 14:14
|
||||
StorageLive(_8); // scope 1 at $DIR/cycle.rs:15:13: 15:14
|
||||
- _8 = _1; // scope 1 at $DIR/cycle.rs:15:13: 15:14
|
||||
- _2 = move _8; // scope 1 at $DIR/cycle.rs:15:9: 15:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:15:13: 15:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:15:9: 15:14
|
||||
StorageDead(_8); // scope 1 at $DIR/cycle.rs:15:13: 15:14
|
||||
StorageLive(_9); // scope 1 at $DIR/cycle.rs:16:13: 16:17
|
||||
- _9 = _6; // scope 1 at $DIR/cycle.rs:16:13: 16:17
|
||||
- _1 = move _9; // scope 1 at $DIR/cycle.rs:16:9: 16:17
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:16:13: 16:17
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:16:9: 16:17
|
||||
StorageDead(_9); // scope 1 at $DIR/cycle.rs:16:16: 16:17
|
||||
- _4 = const (); // scope 0 at $DIR/cycle.rs:12:18: 17:6
|
||||
+ nop; // scope 0 at $DIR/cycle.rs:12:18: 17:6
|
||||
StorageDead(_6); // scope 0 at $DIR/cycle.rs:17:5: 17:6
|
||||
StorageDead(_5); // scope 0 at $DIR/cycle.rs:17:5: 17:6
|
||||
goto -> bb1; // scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
StorageLive(_6); // scope 0 at $DIR/cycle.rs:+4:13: +4:17
|
||||
- _6 = _3; // scope 0 at $DIR/cycle.rs:+4:20: +4:21
|
||||
+ nop; // scope 0 at $DIR/cycle.rs:+4:20: +4:21
|
||||
StorageLive(_7); // scope 1 at $DIR/cycle.rs:+5:13: +5:14
|
||||
- _7 = _2; // scope 1 at $DIR/cycle.rs:+5:13: +5:14
|
||||
- _3 = move _7; // scope 1 at $DIR/cycle.rs:+5:9: +5:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:+5:13: +5:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:+5:9: +5:14
|
||||
StorageDead(_7); // scope 1 at $DIR/cycle.rs:+5:13: +5:14
|
||||
StorageLive(_8); // scope 1 at $DIR/cycle.rs:+6:13: +6:14
|
||||
- _8 = _1; // scope 1 at $DIR/cycle.rs:+6:13: +6:14
|
||||
- _2 = move _8; // scope 1 at $DIR/cycle.rs:+6:9: +6:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:+6:13: +6:14
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:+6:9: +6:14
|
||||
StorageDead(_8); // scope 1 at $DIR/cycle.rs:+6:13: +6:14
|
||||
StorageLive(_9); // scope 1 at $DIR/cycle.rs:+7:13: +7:17
|
||||
- _9 = _6; // scope 1 at $DIR/cycle.rs:+7:13: +7:17
|
||||
- _1 = move _9; // scope 1 at $DIR/cycle.rs:+7:9: +7:17
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:+7:13: +7:17
|
||||
+ nop; // scope 1 at $DIR/cycle.rs:+7:9: +7:17
|
||||
StorageDead(_9); // scope 1 at $DIR/cycle.rs:+7:16: +7:17
|
||||
- _4 = const (); // scope 0 at $DIR/cycle.rs:+3:18: +8:6
|
||||
+ nop; // scope 0 at $DIR/cycle.rs:+3:18: +8:6
|
||||
StorageDead(_6); // scope 0 at $DIR/cycle.rs:+8:5: +8:6
|
||||
StorageDead(_5); // scope 0 at $DIR/cycle.rs:+8:5: +8:6
|
||||
goto -> bb1; // scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_11); // scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
_0 = const (); // scope 0 at $DIR/cycle.rs:12:5: 17:6
|
||||
StorageDead(_11); // scope 0 at $DIR/cycle.rs:17:5: 17:6
|
||||
StorageDead(_5); // scope 0 at $DIR/cycle.rs:17:5: 17:6
|
||||
return; // scope 0 at $DIR/cycle.rs:18:2: 18:2
|
||||
StorageLive(_11); // scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
_0 = const (); // scope 0 at $DIR/cycle.rs:+3:5: +8:6
|
||||
StorageDead(_11); // scope 0 at $DIR/cycle.rs:+8:5: +8:6
|
||||
StorageDead(_5); // scope 0 at $DIR/cycle.rs:+8:5: +8:6
|
||||
return; // scope 0 at $DIR/cycle.rs:+9:2: +9:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `pointer_to_int` after DeadStoreElimination
|
||||
|
||||
fn pointer_to_int(_1: *mut i32) -> () {
|
||||
debug p => _1; // in scope 0 at $DIR/provenance_soundness.rs:7:19: 7:20
|
||||
let mut _0: (); // return place in scope 0 at $DIR/provenance_soundness.rs:7:32: 7:32
|
||||
let _2: usize; // in scope 0 at $DIR/provenance_soundness.rs:8:9: 8:11
|
||||
let mut _3: *mut i32; // in scope 0 at $DIR/provenance_soundness.rs:8:14: 8:15
|
||||
let mut _5: *mut i32; // in scope 0 at $DIR/provenance_soundness.rs:9:14: 9:15
|
||||
debug p => _1; // in scope 0 at $DIR/provenance_soundness.rs:+0:19: +0:20
|
||||
let mut _0: (); // return place in scope 0 at $DIR/provenance_soundness.rs:+0:32: +0:32
|
||||
let _2: usize; // in scope 0 at $DIR/provenance_soundness.rs:+1:9: +1:11
|
||||
let mut _3: *mut i32; // in scope 0 at $DIR/provenance_soundness.rs:+1:14: +1:15
|
||||
let mut _5: *mut i32; // in scope 0 at $DIR/provenance_soundness.rs:+2:14: +2:15
|
||||
scope 1 {
|
||||
debug _x => _2; // in scope 1 at $DIR/provenance_soundness.rs:8:9: 8:11
|
||||
let _4: isize; // in scope 1 at $DIR/provenance_soundness.rs:9:9: 9:11
|
||||
debug _x => _2; // in scope 1 at $DIR/provenance_soundness.rs:+1:9: +1:11
|
||||
let _4: isize; // in scope 1 at $DIR/provenance_soundness.rs:+2:9: +2:11
|
||||
scope 2 {
|
||||
debug _y => _4; // in scope 2 at $DIR/provenance_soundness.rs:9:9: 9:11
|
||||
debug _y => _4; // in scope 2 at $DIR/provenance_soundness.rs:+2:9: +2:11
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/provenance_soundness.rs:8:9: 8:11
|
||||
StorageLive(_3); // scope 0 at $DIR/provenance_soundness.rs:8:14: 8:15
|
||||
_3 = _1; // scope 0 at $DIR/provenance_soundness.rs:8:14: 8:15
|
||||
_2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/provenance_soundness.rs:8:14: 8:24
|
||||
StorageDead(_3); // scope 0 at $DIR/provenance_soundness.rs:8:23: 8:24
|
||||
StorageLive(_4); // scope 1 at $DIR/provenance_soundness.rs:9:9: 9:11
|
||||
StorageLive(_5); // scope 1 at $DIR/provenance_soundness.rs:9:14: 9:15
|
||||
_5 = _1; // scope 1 at $DIR/provenance_soundness.rs:9:14: 9:15
|
||||
_4 = move _5 as isize (PointerExposeAddress); // scope 1 at $DIR/provenance_soundness.rs:9:14: 9:24
|
||||
StorageDead(_5); // scope 1 at $DIR/provenance_soundness.rs:9:23: 9:24
|
||||
_0 = const (); // scope 0 at $DIR/provenance_soundness.rs:7:32: 10:2
|
||||
StorageDead(_4); // scope 1 at $DIR/provenance_soundness.rs:10:1: 10:2
|
||||
StorageDead(_2); // scope 0 at $DIR/provenance_soundness.rs:10:1: 10:2
|
||||
return; // scope 0 at $DIR/provenance_soundness.rs:10:2: 10:2
|
||||
StorageLive(_2); // scope 0 at $DIR/provenance_soundness.rs:+1:9: +1:11
|
||||
StorageLive(_3); // scope 0 at $DIR/provenance_soundness.rs:+1:14: +1:15
|
||||
_3 = _1; // scope 0 at $DIR/provenance_soundness.rs:+1:14: +1:15
|
||||
_2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/provenance_soundness.rs:+1:14: +1:24
|
||||
StorageDead(_3); // scope 0 at $DIR/provenance_soundness.rs:+1:23: +1:24
|
||||
StorageLive(_4); // scope 1 at $DIR/provenance_soundness.rs:+2:9: +2:11
|
||||
StorageLive(_5); // scope 1 at $DIR/provenance_soundness.rs:+2:14: +2:15
|
||||
_5 = _1; // scope 1 at $DIR/provenance_soundness.rs:+2:14: +2:15
|
||||
_4 = move _5 as isize (PointerExposeAddress); // scope 1 at $DIR/provenance_soundness.rs:+2:14: +2:24
|
||||
StorageDead(_5); // scope 1 at $DIR/provenance_soundness.rs:+2:23: +2:24
|
||||
_0 = const (); // scope 0 at $DIR/provenance_soundness.rs:+0:32: +3:2
|
||||
StorageDead(_4); // scope 1 at $DIR/provenance_soundness.rs:+3:1: +3:2
|
||||
StorageDead(_2); // scope 0 at $DIR/provenance_soundness.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/provenance_soundness.rs:+3:2: +3:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,13 +2,13 @@
|
||||
+ // MIR for `retags` after DeadStoreElimination
|
||||
|
||||
fn retags(_1: &mut i32) -> () {
|
||||
debug _r => _1; // in scope 0 at $DIR/provenance_soundness.rs:13:11: 13:13
|
||||
let mut _0: (); // return place in scope 0 at $DIR/provenance_soundness.rs:13:25: 13:25
|
||||
debug _r => _1; // in scope 0 at $DIR/provenance_soundness.rs:+0:11: +0:13
|
||||
let mut _0: (); // return place in scope 0 at $DIR/provenance_soundness.rs:+0:25: +0:25
|
||||
|
||||
bb0: {
|
||||
Retag([fn entry] _1); // scope 0 at $DIR/provenance_soundness.rs:13:1: 13:27
|
||||
_0 = const (); // scope 0 at $DIR/provenance_soundness.rs:13:25: 13:27
|
||||
return; // scope 0 at $DIR/provenance_soundness.rs:13:27: 13:27
|
||||
Retag([fn entry] _1); // scope 0 at $DIR/provenance_soundness.rs:+0:1: +0:27
|
||||
_0 = const (); // scope 0 at $DIR/provenance_soundness.rs:+0:25: +0:27
|
||||
return; // scope 0 at $DIR/provenance_soundness.rs:+0:27: +0:27
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,20 +2,20 @@
|
||||
+ // MIR for `bar` after Deaggregator
|
||||
|
||||
fn bar(_1: usize) -> Baz {
|
||||
debug a => _1; // in scope 0 at $DIR/deaggregator_test.rs:8:8: 8:9
|
||||
let mut _0: Baz; // return place in scope 0 at $DIR/deaggregator_test.rs:8:21: 8:24
|
||||
let mut _2: usize; // in scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15
|
||||
debug a => _1; // in scope 0 at $DIR/deaggregator_test.rs:+0:8: +0:9
|
||||
let mut _0: Baz; // return place in scope 0 at $DIR/deaggregator_test.rs:+0:21: +0:24
|
||||
let mut _2: usize; // in scope 0 at $DIR/deaggregator_test.rs:+1:14: +1:15
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15
|
||||
_2 = _1; // scope 0 at $DIR/deaggregator_test.rs:9:14: 9:15
|
||||
- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
|
||||
+ (_0.0: usize) = move _2; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
|
||||
+ (_0.1: f32) = const 0f32; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
|
||||
+ (_0.2: bool) = const false; // scope 0 at $DIR/deaggregator_test.rs:9:5: 9:35
|
||||
StorageDead(_2); // scope 0 at $DIR/deaggregator_test.rs:9:34: 9:35
|
||||
return; // scope 0 at $DIR/deaggregator_test.rs:10:2: 10:2
|
||||
StorageLive(_2); // scope 0 at $DIR/deaggregator_test.rs:+1:14: +1:15
|
||||
_2 = _1; // scope 0 at $DIR/deaggregator_test.rs:+1:14: +1:15
|
||||
- _0 = Baz { x: move _2, y: const 0f32, z: const false }; // scope 0 at $DIR/deaggregator_test.rs:+1:5: +1:35
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test.rs:+1:5: +1:35
|
||||
+ (_0.0: usize) = move _2; // scope 0 at $DIR/deaggregator_test.rs:+1:5: +1:35
|
||||
+ (_0.1: f32) = const 0f32; // scope 0 at $DIR/deaggregator_test.rs:+1:5: +1:35
|
||||
+ (_0.2: bool) = const false; // scope 0 at $DIR/deaggregator_test.rs:+1:5: +1:35
|
||||
StorageDead(_2); // scope 0 at $DIR/deaggregator_test.rs:+1:34: +1:35
|
||||
return; // scope 0 at $DIR/deaggregator_test.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,19 +2,19 @@
|
||||
+ // MIR for `bar` after Deaggregator
|
||||
|
||||
fn bar(_1: usize) -> Baz {
|
||||
debug a => _1; // in scope 0 at $DIR/deaggregator_test_enum.rs:7:8: 7:9
|
||||
let mut _0: Baz; // return place in scope 0 at $DIR/deaggregator_test_enum.rs:7:21: 7:24
|
||||
let mut _2: usize; // in scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20
|
||||
debug a => _1; // in scope 0 at $DIR/deaggregator_test_enum.rs:+0:8: +0:9
|
||||
let mut _0: Baz; // return place in scope 0 at $DIR/deaggregator_test_enum.rs:+0:21: +0:24
|
||||
let mut _2: usize; // in scope 0 at $DIR/deaggregator_test_enum.rs:+1:19: +1:20
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20
|
||||
_2 = _1; // scope 0 at $DIR/deaggregator_test_enum.rs:8:19: 8:20
|
||||
- _0 = Baz::Foo { x: move _2 }; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
|
||||
+ ((_0 as Foo).0: usize) = move _2; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
|
||||
+ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum.rs:8:5: 8:22
|
||||
StorageDead(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:8:21: 8:22
|
||||
return; // scope 0 at $DIR/deaggregator_test_enum.rs:9:2: 9:2
|
||||
StorageLive(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:+1:19: +1:20
|
||||
_2 = _1; // scope 0 at $DIR/deaggregator_test_enum.rs:+1:19: +1:20
|
||||
- _0 = Baz::Foo { x: move _2 }; // scope 0 at $DIR/deaggregator_test_enum.rs:+1:5: +1:22
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum.rs:+1:5: +1:22
|
||||
+ ((_0 as Foo).0: usize) = move _2; // scope 0 at $DIR/deaggregator_test_enum.rs:+1:5: +1:22
|
||||
+ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum.rs:+1:5: +1:22
|
||||
StorageDead(_2); // scope 0 at $DIR/deaggregator_test_enum.rs:+1:21: +1:22
|
||||
return; // scope 0 at $DIR/deaggregator_test_enum.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,44 +2,44 @@
|
||||
+ // MIR for `test1` after Deaggregator
|
||||
|
||||
fn test1(_1: bool, _2: i32) -> Foo {
|
||||
debug x => _1; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:9:10: 9:11
|
||||
debug y => _2; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:9:19: 9:20
|
||||
let mut _0: Foo; // return place in scope 0 at $DIR/deaggregator_test_enum_2.rs:9:30: 9:33
|
||||
let mut _3: bool; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
|
||||
let mut _4: i32; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
|
||||
let mut _5: i32; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
|
||||
debug x => _1; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:+0:10: +0:11
|
||||
debug y => _2; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:+0:19: +0:20
|
||||
let mut _0: Foo; // return place in scope 0 at $DIR/deaggregator_test_enum_2.rs:+0:30: +0:33
|
||||
let mut _3: bool; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:+1:8: +1:9
|
||||
let mut _4: i32; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:16: +2:17
|
||||
let mut _5: i32; // in scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:16: +4:17
|
||||
|
||||
bb0: {
|
||||
StorageLive(_3); // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
|
||||
_3 = _1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
|
||||
switchInt(move _3) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:8: 10:9
|
||||
StorageLive(_3); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+1:8: +1:9
|
||||
_3 = _1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+1:8: +1:9
|
||||
switchInt(move _3) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+1:8: +1:9
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
|
||||
_4 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:16: 11:17
|
||||
- _0 = Foo::A(move _4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
|
||||
+ ((_0 as A).0: i32) = move _4; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
|
||||
+ discriminant(_0) = 0; // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:9: 11:18
|
||||
StorageDead(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:11:17: 11:18
|
||||
goto -> bb3; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6
|
||||
StorageLive(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:16: +2:17
|
||||
_4 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:16: +2:17
|
||||
- _0 = Foo::A(move _4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:9: +2:18
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:9: +2:18
|
||||
+ ((_0 as A).0: i32) = move _4; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:9: +2:18
|
||||
+ discriminant(_0) = 0; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:9: +2:18
|
||||
StorageDead(_4); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+2:17: +2:18
|
||||
goto -> bb3; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+1:5: +5:6
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
|
||||
_5 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:16: 13:17
|
||||
- _0 = Foo::B(move _5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
|
||||
+ ((_0 as B).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
|
||||
+ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:9: 13:18
|
||||
StorageDead(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:13:17: 13:18
|
||||
goto -> bb3; // scope 0 at $DIR/deaggregator_test_enum_2.rs:10:5: 14:6
|
||||
StorageLive(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:16: +4:17
|
||||
_5 = _2; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:16: +4:17
|
||||
- _0 = Foo::B(move _5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:9: +4:18
|
||||
+ Deinit(_0); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:9: +4:18
|
||||
+ ((_0 as B).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:9: +4:18
|
||||
+ discriminant(_0) = 1; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:9: +4:18
|
||||
StorageDead(_5); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+4:17: +4:18
|
||||
goto -> bb3; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+1:5: +5:6
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_3); // scope 0 at $DIR/deaggregator_test_enum_2.rs:14:5: 14:6
|
||||
return; // scope 0 at $DIR/deaggregator_test_enum_2.rs:15:2: 15:2
|
||||
StorageDead(_3); // scope 0 at $DIR/deaggregator_test_enum_2.rs:+5:5: +5:6
|
||||
return; // scope 0 at $DIR/deaggregator_test_enum_2.rs:+6:2: +6:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `test` after Deaggregator
|
||||
|
||||
fn test(_1: i32) -> [Foo; 2] {
|
||||
debug x => _1; // in scope 0 at $DIR/deaggregator_test_multiple.rs:9:9: 9:10
|
||||
let mut _0: [Foo; 2]; // return place in scope 0 at $DIR/deaggregator_test_multiple.rs:9:20: 9:28
|
||||
let mut _2: Foo; // in scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
|
||||
let mut _3: i32; // in scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
|
||||
let mut _4: Foo; // in scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
|
||||
let mut _5: i32; // in scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
|
||||
debug x => _1; // in scope 0 at $DIR/deaggregator_test_multiple.rs:+0:9: +0:10
|
||||
let mut _0: [Foo; 2]; // return place in scope 0 at $DIR/deaggregator_test_multiple.rs:+0:20: +0:28
|
||||
let mut _2: Foo; // in scope 0 at $DIR/deaggregator_test_multiple.rs:+1:6: +1:15
|
||||
let mut _3: i32; // in scope 0 at $DIR/deaggregator_test_multiple.rs:+1:13: +1:14
|
||||
let mut _4: Foo; // in scope 0 at $DIR/deaggregator_test_multiple.rs:+1:17: +1:26
|
||||
let mut _5: i32; // in scope 0 at $DIR/deaggregator_test_multiple.rs:+1:24: +1:25
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
|
||||
StorageLive(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
|
||||
_3 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:13: 10:14
|
||||
- _2 = Foo::A(move _3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
|
||||
+ Deinit(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
|
||||
+ ((_2 as A).0: i32) = move _3; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
|
||||
+ discriminant(_2) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:6: 10:15
|
||||
StorageDead(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:14: 10:15
|
||||
StorageLive(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
|
||||
StorageLive(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
|
||||
_5 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:24: 10:25
|
||||
- _4 = Foo::A(move _5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
|
||||
+ Deinit(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
|
||||
+ ((_4 as A).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
|
||||
+ discriminant(_4) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:17: 10:26
|
||||
StorageDead(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:25: 10:26
|
||||
_0 = [move _2, move _4]; // scope 0 at $DIR/deaggregator_test_multiple.rs:10:5: 10:27
|
||||
StorageDead(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27
|
||||
StorageDead(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:10:26: 10:27
|
||||
return; // scope 0 at $DIR/deaggregator_test_multiple.rs:11:2: 11:2
|
||||
StorageLive(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:6: +1:15
|
||||
StorageLive(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:13: +1:14
|
||||
_3 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:13: +1:14
|
||||
- _2 = Foo::A(move _3); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:6: +1:15
|
||||
+ Deinit(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:6: +1:15
|
||||
+ ((_2 as A).0: i32) = move _3; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:6: +1:15
|
||||
+ discriminant(_2) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:6: +1:15
|
||||
StorageDead(_3); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:14: +1:15
|
||||
StorageLive(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:17: +1:26
|
||||
StorageLive(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:24: +1:25
|
||||
_5 = _1; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:24: +1:25
|
||||
- _4 = Foo::A(move _5); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:17: +1:26
|
||||
+ Deinit(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:17: +1:26
|
||||
+ ((_4 as A).0: i32) = move _5; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:17: +1:26
|
||||
+ discriminant(_4) = 0; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:17: +1:26
|
||||
StorageDead(_5); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:25: +1:26
|
||||
_0 = [move _2, move _4]; // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:5: +1:27
|
||||
StorageDead(_4); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:26: +1:27
|
||||
StorageDead(_2); // scope 0 at $DIR/deaggregator_test_multiple.rs:+1:26: +1:27
|
||||
return; // scope 0 at $DIR/deaggregator_test_multiple.rs:+2:2: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
+ // MIR for `is_line_doc_comment_2` after DeduplicateBlocks
|
||||
|
||||
fn is_line_doc_comment_2(_1: &str) -> bool {
|
||||
debug s => _1; // in scope 0 at $DIR/deduplicate_blocks.rs:2:36: 2:37
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/deduplicate_blocks.rs:2:48: 2:52
|
||||
let mut _2: &[u8]; // in scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
|
||||
let mut _3: &str; // in scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
|
||||
let mut _4: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
|
||||
let mut _5: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
|
||||
let mut _6: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
|
||||
let mut _7: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
|
||||
debug s => _1; // in scope 0 at $DIR/deduplicate_blocks.rs:+0:36: +0:37
|
||||
let mut _0: bool; // return place in scope 0 at $DIR/deduplicate_blocks.rs:+0:48: +0:52
|
||||
let mut _2: &[u8]; // in scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
let mut _3: &str; // in scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
let mut _4: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:+3:9: +3:31
|
||||
let mut _5: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:+3:9: +3:31
|
||||
let mut _6: usize; // in scope 0 at $DIR/deduplicate_blocks.rs:+2:9: +2:37
|
||||
let mut _7: bool; // in scope 0 at $DIR/deduplicate_blocks.rs:+2:9: +2:37
|
||||
scope 1 (inlined core::str::<impl str>::as_bytes) { // at $DIR/deduplicate_blocks.rs:3:11: 3:23
|
||||
debug self => _3; // in scope 1 at $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
let mut _8: &str; // in scope 1 at $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
@ -18,9 +18,9 @@
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_2); // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
|
||||
StorageLive(_3); // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
|
||||
_3 = _1; // scope 0 at $DIR/deduplicate_blocks.rs:3:11: 3:23
|
||||
StorageLive(_2); // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
StorageLive(_3); // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
_3 = _1; // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
StorageLive(_8); // scope 2 at $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
_8 = _3; // scope 2 at $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
- _2 = transmute::<&str, &[u8]>(move _8) -> bb14; // scope 2 at $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
@ -31,77 +31,77 @@
|
||||
}
|
||||
|
||||
bb1: {
|
||||
switchInt((*_2)[0 of 4]) -> [47_u8: bb2, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
switchInt((*_2)[0 of 4]) -> [47_u8: bb2, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb2: {
|
||||
switchInt((*_2)[1 of 4]) -> [47_u8: bb3, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
switchInt((*_2)[1 of 4]) -> [47_u8: bb3, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb3: {
|
||||
switchInt((*_2)[2 of 4]) -> [47_u8: bb4, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
switchInt((*_2)[2 of 4]) -> [47_u8: bb4, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb4: {
|
||||
- switchInt((*_2)[3 of 4]) -> [47_u8: bb10, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
+ switchInt((*_2)[3 of 4]) -> [47_u8: bb9, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
- switchInt((*_2)[3 of 4]) -> [47_u8: bb10, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
+ switchInt((*_2)[3 of 4]) -> [47_u8: bb9, otherwise: bb5]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb5: {
|
||||
_4 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
|
||||
_5 = Ge(move _4, const 3_usize); // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
|
||||
switchInt(move _5) -> [false: bb9, otherwise: bb6]; // scope 0 at $DIR/deduplicate_blocks.rs:5:9: 5:31
|
||||
_4 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:+3:9: +3:31
|
||||
_5 = Ge(move _4, const 3_usize); // scope 0 at $DIR/deduplicate_blocks.rs:+3:9: +3:31
|
||||
switchInt(move _5) -> [false: bb9, otherwise: bb6]; // scope 0 at $DIR/deduplicate_blocks.rs:+3:9: +3:31
|
||||
}
|
||||
|
||||
bb6: {
|
||||
switchInt((*_2)[0 of 3]) -> [47_u8: bb7, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
switchInt((*_2)[0 of 3]) -> [47_u8: bb7, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb7: {
|
||||
switchInt((*_2)[1 of 3]) -> [47_u8: bb8, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
switchInt((*_2)[1 of 3]) -> [47_u8: bb8, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb8: {
|
||||
- switchInt((*_2)[2 of 3]) -> [47_u8: bb11, 33_u8: bb12, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
+ switchInt((*_2)[2 of 3]) -> [47_u8: bb10, 33_u8: bb10, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:3:5: 3:23
|
||||
- switchInt((*_2)[2 of 3]) -> [47_u8: bb11, 33_u8: bb12, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
+ switchInt((*_2)[2 of 3]) -> [47_u8: bb10, 33_u8: bb10, otherwise: bb9]; // scope 0 at $DIR/deduplicate_blocks.rs:+1:5: +1:23
|
||||
}
|
||||
|
||||
bb9: {
|
||||
- _0 = const false; // scope 0 at $DIR/deduplicate_blocks.rs:7:14: 7:19
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:7:14: 7:19
|
||||
- _0 = const false; // scope 0 at $DIR/deduplicate_blocks.rs:+5:14: +5:19
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:+5:14: +5:19
|
||||
- }
|
||||
-
|
||||
- bb10: {
|
||||
_0 = const false; // scope 0 at $DIR/deduplicate_blocks.rs:4:41: 4:46
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:4:41: 4:46
|
||||
+ goto -> bb11; // scope 0 at $DIR/deduplicate_blocks.rs:4:41: 4:46
|
||||
_0 = const false; // scope 0 at $DIR/deduplicate_blocks.rs:+2:41: +2:46
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:+2:41: +2:46
|
||||
+ goto -> bb11; // scope 0 at $DIR/deduplicate_blocks.rs:+2:41: +2:46
|
||||
}
|
||||
|
||||
- bb11: {
|
||||
- _0 = const true; // scope 0 at $DIR/deduplicate_blocks.rs:5:35: 5:39
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:5:35: 5:39
|
||||
- _0 = const true; // scope 0 at $DIR/deduplicate_blocks.rs:+3:35: +3:39
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:+3:35: +3:39
|
||||
- }
|
||||
-
|
||||
- bb12: {
|
||||
+ bb10: {
|
||||
_0 = const true; // scope 0 at $DIR/deduplicate_blocks.rs:6:35: 6:39
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:6:35: 6:39
|
||||
+ goto -> bb11; // scope 0 at $DIR/deduplicate_blocks.rs:6:35: 6:39
|
||||
_0 = const true; // scope 0 at $DIR/deduplicate_blocks.rs:+4:35: +4:39
|
||||
- goto -> bb13; // scope 0 at $DIR/deduplicate_blocks.rs:+4:35: +4:39
|
||||
+ goto -> bb11; // scope 0 at $DIR/deduplicate_blocks.rs:+4:35: +4:39
|
||||
}
|
||||
|
||||
- bb13: {
|
||||
+ bb11: {
|
||||
StorageDead(_2); // scope 0 at $DIR/deduplicate_blocks.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/deduplicate_blocks.rs:9:2: 9:2
|
||||
StorageDead(_2); // scope 0 at $DIR/deduplicate_blocks.rs:+7:1: +7:2
|
||||
return; // scope 0 at $DIR/deduplicate_blocks.rs:+7:2: +7:2
|
||||
}
|
||||
|
||||
- bb14: {
|
||||
+ bb12: {
|
||||
StorageDead(_8); // scope 2 at $SRC_DIR/core/src/str/mod.rs:LL:COL
|
||||
StorageDead(_3); // scope 0 at $DIR/deduplicate_blocks.rs:3:22: 3:23
|
||||
_6 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
|
||||
_7 = Ge(move _6, const 4_usize); // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
|
||||
switchInt(move _7) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/deduplicate_blocks.rs:4:9: 4:37
|
||||
StorageDead(_3); // scope 0 at $DIR/deduplicate_blocks.rs:+1:22: +1:23
|
||||
_6 = Len((*_2)); // scope 0 at $DIR/deduplicate_blocks.rs:+2:9: +2:37
|
||||
_7 = Ge(move _6, const 4_usize); // scope 0 at $DIR/deduplicate_blocks.rs:+2:9: +2:37
|
||||
switchInt(move _7) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/deduplicate_blocks.rs:+2:9: +2:37
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,110 +2,110 @@
|
||||
+ // MIR for `main` after Derefer
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_complex_case.rs:4:11: 4:11
|
||||
let mut _1: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _2: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let _3: [i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:5:18: 5:26
|
||||
let mut _4: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _5: (); // in scope 0 at $DIR/derefer_complex_case.rs:4:1: 6:2
|
||||
let _6: (); // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _7: std::option::Option<&i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _8: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _9: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _10: isize; // in scope 0 at $DIR/derefer_complex_case.rs:5:5: 5:40
|
||||
let mut _11: !; // in scope 0 at $DIR/derefer_complex_case.rs:5:5: 5:40
|
||||
let mut _13: i32; // in scope 0 at $DIR/derefer_complex_case.rs:5:34: 5:37
|
||||
let mut _14: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
+ let mut _15: &i32; // in scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_complex_case.rs:+0:11: +0:11
|
||||
let mut _1: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _2: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let _3: [i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:+1:18: +1:26
|
||||
let mut _4: std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _5: (); // in scope 0 at $DIR/derefer_complex_case.rs:+0:1: +2:2
|
||||
let _6: (); // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _7: std::option::Option<&i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _8: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _9: &mut std::slice::Iter<i32>; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let mut _10: isize; // in scope 0 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
let mut _11: !; // in scope 0 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
let mut _13: i32; // in scope 0 at $DIR/derefer_complex_case.rs:+1:34: +1:37
|
||||
let mut _14: &[i32; 2]; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
+ let mut _15: &i32; // in scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
scope 1 {
|
||||
debug iter => _4; // in scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
let _12: i32; // in scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
debug iter => _4; // in scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
let _12: i32; // in scope 1 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
scope 2 {
|
||||
debug foo => _12; // in scope 2 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
debug foo => _12; // in scope 2 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageLive(_2); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_14 = const main::promoted[0]; // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
StorageLive(_2); // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_14 = const main::promoted[0]; // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
// + literal: Const { ty: &[i32; 2], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_2 = &(*_14); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_1 = <&[i32; 2] as IntoIterator>::into_iter(move _2) -> bb1; // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_2 = &(*_14); // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_1 = <&[i32; 2] as IntoIterator>::into_iter(move _2) -> bb1; // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
// + literal: Const { ty: fn(&[i32; 2]) -> <&[i32; 2] as IntoIterator>::IntoIter {<&[i32; 2] as IntoIterator>::into_iter}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageDead(_2); // scope 0 at $DIR/derefer_complex_case.rs:5:25: 5:26
|
||||
StorageLive(_4); // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_4 = move _1; // scope 0 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
|
||||
StorageDead(_2); // scope 0 at $DIR/derefer_complex_case.rs:+1:25: +1:26
|
||||
StorageLive(_4); // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_4 = move _1; // scope 0 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_6); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageLive(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageLive(_8); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageLive(_9); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_9 = &mut _4; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_8 = &mut (*_9); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
_7 = <std::slice::Iter<i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageLive(_6); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
StorageLive(_7); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
StorageLive(_8); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
StorageLive(_9); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_9 = &mut _4; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_8 = &mut (*_9); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
_7 = <std::slice::Iter<i32> as Iterator>::next(move _8) -> bb3; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
// + literal: Const { ty: for<'r> fn(&'r mut std::slice::Iter<i32>) -> Option<<std::slice::Iter<i32> as Iterator>::Item> {<std::slice::Iter<i32> as Iterator>::next}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_8); // scope 1 at $DIR/derefer_complex_case.rs:5:25: 5:26
|
||||
_10 = discriminant(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
switchInt(move _10) -> [0_isize: bb6, 1_isize: bb4, otherwise: bb5]; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
StorageDead(_8); // scope 1 at $DIR/derefer_complex_case.rs:+1:25: +1:26
|
||||
_10 = discriminant(_7); // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
switchInt(move _10) -> [0_isize: bb6, 1_isize: bb4, otherwise: bb5]; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_12); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
- _12 = (*((_7 as Some).0: &i32)); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
+ StorageLive(_15); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
+ _15 = deref_copy ((_7 as Some).0: &i32); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
+ _12 = (*_15); // scope 1 at $DIR/derefer_complex_case.rs:5:10: 5:13
|
||||
+ StorageDead(_15); // scope 2 at $DIR/derefer_complex_case.rs:5:34: 5:37
|
||||
StorageLive(_13); // scope 2 at $DIR/derefer_complex_case.rs:5:34: 5:37
|
||||
_13 = _12; // scope 2 at $DIR/derefer_complex_case.rs:5:34: 5:37
|
||||
_6 = std::mem::drop::<i32>(move _13) -> bb7; // scope 2 at $DIR/derefer_complex_case.rs:5:29: 5:38
|
||||
StorageLive(_12); // scope 1 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
- _12 = (*((_7 as Some).0: &i32)); // scope 1 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
+ StorageLive(_15); // scope 1 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
+ _15 = deref_copy ((_7 as Some).0: &i32); // scope 1 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
+ _12 = (*_15); // scope 1 at $DIR/derefer_complex_case.rs:+1:10: +1:13
|
||||
+ StorageDead(_15); // scope 2 at $DIR/derefer_complex_case.rs:+1:34: +1:37
|
||||
StorageLive(_13); // scope 2 at $DIR/derefer_complex_case.rs:+1:34: +1:37
|
||||
_13 = _12; // scope 2 at $DIR/derefer_complex_case.rs:+1:34: +1:37
|
||||
_6 = std::mem::drop::<i32>(move _13) -> bb7; // scope 2 at $DIR/derefer_complex_case.rs:+1:29: +1:38
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_complex_case.rs:5:29: 5:33
|
||||
// + literal: Const { ty: fn(i32) {std::mem::drop::<i32>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
unreachable; // scope 1 at $DIR/derefer_complex_case.rs:5:17: 5:26
|
||||
unreachable; // scope 1 at $DIR/derefer_complex_case.rs:+1:17: +1:26
|
||||
}
|
||||
|
||||
bb6: {
|
||||
_0 = const (); // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
|
||||
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_4); // scope 0 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
return; // scope 0 at $DIR/derefer_complex_case.rs:6:2: 6:2
|
||||
_0 = const (); // scope 1 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_4); // scope 0 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
return; // scope 0 at $DIR/derefer_complex_case.rs:+2:2: +2:2
|
||||
}
|
||||
|
||||
bb7: {
|
||||
StorageDead(_13); // scope 2 at $DIR/derefer_complex_case.rs:5:37: 5:38
|
||||
StorageDead(_12); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:5:39: 5:40
|
||||
_5 = const (); // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
|
||||
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:5:5: 5:40
|
||||
StorageDead(_13); // scope 2 at $DIR/derefer_complex_case.rs:+1:37: +1:38
|
||||
StorageDead(_12); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_9); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_7); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
StorageDead(_6); // scope 1 at $DIR/derefer_complex_case.rs:+1:39: +1:40
|
||||
_5 = const (); // scope 1 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
goto -> bb2; // scope 1 at $DIR/derefer_complex_case.rs:+1:5: +1:40
|
||||
+ }
|
||||
+
|
||||
+ bb8 (cleanup): {
|
||||
+ resume; // scope 0 at $DIR/derefer_complex_case.rs:4:1: 6:2
|
||||
+ resume; // scope 0 at $DIR/derefer_complex_case.rs:+0:1: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,60 +2,60 @@
|
||||
+ // MIR for `main` after Derefer
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_inline_test.rs:9:11: 9:11
|
||||
let _1: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
let mut _2: usize; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
let mut _3: usize; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
let mut _4: *mut u8; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
let mut _5: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_inline_test.rs:+0:11: +0:11
|
||||
let _1: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
let mut _2: usize; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
let mut _3: usize; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
let mut _4: *mut u8; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
let mut _5: std::boxed::Box<std::boxed::Box<u32>>; // in scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
scope 1 {
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
_2 = SizeOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
_3 = AlignOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
_2 = SizeOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
_3 = AlignOf(std::boxed::Box<u32>); // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
_4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
// + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_5); // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
_5 = ShallowInitBox(move _4, std::boxed::Box<u32>); // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
(*_5) = f() -> [return: bb2, unwind: bb6]; // scope 0 at $DIR/derefer_inline_test.rs:10:9: 10:12
|
||||
StorageLive(_5); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
_5 = ShallowInitBox(move _4, std::boxed::Box<u32>); // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
(*_5) = f() -> [return: bb2, unwind: bb6]; // scope 0 at $DIR/derefer_inline_test.rs:+1:9: +1:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_inline_test.rs:10:9: 10:10
|
||||
// + literal: Const { ty: fn() -> Box<u32> {f}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_1 = move _5; // scope 0 at $DIR/derefer_inline_test.rs:10:5: 10:12
|
||||
drop(_5) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
|
||||
_1 = move _5; // scope 0 at $DIR/derefer_inline_test.rs:+1:5: +1:12
|
||||
drop(_5) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12
|
||||
}
|
||||
|
||||
bb3: {
|
||||
StorageDead(_5); // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
|
||||
drop(_1) -> bb4; // scope 0 at $DIR/derefer_inline_test.rs:10:12: 10:13
|
||||
StorageDead(_5); // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12
|
||||
drop(_1) -> bb4; // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_inline_test.rs:10:12: 10:13
|
||||
_0 = const (); // scope 0 at $DIR/derefer_inline_test.rs:9:11: 11:2
|
||||
return; // scope 0 at $DIR/derefer_inline_test.rs:11:2: 11:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13
|
||||
_0 = const (); // scope 0 at $DIR/derefer_inline_test.rs:+0:11: +2:2
|
||||
return; // scope 0 at $DIR/derefer_inline_test.rs:+2:2: +2:2
|
||||
}
|
||||
|
||||
bb5 (cleanup): {
|
||||
drop(_1) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:10:12: 10:13
|
||||
drop(_1) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:+1:12: +1:13
|
||||
}
|
||||
|
||||
bb6 (cleanup): {
|
||||
drop(_5) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:10:11: 10:12
|
||||
drop(_5) -> bb7; // scope 0 at $DIR/derefer_inline_test.rs:+1:11: +1:12
|
||||
}
|
||||
|
||||
bb7 (cleanup): {
|
||||
resume; // scope 0 at $DIR/derefer_inline_test.rs:9:1: 11:2
|
||||
resume; // scope 0 at $DIR/derefer_inline_test.rs:+0:1: +2:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,102 +2,102 @@
|
||||
+ // MIR for `main` after Derefer
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_terminator_test.rs:4:11: 4:11
|
||||
let _1: bool; // in scope 0 at $DIR/derefer_terminator_test.rs:5:9: 5:10
|
||||
let _3: (); // in scope 0 at $DIR/derefer_terminator_test.rs:7:5: 10:6
|
||||
let mut _4: &&&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
||||
let _5: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:17: 7:21
|
||||
let _6: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:18: 7:21
|
||||
let _7: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:19: 7:21
|
||||
+ let mut _10: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
||||
+ let mut _11: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
||||
+ let mut _12: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_terminator_test.rs:+0:11: +0:11
|
||||
let _1: bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+1:9: +1:10
|
||||
let _3: (); // in scope 0 at $DIR/derefer_terminator_test.rs:+3:5: +6:6
|
||||
let mut _4: &&&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:15: +3:22
|
||||
let _5: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:17: +3:21
|
||||
let _6: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:18: +3:21
|
||||
let _7: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:19: +3:21
|
||||
+ let mut _10: &&&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:15: +3:22
|
||||
+ let mut _11: &&bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:15: +3:22
|
||||
+ let mut _12: &bool; // in scope 0 at $DIR/derefer_terminator_test.rs:+3:15: +3:22
|
||||
scope 1 {
|
||||
debug b => _1; // in scope 1 at $DIR/derefer_terminator_test.rs:5:9: 5:10
|
||||
let _2: bool; // in scope 1 at $DIR/derefer_terminator_test.rs:6:9: 6:10
|
||||
debug b => _1; // in scope 1 at $DIR/derefer_terminator_test.rs:+1:9: +1:10
|
||||
let _2: bool; // in scope 1 at $DIR/derefer_terminator_test.rs:+2:9: +2:10
|
||||
scope 2 {
|
||||
debug d => _2; // in scope 2 at $DIR/derefer_terminator_test.rs:6:9: 6:10
|
||||
let _8: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:8:22: 8:23
|
||||
let _9: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:11:9: 11:10
|
||||
debug d => _2; // in scope 2 at $DIR/derefer_terminator_test.rs:+2:9: +2:10
|
||||
let _8: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:+4:22: +4:23
|
||||
let _9: i32; // in scope 2 at $DIR/derefer_terminator_test.rs:+7:9: +7:10
|
||||
scope 3 {
|
||||
debug x => _8; // in scope 3 at $DIR/derefer_terminator_test.rs:8:22: 8:23
|
||||
debug x => _8; // in scope 3 at $DIR/derefer_terminator_test.rs:+4:22: +4:23
|
||||
}
|
||||
scope 4 {
|
||||
debug y => _9; // in scope 4 at $DIR/derefer_terminator_test.rs:11:9: 11:10
|
||||
debug y => _9; // in scope 4 at $DIR/derefer_terminator_test.rs:+7:9: +7:10
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_terminator_test.rs:5:9: 5:10
|
||||
_1 = foo() -> bb1; // scope 0 at $DIR/derefer_terminator_test.rs:5:13: 5:18
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_terminator_test.rs:+1:9: +1:10
|
||||
_1 = foo() -> bb1; // scope 0 at $DIR/derefer_terminator_test.rs:+1:13: +1:18
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_terminator_test.rs:5:13: 5:16
|
||||
// + literal: Const { ty: fn() -> bool {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_2); // scope 1 at $DIR/derefer_terminator_test.rs:6:9: 6:10
|
||||
_2 = foo() -> bb2; // scope 1 at $DIR/derefer_terminator_test.rs:6:13: 6:18
|
||||
StorageLive(_2); // scope 1 at $DIR/derefer_terminator_test.rs:+2:9: +2:10
|
||||
_2 = foo() -> bb2; // scope 1 at $DIR/derefer_terminator_test.rs:+2:13: +2:18
|
||||
// mir::Constant
|
||||
// + span: $DIR/derefer_terminator_test.rs:6:13: 6:16
|
||||
// + literal: Const { ty: fn() -> bool {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
StorageLive(_3); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 10:6
|
||||
StorageLive(_4); // scope 2 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
||||
StorageLive(_5); // scope 2 at $DIR/derefer_terminator_test.rs:7:17: 7:21
|
||||
StorageLive(_6); // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:21
|
||||
StorageLive(_7); // scope 2 at $DIR/derefer_terminator_test.rs:7:19: 7:21
|
||||
_7 = &_1; // scope 2 at $DIR/derefer_terminator_test.rs:7:19: 7:21
|
||||
_6 = &_7; // scope 2 at $DIR/derefer_terminator_test.rs:7:18: 7:21
|
||||
_5 = &_6; // scope 2 at $DIR/derefer_terminator_test.rs:7:17: 7:21
|
||||
_4 = &_5; // scope 2 at $DIR/derefer_terminator_test.rs:7:15: 7:22
|
||||
- switchInt((*(*(*(*_4))))) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ StorageLive(_10); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ _10 = deref_copy (*_4); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ StorageLive(_11); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ _11 = deref_copy (*_10); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ StorageDead(_10); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ StorageLive(_12); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ _12 = deref_copy (*_11); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ StorageDead(_11); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
+ switchInt((*_12)) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
StorageLive(_3); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +6:6
|
||||
StorageLive(_4); // scope 2 at $DIR/derefer_terminator_test.rs:+3:15: +3:22
|
||||
StorageLive(_5); // scope 2 at $DIR/derefer_terminator_test.rs:+3:17: +3:21
|
||||
StorageLive(_6); // scope 2 at $DIR/derefer_terminator_test.rs:+3:18: +3:21
|
||||
StorageLive(_7); // scope 2 at $DIR/derefer_terminator_test.rs:+3:19: +3:21
|
||||
_7 = &_1; // scope 2 at $DIR/derefer_terminator_test.rs:+3:19: +3:21
|
||||
_6 = &_7; // scope 2 at $DIR/derefer_terminator_test.rs:+3:18: +3:21
|
||||
_5 = &_6; // scope 2 at $DIR/derefer_terminator_test.rs:+3:17: +3:21
|
||||
_4 = &_5; // scope 2 at $DIR/derefer_terminator_test.rs:+3:15: +3:22
|
||||
- switchInt((*(*(*(*_4))))) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ StorageLive(_10); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ _10 = deref_copy (*_4); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ StorageLive(_11); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ _11 = deref_copy (*_10); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ StorageDead(_10); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ StorageLive(_12); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ _12 = deref_copy (*_11); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ StorageDead(_11); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
+ switchInt((*_12)) -> [false: bb3, otherwise: bb4]; // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
}
|
||||
|
||||
bb3: {
|
||||
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:9:18: 9:20
|
||||
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:9:18: 9:20
|
||||
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:+5:18: +5:20
|
||||
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:+5:18: +5:20
|
||||
}
|
||||
|
||||
bb4: {
|
||||
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:7:5: 7:22
|
||||
StorageLive(_8); // scope 2 at $DIR/derefer_terminator_test.rs:8:22: 8:23
|
||||
_8 = const 5_i32; // scope 2 at $DIR/derefer_terminator_test.rs:8:26: 8:27
|
||||
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:8:17: 8:29
|
||||
StorageDead(_8); // scope 2 at $DIR/derefer_terminator_test.rs:8:28: 8:29
|
||||
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:8:28: 8:29
|
||||
+ StorageDead(_12); // scope 2 at $DIR/derefer_terminator_test.rs:+3:5: +3:22
|
||||
StorageLive(_8); // scope 2 at $DIR/derefer_terminator_test.rs:+4:22: +4:23
|
||||
_8 = const 5_i32; // scope 2 at $DIR/derefer_terminator_test.rs:+4:26: +4:27
|
||||
_3 = const (); // scope 2 at $DIR/derefer_terminator_test.rs:+4:17: +4:29
|
||||
StorageDead(_8); // scope 2 at $DIR/derefer_terminator_test.rs:+4:28: +4:29
|
||||
goto -> bb5; // scope 2 at $DIR/derefer_terminator_test.rs:+4:28: +4:29
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_7); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
||||
StorageDead(_6); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
||||
StorageDead(_5); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
||||
StorageDead(_4); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
||||
StorageDead(_3); // scope 2 at $DIR/derefer_terminator_test.rs:10:5: 10:6
|
||||
StorageLive(_9); // scope 2 at $DIR/derefer_terminator_test.rs:11:9: 11:10
|
||||
_9 = const 42_i32; // scope 2 at $DIR/derefer_terminator_test.rs:11:13: 11:15
|
||||
_0 = const (); // scope 0 at $DIR/derefer_terminator_test.rs:4:11: 12:2
|
||||
StorageDead(_9); // scope 2 at $DIR/derefer_terminator_test.rs:12:1: 12:2
|
||||
StorageDead(_2); // scope 1 at $DIR/derefer_terminator_test.rs:12:1: 12:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_terminator_test.rs:12:1: 12:2
|
||||
return; // scope 0 at $DIR/derefer_terminator_test.rs:12:2: 12:2
|
||||
StorageDead(_7); // scope 2 at $DIR/derefer_terminator_test.rs:+6:5: +6:6
|
||||
StorageDead(_6); // scope 2 at $DIR/derefer_terminator_test.rs:+6:5: +6:6
|
||||
StorageDead(_5); // scope 2 at $DIR/derefer_terminator_test.rs:+6:5: +6:6
|
||||
StorageDead(_4); // scope 2 at $DIR/derefer_terminator_test.rs:+6:5: +6:6
|
||||
StorageDead(_3); // scope 2 at $DIR/derefer_terminator_test.rs:+6:5: +6:6
|
||||
StorageLive(_9); // scope 2 at $DIR/derefer_terminator_test.rs:+7:9: +7:10
|
||||
_9 = const 42_i32; // scope 2 at $DIR/derefer_terminator_test.rs:+7:13: +7:15
|
||||
_0 = const (); // scope 0 at $DIR/derefer_terminator_test.rs:+0:11: +8:2
|
||||
StorageDead(_9); // scope 2 at $DIR/derefer_terminator_test.rs:+8:1: +8:2
|
||||
StorageDead(_2); // scope 1 at $DIR/derefer_terminator_test.rs:+8:1: +8:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_terminator_test.rs:+8:1: +8:2
|
||||
return; // scope 0 at $DIR/derefer_terminator_test.rs:+8:2: +8:2
|
||||
+ }
|
||||
+
|
||||
+ bb6 (cleanup): {
|
||||
+ resume; // scope 0 at $DIR/derefer_terminator_test.rs:4:1: 12:2
|
||||
+ resume; // scope 0 at $DIR/derefer_terminator_test.rs:+0:1: +8:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,57 +2,57 @@
|
||||
+ // MIR for `main` after Derefer
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_test.rs:2:11: 2:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/derefer_test.rs:3:9: 3:14
|
||||
let mut _3: &mut (i32, i32); // in scope 0 at $DIR/derefer_test.rs:4:22: 4:28
|
||||
+ let mut _6: &mut (i32, i32); // in scope 0 at $DIR/derefer_test.rs:4:9: 4:14
|
||||
+ let mut _7: &mut (i32, i32); // in scope 0 at $DIR/derefer_test.rs:4:9: 4:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_test.rs:+0:11: +0:11
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/derefer_test.rs:+1:9: +1:14
|
||||
let mut _3: &mut (i32, i32); // in scope 0 at $DIR/derefer_test.rs:+2:22: +2:28
|
||||
+ let mut _6: &mut (i32, i32); // in scope 0 at $DIR/derefer_test.rs:+2:9: +2:14
|
||||
+ let mut _7: &mut (i32, i32); // in scope 0 at $DIR/derefer_test.rs:+2:9: +2:14
|
||||
scope 1 {
|
||||
debug a => _1; // in scope 1 at $DIR/derefer_test.rs:3:9: 3:14
|
||||
let mut _2: (i32, &mut (i32, i32)); // in scope 1 at $DIR/derefer_test.rs:4:9: 4:14
|
||||
debug a => _1; // in scope 1 at $DIR/derefer_test.rs:+1:9: +1:14
|
||||
let mut _2: (i32, &mut (i32, i32)); // in scope 1 at $DIR/derefer_test.rs:+2:9: +2:14
|
||||
scope 2 {
|
||||
debug b => _2; // in scope 2 at $DIR/derefer_test.rs:4:9: 4:14
|
||||
let _4: &mut i32; // in scope 2 at $DIR/derefer_test.rs:5:9: 5:10
|
||||
debug b => _2; // in scope 2 at $DIR/derefer_test.rs:+2:9: +2:14
|
||||
let _4: &mut i32; // in scope 2 at $DIR/derefer_test.rs:+3:9: +3:10
|
||||
scope 3 {
|
||||
debug x => _4; // in scope 3 at $DIR/derefer_test.rs:5:9: 5:10
|
||||
let _5: &mut i32; // in scope 3 at $DIR/derefer_test.rs:6:9: 6:10
|
||||
debug x => _4; // in scope 3 at $DIR/derefer_test.rs:+3:9: +3:10
|
||||
let _5: &mut i32; // in scope 3 at $DIR/derefer_test.rs:+4:9: +4:10
|
||||
scope 4 {
|
||||
debug y => _5; // in scope 4 at $DIR/derefer_test.rs:6:9: 6:10
|
||||
debug y => _5; // in scope 4 at $DIR/derefer_test.rs:+4:9: +4:10
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_test.rs:3:9: 3:14
|
||||
_1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/derefer_test.rs:3:17: 3:24
|
||||
StorageLive(_2); // scope 1 at $DIR/derefer_test.rs:4:9: 4:14
|
||||
StorageLive(_3); // scope 1 at $DIR/derefer_test.rs:4:22: 4:28
|
||||
_3 = &mut _1; // scope 1 at $DIR/derefer_test.rs:4:22: 4:28
|
||||
_2 = (const 99_i32, move _3); // scope 1 at $DIR/derefer_test.rs:4:17: 4:29
|
||||
StorageDead(_3); // scope 1 at $DIR/derefer_test.rs:4:28: 4:29
|
||||
StorageLive(_4); // scope 2 at $DIR/derefer_test.rs:5:9: 5:10
|
||||
- _4 = &mut ((*(_2.1: &mut (i32, i32))).0: i32); // scope 2 at $DIR/derefer_test.rs:5:13: 5:26
|
||||
+ StorageLive(_6); // scope 2 at $DIR/derefer_test.rs:5:13: 5:26
|
||||
+ _6 = deref_copy (_2.1: &mut (i32, i32)); // scope 2 at $DIR/derefer_test.rs:5:13: 5:26
|
||||
+ _4 = &mut ((*_6).0: i32); // scope 2 at $DIR/derefer_test.rs:5:13: 5:26
|
||||
+ StorageDead(_6); // scope 3 at $DIR/derefer_test.rs:6:9: 6:10
|
||||
StorageLive(_5); // scope 3 at $DIR/derefer_test.rs:6:9: 6:10
|
||||
- _5 = &mut ((*(_2.1: &mut (i32, i32))).1: i32); // scope 3 at $DIR/derefer_test.rs:6:13: 6:26
|
||||
+ StorageLive(_7); // scope 3 at $DIR/derefer_test.rs:6:13: 6:26
|
||||
+ _7 = deref_copy (_2.1: &mut (i32, i32)); // scope 3 at $DIR/derefer_test.rs:6:13: 6:26
|
||||
+ _5 = &mut ((*_7).1: i32); // scope 3 at $DIR/derefer_test.rs:6:13: 6:26
|
||||
+ StorageDead(_7); // scope 0 at $DIR/derefer_test.rs:2:11: 7:2
|
||||
_0 = const (); // scope 0 at $DIR/derefer_test.rs:2:11: 7:2
|
||||
StorageDead(_5); // scope 3 at $DIR/derefer_test.rs:7:1: 7:2
|
||||
StorageDead(_4); // scope 2 at $DIR/derefer_test.rs:7:1: 7:2
|
||||
StorageDead(_2); // scope 1 at $DIR/derefer_test.rs:7:1: 7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_test.rs:7:1: 7:2
|
||||
return; // scope 0 at $DIR/derefer_test.rs:7:2: 7:2
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_test.rs:+1:9: +1:14
|
||||
_1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/derefer_test.rs:+1:17: +1:24
|
||||
StorageLive(_2); // scope 1 at $DIR/derefer_test.rs:+2:9: +2:14
|
||||
StorageLive(_3); // scope 1 at $DIR/derefer_test.rs:+2:22: +2:28
|
||||
_3 = &mut _1; // scope 1 at $DIR/derefer_test.rs:+2:22: +2:28
|
||||
_2 = (const 99_i32, move _3); // scope 1 at $DIR/derefer_test.rs:+2:17: +2:29
|
||||
StorageDead(_3); // scope 1 at $DIR/derefer_test.rs:+2:28: +2:29
|
||||
StorageLive(_4); // scope 2 at $DIR/derefer_test.rs:+3:9: +3:10
|
||||
- _4 = &mut ((*(_2.1: &mut (i32, i32))).0: i32); // scope 2 at $DIR/derefer_test.rs:+3:13: +3:26
|
||||
+ StorageLive(_6); // scope 2 at $DIR/derefer_test.rs:+3:13: +3:26
|
||||
+ _6 = deref_copy (_2.1: &mut (i32, i32)); // scope 2 at $DIR/derefer_test.rs:+3:13: +3:26
|
||||
+ _4 = &mut ((*_6).0: i32); // scope 2 at $DIR/derefer_test.rs:+3:13: +3:26
|
||||
+ StorageDead(_6); // scope 3 at $DIR/derefer_test.rs:+4:9: +4:10
|
||||
StorageLive(_5); // scope 3 at $DIR/derefer_test.rs:+4:9: +4:10
|
||||
- _5 = &mut ((*(_2.1: &mut (i32, i32))).1: i32); // scope 3 at $DIR/derefer_test.rs:+4:13: +4:26
|
||||
+ StorageLive(_7); // scope 3 at $DIR/derefer_test.rs:+4:13: +4:26
|
||||
+ _7 = deref_copy (_2.1: &mut (i32, i32)); // scope 3 at $DIR/derefer_test.rs:+4:13: +4:26
|
||||
+ _5 = &mut ((*_7).1: i32); // scope 3 at $DIR/derefer_test.rs:+4:13: +4:26
|
||||
+ StorageDead(_7); // scope 0 at $DIR/derefer_test.rs:+0:11: +5:2
|
||||
_0 = const (); // scope 0 at $DIR/derefer_test.rs:+0:11: +5:2
|
||||
StorageDead(_5); // scope 3 at $DIR/derefer_test.rs:+5:1: +5:2
|
||||
StorageDead(_4); // scope 2 at $DIR/derefer_test.rs:+5:1: +5:2
|
||||
StorageDead(_2); // scope 1 at $DIR/derefer_test.rs:+5:1: +5:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_test.rs:+5:1: +5:2
|
||||
return; // scope 0 at $DIR/derefer_test.rs:+5:2: +5:2
|
||||
+ }
|
||||
+
|
||||
+ bb1 (cleanup): {
|
||||
+ resume; // scope 0 at $DIR/derefer_test.rs:2:1: 7:2
|
||||
+ resume; // scope 0 at $DIR/derefer_test.rs:+0:1: +5:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,34 +2,34 @@
|
||||
+ // MIR for `main` after Derefer
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_test_multiple.rs:2:12: 2:12
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:3:9: 3:14
|
||||
let mut _3: &mut (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:4:22: 4:28
|
||||
let mut _5: &mut (i32, &mut (i32, i32)); // in scope 0 at $DIR/derefer_test_multiple.rs:5:22: 5:28
|
||||
let mut _7: &mut (i32, &mut (i32, &mut (i32, i32))); // in scope 0 at $DIR/derefer_test_multiple.rs:6:22: 6:28
|
||||
+ let mut _10: &mut (i32, &mut (i32, &mut (i32, i32))); // in scope 0 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
+ let mut _11: &mut (i32, &mut (i32, i32)); // in scope 0 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
+ let mut _12: &mut (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
+ let mut _13: &mut (i32, &mut (i32, &mut (i32, i32))); // in scope 0 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
+ let mut _14: &mut (i32, &mut (i32, i32)); // in scope 0 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
+ let mut _15: &mut (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/derefer_test_multiple.rs:+0:12: +0:12
|
||||
let mut _1: (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:+1:9: +1:14
|
||||
let mut _3: &mut (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:+2:22: +2:28
|
||||
let mut _5: &mut (i32, &mut (i32, i32)); // in scope 0 at $DIR/derefer_test_multiple.rs:+3:22: +3:28
|
||||
let mut _7: &mut (i32, &mut (i32, &mut (i32, i32))); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:22: +4:28
|
||||
+ let mut _10: &mut (i32, &mut (i32, &mut (i32, i32))); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
+ let mut _11: &mut (i32, &mut (i32, i32)); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
+ let mut _12: &mut (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
+ let mut _13: &mut (i32, &mut (i32, &mut (i32, i32))); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
+ let mut _14: &mut (i32, &mut (i32, i32)); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
+ let mut _15: &mut (i32, i32); // in scope 0 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
scope 1 {
|
||||
debug a => _1; // in scope 1 at $DIR/derefer_test_multiple.rs:3:9: 3:14
|
||||
let mut _2: (i32, &mut (i32, i32)); // in scope 1 at $DIR/derefer_test_multiple.rs:4:9: 4:14
|
||||
debug a => _1; // in scope 1 at $DIR/derefer_test_multiple.rs:+1:9: +1:14
|
||||
let mut _2: (i32, &mut (i32, i32)); // in scope 1 at $DIR/derefer_test_multiple.rs:+2:9: +2:14
|
||||
scope 2 {
|
||||
debug b => _2; // in scope 2 at $DIR/derefer_test_multiple.rs:4:9: 4:14
|
||||
let mut _4: (i32, &mut (i32, &mut (i32, i32))); // in scope 2 at $DIR/derefer_test_multiple.rs:5:9: 5:14
|
||||
debug b => _2; // in scope 2 at $DIR/derefer_test_multiple.rs:+2:9: +2:14
|
||||
let mut _4: (i32, &mut (i32, &mut (i32, i32))); // in scope 2 at $DIR/derefer_test_multiple.rs:+3:9: +3:14
|
||||
scope 3 {
|
||||
debug c => _4; // in scope 3 at $DIR/derefer_test_multiple.rs:5:9: 5:14
|
||||
let mut _6: (i32, &mut (i32, &mut (i32, &mut (i32, i32)))); // in scope 3 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
debug c => _4; // in scope 3 at $DIR/derefer_test_multiple.rs:+3:9: +3:14
|
||||
let mut _6: (i32, &mut (i32, &mut (i32, &mut (i32, i32)))); // in scope 3 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
scope 4 {
|
||||
debug d => _6; // in scope 4 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
let _8: &mut i32; // in scope 4 at $DIR/derefer_test_multiple.rs:7:9: 7:10
|
||||
debug d => _6; // in scope 4 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
let _8: &mut i32; // in scope 4 at $DIR/derefer_test_multiple.rs:+5:9: +5:10
|
||||
scope 5 {
|
||||
debug x => _8; // in scope 5 at $DIR/derefer_test_multiple.rs:7:9: 7:10
|
||||
let _9: &mut i32; // in scope 5 at $DIR/derefer_test_multiple.rs:8:9: 8:10
|
||||
debug x => _8; // in scope 5 at $DIR/derefer_test_multiple.rs:+5:9: +5:10
|
||||
let _9: &mut i32; // in scope 5 at $DIR/derefer_test_multiple.rs:+6:9: +6:10
|
||||
scope 6 {
|
||||
debug y => _9; // in scope 6 at $DIR/derefer_test_multiple.rs:8:9: 8:10
|
||||
debug y => _9; // in scope 6 at $DIR/derefer_test_multiple.rs:+6:9: +6:10
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,59 +38,59 @@
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_test_multiple.rs:3:9: 3:14
|
||||
_1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/derefer_test_multiple.rs:3:17: 3:25
|
||||
StorageLive(_2); // scope 1 at $DIR/derefer_test_multiple.rs:4:9: 4:14
|
||||
StorageLive(_3); // scope 1 at $DIR/derefer_test_multiple.rs:4:22: 4:28
|
||||
_3 = &mut _1; // scope 1 at $DIR/derefer_test_multiple.rs:4:22: 4:28
|
||||
_2 = (const 99_i32, move _3); // scope 1 at $DIR/derefer_test_multiple.rs:4:17: 4:29
|
||||
StorageDead(_3); // scope 1 at $DIR/derefer_test_multiple.rs:4:28: 4:29
|
||||
StorageLive(_4); // scope 2 at $DIR/derefer_test_multiple.rs:5:9: 5:14
|
||||
StorageLive(_5); // scope 2 at $DIR/derefer_test_multiple.rs:5:22: 5:28
|
||||
_5 = &mut _2; // scope 2 at $DIR/derefer_test_multiple.rs:5:22: 5:28
|
||||
_4 = (const 11_i32, move _5); // scope 2 at $DIR/derefer_test_multiple.rs:5:17: 5:29
|
||||
StorageDead(_5); // scope 2 at $DIR/derefer_test_multiple.rs:5:28: 5:29
|
||||
StorageLive(_6); // scope 3 at $DIR/derefer_test_multiple.rs:6:9: 6:14
|
||||
StorageLive(_7); // scope 3 at $DIR/derefer_test_multiple.rs:6:22: 6:28
|
||||
_7 = &mut _4; // scope 3 at $DIR/derefer_test_multiple.rs:6:22: 6:28
|
||||
_6 = (const 13_i32, move _7); // scope 3 at $DIR/derefer_test_multiple.rs:6:17: 6:29
|
||||
StorageDead(_7); // scope 3 at $DIR/derefer_test_multiple.rs:6:28: 6:29
|
||||
StorageLive(_8); // scope 4 at $DIR/derefer_test_multiple.rs:7:9: 7:10
|
||||
- _8 = &mut ((*((*((*(_6.1: &mut (i32, &mut (i32, &mut (i32, i32))))).1: &mut (i32, &mut (i32, i32)))).1: &mut (i32, i32))).1: i32); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ StorageLive(_10); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ _10 = deref_copy (_6.1: &mut (i32, &mut (i32, &mut (i32, i32)))); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ StorageLive(_11); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ _11 = deref_copy ((*_10).1: &mut (i32, &mut (i32, i32))); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ StorageDead(_10); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ StorageLive(_12); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ _12 = deref_copy ((*_11).1: &mut (i32, i32)); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ StorageDead(_11); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ _8 = &mut ((*_12).1: i32); // scope 4 at $DIR/derefer_test_multiple.rs:7:13: 7:30
|
||||
+ StorageDead(_12); // scope 5 at $DIR/derefer_test_multiple.rs:8:9: 8:10
|
||||
StorageLive(_9); // scope 5 at $DIR/derefer_test_multiple.rs:8:9: 8:10
|
||||
- _9 = &mut ((*((*((*(_6.1: &mut (i32, &mut (i32, &mut (i32, i32))))).1: &mut (i32, &mut (i32, i32)))).1: &mut (i32, i32))).1: i32); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ StorageLive(_13); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ _13 = deref_copy (_6.1: &mut (i32, &mut (i32, &mut (i32, i32)))); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ StorageLive(_14); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ _14 = deref_copy ((*_13).1: &mut (i32, &mut (i32, i32))); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ StorageDead(_13); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ StorageLive(_15); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ _15 = deref_copy ((*_14).1: &mut (i32, i32)); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ StorageDead(_14); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ _9 = &mut ((*_15).1: i32); // scope 5 at $DIR/derefer_test_multiple.rs:8:13: 8:30
|
||||
+ StorageDead(_15); // scope 0 at $DIR/derefer_test_multiple.rs:2:12: 9:2
|
||||
_0 = const (); // scope 0 at $DIR/derefer_test_multiple.rs:2:12: 9:2
|
||||
StorageDead(_9); // scope 5 at $DIR/derefer_test_multiple.rs:9:1: 9:2
|
||||
StorageDead(_8); // scope 4 at $DIR/derefer_test_multiple.rs:9:1: 9:2
|
||||
StorageDead(_6); // scope 3 at $DIR/derefer_test_multiple.rs:9:1: 9:2
|
||||
StorageDead(_4); // scope 2 at $DIR/derefer_test_multiple.rs:9:1: 9:2
|
||||
StorageDead(_2); // scope 1 at $DIR/derefer_test_multiple.rs:9:1: 9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_test_multiple.rs:9:1: 9:2
|
||||
return; // scope 0 at $DIR/derefer_test_multiple.rs:9:2: 9:2
|
||||
StorageLive(_1); // scope 0 at $DIR/derefer_test_multiple.rs:+1:9: +1:14
|
||||
_1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/derefer_test_multiple.rs:+1:17: +1:25
|
||||
StorageLive(_2); // scope 1 at $DIR/derefer_test_multiple.rs:+2:9: +2:14
|
||||
StorageLive(_3); // scope 1 at $DIR/derefer_test_multiple.rs:+2:22: +2:28
|
||||
_3 = &mut _1; // scope 1 at $DIR/derefer_test_multiple.rs:+2:22: +2:28
|
||||
_2 = (const 99_i32, move _3); // scope 1 at $DIR/derefer_test_multiple.rs:+2:17: +2:29
|
||||
StorageDead(_3); // scope 1 at $DIR/derefer_test_multiple.rs:+2:28: +2:29
|
||||
StorageLive(_4); // scope 2 at $DIR/derefer_test_multiple.rs:+3:9: +3:14
|
||||
StorageLive(_5); // scope 2 at $DIR/derefer_test_multiple.rs:+3:22: +3:28
|
||||
_5 = &mut _2; // scope 2 at $DIR/derefer_test_multiple.rs:+3:22: +3:28
|
||||
_4 = (const 11_i32, move _5); // scope 2 at $DIR/derefer_test_multiple.rs:+3:17: +3:29
|
||||
StorageDead(_5); // scope 2 at $DIR/derefer_test_multiple.rs:+3:28: +3:29
|
||||
StorageLive(_6); // scope 3 at $DIR/derefer_test_multiple.rs:+4:9: +4:14
|
||||
StorageLive(_7); // scope 3 at $DIR/derefer_test_multiple.rs:+4:22: +4:28
|
||||
_7 = &mut _4; // scope 3 at $DIR/derefer_test_multiple.rs:+4:22: +4:28
|
||||
_6 = (const 13_i32, move _7); // scope 3 at $DIR/derefer_test_multiple.rs:+4:17: +4:29
|
||||
StorageDead(_7); // scope 3 at $DIR/derefer_test_multiple.rs:+4:28: +4:29
|
||||
StorageLive(_8); // scope 4 at $DIR/derefer_test_multiple.rs:+5:9: +5:10
|
||||
- _8 = &mut ((*((*((*(_6.1: &mut (i32, &mut (i32, &mut (i32, i32))))).1: &mut (i32, &mut (i32, i32)))).1: &mut (i32, i32))).1: i32); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ StorageLive(_10); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ _10 = deref_copy (_6.1: &mut (i32, &mut (i32, &mut (i32, i32)))); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ StorageLive(_11); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ _11 = deref_copy ((*_10).1: &mut (i32, &mut (i32, i32))); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ StorageDead(_10); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ StorageLive(_12); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ _12 = deref_copy ((*_11).1: &mut (i32, i32)); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ StorageDead(_11); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ _8 = &mut ((*_12).1: i32); // scope 4 at $DIR/derefer_test_multiple.rs:+5:13: +5:30
|
||||
+ StorageDead(_12); // scope 5 at $DIR/derefer_test_multiple.rs:+6:9: +6:10
|
||||
StorageLive(_9); // scope 5 at $DIR/derefer_test_multiple.rs:+6:9: +6:10
|
||||
- _9 = &mut ((*((*((*(_6.1: &mut (i32, &mut (i32, &mut (i32, i32))))).1: &mut (i32, &mut (i32, i32)))).1: &mut (i32, i32))).1: i32); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ StorageLive(_13); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ _13 = deref_copy (_6.1: &mut (i32, &mut (i32, &mut (i32, i32)))); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ StorageLive(_14); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ _14 = deref_copy ((*_13).1: &mut (i32, &mut (i32, i32))); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ StorageDead(_13); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ StorageLive(_15); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ _15 = deref_copy ((*_14).1: &mut (i32, i32)); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ StorageDead(_14); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ _9 = &mut ((*_15).1: i32); // scope 5 at $DIR/derefer_test_multiple.rs:+6:13: +6:30
|
||||
+ StorageDead(_15); // scope 0 at $DIR/derefer_test_multiple.rs:+0:12: +7:2
|
||||
_0 = const (); // scope 0 at $DIR/derefer_test_multiple.rs:+0:12: +7:2
|
||||
StorageDead(_9); // scope 5 at $DIR/derefer_test_multiple.rs:+7:1: +7:2
|
||||
StorageDead(_8); // scope 4 at $DIR/derefer_test_multiple.rs:+7:1: +7:2
|
||||
StorageDead(_6); // scope 3 at $DIR/derefer_test_multiple.rs:+7:1: +7:2
|
||||
StorageDead(_4); // scope 2 at $DIR/derefer_test_multiple.rs:+7:1: +7:2
|
||||
StorageDead(_2); // scope 1 at $DIR/derefer_test_multiple.rs:+7:1: +7:2
|
||||
StorageDead(_1); // scope 0 at $DIR/derefer_test_multiple.rs:+7:1: +7:2
|
||||
return; // scope 0 at $DIR/derefer_test_multiple.rs:+7:2: +7:2
|
||||
+ }
|
||||
+
|
||||
+ bb1 (cleanup): {
|
||||
+ resume; // scope 0 at $DIR/derefer_test_multiple.rs:2:1: 9:2
|
||||
+ resume; // scope 0 at $DIR/derefer_test_multiple.rs:+0:1: +7:2
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,64 +2,64 @@
|
||||
+ // MIR for `main` after DestinationPropagation
|
||||
|
||||
fn main() -> () {
|
||||
let mut _0: (); // return place in scope 0 at $DIR/branch.rs:12:11: 12:11
|
||||
let _1: i32; // in scope 0 at $DIR/branch.rs:13:9: 13:10
|
||||
let mut _3: bool; // in scope 0 at $DIR/branch.rs:15:16: 15:22
|
||||
let _4: i32; // in scope 0 at $DIR/branch.rs:18:9: 18:14
|
||||
let mut _0: (); // return place in scope 0 at $DIR/branch.rs:+0:11: +0:11
|
||||
let _1: i32; // in scope 0 at $DIR/branch.rs:+1:9: +1:10
|
||||
let mut _3: bool; // in scope 0 at $DIR/branch.rs:+3:16: +3:22
|
||||
let _4: i32; // in scope 0 at $DIR/branch.rs:+6:9: +6:14
|
||||
scope 1 {
|
||||
debug x => _1; // in scope 1 at $DIR/branch.rs:13:9: 13:10
|
||||
let _2: i32; // in scope 1 at $DIR/branch.rs:15:9: 15:10
|
||||
debug x => _1; // in scope 1 at $DIR/branch.rs:+1:9: +1:10
|
||||
let _2: i32; // in scope 1 at $DIR/branch.rs:+3:9: +3:10
|
||||
scope 2 {
|
||||
debug y => _2; // in scope 2 at $DIR/branch.rs:15:9: 15:10
|
||||
debug y => _2; // in scope 2 at $DIR/branch.rs:+3:9: +3:10
|
||||
}
|
||||
}
|
||||
|
||||
bb0: {
|
||||
StorageLive(_1); // scope 0 at $DIR/branch.rs:13:9: 13:10
|
||||
_1 = val() -> bb1; // scope 0 at $DIR/branch.rs:13:13: 13:18
|
||||
StorageLive(_1); // scope 0 at $DIR/branch.rs:+1:9: +1:10
|
||||
_1 = val() -> bb1; // scope 0 at $DIR/branch.rs:+1:13: +1:18
|
||||
// mir::Constant
|
||||
// + span: $DIR/branch.rs:13:13: 13:16
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
StorageLive(_2); // scope 1 at $DIR/branch.rs:15:9: 15:10
|
||||
StorageLive(_3); // scope 1 at $DIR/branch.rs:15:16: 15:22
|
||||
_3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:15:16: 15:22
|
||||
StorageLive(_2); // scope 1 at $DIR/branch.rs:+3:9: +3:10
|
||||
StorageLive(_3); // scope 1 at $DIR/branch.rs:+3:16: +3:22
|
||||
_3 = cond() -> bb2; // scope 1 at $DIR/branch.rs:+3:16: +3:22
|
||||
// mir::Constant
|
||||
// + span: $DIR/branch.rs:15:16: 15:20
|
||||
// + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
switchInt(move _3) -> [false: bb4, otherwise: bb3]; // scope 1 at $DIR/branch.rs:15:16: 15:22
|
||||
switchInt(move _3) -> [false: bb4, otherwise: bb3]; // scope 1 at $DIR/branch.rs:+3:16: +3:22
|
||||
}
|
||||
|
||||
bb3: {
|
||||
nop; // scope 1 at $DIR/branch.rs:16:9: 16:10
|
||||
goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
|
||||
nop; // scope 1 at $DIR/branch.rs:+4:9: +4:10
|
||||
goto -> bb6; // scope 1 at $DIR/branch.rs:+3:13: +8:6
|
||||
}
|
||||
|
||||
bb4: {
|
||||
StorageLive(_4); // scope 1 at $DIR/branch.rs:18:9: 18:14
|
||||
_4 = val() -> bb5; // scope 1 at $DIR/branch.rs:18:9: 18:14
|
||||
StorageLive(_4); // scope 1 at $DIR/branch.rs:+6:9: +6:14
|
||||
_4 = val() -> bb5; // scope 1 at $DIR/branch.rs:+6:9: +6:14
|
||||
// mir::Constant
|
||||
// + span: $DIR/branch.rs:18:9: 18:12
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb5: {
|
||||
StorageDead(_4); // scope 1 at $DIR/branch.rs:18:14: 18:15
|
||||
nop; // scope 1 at $DIR/branch.rs:19:9: 19:10
|
||||
goto -> bb6; // scope 1 at $DIR/branch.rs:15:13: 20:6
|
||||
StorageDead(_4); // scope 1 at $DIR/branch.rs:+6:14: +6:15
|
||||
nop; // scope 1 at $DIR/branch.rs:+7:9: +7:10
|
||||
goto -> bb6; // scope 1 at $DIR/branch.rs:+3:13: +8:6
|
||||
}
|
||||
|
||||
bb6: {
|
||||
StorageDead(_3); // scope 1 at $DIR/branch.rs:20:5: 20:6
|
||||
nop; // scope 0 at $DIR/branch.rs:12:11: 21:2
|
||||
StorageDead(_2); // scope 1 at $DIR/branch.rs:21:1: 21:2
|
||||
StorageDead(_1); // scope 0 at $DIR/branch.rs:21:1: 21:2
|
||||
return; // scope 0 at $DIR/branch.rs:21:2: 21:2
|
||||
StorageDead(_3); // scope 1 at $DIR/branch.rs:+8:5: +8:6
|
||||
nop; // scope 0 at $DIR/branch.rs:+0:11: +9:2
|
||||
StorageDead(_2); // scope 1 at $DIR/branch.rs:+9:1: +9:2
|
||||
StorageDead(_1); // scope 0 at $DIR/branch.rs:+9:1: +9:2
|
||||
return; // scope 0 at $DIR/branch.rs:+9:2: +9:2
|
||||
}
|
||||
}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user