Skip to content

Commit a5c1851

Browse files
Fix codegen and mir-opt tests
Mostly renamed allocations, but I'm not sure about the const prop tests
1 parent c5bfbb6 commit a5c1851

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

src/librustc_mir/interpret/eval_context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
760760
self.deallocate_local(local.value)?;
761761
}
762762

763-
let return_place = frame.return_place;
764763
if M::after_stack_pop(self, frame, unwinding)? == StackPopJump::NoJump {
765764
// The hook already did everything.
766765
// We want to skip the `info!` below, hence early return.

src/test/codegen/consts.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
// CHECK: @STATIC = {{.*}}, align 4
1111

1212
// This checks the constants from inline_enum_const
13-
// CHECK: @alloc5 = {{.*}}, align 2
13+
// CHECK: @alloc7 = {{.*}}, align 2
1414

1515
// This checks the constants from {low,high}_align_const, they share the same
1616
// constant, but the alignment differs, so the higher one should be used
17-
// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc15, i32 0, i32 0, i32 0), {{.*}}
17+
// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc19, i32 0, i32 0, i32 0), {{.*}}
1818

1919
#[derive(Copy, Clone)]
2020
// repr(i16) is required for the {low,high}_align_const test

src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,44 @@ fn main() -> () {
3030
}
3131

3232
alloc0 (static: FOO, size: 16, align: 8) {
33-
╾──────alloc24+0──────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
33+
╾──────alloc25+0──────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
3434
}
3535

36-
alloc24 (size: 72, align: 8) {
37-
0x00 │ 00 00 00 00 __ __ __ __ ╾──────alloc9+0───────╼ │ ....░░░░╾──────╼
36+
alloc25 (size: 72, align: 8) {
37+
0x00 │ 00 00 00 00 __ __ __ __ ╾──────alloc10+0──────╼ │ ....░░░░╾──────╼
3838
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
39-
0x20 │ ╾──────alloc14+0──────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
40-
0x30 │ 01 00 00 00 2a 00 00 00 ╾──────alloc22+0──────╼ │ ....*...╾──────╼
39+
0x20 │ ╾──────alloc15+0──────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
40+
0x30 │ 01 00 00 00 2a 00 00 00 ╾──────alloc23+0──────╼ │ ....*...╾──────╼
4141
0x40 │ 03 00 00 00 00 00 00 00 │ ........
4242
}
4343

44-
alloc9 (size: 0, align: 8) {}
44+
alloc10 (size: 0, align: 8) {}
4545

46-
alloc14 (size: 16, align: 8) {
47-
╾──────alloc12+0──────╼ ╾──────alloc13+0──────╼ │ ╾──────╼╾──────╼
46+
alloc15 (size: 16, align: 8) {
47+
╾──────alloc13+0──────╼ ╾──────alloc14+0──────╼ │ ╾──────╼╾──────╼
4848
}
4949

50-
alloc12 (size: 1, align: 1) {
50+
alloc13 (size: 1, align: 1) {
5151
05 │ .
5252
}
5353

54-
alloc13 (size: 1, align: 1) {
54+
alloc14 (size: 1, align: 1) {
5555
06 │ .
5656
}
5757

58-
alloc22 (size: 24, align: 8) {
59-
0x00 │ ╾──────alloc18+3──────╼ ╾──────alloc19+0──────╼ │ ╾──────╼╾──────╼
60-
0x10 │ ╾──────alloc21+2──────╼ │ ╾──────╼
58+
alloc23 (size: 24, align: 8) {
59+
0x00 │ ╾──────alloc19+3──────╼ ╾──────alloc20+0──────╼ │ ╾──────╼╾──────╼
60+
0x10 │ ╾──────alloc22+2──────╼ │ ╾──────╼
6161
}
6262

63-
alloc18 (size: 4, align: 1) {
63+
alloc19 (size: 4, align: 1) {
6464
2a 45 15 6f │ *E.o
6565
}
6666

67-
alloc19 (size: 1, align: 1) {
67+
alloc20 (size: 1, align: 1) {
6868
2a │ *
6969
}
7070

71-
alloc21 (size: 4, align: 1) {
71+
alloc22 (size: 4, align: 1) {
7272
2a 45 15 6f │ *E.o
7373
}

0 commit comments

Comments
 (0)