Enable GVN by default.
This commit is contained in:
parent
08cc634f1a
commit
a03c972816
35 changed files with 389 additions and 534 deletions
|
@ -109,7 +109,7 @@ pub struct GVN;
|
||||||
|
|
||||||
impl<'tcx> MirPass<'tcx> for GVN {
|
impl<'tcx> MirPass<'tcx> for GVN {
|
||||||
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
|
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
|
||||||
sess.mir_opt_level() >= 4
|
sess.mir_opt_level() >= 2
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(level = "trace", skip(self, tcx, body))]
|
#[instrument(level = "trace", skip(self, tcx, body))]
|
||||||
|
|
|
@ -588,9 +588,9 @@ fn run_optimization_passes<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||||
// destroy the SSA property. It should still happen before const-propagation, so the
|
// destroy the SSA property. It should still happen before const-propagation, so the
|
||||||
// latter pass will leverage the created opportunities.
|
// latter pass will leverage the created opportunities.
|
||||||
&separate_const_switch::SeparateConstSwitch,
|
&separate_const_switch::SeparateConstSwitch,
|
||||||
&const_prop::ConstProp,
|
|
||||||
&gvn::GVN,
|
&gvn::GVN,
|
||||||
&simplify::SimplifyLocals::AfterGVN,
|
&simplify::SimplifyLocals::AfterGVN,
|
||||||
|
&const_prop::ConstProp,
|
||||||
&dataflow_const_prop::DataflowConstProp,
|
&dataflow_const_prop::DataflowConstProp,
|
||||||
&const_debuginfo::ConstDebugInfo,
|
&const_debuginfo::ConstDebugInfo,
|
||||||
&o1(simplify_branches::SimplifyConstCondition::AfterConstProp),
|
&o1(simplify_branches::SimplifyConstCondition::AfterConstProp),
|
||||||
|
|
|
@ -19,5 +19,3 @@ pub fn outer_function(x: S, y: S) -> usize {
|
||||||
// CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"{closure@{{.*.rs}}:9:23: 9:25}", ptr [[spill]]
|
// CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"{closure@{{.*.rs}}:9:23: 9:25}", ptr [[spill]]
|
||||||
// CHECK-NOT: [[load:%.*]] = load ptr, ptr
|
// CHECK-NOT: [[load:%.*]] = load ptr, ptr
|
||||||
// CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]])
|
// CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]])
|
||||||
// CHECK: [[inner:%.*]] = getelementptr inbounds %"{{.*}}", ptr [[spill]]
|
|
||||||
// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[inner]], ptr {{align .*}} %x
|
|
||||||
|
|
|
@ -7,19 +7,17 @@ Number of file 0 mappings: 1
|
||||||
- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 23)
|
- Code(Counter(0)) at (prev + 13, 1) to (start + 0, 23)
|
||||||
|
|
||||||
Function name: async2::async_func::{closure#0}
|
Function name: async2::async_func::{closure#0}
|
||||||
Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0d, 17, 03, 09, 05, 03, 0a, 02, 06, 02, 02, 06, 00, 07, 07, 01, 01, 00, 02]
|
Raw bytes (26): 0x[01, 01, 01, 05, 00, 04, 01, 0d, 17, 03, 09, 05, 03, 0a, 02, 06, 00, 02, 06, 00, 07, 03, 01, 01, 00, 02]
|
||||||
Number of files: 1
|
Number of files: 1
|
||||||
- file 0 => global file 1
|
- file 0 => global file 1
|
||||||
Number of expressions: 2
|
Number of expressions: 1
|
||||||
- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
|
- expression 0 operands: lhs = Counter(1), rhs = Zero
|
||||||
- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
|
|
||||||
Number of file 0 mappings: 4
|
Number of file 0 mappings: 4
|
||||||
- Code(Counter(0)) at (prev + 13, 23) to (start + 3, 9)
|
- Code(Counter(0)) at (prev + 13, 23) to (start + 3, 9)
|
||||||
- Code(Counter(1)) at (prev + 3, 10) to (start + 2, 6)
|
- Code(Counter(1)) at (prev + 3, 10) to (start + 2, 6)
|
||||||
- Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7)
|
- Code(Zero) at (prev + 2, 6) to (start + 0, 7)
|
||||||
= (c0 - c1)
|
- Code(Expression(0, Add)) at (prev + 1, 1) to (start + 0, 2)
|
||||||
- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
|
= (c1 + Zero)
|
||||||
= (c1 + (c0 - c1))
|
|
||||||
|
|
||||||
Function name: async2::async_func_just_println
|
Function name: async2::async_func_just_println
|
||||||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 15, 01, 00, 24]
|
Raw bytes (9): 0x[01, 01, 00, 01, 01, 15, 01, 00, 24]
|
||||||
|
|
|
@ -25,18 +25,18 @@ Number of file 0 mappings: 2
|
||||||
- Code(Zero) at (prev + 0, 32) to (start + 0, 33)
|
- Code(Zero) at (prev + 0, 32) to (start + 0, 33)
|
||||||
|
|
||||||
Function name: <partial_eq::Version as core::cmp::PartialOrd>::partial_cmp
|
Function name: <partial_eq::Version as core::cmp::PartialOrd>::partial_cmp
|
||||||
Raw bytes (22): 0x[01, 01, 04, 07, 0b, 05, 09, 0f, 15, 0d, 11, 02, 01, 04, 27, 00, 28, 03, 00, 30, 00, 31]
|
Raw bytes (22): 0x[01, 01, 04, 07, 0b, 00, 09, 0f, 15, 00, 11, 02, 01, 04, 27, 00, 28, 03, 00, 30, 00, 31]
|
||||||
Number of files: 1
|
Number of files: 1
|
||||||
- file 0 => global file 1
|
- file 0 => global file 1
|
||||||
Number of expressions: 4
|
Number of expressions: 4
|
||||||
- expression 0 operands: lhs = Expression(1, Add), rhs = Expression(2, Add)
|
- expression 0 operands: lhs = Expression(1, Add), rhs = Expression(2, Add)
|
||||||
- expression 1 operands: lhs = Counter(1), rhs = Counter(2)
|
- expression 1 operands: lhs = Zero, rhs = Counter(2)
|
||||||
- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(5)
|
- expression 2 operands: lhs = Expression(3, Add), rhs = Counter(5)
|
||||||
- expression 3 operands: lhs = Counter(3), rhs = Counter(4)
|
- expression 3 operands: lhs = Zero, rhs = Counter(4)
|
||||||
Number of file 0 mappings: 2
|
Number of file 0 mappings: 2
|
||||||
- Code(Counter(0)) at (prev + 4, 39) to (start + 0, 40)
|
- Code(Counter(0)) at (prev + 4, 39) to (start + 0, 40)
|
||||||
- Code(Expression(0, Add)) at (prev + 0, 48) to (start + 0, 49)
|
- Code(Expression(0, Add)) at (prev + 0, 48) to (start + 0, 49)
|
||||||
= ((c1 + c2) + ((c3 + c4) + c5))
|
= ((Zero + c2) + ((Zero + c4) + c5))
|
||||||
|
|
||||||
Function name: <partial_eq::Version as core::fmt::Debug>::fmt
|
Function name: <partial_eq::Version as core::fmt::Debug>::fmt
|
||||||
Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 11, 00, 16]
|
Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 11, 00, 16]
|
||||||
|
|
|
@ -9,17 +9,10 @@
|
||||||
let _4: bool;
|
let _4: bool;
|
||||||
let mut _6: std::option::Option<usize>;
|
let mut _6: std::option::Option<usize>;
|
||||||
let mut _7: isize;
|
let mut _7: isize;
|
||||||
let mut _9: &mut std::fmt::Formatter<'_>;
|
let mut _9: core::num::flt2dec::Sign;
|
||||||
let mut _10: &T;
|
let mut _10: u32;
|
||||||
let mut _11: core::num::flt2dec::Sign;
|
let mut _11: u32;
|
||||||
let mut _12: u32;
|
let mut _12: core::num::flt2dec::Sign;
|
||||||
let mut _13: u32;
|
|
||||||
let mut _14: usize;
|
|
||||||
let mut _15: bool;
|
|
||||||
let mut _16: &mut std::fmt::Formatter<'_>;
|
|
||||||
let mut _17: &T;
|
|
||||||
let mut _18: core::num::flt2dec::Sign;
|
|
||||||
let mut _19: bool;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug force_sign => _4;
|
debug force_sign => _4;
|
||||||
let _5: core::num::flt2dec::Sign;
|
let _5: core::num::flt2dec::Sign;
|
||||||
|
@ -36,32 +29,30 @@
|
||||||
}
|
}
|
||||||
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
||||||
debug self => _1;
|
debug self => _1;
|
||||||
let mut _20: u32;
|
let mut _13: u32;
|
||||||
let mut _21: u32;
|
let mut _14: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
StorageLive(_20);
|
StorageLive(_13);
|
||||||
StorageLive(_21);
|
StorageLive(_14);
|
||||||
_21 = ((*_1).0: u32);
|
_14 = ((*_1).0: u32);
|
||||||
_20 = BitAnd(move _21, const 1_u32);
|
_13 = BitAnd(move _14, const 1_u32);
|
||||||
StorageDead(_21);
|
StorageDead(_14);
|
||||||
_4 = Ne(move _20, const 0_u32);
|
_4 = Ne(move _13, const 0_u32);
|
||||||
StorageDead(_20);
|
StorageDead(_13);
|
||||||
StorageLive(_5);
|
StorageLive(_5);
|
||||||
switchInt(_4) -> [0: bb2, otherwise: bb1];
|
switchInt(_4) -> [0: bb2, otherwise: bb1];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
- _5 = MinusPlus;
|
_5 = const MinusPlus;
|
||||||
+ _5 = const MinusPlus;
|
|
||||||
goto -> bb3;
|
goto -> bb3;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
- _5 = Minus;
|
_5 = const Minus;
|
||||||
+ _5 = const Minus;
|
|
||||||
goto -> bb3;
|
goto -> bb3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,30 +65,30 @@
|
||||||
|
|
||||||
bb4: {
|
bb4: {
|
||||||
_8 = ((_6 as Some).0: usize);
|
_8 = ((_6 as Some).0: usize);
|
||||||
|
StorageLive(_9);
|
||||||
|
_9 = _5;
|
||||||
|
StorageLive(_10);
|
||||||
StorageLive(_11);
|
StorageLive(_11);
|
||||||
_11 = _5;
|
_11 = _8 as u32 (IntToInt);
|
||||||
StorageLive(_12);
|
_10 = Add(move _11, const 1_u32);
|
||||||
StorageLive(_13);
|
StorageDead(_11);
|
||||||
_13 = _8 as u32 (IntToInt);
|
_0 = float_to_exponential_common_exact::<T>(_1, _2, move _9, move _10, _3) -> [return: bb5, unwind unreachable];
|
||||||
_12 = Add(move _13, const 1_u32);
|
|
||||||
StorageDead(_13);
|
|
||||||
_0 = float_to_exponential_common_exact::<T>(_1, _2, move _11, move _12, _3) -> [return: bb5, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb5: {
|
bb5: {
|
||||||
StorageDead(_12);
|
StorageDead(_10);
|
||||||
StorageDead(_11);
|
StorageDead(_9);
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb6: {
|
bb6: {
|
||||||
StorageLive(_18);
|
StorageLive(_12);
|
||||||
_18 = _5;
|
_12 = _5;
|
||||||
_0 = float_to_exponential_common_shortest::<T>(_1, _2, move _18, _3) -> [return: bb7, unwind unreachable];
|
_0 = float_to_exponential_common_shortest::<T>(_1, _2, move _12, _3) -> [return: bb7, unwind unreachable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb7: {
|
bb7: {
|
||||||
StorageDead(_18);
|
StorageDead(_12);
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,10 @@
|
||||||
let _4: bool;
|
let _4: bool;
|
||||||
let mut _6: std::option::Option<usize>;
|
let mut _6: std::option::Option<usize>;
|
||||||
let mut _7: isize;
|
let mut _7: isize;
|
||||||
let mut _9: &mut std::fmt::Formatter<'_>;
|
let mut _9: core::num::flt2dec::Sign;
|
||||||
let mut _10: &T;
|
let mut _10: u32;
|
||||||
let mut _11: core::num::flt2dec::Sign;
|
let mut _11: u32;
|
||||||
let mut _12: u32;
|
let mut _12: core::num::flt2dec::Sign;
|
||||||
let mut _13: u32;
|
|
||||||
let mut _14: usize;
|
|
||||||
let mut _15: bool;
|
|
||||||
let mut _16: &mut std::fmt::Formatter<'_>;
|
|
||||||
let mut _17: &T;
|
|
||||||
let mut _18: core::num::flt2dec::Sign;
|
|
||||||
let mut _19: bool;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug force_sign => _4;
|
debug force_sign => _4;
|
||||||
let _5: core::num::flt2dec::Sign;
|
let _5: core::num::flt2dec::Sign;
|
||||||
|
@ -36,32 +29,30 @@
|
||||||
}
|
}
|
||||||
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
scope 4 (inlined Formatter::<'_>::sign_plus) {
|
||||||
debug self => _1;
|
debug self => _1;
|
||||||
let mut _20: u32;
|
let mut _13: u32;
|
||||||
let mut _21: u32;
|
let mut _14: u32;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
StorageLive(_20);
|
StorageLive(_13);
|
||||||
StorageLive(_21);
|
StorageLive(_14);
|
||||||
_21 = ((*_1).0: u32);
|
_14 = ((*_1).0: u32);
|
||||||
_20 = BitAnd(move _21, const 1_u32);
|
_13 = BitAnd(move _14, const 1_u32);
|
||||||
StorageDead(_21);
|
StorageDead(_14);
|
||||||
_4 = Ne(move _20, const 0_u32);
|
_4 = Ne(move _13, const 0_u32);
|
||||||
StorageDead(_20);
|
StorageDead(_13);
|
||||||
StorageLive(_5);
|
StorageLive(_5);
|
||||||
switchInt(_4) -> [0: bb2, otherwise: bb1];
|
switchInt(_4) -> [0: bb2, otherwise: bb1];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
- _5 = MinusPlus;
|
_5 = const MinusPlus;
|
||||||
+ _5 = const MinusPlus;
|
|
||||||
goto -> bb3;
|
goto -> bb3;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
- _5 = Minus;
|
_5 = const Minus;
|
||||||
+ _5 = const Minus;
|
|
||||||
goto -> bb3;
|
goto -> bb3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,30 +65,30 @@
|
||||||
|
|
||||||
bb4: {
|
bb4: {
|
||||||
_8 = ((_6 as Some).0: usize);
|
_8 = ((_6 as Some).0: usize);
|
||||||
|
StorageLive(_9);
|
||||||
|
_9 = _5;
|
||||||
|
StorageLive(_10);
|
||||||
StorageLive(_11);
|
StorageLive(_11);
|
||||||
_11 = _5;
|
_11 = _8 as u32 (IntToInt);
|
||||||
StorageLive(_12);
|
_10 = Add(move _11, const 1_u32);
|
||||||
StorageLive(_13);
|
StorageDead(_11);
|
||||||
_13 = _8 as u32 (IntToInt);
|
_0 = float_to_exponential_common_exact::<T>(_1, _2, move _9, move _10, _3) -> [return: bb5, unwind continue];
|
||||||
_12 = Add(move _13, const 1_u32);
|
|
||||||
StorageDead(_13);
|
|
||||||
_0 = float_to_exponential_common_exact::<T>(_1, _2, move _11, move _12, _3) -> [return: bb5, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb5: {
|
bb5: {
|
||||||
StorageDead(_12);
|
StorageDead(_10);
|
||||||
StorageDead(_11);
|
StorageDead(_9);
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb6: {
|
bb6: {
|
||||||
StorageLive(_18);
|
StorageLive(_12);
|
||||||
_18 = _5;
|
_12 = _5;
|
||||||
_0 = float_to_exponential_common_shortest::<T>(_1, _2, move _18, _3) -> [return: bb7, unwind continue];
|
_0 = float_to_exponential_common_shortest::<T>(_1, _2, move _12, _3) -> [return: bb7, unwind continue];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb7: {
|
bb7: {
|
||||||
StorageDead(_18);
|
StorageDead(_12);
|
||||||
goto -> bb8;
|
goto -> bb8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ fn b(_1: &mut Box<T>) -> &mut T {
|
||||||
_4 = &mut (*_1);
|
_4 = &mut (*_1);
|
||||||
StorageLive(_5);
|
StorageLive(_5);
|
||||||
StorageLive(_6);
|
StorageLive(_6);
|
||||||
_5 = deref_copy (*_4);
|
_5 = (*_4);
|
||||||
_6 = (((_5.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
_6 = (((_5.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
||||||
_3 = &mut (*_6);
|
_3 = &mut (*_6);
|
||||||
StorageDead(_6);
|
StorageDead(_6);
|
||||||
|
|
|
@ -17,7 +17,7 @@ fn d(_1: &Box<T>) -> &T {
|
||||||
_3 = &(*_1);
|
_3 = &(*_1);
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
StorageLive(_5);
|
StorageLive(_5);
|
||||||
_4 = deref_copy (*_3);
|
_4 = (*_3);
|
||||||
_5 = (((_4.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
_5 = (((_4.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T);
|
||||||
_2 = &(*_5);
|
_2 = &(*_5);
|
||||||
StorageDead(_5);
|
StorageDead(_5);
|
||||||
|
|
|
@ -10,23 +10,17 @@
|
||||||
let mut _5: u32;
|
let mut _5: u32;
|
||||||
let mut _6: u32;
|
let mut _6: u32;
|
||||||
let mut _7: u32;
|
let mut _7: u32;
|
||||||
let mut _8: u32;
|
|
||||||
let mut _9: u32;
|
|
||||||
let mut _10: u32;
|
|
||||||
let mut _11: bool;
|
|
||||||
let mut _12: u32;
|
|
||||||
let mut _13: bool;
|
|
||||||
scope 1 (inlined imm8) {
|
scope 1 (inlined imm8) {
|
||||||
debug x => _1;
|
debug x => _1;
|
||||||
let mut _14: u32;
|
let mut _8: u32;
|
||||||
let mut _15: u32;
|
let mut _9: u32;
|
||||||
scope 2 {
|
scope 2 {
|
||||||
debug out => _4;
|
debug out => _4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope 3 (inlined core::num::<impl u32>::rotate_right) {
|
scope 3 (inlined core::num::<impl u32>::rotate_right) {
|
||||||
debug self => _4;
|
debug self => _4;
|
||||||
debug n => _6;
|
debug n => _5;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
|
@ -34,44 +28,34 @@
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
_4 = const 0_u32;
|
_4 = const 0_u32;
|
||||||
StorageLive(_15);
|
StorageLive(_9);
|
||||||
StorageLive(_14);
|
StorageLive(_8);
|
||||||
_14 = Shr(_1, const 0_i32);
|
_8 = Shr(_1, const 0_i32);
|
||||||
_15 = BitAnd(move _14, const 255_u32);
|
_9 = BitAnd(move _8, const 255_u32);
|
||||||
StorageDead(_14);
|
StorageDead(_8);
|
||||||
_4 = BitOr(const 0_u32, move _15);
|
_4 = BitOr(const 0_u32, move _9);
|
||||||
StorageDead(_15);
|
StorageDead(_9);
|
||||||
|
StorageLive(_5);
|
||||||
StorageLive(_6);
|
StorageLive(_6);
|
||||||
StorageLive(_7);
|
StorageLive(_7);
|
||||||
StorageLive(_8);
|
assert(const true, "attempt to shift right by `{}`, which would overflow", const 8_i32) -> [success: bb1, unwind unreachable];
|
||||||
- _10 = const 8_i32 as u32 (IntToInt);
|
|
||||||
- _11 = Lt(move _10, const 32_u32);
|
|
||||||
- assert(move _11, "attempt to shift right by `{}`, which would overflow", const 8_i32) -> [success: bb1, unwind unreachable];
|
|
||||||
+ _10 = const 8_u32;
|
|
||||||
+ _11 = const true;
|
|
||||||
+ assert(const true, "attempt to shift right by `{}`, which would overflow", const 8_i32) -> [success: bb1, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
_8 = Shr(_1, const 8_i32);
|
_7 = Shr(_1, const 8_i32);
|
||||||
_7 = BitAnd(move _8, const 15_u32);
|
_6 = BitAnd(move _7, const 15_u32);
|
||||||
StorageDead(_8);
|
StorageDead(_7);
|
||||||
- _12 = const 1_i32 as u32 (IntToInt);
|
assert(const true, "attempt to shift left by `{}`, which would overflow", const 1_i32) -> [success: bb2, unwind unreachable];
|
||||||
- _13 = Lt(move _12, const 32_u32);
|
|
||||||
- assert(move _13, "attempt to shift left by `{}`, which would overflow", const 1_i32) -> [success: bb2, unwind unreachable];
|
|
||||||
+ _12 = const 1_u32;
|
|
||||||
+ _13 = const true;
|
|
||||||
+ assert(const true, "attempt to shift left by `{}`, which would overflow", const 1_i32) -> [success: bb2, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
_6 = Shl(move _7, const 1_i32);
|
_5 = Shl(move _6, const 1_i32);
|
||||||
StorageDead(_7);
|
StorageDead(_6);
|
||||||
_3 = rotate_right::<u32>(move _4, move _6) -> [return: bb3, unwind unreachable];
|
_3 = rotate_right::<u32>(move _4, move _5) -> [return: bb3, unwind unreachable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
StorageDead(_6);
|
StorageDead(_5);
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
_2 = move _3 as i32 (IntToInt);
|
_2 = move _3 as i32 (IntToInt);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
|
|
|
@ -10,23 +10,17 @@
|
||||||
let mut _5: u32;
|
let mut _5: u32;
|
||||||
let mut _6: u32;
|
let mut _6: u32;
|
||||||
let mut _7: u32;
|
let mut _7: u32;
|
||||||
let mut _8: u32;
|
|
||||||
let mut _9: u32;
|
|
||||||
let mut _10: u32;
|
|
||||||
let mut _11: bool;
|
|
||||||
let mut _12: u32;
|
|
||||||
let mut _13: bool;
|
|
||||||
scope 1 (inlined imm8) {
|
scope 1 (inlined imm8) {
|
||||||
debug x => _1;
|
debug x => _1;
|
||||||
let mut _14: u32;
|
let mut _8: u32;
|
||||||
let mut _15: u32;
|
let mut _9: u32;
|
||||||
scope 2 {
|
scope 2 {
|
||||||
debug out => _4;
|
debug out => _4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope 3 (inlined core::num::<impl u32>::rotate_right) {
|
scope 3 (inlined core::num::<impl u32>::rotate_right) {
|
||||||
debug self => _4;
|
debug self => _4;
|
||||||
debug n => _6;
|
debug n => _5;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
|
@ -34,44 +28,34 @@
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
_4 = const 0_u32;
|
_4 = const 0_u32;
|
||||||
StorageLive(_15);
|
StorageLive(_9);
|
||||||
StorageLive(_14);
|
StorageLive(_8);
|
||||||
_14 = Shr(_1, const 0_i32);
|
_8 = Shr(_1, const 0_i32);
|
||||||
_15 = BitAnd(move _14, const 255_u32);
|
_9 = BitAnd(move _8, const 255_u32);
|
||||||
StorageDead(_14);
|
StorageDead(_8);
|
||||||
_4 = BitOr(const 0_u32, move _15);
|
_4 = BitOr(const 0_u32, move _9);
|
||||||
StorageDead(_15);
|
StorageDead(_9);
|
||||||
|
StorageLive(_5);
|
||||||
StorageLive(_6);
|
StorageLive(_6);
|
||||||
StorageLive(_7);
|
StorageLive(_7);
|
||||||
StorageLive(_8);
|
assert(const true, "attempt to shift right by `{}`, which would overflow", const 8_i32) -> [success: bb1, unwind continue];
|
||||||
- _10 = const 8_i32 as u32 (IntToInt);
|
|
||||||
- _11 = Lt(move _10, const 32_u32);
|
|
||||||
- assert(move _11, "attempt to shift right by `{}`, which would overflow", const 8_i32) -> [success: bb1, unwind continue];
|
|
||||||
+ _10 = const 8_u32;
|
|
||||||
+ _11 = const true;
|
|
||||||
+ assert(const true, "attempt to shift right by `{}`, which would overflow", const 8_i32) -> [success: bb1, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
_8 = Shr(_1, const 8_i32);
|
_7 = Shr(_1, const 8_i32);
|
||||||
_7 = BitAnd(move _8, const 15_u32);
|
_6 = BitAnd(move _7, const 15_u32);
|
||||||
StorageDead(_8);
|
StorageDead(_7);
|
||||||
- _12 = const 1_i32 as u32 (IntToInt);
|
assert(const true, "attempt to shift left by `{}`, which would overflow", const 1_i32) -> [success: bb2, unwind continue];
|
||||||
- _13 = Lt(move _12, const 32_u32);
|
|
||||||
- assert(move _13, "attempt to shift left by `{}`, which would overflow", const 1_i32) -> [success: bb2, unwind continue];
|
|
||||||
+ _12 = const 1_u32;
|
|
||||||
+ _13 = const true;
|
|
||||||
+ assert(const true, "attempt to shift left by `{}`, which would overflow", const 1_i32) -> [success: bb2, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
_6 = Shl(move _7, const 1_i32);
|
_5 = Shl(move _6, const 1_i32);
|
||||||
StorageDead(_7);
|
StorageDead(_6);
|
||||||
_3 = rotate_right::<u32>(move _4, move _6) -> [return: bb3, unwind unreachable];
|
_3 = rotate_right::<u32>(move _4, move _5) -> [return: bb3, unwind unreachable];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
StorageDead(_6);
|
StorageDead(_5);
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
_2 = move _3 as i32 (IntToInt);
|
_2 = move _3 as i32 (IntToInt);
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
|
|
|
@ -55,7 +55,7 @@ fn checked_shl(_1: u32, _2: u32) -> Option<u32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
_0 = Option::<u32>::None;
|
_0 = const Option::<u32>::None;
|
||||||
goto -> bb4;
|
goto -> bb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,3 +66,7 @@ fn checked_shl(_1: u32, _2: u32) -> Option<u32> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 8, align: 4) {
|
||||||
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -55,8 +55,10 @@
|
||||||
- _2 = Option::<Layout>::None;
|
- _2 = Option::<Layout>::None;
|
||||||
+ _2 = const Option::<Layout>::None;
|
+ _2 = const Option::<Layout>::None;
|
||||||
StorageLive(_10);
|
StorageLive(_10);
|
||||||
_10 = const 0_isize;
|
- _10 = discriminant(_2);
|
||||||
switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
|
- switchInt(move _10) -> [0: bb1, 1: bb3, otherwise: bb2];
|
||||||
|
+ _10 = const 0_isize;
|
||||||
|
+ switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
|
|
@ -40,8 +40,10 @@
|
||||||
- _2 = Option::<Layout>::None;
|
- _2 = Option::<Layout>::None;
|
||||||
+ _2 = const Option::<Layout>::None;
|
+ _2 = const Option::<Layout>::None;
|
||||||
StorageLive(_10);
|
StorageLive(_10);
|
||||||
_10 = const 0_isize;
|
- _10 = discriminant(_2);
|
||||||
switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
|
- switchInt(move _10) -> [0: bb2, 1: bb4, otherwise: bb3];
|
||||||
|
+ _10 = const 0_isize;
|
||||||
|
+ switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
|
|
@ -55,8 +55,10 @@
|
||||||
- _2 = Option::<Layout>::None;
|
- _2 = Option::<Layout>::None;
|
||||||
+ _2 = const Option::<Layout>::None;
|
+ _2 = const Option::<Layout>::None;
|
||||||
StorageLive(_10);
|
StorageLive(_10);
|
||||||
_10 = const 0_isize;
|
- _10 = discriminant(_2);
|
||||||
switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
|
- switchInt(move _10) -> [0: bb1, 1: bb3, otherwise: bb2];
|
||||||
|
+ _10 = const 0_isize;
|
||||||
|
+ switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
|
|
@ -40,8 +40,10 @@
|
||||||
- _2 = Option::<Layout>::None;
|
- _2 = Option::<Layout>::None;
|
||||||
+ _2 = const Option::<Layout>::None;
|
+ _2 = const Option::<Layout>::None;
|
||||||
StorageLive(_10);
|
StorageLive(_10);
|
||||||
_10 = const 0_isize;
|
- _10 = discriminant(_2);
|
||||||
switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
|
- switchInt(move _10) -> [0: bb2, 1: bb4, otherwise: bb3];
|
||||||
|
+ _10 = const 0_isize;
|
||||||
|
+ switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
|
|
@ -72,7 +72,7 @@ fn int_range(_1: usize, _2: usize) -> () {
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
StorageDead(_6);
|
StorageDead(_6);
|
||||||
_11 = Option::<usize>::None;
|
_11 = const Option::<usize>::None;
|
||||||
goto -> bb5;
|
goto -> bb5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,3 +118,7 @@ fn int_range(_1: usize, _2: usize) -> () {
|
||||||
unreachable;
|
unreachable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 16, align: 8) {
|
||||||
|
00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ │ ........░░░░░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
// skip-filecheck
|
// skip-filecheck
|
||||||
// compile-flags: -O -Zmir-opt-level=2 -g
|
// compile-flags: -O -Zmir-opt-level=2 -g
|
||||||
// needs-unwind
|
// needs-unwind
|
||||||
|
// only-64bit
|
||||||
|
|
||||||
#![crate_type = "lib"]
|
#![crate_type = "lib"]
|
||||||
|
|
||||||
|
|
|
@ -4,60 +4,35 @@
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
let mut _0: ();
|
let mut _0: ();
|
||||||
let _1: i32;
|
let _1: i32;
|
||||||
let mut _2: (i32, bool);
|
let mut _3: u32;
|
||||||
let mut _4: [i32; 6];
|
|
||||||
let _5: usize;
|
|
||||||
let mut _6: usize;
|
|
||||||
let mut _7: bool;
|
|
||||||
let mut _9: u32;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug x => _1;
|
debug x => _1;
|
||||||
let _3: i32;
|
let _2: i32;
|
||||||
scope 2 {
|
scope 2 {
|
||||||
debug y => _3;
|
debug y => _2;
|
||||||
let _8: u32;
|
|
||||||
scope 3 {
|
scope 3 {
|
||||||
debug z => _9;
|
debug z => _3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_1);
|
StorageLive(_1);
|
||||||
- _2 = CheckedAdd(const 2_i32, const 2_i32);
|
assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind unreachable];
|
||||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind unreachable];
|
|
||||||
+ _2 = const (4_i32, false);
|
|
||||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_2.0: i32);
|
_1 = const 4_i32;
|
||||||
+ _1 = const 4_i32;
|
StorageLive(_2);
|
||||||
StorageLive(_3);
|
assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind unreachable];
|
||||||
StorageLive(_4);
|
|
||||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
|
|
||||||
StorageLive(_5);
|
|
||||||
_5 = const 3_usize;
|
|
||||||
_6 = const 6_usize;
|
|
||||||
- _7 = Lt(_5, _6);
|
|
||||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> [success: bb2, unwind unreachable];
|
|
||||||
+ _7 = const true;
|
|
||||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
- _3 = _4[_5];
|
_2 = const 3_i32;
|
||||||
+ _3 = const 3_i32;
|
_3 = const 42_u32;
|
||||||
StorageDead(_5);
|
StorageDead(_2);
|
||||||
StorageDead(_4);
|
|
||||||
_9 = const 42_u32;
|
|
||||||
StorageDead(_3);
|
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ALLOC0 (size: 8, align: 4) {
|
|
||||||
+ 04 00 00 00 00 __ __ __ │ .....░░░
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,60 +4,35 @@
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
let mut _0: ();
|
let mut _0: ();
|
||||||
let _1: i32;
|
let _1: i32;
|
||||||
let mut _2: (i32, bool);
|
let mut _3: u32;
|
||||||
let mut _4: [i32; 6];
|
|
||||||
let _5: usize;
|
|
||||||
let mut _6: usize;
|
|
||||||
let mut _7: bool;
|
|
||||||
let mut _9: u32;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug x => _1;
|
debug x => _1;
|
||||||
let _3: i32;
|
let _2: i32;
|
||||||
scope 2 {
|
scope 2 {
|
||||||
debug y => _3;
|
debug y => _2;
|
||||||
let _8: u32;
|
|
||||||
scope 3 {
|
scope 3 {
|
||||||
debug z => _9;
|
debug z => _3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_1);
|
StorageLive(_1);
|
||||||
- _2 = CheckedAdd(const 2_i32, const 2_i32);
|
assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
|
||||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
|
|
||||||
+ _2 = const (4_i32, false);
|
|
||||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_2.0: i32);
|
_1 = const 4_i32;
|
||||||
+ _1 = const 4_i32;
|
StorageLive(_2);
|
||||||
StorageLive(_3);
|
assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
|
||||||
StorageLive(_4);
|
|
||||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
|
|
||||||
StorageLive(_5);
|
|
||||||
_5 = const 3_usize;
|
|
||||||
_6 = const 6_usize;
|
|
||||||
- _7 = Lt(_5, _6);
|
|
||||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> [success: bb2, unwind continue];
|
|
||||||
+ _7 = const true;
|
|
||||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
- _3 = _4[_5];
|
_2 = const 3_i32;
|
||||||
+ _3 = const 3_i32;
|
_3 = const 42_u32;
|
||||||
StorageDead(_5);
|
StorageDead(_2);
|
||||||
StorageDead(_4);
|
|
||||||
_9 = const 42_u32;
|
|
||||||
StorageDead(_3);
|
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ALLOC0 (size: 8, align: 4) {
|
|
||||||
+ 04 00 00 00 00 __ __ __ │ .....░░░
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,60 +4,35 @@
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
let mut _0: ();
|
let mut _0: ();
|
||||||
let _1: i32;
|
let _1: i32;
|
||||||
let mut _2: (i32, bool);
|
let mut _3: u32;
|
||||||
let mut _4: [i32; 6];
|
|
||||||
let _5: usize;
|
|
||||||
let mut _6: usize;
|
|
||||||
let mut _7: bool;
|
|
||||||
let mut _9: u32;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug x => _1;
|
debug x => _1;
|
||||||
let _3: i32;
|
let _2: i32;
|
||||||
scope 2 {
|
scope 2 {
|
||||||
debug y => _3;
|
debug y => _2;
|
||||||
let _8: u32;
|
|
||||||
scope 3 {
|
scope 3 {
|
||||||
debug z => _9;
|
debug z => _3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_1);
|
StorageLive(_1);
|
||||||
- _2 = CheckedAdd(const 2_i32, const 2_i32);
|
assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind unreachable];
|
||||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind unreachable];
|
|
||||||
+ _2 = const (4_i32, false);
|
|
||||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_2.0: i32);
|
_1 = const 4_i32;
|
||||||
+ _1 = const 4_i32;
|
StorageLive(_2);
|
||||||
StorageLive(_3);
|
assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind unreachable];
|
||||||
StorageLive(_4);
|
|
||||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
|
|
||||||
StorageLive(_5);
|
|
||||||
_5 = const 3_usize;
|
|
||||||
_6 = const 6_usize;
|
|
||||||
- _7 = Lt(_5, _6);
|
|
||||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> [success: bb2, unwind unreachable];
|
|
||||||
+ _7 = const true;
|
|
||||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind unreachable];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
- _3 = _4[_5];
|
_2 = const 3_i32;
|
||||||
+ _3 = const 3_i32;
|
_3 = const 42_u32;
|
||||||
StorageDead(_5);
|
StorageDead(_2);
|
||||||
StorageDead(_4);
|
|
||||||
_9 = const 42_u32;
|
|
||||||
StorageDead(_3);
|
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ALLOC0 (size: 8, align: 4) {
|
|
||||||
+ 04 00 00 00 00 __ __ __ │ .....░░░
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,60 +4,35 @@
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
let mut _0: ();
|
let mut _0: ();
|
||||||
let _1: i32;
|
let _1: i32;
|
||||||
let mut _2: (i32, bool);
|
let mut _3: u32;
|
||||||
let mut _4: [i32; 6];
|
|
||||||
let _5: usize;
|
|
||||||
let mut _6: usize;
|
|
||||||
let mut _7: bool;
|
|
||||||
let mut _9: u32;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug x => _1;
|
debug x => _1;
|
||||||
let _3: i32;
|
let _2: i32;
|
||||||
scope 2 {
|
scope 2 {
|
||||||
debug y => _3;
|
debug y => _2;
|
||||||
let _8: u32;
|
|
||||||
scope 3 {
|
scope 3 {
|
||||||
debug z => _9;
|
debug z => _3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_1);
|
StorageLive(_1);
|
||||||
- _2 = CheckedAdd(const 2_i32, const 2_i32);
|
assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
|
||||||
- assert(!move (_2.1: bool), "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
|
|
||||||
+ _2 = const (4_i32, false);
|
|
||||||
+ assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_i32, const 2_i32) -> [success: bb1, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
- _1 = move (_2.0: i32);
|
_1 = const 4_i32;
|
||||||
+ _1 = const 4_i32;
|
StorageLive(_2);
|
||||||
StorageLive(_3);
|
assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
|
||||||
StorageLive(_4);
|
|
||||||
_4 = [const 0_i32, const 1_i32, const 2_i32, const 3_i32, const 4_i32, const 5_i32];
|
|
||||||
StorageLive(_5);
|
|
||||||
_5 = const 3_usize;
|
|
||||||
_6 = const 6_usize;
|
|
||||||
- _7 = Lt(_5, _6);
|
|
||||||
- assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> [success: bb2, unwind continue];
|
|
||||||
+ _7 = const true;
|
|
||||||
+ assert(const true, "index out of bounds: the length is {} but the index is {}", const 6_usize, const 3_usize) -> [success: bb2, unwind continue];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
- _3 = _4[_5];
|
_2 = const 3_i32;
|
||||||
+ _3 = const 3_i32;
|
_3 = const 42_u32;
|
||||||
StorageDead(_5);
|
StorageDead(_2);
|
||||||
StorageDead(_4);
|
|
||||||
_9 = const 42_u32;
|
|
||||||
StorageDead(_3);
|
|
||||||
StorageDead(_1);
|
StorageDead(_1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ ALLOC0 (size: 8, align: 4) {
|
|
||||||
+ 04 00 00 00 00 __ __ __ │ .....░░░
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageDead(_8);
|
StorageDead(_8);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
_12 = Option::<u32>::None;
|
_12 = const Option::<u32>::None;
|
||||||
goto -> bb5;
|
goto -> bb5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,3 +131,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||||
unreachable;
|
unreachable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 8, align: 4) {
|
||||||
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageDead(_8);
|
StorageDead(_8);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
_12 = Option::<u32>::None;
|
_12 = const Option::<u32>::None;
|
||||||
goto -> bb5;
|
goto -> bb5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,3 +139,7 @@ fn forward_loop(_1: u32, _2: u32, _3: impl Fn(u32)) -> () {
|
||||||
resume;
|
resume;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 8, align: 4) {
|
||||||
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
|
||||||
bb1: {
|
bb1: {
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
_0 = Option::<u32>::None;
|
_0 = const Option::<u32>::None;
|
||||||
goto -> bb4;
|
goto -> bb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,3 +71,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 8, align: 4) {
|
||||||
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
|
||||||
bb1: {
|
bb1: {
|
||||||
StorageDead(_3);
|
StorageDead(_3);
|
||||||
StorageDead(_2);
|
StorageDead(_2);
|
||||||
_0 = Option::<u32>::None;
|
_0 = const Option::<u32>::None;
|
||||||
goto -> bb4;
|
goto -> bb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,3 +71,7 @@ fn range_iter_next(_1: &mut std::ops::Range<u32>) -> Option<u32> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 8, align: 4) {
|
||||||
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ fn ezmap(_1: Option<i32>) -> Option<i32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
_0 = Option::<i32>::None;
|
_0 = const Option::<i32>::None;
|
||||||
goto -> bb3;
|
goto -> bb3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,3 +46,7 @@ fn ezmap(_1: Option<i32>) -> Option<i32> {
|
||||||
unreachable;
|
unreachable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 8, align: 4) {
|
||||||
|
00 00 00 00 __ __ __ __ │ ....░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -4,239 +4,217 @@ fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:8:25: 8:39}, _2
|
||||||
let mut _0: bool;
|
let mut _0: bool;
|
||||||
let mut _3: &(usize, usize, usize, usize);
|
let mut _3: &(usize, usize, usize, usize);
|
||||||
let _4: &usize;
|
let _4: &usize;
|
||||||
let mut _5: &(usize, usize, usize, usize);
|
let _5: &usize;
|
||||||
let _6: &usize;
|
let _6: &usize;
|
||||||
let mut _7: &(usize, usize, usize, usize);
|
let _7: &usize;
|
||||||
let _8: &usize;
|
let mut _8: &&usize;
|
||||||
let mut _9: &(usize, usize, usize, usize);
|
let _9: &usize;
|
||||||
let _10: &usize;
|
let mut _10: &&usize;
|
||||||
let mut _11: &&usize;
|
let mut _15: bool;
|
||||||
let _12: &usize;
|
let mut _16: &&usize;
|
||||||
let mut _13: &&usize;
|
let _17: &usize;
|
||||||
let mut _18: bool;
|
let mut _18: &&usize;
|
||||||
let mut _19: &&usize;
|
let mut _23: bool;
|
||||||
let _20: &usize;
|
let mut _24: &&usize;
|
||||||
let mut _21: &&usize;
|
let _25: &usize;
|
||||||
let mut _26: bool;
|
let mut _26: &&usize;
|
||||||
let mut _27: &&usize;
|
let mut _31: bool;
|
||||||
let _28: &usize;
|
let mut _32: &&usize;
|
||||||
let mut _29: &&usize;
|
let _33: &usize;
|
||||||
let mut _34: bool;
|
let mut _34: &&usize;
|
||||||
let mut _35: &&usize;
|
|
||||||
let _36: &usize;
|
|
||||||
let mut _37: &&usize;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug a => _4;
|
debug a => _4;
|
||||||
debug b => _6;
|
debug b => _5;
|
||||||
debug c => _8;
|
debug c => _6;
|
||||||
debug d => _10;
|
debug d => _7;
|
||||||
scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
scope 2 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
||||||
debug self => _11;
|
debug self => _8;
|
||||||
debug other => _13;
|
debug other => _10;
|
||||||
let mut _14: &usize;
|
let mut _11: &usize;
|
||||||
let mut _15: &usize;
|
let mut _12: &usize;
|
||||||
scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
scope 3 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
||||||
debug self => _14;
|
debug self => _11;
|
||||||
debug other => _15;
|
debug other => _12;
|
||||||
let mut _16: usize;
|
let mut _13: usize;
|
||||||
let mut _17: usize;
|
let mut _14: usize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
scope 4 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
||||||
debug self => _19;
|
debug self => _16;
|
||||||
debug other => _21;
|
debug other => _18;
|
||||||
let mut _22: &usize;
|
let mut _19: &usize;
|
||||||
let mut _23: &usize;
|
let mut _20: &usize;
|
||||||
scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
scope 5 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
||||||
debug self => _22;
|
debug self => _19;
|
||||||
debug other => _23;
|
debug other => _20;
|
||||||
let mut _24: usize;
|
let mut _21: usize;
|
||||||
let mut _25: usize;
|
let mut _22: usize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
scope 6 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
||||||
debug self => _27;
|
debug self => _24;
|
||||||
debug other => _29;
|
debug other => _26;
|
||||||
let mut _30: &usize;
|
let mut _27: &usize;
|
||||||
let mut _31: &usize;
|
let mut _28: &usize;
|
||||||
scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
scope 7 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
||||||
debug self => _30;
|
debug self => _27;
|
||||||
debug other => _31;
|
debug other => _28;
|
||||||
let mut _32: usize;
|
let mut _29: usize;
|
||||||
let mut _33: usize;
|
let mut _30: usize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
scope 8 (inlined std::cmp::impls::<impl PartialOrd for &usize>::le) {
|
||||||
debug self => _35;
|
debug self => _32;
|
||||||
debug other => _37;
|
debug other => _34;
|
||||||
let mut _38: &usize;
|
let mut _35: &usize;
|
||||||
let mut _39: &usize;
|
let mut _36: &usize;
|
||||||
scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
scope 9 (inlined std::cmp::impls::<impl PartialOrd for usize>::le) {
|
||||||
debug self => _38;
|
debug self => _35;
|
||||||
debug other => _39;
|
debug other => _36;
|
||||||
let mut _40: usize;
|
let mut _37: usize;
|
||||||
let mut _41: usize;
|
let mut _38: usize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
_3 = deref_copy (*_2);
|
_3 = (*_2);
|
||||||
_4 = &((*_3).0: usize);
|
_4 = &((*_3).0: usize);
|
||||||
|
StorageLive(_5);
|
||||||
|
_5 = &((*_3).1: usize);
|
||||||
StorageLive(_6);
|
StorageLive(_6);
|
||||||
_5 = deref_copy (*_2);
|
_6 = &((*_3).2: usize);
|
||||||
_6 = &((*_5).1: usize);
|
StorageLive(_7);
|
||||||
StorageLive(_8);
|
_7 = &((*_3).3: usize);
|
||||||
_7 = deref_copy (*_2);
|
|
||||||
_8 = &((*_7).2: usize);
|
|
||||||
StorageLive(_10);
|
|
||||||
_9 = deref_copy (*_2);
|
|
||||||
_10 = &((*_9).3: usize);
|
|
||||||
StorageLive(_18);
|
|
||||||
StorageLive(_11);
|
|
||||||
_11 = &_4;
|
|
||||||
StorageLive(_13);
|
|
||||||
StorageLive(_12);
|
|
||||||
_12 = _8;
|
|
||||||
_13 = &_12;
|
|
||||||
StorageLive(_14);
|
|
||||||
StorageLive(_15);
|
StorageLive(_15);
|
||||||
_14 = deref_copy _4;
|
StorageLive(_8);
|
||||||
_15 = deref_copy _12;
|
_8 = &_4;
|
||||||
StorageLive(_16);
|
StorageLive(_10);
|
||||||
_16 = (*_14);
|
StorageLive(_9);
|
||||||
StorageLive(_17);
|
_9 = _6;
|
||||||
_17 = (*_15);
|
_10 = &_9;
|
||||||
_18 = Le(move _16, move _17);
|
_11 = _4;
|
||||||
StorageDead(_17);
|
_12 = _9;
|
||||||
StorageDead(_16);
|
StorageLive(_13);
|
||||||
StorageDead(_15);
|
_13 = (*_11);
|
||||||
|
StorageLive(_14);
|
||||||
|
_14 = (*_12);
|
||||||
|
_15 = Le(move _13, move _14);
|
||||||
StorageDead(_14);
|
StorageDead(_14);
|
||||||
switchInt(move _18) -> [0: bb1, otherwise: bb2];
|
StorageDead(_13);
|
||||||
|
switchInt(move _15) -> [0: bb1, otherwise: bb2];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
StorageDead(_12);
|
StorageDead(_9);
|
||||||
StorageDead(_13);
|
StorageDead(_10);
|
||||||
StorageDead(_11);
|
StorageDead(_8);
|
||||||
goto -> bb4;
|
goto -> bb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageDead(_12);
|
StorageDead(_9);
|
||||||
StorageDead(_13);
|
StorageDead(_10);
|
||||||
StorageDead(_11);
|
StorageDead(_8);
|
||||||
StorageLive(_26);
|
|
||||||
StorageLive(_19);
|
|
||||||
_19 = &_10;
|
|
||||||
StorageLive(_21);
|
|
||||||
StorageLive(_20);
|
|
||||||
_20 = _6;
|
|
||||||
_21 = &_20;
|
|
||||||
StorageLive(_22);
|
|
||||||
StorageLive(_23);
|
StorageLive(_23);
|
||||||
_22 = deref_copy _10;
|
StorageLive(_16);
|
||||||
_23 = deref_copy _20;
|
_16 = &_7;
|
||||||
StorageLive(_24);
|
StorageLive(_18);
|
||||||
_24 = (*_22);
|
StorageLive(_17);
|
||||||
StorageLive(_25);
|
_17 = _5;
|
||||||
_25 = (*_23);
|
_18 = &_17;
|
||||||
_26 = Le(move _24, move _25);
|
_19 = _7;
|
||||||
StorageDead(_25);
|
_20 = _17;
|
||||||
StorageDead(_24);
|
StorageLive(_21);
|
||||||
StorageDead(_23);
|
_21 = (*_19);
|
||||||
|
StorageLive(_22);
|
||||||
|
_22 = (*_20);
|
||||||
|
_23 = Le(move _21, move _22);
|
||||||
StorageDead(_22);
|
StorageDead(_22);
|
||||||
switchInt(move _26) -> [0: bb3, otherwise: bb8];
|
StorageDead(_21);
|
||||||
|
switchInt(move _23) -> [0: bb3, otherwise: bb8];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
StorageDead(_20);
|
StorageDead(_17);
|
||||||
StorageDead(_21);
|
StorageDead(_18);
|
||||||
StorageDead(_19);
|
StorageDead(_16);
|
||||||
goto -> bb4;
|
goto -> bb4;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb4: {
|
bb4: {
|
||||||
StorageLive(_34);
|
|
||||||
StorageLive(_27);
|
|
||||||
_27 = &_8;
|
|
||||||
StorageLive(_29);
|
|
||||||
StorageLive(_28);
|
|
||||||
_28 = _4;
|
|
||||||
_29 = &_28;
|
|
||||||
StorageLive(_30);
|
|
||||||
StorageLive(_31);
|
StorageLive(_31);
|
||||||
_30 = deref_copy _8;
|
StorageLive(_24);
|
||||||
_31 = deref_copy _28;
|
_24 = &_6;
|
||||||
StorageLive(_32);
|
StorageLive(_26);
|
||||||
_32 = (*_30);
|
StorageLive(_25);
|
||||||
StorageLive(_33);
|
_25 = _4;
|
||||||
_33 = (*_31);
|
_26 = &_25;
|
||||||
_34 = Le(move _32, move _33);
|
_27 = _6;
|
||||||
StorageDead(_33);
|
_28 = _25;
|
||||||
StorageDead(_32);
|
StorageLive(_29);
|
||||||
StorageDead(_31);
|
_29 = (*_27);
|
||||||
|
StorageLive(_30);
|
||||||
|
_30 = (*_28);
|
||||||
|
_31 = Le(move _29, move _30);
|
||||||
StorageDead(_30);
|
StorageDead(_30);
|
||||||
switchInt(move _34) -> [0: bb5, otherwise: bb6];
|
StorageDead(_29);
|
||||||
|
switchInt(move _31) -> [0: bb5, otherwise: bb6];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb5: {
|
bb5: {
|
||||||
StorageDead(_28);
|
StorageDead(_25);
|
||||||
StorageDead(_29);
|
StorageDead(_26);
|
||||||
StorageDead(_27);
|
StorageDead(_24);
|
||||||
_0 = const false;
|
_0 = const false;
|
||||||
goto -> bb7;
|
goto -> bb7;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb6: {
|
bb6: {
|
||||||
StorageDead(_28);
|
StorageDead(_25);
|
||||||
StorageDead(_29);
|
StorageDead(_26);
|
||||||
StorageDead(_27);
|
StorageDead(_24);
|
||||||
StorageLive(_35);
|
StorageLive(_32);
|
||||||
_35 = &_6;
|
_32 = &_5;
|
||||||
|
StorageLive(_34);
|
||||||
|
StorageLive(_33);
|
||||||
|
_33 = _7;
|
||||||
|
_34 = &_33;
|
||||||
|
_35 = _5;
|
||||||
|
_36 = _33;
|
||||||
StorageLive(_37);
|
StorageLive(_37);
|
||||||
StorageLive(_36);
|
_37 = (*_35);
|
||||||
_36 = _10;
|
|
||||||
_37 = &_36;
|
|
||||||
StorageLive(_38);
|
StorageLive(_38);
|
||||||
StorageLive(_39);
|
_38 = (*_36);
|
||||||
_38 = deref_copy _6;
|
_0 = Le(move _37, move _38);
|
||||||
_39 = deref_copy _36;
|
|
||||||
StorageLive(_40);
|
|
||||||
_40 = (*_38);
|
|
||||||
StorageLive(_41);
|
|
||||||
_41 = (*_39);
|
|
||||||
_0 = Le(move _40, move _41);
|
|
||||||
StorageDead(_41);
|
|
||||||
StorageDead(_40);
|
|
||||||
StorageDead(_39);
|
|
||||||
StorageDead(_38);
|
StorageDead(_38);
|
||||||
StorageDead(_36);
|
|
||||||
StorageDead(_37);
|
StorageDead(_37);
|
||||||
StorageDead(_35);
|
StorageDead(_33);
|
||||||
|
StorageDead(_34);
|
||||||
|
StorageDead(_32);
|
||||||
goto -> bb7;
|
goto -> bb7;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb7: {
|
bb7: {
|
||||||
StorageDead(_34);
|
StorageDead(_31);
|
||||||
goto -> bb9;
|
goto -> bb9;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb8: {
|
bb8: {
|
||||||
StorageDead(_20);
|
StorageDead(_17);
|
||||||
StorageDead(_21);
|
StorageDead(_18);
|
||||||
StorageDead(_19);
|
StorageDead(_16);
|
||||||
_0 = const true;
|
_0 = const true;
|
||||||
goto -> bb9;
|
goto -> bb9;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb9: {
|
bb9: {
|
||||||
StorageDead(_26);
|
StorageDead(_23);
|
||||||
StorageDead(_18);
|
StorageDead(_15);
|
||||||
StorageDead(_10);
|
StorageDead(_7);
|
||||||
StorageDead(_8);
|
|
||||||
StorageDead(_6);
|
StorageDead(_6);
|
||||||
|
StorageDead(_5);
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,46 +4,40 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:12:25: 12:41},
|
||||||
let mut _0: bool;
|
let mut _0: bool;
|
||||||
let mut _3: &(usize, usize, usize, usize);
|
let mut _3: &(usize, usize, usize, usize);
|
||||||
let _4: usize;
|
let _4: usize;
|
||||||
let mut _5: &(usize, usize, usize, usize);
|
let _5: usize;
|
||||||
let _6: usize;
|
let _6: usize;
|
||||||
let mut _7: &(usize, usize, usize, usize);
|
let _7: usize;
|
||||||
let _8: usize;
|
let mut _8: bool;
|
||||||
let mut _9: &(usize, usize, usize, usize);
|
let mut _9: bool;
|
||||||
let _10: usize;
|
let mut _10: bool;
|
||||||
let mut _11: bool;
|
|
||||||
let mut _12: bool;
|
|
||||||
let mut _13: bool;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug a => _4;
|
debug a => _4;
|
||||||
debug b => _6;
|
debug b => _5;
|
||||||
debug c => _8;
|
debug c => _6;
|
||||||
debug d => _10;
|
debug d => _7;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
_3 = deref_copy (*_2);
|
_3 = (*_2);
|
||||||
_4 = ((*_3).0: usize);
|
_4 = ((*_3).0: usize);
|
||||||
_5 = deref_copy (*_2);
|
_5 = ((*_3).1: usize);
|
||||||
_6 = ((*_5).1: usize);
|
_6 = ((*_3).2: usize);
|
||||||
_7 = deref_copy (*_2);
|
_7 = ((*_3).3: usize);
|
||||||
_8 = ((*_7).2: usize);
|
StorageLive(_8);
|
||||||
_9 = deref_copy (*_2);
|
_8 = Le(_4, _6);
|
||||||
_10 = ((*_9).3: usize);
|
switchInt(move _8) -> [0: bb2, otherwise: bb1];
|
||||||
StorageLive(_11);
|
|
||||||
_11 = Le(_4, _8);
|
|
||||||
switchInt(move _11) -> [0: bb2, otherwise: bb1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
StorageLive(_12);
|
StorageLive(_9);
|
||||||
_12 = Le(_10, _6);
|
_9 = Le(_7, _5);
|
||||||
switchInt(move _12) -> [0: bb2, otherwise: bb6];
|
switchInt(move _9) -> [0: bb2, otherwise: bb6];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageLive(_13);
|
StorageLive(_10);
|
||||||
_13 = Le(_8, _4);
|
_10 = Le(_6, _4);
|
||||||
switchInt(move _13) -> [0: bb3, otherwise: bb4];
|
switchInt(move _10) -> [0: bb3, otherwise: bb4];
|
||||||
}
|
}
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
|
@ -52,12 +46,12 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:12:25: 12:41},
|
||||||
}
|
}
|
||||||
|
|
||||||
bb4: {
|
bb4: {
|
||||||
_0 = Le(_6, _10);
|
_0 = Le(_5, _7);
|
||||||
goto -> bb5;
|
goto -> bb5;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb5: {
|
bb5: {
|
||||||
StorageDead(_13);
|
StorageDead(_10);
|
||||||
goto -> bb7;
|
goto -> bb7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,8 +61,8 @@ fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:12:25: 12:41},
|
||||||
}
|
}
|
||||||
|
|
||||||
bb7: {
|
bb7: {
|
||||||
StorageDead(_12);
|
StorageDead(_9);
|
||||||
StorageDead(_11);
|
StorageDead(_8);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_7);
|
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = Len((*_1));
|
_3 = Len((*_1));
|
||||||
|
@ -86,7 +85,6 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
StorageDead(_7);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,6 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
StorageLive(_7);
|
|
||||||
StorageLive(_4);
|
StorageLive(_4);
|
||||||
StorageLive(_3);
|
StorageLive(_3);
|
||||||
_3 = Len((*_1));
|
_3 = Len((*_1));
|
||||||
|
@ -86,7 +85,6 @@ fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
|
||||||
|
|
||||||
bb3: {
|
bb3: {
|
||||||
StorageDead(_4);
|
StorageDead(_4);
|
||||||
StorageDead(_7);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageDead(_8);
|
StorageDead(_8);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
_12 = Option::<usize>::None;
|
_12 = const Option::<usize>::None;
|
||||||
goto -> bb5;
|
goto -> bb5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,3 +147,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||||
unreachable;
|
unreachable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 16, align: 8) {
|
||||||
|
00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ │ ........░░░░░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||||
bb2: {
|
bb2: {
|
||||||
StorageDead(_8);
|
StorageDead(_8);
|
||||||
StorageDead(_7);
|
StorageDead(_7);
|
||||||
_12 = Option::<usize>::None;
|
_12 = const Option::<usize>::None;
|
||||||
goto -> bb5;
|
goto -> bb5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -155,3 +155,7 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () {
|
||||||
resume;
|
resume;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ALLOC0 (size: 16, align: 8) {
|
||||||
|
00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ │ ........░░░░░░░░
|
||||||
|
}
|
||||||
|
|
|
@ -3,16 +3,14 @@
|
||||||
|
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
let mut _0: ();
|
let mut _0: ();
|
||||||
let mut _1: bool;
|
let _1: bool;
|
||||||
let _2: bool;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug x => _2;
|
debug x => _1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
_2 = const false;
|
_1 = const false;
|
||||||
- switchInt(_2) -> [0: bb1, otherwise: bb2];
|
switchInt(const false) -> [0: bb1, otherwise: bb2];
|
||||||
+ switchInt(const false) -> [0: bb1, otherwise: bb2];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
|
|
@ -3,16 +3,14 @@
|
||||||
|
|
||||||
fn main() -> () {
|
fn main() -> () {
|
||||||
let mut _0: ();
|
let mut _0: ();
|
||||||
let mut _1: bool;
|
let _1: bool;
|
||||||
let _2: bool;
|
|
||||||
scope 1 {
|
scope 1 {
|
||||||
debug x => _2;
|
debug x => _1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bb0: {
|
bb0: {
|
||||||
_2 = const false;
|
_1 = const false;
|
||||||
- switchInt(_2) -> [0: bb1, otherwise: bb2];
|
switchInt(const false) -> [0: bb1, otherwise: bb2];
|
||||||
+ switchInt(const false) -> [0: bb1, otherwise: bb2];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bb1: {
|
bb1: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue