Fix codegen and mir-opt tests

Mostly renamed allocations, but I'm not sure about the const prop tests
This commit is contained in:
Jonas Schievink 2020-04-16 20:03:13 +02:00
parent c5bfbb6ad1
commit a5c1851607
3 changed files with 20 additions and 21 deletions

View file

@ -760,7 +760,6 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
self.deallocate_local(local.value)?;
}
let return_place = frame.return_place;
if M::after_stack_pop(self, frame, unwinding)? == StackPopJump::NoJump {
// The hook already did everything.
// We want to skip the `info!` below, hence early return.

View file

@ -10,11 +10,11 @@
// CHECK: @STATIC = {{.*}}, align 4
// This checks the constants from inline_enum_const
// CHECK: @alloc5 = {{.*}}, align 2
// CHECK: @alloc7 = {{.*}}, align 2
// This checks the constants from {low,high}_align_const, they share the same
// constant, but the alignment differs, so the higher one should be used
// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc15, i32 0, i32 0, i32 0), {{.*}}
// CHECK: [[LOW_HIGH:@[0-9]+]] = {{.*}} getelementptr inbounds (<{ [8 x i8] }>, <{ [8 x i8] }>* @alloc19, i32 0, i32 0, i32 0), {{.*}}
#[derive(Copy, Clone)]
// repr(i16) is required for the {low,high}_align_const test

View file

@ -30,44 +30,44 @@ fn main() -> () {
}
alloc0 (static: FOO, size: 16, align: 8) {
╾──────alloc24+0──────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
╾──────alloc25+0──────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
}
alloc24 (size: 72, align: 8) {
0x00 │ 00 00 00 00 __ __ __ __ ╾──────alloc9+0───────╼ │ ....░░░░╾──────╼
alloc25 (size: 72, align: 8) {
0x00 │ 00 00 00 00 __ __ __ __ ╾──────alloc10+0──────╼ │ ....░░░░╾──────╼
0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
0x20 │ ╾──────alloc14+0──────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
0x30 │ 01 00 00 00 2a 00 00 00 ╾──────alloc22+0──────╼ │ ....*...╾──────╼
0x20 │ ╾──────alloc15+0──────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
0x30 │ 01 00 00 00 2a 00 00 00 ╾──────alloc23+0──────╼ │ ....*...╾──────╼
0x40 │ 03 00 00 00 00 00 00 00 │ ........
}
alloc9 (size: 0, align: 8) {}
alloc10 (size: 0, align: 8) {}
alloc14 (size: 16, align: 8) {
╾──────alloc12+0──────╼ ╾──────alloc13+0──────╼ │ ╾──────╼╾──────╼
}
alloc12 (size: 1, align: 1) {
05 │ .
alloc15 (size: 16, align: 8) {
╾──────alloc13+0──────╼ ╾──────alloc14+0──────╼ │ ╾──────╼╾──────╼
}
alloc13 (size: 1, align: 1) {
05 │ .
}
alloc14 (size: 1, align: 1) {
06 │ .
}
alloc22 (size: 24, align: 8) {
0x00 │ ╾──────alloc18+3──────╼ ╾──────alloc19+0──────╼ │ ╾──────╼╾──────╼
0x10 │ ╾──────alloc21+2──────╼ │ ╾──────╼
alloc23 (size: 24, align: 8) {
0x00 │ ╾──────alloc19+3──────╼ ╾──────alloc20+0──────╼ │ ╾──────╼╾──────╼
0x10 │ ╾──────alloc22+2──────╼ │ ╾──────╼
}
alloc18 (size: 4, align: 1) {
alloc19 (size: 4, align: 1) {
2a 45 15 6f │ *E.o
}
alloc19 (size: 1, align: 1) {
alloc20 (size: 1, align: 1) {
2a │ *
}
alloc21 (size: 4, align: 1) {
alloc22 (size: 4, align: 1) {
2a 45 15 6f │ *E.o
}