]> git.lizzy.rs Git - rust.git/commitdiff
Fix codegen and mir-opt tests
authorJonas Schievink <jonasschievink@gmail.com>
Thu, 16 Apr 2020 18:03:13 +0000 (20:03 +0200)
committerJonas Schievink <jonasschievink@gmail.com>
Mon, 20 Apr 2020 19:18:20 +0000 (21:18 +0200)
Mostly renamed allocations, but I'm not sure about the const prop tests

src/librustc_mir/interpret/eval_context.rs
src/test/codegen/consts.rs
src/test/mir-opt/const_allocation2/64bit/rustc.main.ConstProp.after.mir

index d4431806c4a3900bd1076eeaa021298ef68050bb..b137832cdf292cd89232833972e154545b658c66 100644 (file)
@@ -760,7 +760,6 @@ pub(super) fn pop_stack_frame(&mut self, unwinding: bool) -> InterpResult<'tcx>
             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.
index e53e75b339beff8795602ec99269d0e427ff57b9..ed93af2f993d3bc7bee7b7dae1ca99b363671a5a 100644 (file)
 // 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
index e61f0a8b69fa72b420194cc9368fda4721081ddb..3b649ee7a24bd90dbedd40621248584057849a4e 100644 (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──────╼ │ ╾──────╼╾──────╼
+alloc15 (size: 16, align: 8) {
+    ╾──────alloc13+0──────╼ ╾──────alloc14+0──────╼ │ ╾──────╼╾──────╼
 }
 
-alloc12 (size: 1, align: 1) {
+alloc13 (size: 1, align: 1) {
     05                                              │ .
 }
 
-alloc13 (size: 1, align: 1) {
+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
 }