summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff')
-rw-r--r--tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff b/tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff
new file mode 100644
index 000000000..8bdd2ede6
--- /dev/null
+++ b/tests/mir-opt/lower_array_len.array_len_reborrow.NormalizeArrayLen.diff
@@ -0,0 +1,44 @@
+- // MIR for `array_len_reborrow` before NormalizeArrayLen
++ // MIR for `array_len_reborrow` after NormalizeArrayLen
+
+ fn array_len_reborrow(_1: [u8; N]) -> usize {
+ debug arr => _1; // in scope 0 at $DIR/lower_array_len.rs:+0:43: +0:50
+ let mut _0: usize; // return place in scope 0 at $DIR/lower_array_len.rs:+0:64: +0:69
+ let _2: &mut [u8]; // in scope 0 at $DIR/lower_array_len.rs:+1:9: +1:12
+ let mut _3: &mut [u8; N]; // in scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ let mut _4: &mut [u8; N]; // in scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ let mut _6: &[u8]; // in scope 0 at $DIR/lower_array_len.rs:+3:5: +3:14
+ scope 1 {
+ debug arr => _2; // in scope 1 at $DIR/lower_array_len.rs:+1:9: +1:12
+ let _5: &[u8]; // in scope 1 at $DIR/lower_array_len.rs:+2:9: +2:12
+ scope 2 {
+ debug arr => _5; // in scope 2 at $DIR/lower_array_len.rs:+2:9: +2:12
+ }
+ }
+
+ bb0: {
+ StorageLive(_2); // scope 0 at $DIR/lower_array_len.rs:+1:9: +1:12
+ StorageLive(_3); // scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ StorageLive(_4); // scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ _4 = &mut _1; // scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ _3 = &mut (*_4); // scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ _2 = move _3 as &mut [u8] (Pointer(Unsize)); // scope 0 at $DIR/lower_array_len.rs:+1:25: +1:33
+ StorageDead(_3); // scope 0 at $DIR/lower_array_len.rs:+1:32: +1:33
+ StorageDead(_4); // scope 0 at $DIR/lower_array_len.rs:+1:33: +1:34
+ StorageLive(_5); // scope 1 at $DIR/lower_array_len.rs:+2:9: +2:12
+ _5 = &(*_2); // scope 1 at $DIR/lower_array_len.rs:+2:15: +2:20
+ StorageLive(_6); // scope 2 at $DIR/lower_array_len.rs:+3:5: +3:14
+ _6 = &(*_5); // scope 2 at $DIR/lower_array_len.rs:+3:5: +3:14
+- _0 = Len((*_6)); // scope 2 at $DIR/lower_array_len.rs:+3:5: +3:14
++ _0 = const N; // scope 2 at $DIR/lower_array_len.rs:+3:5: +3:14
+ goto -> bb1; // scope 2 at $DIR/lower_array_len.rs:+3:5: +3:14
+ }
+
+ bb1: {
+ StorageDead(_6); // scope 2 at $DIR/lower_array_len.rs:+3:13: +3:14
+ StorageDead(_5); // scope 1 at $DIR/lower_array_len.rs:+4:1: +4:2
+ StorageDead(_2); // scope 0 at $DIR/lower_array_len.rs:+4:1: +4:2
+ return; // scope 0 at $DIR/lower_array_len.rs:+4:2: +4:2
+ }
+ }
+