mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 04:26:48 +00:00
Ignore many tests on wasm32
This commit is contained in:
parent
e06de16a82
commit
04126398c2
@ -38,7 +38,7 @@ fn main() -> () {
|
||||
_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
|
||||
// + span: $DIR/array_index_is_temporary.rs:17:21: 17:24
|
||||
// + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// Retagging (from Stacked Borrows) relies on the array index being a fresh
|
||||
// temporary, so that side-effects cannot change it.
|
||||
// Test that this is indeed the case.
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: InstCombine
|
||||
// EMIT_MIR combine_array_len.norm2.InstCombine.diff
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
+ _5 = const 1_u8; // scope 1 at $DIR/aggregate.rs:+2:9: +2:10
|
||||
_4 = foo(move _5) -> bb1; // scope 1 at $DIR/aggregate.rs:+2:5: +2:11
|
||||
// mir::Constant
|
||||
// + span: $DIR/aggregate.rs:8:5: 8:8
|
||||
// + span: $DIR/aggregate.rs:9:5: 9:8
|
||||
// + literal: Const { ty: fn(u8) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ fn main() -> () {
|
||||
_5 = const 1_u8; // scope 1 at $DIR/aggregate.rs:+2:9: +2:10
|
||||
_4 = foo(move _5) -> bb1; // scope 1 at $DIR/aggregate.rs:+2:5: +2:11
|
||||
// mir::Constant
|
||||
// + span: $DIR/aggregate.rs:8:5: 8:8
|
||||
// + span: $DIR/aggregate.rs:9:5: 9:8
|
||||
// + literal: Const { ty: fn(u8) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -O
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// EMIT_MIR bad_op_div_by_zero.main.ConstProp.diff
|
||||
#[allow(unconditional_panic)]
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
|
||||
#[allow(unconditional_panic)]
|
||||
fn main() {
|
||||
|
@ -25,7 +25,7 @@
|
||||
StorageLive(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_8 = const _; // 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
|
||||
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:6:25: 6:35
|
||||
// + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_2 = &raw const (*_8); // 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
|
||||
|
@ -25,7 +25,7 @@
|
||||
StorageLive(_2); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
|
||||
_8 = const _; // 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
|
||||
// + span: $DIR/bad_op_unsafe_oob_for_slices.rs:6:25: 6:35
|
||||
// + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_2 = &raw const (*_8); // 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
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
// EMIT_MIR bad_op_unsafe_oob_for_slices.main.ConstProp.diff
|
||||
#[allow(unconditional_panic)]
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
StorageLive(_3); // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:16
|
||||
_3 = const _; // scope 0 at $DIR/const_prop_fails_gracefully.rs:+2:13: +2:16
|
||||
// mir::Constant
|
||||
// + span: $DIR/const_prop_fails_gracefully.rs:8:13: 8:16
|
||||
// + span: $DIR/const_prop_fails_gracefully.rs:9:13: 9:16
|
||||
// + literal: Const { ty: &i32, val: Unevaluated(FOO, [], None) }
|
||||
_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
|
||||
@ -29,7 +29,7 @@
|
||||
_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:9:5: 9:9
|
||||
// + span: $DIR/const_prop_fails_gracefully.rs:10:5: 10:9
|
||||
// + literal: Const { ty: fn(usize) {read}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
#[inline(never)]
|
||||
fn read(_: usize) { }
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-opt-level=1
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
let mut _3: u8; // in scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
||||
scope 1 {
|
||||
}
|
||||
scope 2 (inlined <u8 as Add>::add) { // at $DIR/inherit_overflow.rs:8:13: 8:47
|
||||
scope 2 (inlined <u8 as Add>::add) { // at $DIR/inherit_overflow.rs:9:13: 9:47
|
||||
debug self => _2; // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
debug other => _3; // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
let mut _4: (u8, bool); // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+Inline
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
_2 = (const (), const 0_u8, const 0_u8); // scope 0 at $DIR/issue_66971.rs:+1:12: +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:17:5: 17:11
|
||||
// + span: $DIR/issue_66971.rs:18:5: 18:11
|
||||
// + literal: Const { ty: fn(((), u8, u8)) {encode}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
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:12:5: 12:9
|
||||
// + span: $DIR/issue_67019.rs:13:5: 13:9
|
||||
// + literal: Const { ty: fn(((u8, u8),)) {test}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Z mir-opt-level=3
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
||||
// EMIT_MIR large_array_index.main.ConstProp.diff
|
||||
|
@ -16,7 +16,7 @@
|
||||
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:6:29: 6:32
|
||||
// + span: $DIR/mutable_variable_aggregate_partial_read.rs:7:29: 7:32
|
||||
// + literal: Const { ty: fn() -> (i32, i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test
|
||||
// compile-flags: -O
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
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:6:13: 6:16
|
||||
// + span: $DIR/mutable_variable_unprop_assign.rs:7:13: 7:16
|
||||
// + literal: Const { ty: fn() -> i32 {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test
|
||||
// compile-flags: -O
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// compile-flags: -O
|
||||
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// compile-flags: -C overflow-checks=on
|
||||
|
||||
// EMIT_MIR return_place.add.ConstProp.diff
|
||||
|
@ -15,7 +15,7 @@
|
||||
- _2 = consume(_1) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
|
||||
+ _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
|
||||
// + span: $DIR/scalar_literal_propagation.rs:5:5: 5:12
|
||||
// + literal: Const { ty: fn(u32) {consume}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
|
||||
fn main() {
|
||||
let x = 1;
|
||||
|
@ -20,7 +20,7 @@
|
||||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_9 = const _; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/slice_len.rs:7:6: 7:19
|
||||
// + span: $DIR/slice_len.rs:8:6: 8:19
|
||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_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
|
||||
|
@ -20,7 +20,7 @@
|
||||
StorageLive(_4); // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
_9 = const _; // scope 0 at $DIR/slice_len.rs:+1:6: +1:19
|
||||
// mir::Constant
|
||||
// + span: $DIR/slice_len.rs:7:6: 7:19
|
||||
// + span: $DIR/slice_len.rs:8:6: 8:19
|
||||
// + literal: Const { ty: &[u32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
|
||||
_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
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: ConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+InstCombine
|
||||
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
||||
|
@ -15,14 +15,14 @@
|
||||
bb1: {
|
||||
_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
|
||||
// + span: $DIR/switch_int.rs:10:14: 10:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_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
|
||||
// + span: $DIR/switch_int.rs:9:14: 9:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -15,14 +15,14 @@
|
||||
bb1: {
|
||||
_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
|
||||
// + span: $DIR/switch_int.rs:10:14: 10:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
_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
|
||||
// + span: $DIR/switch_int.rs:9:14: 9:17
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
#[inline(never)]
|
||||
fn foo(_: i32) { }
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
+ _1 = const (1_u32, 2_u32); // scope 0 at $DIR/tuple_literal_propagation.rs:+1:13: +1:19
|
||||
_2 = consume(_1) -> 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
|
||||
// + span: $DIR/tuple_literal_propagation.rs:6:5: 6:12
|
||||
// + literal: Const { ty: fn((u32, u32)) {consume}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
|
||||
fn main() {
|
||||
let x = (1, 2);
|
||||
|
@ -15,7 +15,7 @@
|
||||
_4 = &_3; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
|
||||
_0 = cmp_ref(_2, _4) -> bb1; // scope 0 at $DIR/borrowed_local.rs:+8:13: +8:45
|
||||
// mir::Constant
|
||||
// + span: $DIR/borrowed_local.rs:23:29: 23:36
|
||||
// + span: $DIR/borrowed_local.rs:24:29: 24:36
|
||||
// + literal: Const { ty: for<'a, 'b> fn(&'a u8, &'b u8) -> bool {cmp_ref}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
- _0 = opaque::<u8>(_3) -> bb2; // scope 0 at $DIR/borrowed_local.rs:+12:13: +12:38
|
||||
+ _0 = opaque::<u8>(_1) -> bb2; // scope 0 at $DIR/borrowed_local.rs:+12:13: +12:38
|
||||
// mir::Constant
|
||||
// + span: $DIR/borrowed_local.rs:27:28: 27:34
|
||||
// + span: $DIR/borrowed_local.rs:28:28: 28:34
|
||||
// + literal: Const { ty: fn(u8) -> bool {opaque::<u8>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: CopyProp
|
||||
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
@ -18,7 +18,7 @@
|
||||
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
|
||||
// + span: $DIR/branch.rs:14:13: 14:16
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
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
|
||||
// + span: $DIR/branch.rs:16:16: 16:20
|
||||
// + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@
|
||||
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
|
||||
// + span: $DIR/branch.rs:19:9: 19:12
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
//! Tests that we bail out when there are multiple assignments to the same local.
|
||||
// unit-test: CopyProp
|
||||
fn val() -> i32 {
|
||||
|
@ -13,7 +13,7 @@
|
||||
_3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:+1:11: +1:12
|
||||
_2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:+1:5: +1:13
|
||||
// mir::Constant
|
||||
// + span: $DIR/copy_propagation_arg.rs:16:5: 16:10
|
||||
// + span: $DIR/copy_propagation_arg.rs:17:5: 17:10
|
||||
// + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
_3 = _1; // scope 0 at $DIR/copy_propagation_arg.rs:+2:15: +2:16
|
||||
_2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:+2:9: +2:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/copy_propagation_arg.rs:11:9: 11:14
|
||||
// + span: $DIR/copy_propagation_arg.rs:12:9: 12:14
|
||||
// + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// Check that CopyProp does not propagate an assignment to a function argument
|
||||
// (doing so can break usages of the original argument value)
|
||||
// unit-test: CopyProp
|
||||
|
@ -11,7 +11,7 @@
|
||||
- _0 = opaque::<NotCopy>(move _1) -> bb1; // scope 0 at $DIR/custom_move_arg.rs:+3:9: +3:41
|
||||
+ _0 = opaque::<NotCopy>(_1) -> bb1; // scope 0 at $DIR/custom_move_arg.rs:+3:9: +3:41
|
||||
// mir::Constant
|
||||
// + span: $DIR/custom_move_arg.rs:15:24: 15:30
|
||||
// + span: $DIR/custom_move_arg.rs:16:24: 16:30
|
||||
// + literal: Const { ty: fn(NotCopy) {opaque::<NotCopy>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
- _0 = opaque::<NotCopy>(_3) -> bb2; // scope 0 at $DIR/custom_move_arg.rs:+7:9: +7:35
|
||||
+ _0 = opaque::<NotCopy>(_1) -> bb2; // scope 0 at $DIR/custom_move_arg.rs:+7:9: +7:35
|
||||
// mir::Constant
|
||||
// + span: $DIR/custom_move_arg.rs:19:24: 19:30
|
||||
// + span: $DIR/custom_move_arg.rs:20:24: 20:30
|
||||
// + literal: Const { ty: fn(NotCopy) {opaque::<NotCopy>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: CopyProp
|
||||
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
@ -24,7 +24,7 @@
|
||||
StorageLive(_1); // scope 0 at $DIR/cycle.rs:+1:9: +1:14
|
||||
_1 = val() -> bb1; // scope 0 at $DIR/cycle.rs:+1:17: +1:22
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:9:17: 9:20
|
||||
// + span: $DIR/cycle.rs:10:17: 10:20
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
_6 = _1; // scope 3 at $DIR/cycle.rs:+6:10: +6:11
|
||||
_5 = std::mem::drop::<i32>(move _6) -> bb2; // scope 3 at $DIR/cycle.rs:+6:5: +6:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:14:5: 14:9
|
||||
// + span: $DIR/cycle.rs:15:5: 15:9
|
||||
// + literal: Const { ty: fn(i32) {std::mem::drop::<i32>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
//! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
|
||||
// unit-test: CopyProp
|
||||
fn val() -> i32 {
|
||||
|
@ -18,7 +18,7 @@ fn f(_1: usize) -> usize {
|
||||
_4 = _1; // scope 1 at $DIR/dead_stores_79191.rs:+4:8: +4:9
|
||||
_0 = id::<usize>(move _4) -> bb1; // scope 1 at $DIR/dead_stores_79191.rs:+4:5: +4:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/dead_stores_79191.rs:12:5: 12:7
|
||||
// + span: $DIR/dead_stores_79191.rs:13:5: 13:7
|
||||
// + literal: Const { ty: fn(usize) -> usize {id::<usize>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: CopyProp
|
||||
|
||||
fn id<T>(x: T) -> T {
|
||||
|
@ -18,7 +18,7 @@ fn f(_1: usize) -> usize {
|
||||
_4 = _1; // scope 1 at $DIR/dead_stores_better.rs:+4:8: +4:9
|
||||
_0 = id::<usize>(move _4) -> bb1; // scope 1 at $DIR/dead_stores_better.rs:+4:5: +4:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/dead_stores_better.rs:16:5: 16:7
|
||||
// + span: $DIR/dead_stores_better.rs:17:5: 17:7
|
||||
// + literal: Const { ty: fn(usize) -> usize {id::<usize>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
|
||||
// that that pass enables this one to do more optimizations.
|
||||
|
||||
|
@ -51,7 +51,7 @@
|
||||
StorageDead(_7); // scope 2 at $DIR/issue_107511.rs:+6:17: +6:18
|
||||
_5 = core::slice::<impl [i32]>::len(move _6) -> bb1; // scope 2 at $DIR/issue_107511.rs:+6:17: +6:24
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue_107511.rs:10:19: 10:22
|
||||
// + span: $DIR/issue_107511.rs:11:19: 11:22
|
||||
// + literal: Const { ty: for<'a> fn(&'a [i32]) -> usize {core::slice::<impl [i32]>::len}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@
|
||||
StorageDead(_5); // scope 2 at $DIR/issue_107511.rs:+6:23: +6:24
|
||||
_3 = <std::ops::Range<usize> as IntoIterator>::into_iter(move _4) -> bb2; // scope 2 at $DIR/issue_107511.rs:+6:14: +6:24
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue_107511.rs:10:14: 10:24
|
||||
// + span: $DIR/issue_107511.rs:11:14: 11:24
|
||||
// + literal: Const { ty: fn(std::ops::Range<usize>) -> <std::ops::Range<usize> as IntoIterator>::IntoIter {<std::ops::Range<usize> as IntoIterator>::into_iter}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@
|
||||
_12 = &mut (*_13); // scope 3 at $DIR/issue_107511.rs:+6:14: +6:24
|
||||
_11 = <std::ops::Range<usize> as Iterator>::next(move _12) -> bb4; // scope 3 at $DIR/issue_107511.rs:+6:14: +6:24
|
||||
// mir::Constant
|
||||
// + span: $DIR/issue_107511.rs:10:14: 10:24
|
||||
// + span: $DIR/issue_107511.rs:11:14: 11:24
|
||||
// + literal: Const { ty: for<'a> fn(&'a mut std::ops::Range<usize>) -> Option<<std::ops::Range<usize> as Iterator>::Item> {<std::ops::Range<usize> as Iterator>::next}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: CopyProp
|
||||
|
||||
// EMIT_MIR issue_107511.main.CopyProp.diff
|
||||
|
@ -24,7 +24,7 @@
|
||||
- _3 = g::<T>(move _4, move _5) -> bb1; // scope 1 at $DIR/move_arg.rs:+2:5: +2:12
|
||||
+ _3 = g::<T>(_1, _1) -> bb1; // scope 1 at $DIR/move_arg.rs:+2:5: +2:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/move_arg.rs:7:5: 7:6
|
||||
// + span: $DIR/move_arg.rs:8:5: 8:6
|
||||
// + literal: Const { ty: fn(T, T) {g::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// Test that we do not move multiple times from the same local.
|
||||
// unit-test: CopyProp
|
||||
|
||||
|
@ -13,14 +13,14 @@
|
||||
+ _3 = (_1.0: u8); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
|
||||
+ _0 = opaque::<Foo>(_1) -> bb1; // scope 0 at $DIR/move_projection.rs:+6:13: +6:44
|
||||
// mir::Constant
|
||||
// + span: $DIR/move_projection.rs:19:28: 19:34
|
||||
// + span: $DIR/move_projection.rs:20:28: 20:34
|
||||
// + literal: Const { ty: fn(Foo) -> bool {opaque::<Foo>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb1: {
|
||||
_0 = opaque::<u8>(move _3) -> bb2; // scope 0 at $DIR/move_projection.rs:+9:13: +9:44
|
||||
// mir::Constant
|
||||
// + span: $DIR/move_projection.rs:22:28: 22:34
|
||||
// + span: $DIR/move_projection.rs:23:28: 23:34
|
||||
// + literal: Const { ty: fn(u8) -> bool {opaque::<u8>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: CopyProp
|
||||
|
||||
#![feature(custom_mir, core_intrinsics)]
|
||||
|
@ -39,7 +39,7 @@
|
||||
- _6 = opaque::<*mut u8>(move _7) -> bb1; // scope 4 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
+ _6 = opaque::<*mut u8>(_2) -> bb1; // scope 4 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
// mir::Constant
|
||||
// + span: $DIR/reborrow.rs:38:5: 38:11
|
||||
// + span: $DIR/reborrow.rs:39:5: 39:11
|
||||
// + literal: Const { ty: fn(*mut u8) {opaque::<*mut u8>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
- _5 = opaque::<*mut u8>(move _6) -> bb1; // scope 4 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
+ _5 = opaque::<*mut u8>(_2) -> bb1; // scope 4 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
// mir::Constant
|
||||
// + span: $DIR/reborrow.rs:30:5: 30:11
|
||||
// + span: $DIR/reborrow.rs:31:5: 31:11
|
||||
// + literal: Const { ty: fn(*mut u8) {opaque::<*mut u8>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
- _5 = opaque::<&mut u8>(move _6) -> bb1; // scope 3 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
+ _5 = opaque::<&mut u8>(move _2) -> bb1; // scope 3 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
// mir::Constant
|
||||
// + span: $DIR/reborrow.rs:14:5: 14:11
|
||||
// + span: $DIR/reborrow.rs:15:5: 15:11
|
||||
// + literal: Const { ty: fn(&mut u8) {opaque::<&mut u8>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
- _5 = opaque::<&mut u8>(move _6) -> bb1; // scope 3 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
+ _5 = opaque::<&mut u8>(move _2) -> bb1; // scope 3 at $DIR/reborrow.rs:+4:5: +4:14
|
||||
// mir::Constant
|
||||
// + span: $DIR/reborrow.rs:22:5: 22:11
|
||||
// + span: $DIR/reborrow.rs:23:5: 23:11
|
||||
// + literal: Const { ty: fn(&mut u8) {opaque::<&mut u8>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// Check that CopyProp considers reborrows as not mutating the pointer.
|
||||
// unit-test: CopyProp
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DataflowConstProp
|
||||
// compile-flags: -Coverflow-checks=on
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
let mut _3: u8; // in scope 0 at $DIR/inherit_overflow.rs:+3:13: +3:47
|
||||
scope 1 {
|
||||
}
|
||||
scope 2 (inlined <u8 as Add>::add) { // at $DIR/inherit_overflow.rs:8:13: 8:47
|
||||
scope 2 (inlined <u8 as Add>::add) { // at $DIR/inherit_overflow.rs:9:13: 9:47
|
||||
debug self => _2; // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
debug other => _3; // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
let mut _4: (u8, bool); // in scope 2 at $SRC_DIR/core/src/ops/arith.rs:LL:COL
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DataflowConstProp
|
||||
// compile-flags: -Zmir-enable-passes=+Inline
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
_3 = &(*_4); // scope 1 at $DIR/ref_without_sb.rs:+2:12: +2:14
|
||||
_2 = escape::<i32>(move _3) -> bb1; // scope 1 at $DIR/ref_without_sb.rs:+2:5: +2:15
|
||||
// mir::Constant
|
||||
// + span: $DIR/ref_without_sb.rs:12:5: 12:11
|
||||
// + span: $DIR/ref_without_sb.rs:13:5: 13:11
|
||||
// + literal: Const { ty: for<'a> fn(&'a i32) {escape::<i32>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
StorageLive(_5); // scope 1 at $DIR/ref_without_sb.rs:+4:5: +4:20
|
||||
_5 = some_function() -> bb2; // scope 1 at $DIR/ref_without_sb.rs:+4:5: +4:20
|
||||
// mir::Constant
|
||||
// + span: $DIR/ref_without_sb.rs:14:5: 14:18
|
||||
// + span: $DIR/ref_without_sb.rs:15:5: 15:18
|
||||
// + literal: Const { ty: fn() {some_function}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DataflowConstProp
|
||||
|
||||
#[inline(never)]
|
||||
|
@ -32,7 +32,7 @@
|
||||
_5 = _3; // scope 3 at $DIR/sibling_ptr.rs:+4:10: +4:11
|
||||
_4 = ptr::mut_ptr::<impl *mut u8>::add(move _5, const 1_usize) -> bb1; // scope 3 at $DIR/sibling_ptr.rs:+4:10: +4:18
|
||||
// mir::Constant
|
||||
// + span: $DIR/sibling_ptr.rs:15:12: 15:15
|
||||
// + span: $DIR/sibling_ptr.rs:16:12: 16:15
|
||||
// + literal: Const { ty: unsafe fn(*mut u8, usize) -> *mut u8 {ptr::mut_ptr::<impl *mut u8>::add}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// This attempts to modify `x.1` via a pointer derived from `addr_of_mut!(x.0)`.
|
||||
// According to Miri, that is UB. However, T-opsem has not finalized that
|
||||
// decision and as such we cannot rely on it in optimizations. Consequently,
|
||||
|
@ -25,7 +25,7 @@
|
||||
- _2 = foo(move _3) -> bb1; // scope 1 at $DIR/terminator.rs:+3:5: +3:15
|
||||
+ _2 = foo(const 2_i32) -> bb1; // scope 1 at $DIR/terminator.rs:+3:5: +3:15
|
||||
// mir::Constant
|
||||
// + span: $DIR/terminator.rs:9:5: 9:8
|
||||
// + span: $DIR/terminator.rs:10:5: 10:8
|
||||
// + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DataflowConstProp
|
||||
|
||||
fn foo(n: i32) {}
|
||||
|
@ -32,7 +32,7 @@
|
||||
+ StorageLive(_4); // scope 0 at $DIR/cycle.rs:+3:11: +3:17
|
||||
+ _4 = cond() -> bb2; // scope 0 at $DIR/cycle.rs:+3:11: +3:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:12:11: 12:15
|
||||
// + span: $DIR/cycle.rs:13:11: 13:15
|
||||
// + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DeadStoreElimination
|
||||
|
||||
#[inline(never)]
|
||||
|
@ -19,7 +19,7 @@
|
||||
_3 = &(*_1); // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
_2 = core::str::<impl str>::as_bytes(move _3) -> bb1; // scope 0 at $DIR/deduplicate_blocks.rs:+1:11: +1:23
|
||||
// mir::Constant
|
||||
// + span: $DIR/deduplicate_blocks.rs:5:13: 5:21
|
||||
// + span: $DIR/deduplicate_blocks.rs:6:13: 6:21
|
||||
// + literal: Const { ty: for<'a> fn(&'a str) -> &'a [u8] {core::str::<impl str>::as_bytes}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DeduplicateBlocks
|
||||
|
||||
// EMIT_MIR deduplicate_blocks.is_line_doc_comment_2.DeduplicateBlocks.diff
|
||||
|
@ -22,7 +22,7 @@
|
||||
+ nop; // scope 0 at $DIR/branch.rs:+1:9: +1:10
|
||||
+ _0 = val() -> bb1; // scope 0 at $DIR/branch.rs:+1:13: +1:18
|
||||
// mir::Constant
|
||||
// + span: $DIR/branch.rs:13:13: 13:16
|
||||
// + span: $DIR/branch.rs:14:13: 14:16
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
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
|
||||
// + span: $DIR/branch.rs:16:16: 16:20
|
||||
// + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@
|
||||
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
|
||||
// + span: $DIR/branch.rs:19:9: 19:12
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
//! Tests that assignment in both branches of an `if` are eliminated.
|
||||
// unit-test: DestinationPropagation
|
||||
fn val() -> i32 {
|
||||
|
@ -16,7 +16,7 @@
|
||||
+ nop; // scope 0 at $DIR/copy_propagation_arg.rs:+1:11: +1:12
|
||||
+ _2 = dummy(move _1) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:+1:5: +1:13
|
||||
// mir::Constant
|
||||
// + span: $DIR/copy_propagation_arg.rs:16:5: 16:10
|
||||
// + span: $DIR/copy_propagation_arg.rs:17:5: 17:10
|
||||
// + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
- _2 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:+2:9: +2:17
|
||||
+ _1 = dummy(move _3) -> bb1; // scope 0 at $DIR/copy_propagation_arg.rs:+2:9: +2:17
|
||||
// mir::Constant
|
||||
// + span: $DIR/copy_propagation_arg.rs:11:9: 11:14
|
||||
// + span: $DIR/copy_propagation_arg.rs:12:9: 12:14
|
||||
// + literal: Const { ty: fn(u8) -> u8 {dummy}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// Check that DestinationPropagation does not propagate an assignment to a function argument
|
||||
// (doing so can break usages of the original argument value)
|
||||
// unit-test: DestinationPropagation
|
||||
|
@ -28,7 +28,7 @@
|
||||
+ nop; // scope 0 at $DIR/cycle.rs:+1:9: +1:14
|
||||
+ _6 = val() -> bb1; // scope 0 at $DIR/cycle.rs:+1:17: +1:22
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:9:17: 9:20
|
||||
// + span: $DIR/cycle.rs:10:17: 10:20
|
||||
// + literal: Const { ty: fn() -> i32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
+ nop; // scope 3 at $DIR/cycle.rs:+6:10: +6:11
|
||||
_5 = std::mem::drop::<i32>(move _6) -> bb2; // scope 3 at $DIR/cycle.rs:+6:5: +6:12
|
||||
// mir::Constant
|
||||
// + span: $DIR/cycle.rs:14:5: 14:9
|
||||
// + span: $DIR/cycle.rs:15:5: 15:9
|
||||
// + literal: Const { ty: fn(i32) {std::mem::drop::<i32>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
//! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code.
|
||||
// unit-test: DestinationPropagation
|
||||
fn val() -> i32 {
|
||||
|
@ -22,7 +22,7 @@ fn f(_1: usize) -> usize {
|
||||
nop; // scope 1 at $DIR/dead_stores_79191.rs:+4:8: +4:9
|
||||
_0 = id::<usize>(move _1) -> bb1; // scope 1 at $DIR/dead_stores_79191.rs:+4:5: +4:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/dead_stores_79191.rs:12:5: 12:7
|
||||
// + span: $DIR/dead_stores_79191.rs:13:5: 13:7
|
||||
// + literal: Const { ty: fn(usize) -> usize {id::<usize>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// unit-test: DestinationPropagation
|
||||
|
||||
fn id<T>(x: T) -> T {
|
||||
|
@ -21,7 +21,7 @@ fn f(_1: usize) -> usize {
|
||||
nop; // scope 1 at $DIR/dead_stores_better.rs:+4:8: +4:9
|
||||
_0 = id::<usize>(move _1) -> bb1; // scope 1 at $DIR/dead_stores_better.rs:+4:5: +4:10
|
||||
// mir::Constant
|
||||
// + span: $DIR/dead_stores_better.rs:16:5: 16:7
|
||||
// + span: $DIR/dead_stores_better.rs:17:5: 17:7
|
||||
// + literal: Const { ty: fn(usize) -> usize {id::<usize>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
|
||||
// that that pass enables this one to do more optimizations.
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
//! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too.
|
||||
// unit-test: DestinationPropagation
|
||||
// EMIT_MIR simple.nrvo.DestinationPropagation.diff
|
||||
|
@ -10,7 +10,7 @@
|
||||
debug un => _1; // in scope 1 at $DIR/union.rs:+5:9: +5:11
|
||||
scope 2 {
|
||||
}
|
||||
scope 3 (inlined std::mem::drop::<u32>) { // at $DIR/union.rs:15:5: 15:27
|
||||
scope 3 (inlined std::mem::drop::<u32>) { // at $DIR/union.rs:16:5: 16:27
|
||||
debug _x => _3; // in scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
|
||||
}
|
||||
}
|
||||
@ -20,7 +20,7 @@
|
||||
StorageLive(_2); // scope 0 at $DIR/union.rs:+5:23: +5:28
|
||||
_2 = val() -> bb1; // scope 0 at $DIR/union.rs:+5:23: +5:28
|
||||
// mir::Constant
|
||||
// + span: $DIR/union.rs:13:23: 13:26
|
||||
// + span: $DIR/union.rs:14:23: 14:26
|
||||
// + literal: Const { ty: fn() -> u32 {val}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
//! Tests that we can propagate into places that are projections into unions
|
||||
// compile-flags: -Zunsound-mir-opts
|
||||
fn val() -> u32 {
|
||||
|
@ -36,7 +36,7 @@
|
||||
- _6 = _2; // scope 1 at $DIR/unreachable.rs:+3:14: +3:15
|
||||
- _4 = g::<T>(move _5, move _6) -> bb2; // scope 1 at $DIR/unreachable.rs:+3:9: +3:16
|
||||
- // mir::Constant
|
||||
- // + span: $DIR/unreachable.rs:11:9: 11:10
|
||||
- // + span: $DIR/unreachable.rs:12:9: 12:10
|
||||
- // + literal: Const { ty: fn(T, T) {g::<T>}, val: Value(<ZST>) }
|
||||
- }
|
||||
-
|
||||
@ -60,7 +60,7 @@
|
||||
+ _9 = _1; // scope 1 at $DIR/unreachable.rs:+5:14: +5:15
|
||||
+ _7 = g::<T>(move _1, move _9) -> bb2; // scope 1 at $DIR/unreachable.rs:+5:9: +5:16
|
||||
// mir::Constant
|
||||
// + span: $DIR/unreachable.rs:13:9: 13:10
|
||||
// + span: $DIR/unreachable.rs:14:9: 14:10
|
||||
// + literal: Const { ty: fn(T, T) {g::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// Check that unreachable code is removed after the destination propagation.
|
||||
// Regression test for issue #105428.
|
||||
//
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// compile-flags: -Copt-level=0 -Coverflow-checks=yes
|
||||
|
||||
// Tests that division with a const does not emit a panicking branch for overflow
|
||||
|
@ -40,7 +40,7 @@
|
||||
_5 = &(*_1); // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
_4 = Formatter::<'_>::sign_plus(move _5) -> bb1; // scope 0 at $DIR/funky_arms.rs:+4:22: +4:37
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:15:26: 15:35
|
||||
// + span: $DIR/funky_arms.rs:16:26: 16:35
|
||||
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> bool {Formatter::<'_>::sign_plus}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
_8 = &(*_1); // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
_7 = Formatter::<'_>::precision(move _8) -> bb5; // scope 3 at $DIR/funky_arms.rs:+13:30: +13:45
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:24:34: 24:43
|
||||
// + span: $DIR/funky_arms.rs:25:34: 25:43
|
||||
// + literal: Const { ty: for<'a> fn(&'a Formatter<'_>) -> Option<usize> {Formatter::<'_>::precision}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@
|
||||
StorageDead(_15); // scope 3 at $DIR/funky_arms.rs:+15:78: +15:79
|
||||
_0 = float_to_exponential_common_exact::<T>(_1, _2, move _13, move _14, _3) -> bb7; // scope 3 at $DIR/funky_arms.rs:+15:9: +15:87
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:26:9: 26:42
|
||||
// + span: $DIR/funky_arms.rs:27:9: 27:42
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(&'a mut Formatter<'b>, &'c T, Sign, u32, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_exact::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@
|
||||
_20 = _6; // scope 2 at $DIR/funky_arms.rs:+17:56: +17:60
|
||||
_0 = float_to_exponential_common_shortest::<T>(_1, _2, move _20, _3) -> bb9; // scope 2 at $DIR/funky_arms.rs:+17:9: +17:68
|
||||
// mir::Constant
|
||||
// + span: $DIR/funky_arms.rs:28:9: 28:45
|
||||
// + span: $DIR/funky_arms.rs:29:9: 29:45
|
||||
// + literal: Const { ty: for<'a, 'b, 'c> fn(&'a mut Formatter<'b>, &'c T, Sign, bool) -> Result<(), std::fmt::Error> {float_to_exponential_common_shortest::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// ignore-wasm32 compiled with panic=abort by default
|
||||
// compile-flags: --crate-type lib -Cdebug-assertions=no
|
||||
|
||||
#![feature(flt2dec)]
|
||||
|
@ -9,11 +9,11 @@
|
||||
let mut _4: &<Q as Query>::C; // in scope 0 at $DIR/dyn_trait.rs:+2:23: +2:24
|
||||
scope 1 {
|
||||
debug c => _2; // in scope 1 at $DIR/dyn_trait.rs:+1:9: +1:10
|
||||
+ scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn_trait.rs:34:5: 34:25
|
||||
+ debug c => _4; // in scope 2 at $DIR/dyn_trait.rs:26:36: 26:37
|
||||
+ let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
|
||||
+ scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn_trait.rs:27:5: 27:16
|
||||
+ debug c => _5; // in scope 3 at $DIR/dyn_trait.rs:20:27: 20:28
|
||||
+ scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn_trait.rs:35:5: 35:25
|
||||
+ debug c => _4; // in scope 2 at $DIR/dyn_trait.rs:27:36: 27:37
|
||||
+ let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn_trait.rs:28:14: 28:15
|
||||
+ scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn_trait.rs:28:5: 28:16
|
||||
+ debug c => _5; // in scope 3 at $DIR/dyn_trait.rs:21:27: 21:28
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
@ -24,7 +24,7 @@
|
||||
_3 = &(*_1); // scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
|
||||
_2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn_trait.rs:+1:13: +1:24
|
||||
// mir::Constant
|
||||
// + span: $DIR/dyn_trait.rs:33:13: 33:21
|
||||
// + span: $DIR/dyn_trait.rs:34:13: 34:21
|
||||
// + user_ty: UserType(0)
|
||||
// + literal: Const { ty: for<'a> fn(&'a T) -> &'a <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
|
||||
}
|
||||
@ -34,18 +34,18 @@
|
||||
StorageLive(_4); // scope 1 at $DIR/dyn_trait.rs:+2:23: +2:24
|
||||
_4 = &(*_2); // scope 1 at $DIR/dyn_trait.rs:+2:23: +2:24
|
||||
- _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn_trait.rs:+2:5: +2:25
|
||||
+ StorageLive(_5); // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
|
||||
+ _5 = _4 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
|
||||
+ _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(_5) -> bb2; // scope 3 at $DIR/dyn_trait.rs:21:5: 21:22
|
||||
+ StorageLive(_5); // scope 2 at $DIR/dyn_trait.rs:28:14: 28:15
|
||||
+ _5 = _4 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn_trait.rs:28:14: 28:15
|
||||
+ _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(_5) -> bb2; // scope 3 at $DIR/dyn_trait.rs:22:5: 22:22
|
||||
// mir::Constant
|
||||
- // + span: $DIR/dyn_trait.rs:34:5: 34:22
|
||||
- // + span: $DIR/dyn_trait.rs:35:5: 35:22
|
||||
- // + literal: Const { ty: for<'a> fn(&'a <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
|
||||
+ // + span: $DIR/dyn_trait.rs:21:7: 21:20
|
||||
+ // + span: $DIR/dyn_trait.rs:22:7: 22:20
|
||||
+ // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
|
||||
}
|
||||
|
||||
bb2: {
|
||||
+ StorageDead(_5); // scope 2 at $DIR/dyn_trait.rs:27:15: 27:16
|
||||
+ StorageDead(_5); // scope 2 at $DIR/dyn_trait.rs:28:15: 28:16
|
||||
StorageDead(_4); // scope 1 at $DIR/dyn_trait.rs:+2:24: +2:25
|
||||
StorageDead(_2); // scope 0 at $DIR/dyn_trait.rs:+3:1: +3:2
|
||||
return; // scope 0 at $DIR/dyn_trait.rs:+3:2: +3: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