From 9835e2ae736235810b4ea1c162ca5e65c547e770 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 04:49:50 +0200 Subject: Merging upstream version 1.71.1+dfsg1. Signed-off-by: Daniel Baumann --- ...prop.dominate_storage.ReferencePropagation.diff | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff (limited to 'tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff') diff --git a/tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff b/tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff new file mode 100644 index 000000000..e158f64e9 --- /dev/null +++ b/tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff @@ -0,0 +1,38 @@ +- // MIR for `dominate_storage` before ReferencePropagation ++ // MIR for `dominate_storage` after ReferencePropagation + + fn dominate_storage() -> () { + let mut _0: (); // return place in scope 0 at $DIR/reference_prop.rs:+0:23: +0:23 + let mut _1: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _2: &i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _3: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _4: bool; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _5: i32; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + let mut _6: bool; // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + + bb0: { + goto -> bb1; // scope 0 at $DIR/reference_prop.rs:+8:11: +8:20 + } + + bb1: { + _1 = const 5_i32; // scope 0 at $DIR/reference_prop.rs:+10:13: +10:18 + _2 = &_1; // scope 0 at $DIR/reference_prop.rs:+11:13: +11:19 + goto -> bb2; // scope 0 at $DIR/reference_prop.rs:+12:13: +12:22 + } + + bb2: { + _5 = (*_2); // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + _0 = opaque::(_5) -> bb3; // scope 0 at $DIR/reference_prop.rs:+16:13: +16:38 + // mir::Constant + // + span: $DIR/reference_prop.rs:455:28: 455:34 + // + literal: Const { ty: fn(i32) {opaque::}, val: Value() } + } + + bb3: { + StorageDead(_1); // scope 0 at $DIR/reference_prop.rs:+19:13: +19:27 + StorageLive(_1); // scope 0 at $DIR/reference_prop.rs:+20:13: +20:27 + _6 = const true; // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL + switchInt(_6) -> [0: bb3, otherwise: bb1]; // scope 0 at $DIR/reference_prop.rs:+22:13: +22:47 + } + } + -- cgit v1.2.3