From 7279af86c8f6ab080e7d360e497e1c75b313d1a1 Mon Sep 17 00:00:00 2001 From: Eduard Burtescu Date: Mon, 20 Jun 2016 23:55:14 +0300 Subject: trans: generalize immediate temporaries to all MIR locals. --- src/test/codegen/loads.rs | 3 +++ src/test/codegen/naked-functions.rs | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src/test/codegen') diff --git a/src/test/codegen/loads.rs b/src/test/codegen/loads.rs index 21f23b6ea18..a65a3e1bb66 100644 --- a/src/test/codegen/loads.rs +++ b/src/test/codegen/loads.rs @@ -11,6 +11,7 @@ // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] +#![feature(rustc_attrs)] pub struct Bytes { a: u8, @@ -21,6 +22,7 @@ pub struct Bytes { // CHECK-LABEL: @borrow #[no_mangle] +#[rustc_no_mir] // FIXME #27840 MIR has different codegen. pub fn borrow(x: &i32) -> &i32 { // CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull x @@ -28,6 +30,7 @@ pub fn borrow(x: &i32) -> &i32 { // CHECK-LABEL: @_box #[no_mangle] +#[rustc_no_mir] // FIXME #27840 MIR has different codegen. pub fn _box(x: Box) -> i32 { // CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull *x diff --git a/src/test/codegen/naked-functions.rs b/src/test/codegen/naked-functions.rs index 0a600f4acad..199f7f02018 100644 --- a/src/test/codegen/naked-functions.rs +++ b/src/test/codegen/naked-functions.rs @@ -13,7 +13,7 @@ // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] -#![feature(naked_functions)] +#![feature(naked_functions, rustc_attrs)] // CHECK: Function Attrs: naked uwtable // CHECK-NEXT: define internal void @naked_empty() @@ -26,6 +26,7 @@ fn naked_empty() { // CHECK: Function Attrs: naked uwtable #[no_mangle] #[naked] +#[rustc_no_mir] // FIXME #27840 MIR has different codegen. // CHECK-NEXT: define internal void @naked_with_args(i{{[0-9]+}}) fn naked_with_args(a: isize) { // CHECK: %a = alloca i{{[0-9]+}} @@ -45,6 +46,7 @@ fn naked_with_return() -> isize { // CHECK-NEXT: define internal i{{[0-9]+}} @naked_with_args_and_return(i{{[0-9]+}}) #[no_mangle] #[naked] +#[rustc_no_mir] // FIXME #27840 MIR has different codegen. fn naked_with_args_and_return(a: isize) -> isize { // CHECK: %a = alloca i{{[0-9]+}} // CHECK: ret i{{[0-9]+}} %{{[0-9]+}} -- cgit 1.4.1-3-g733a5