about summary refs log tree commit diff
path: root/tests/codegen
diff options
context:
space:
mode:
authorJubilee Young <workingjubilee@gmail.com>2024-10-18 11:54:07 -0700
committerJubilee Young <workingjubilee@gmail.com>2024-10-18 11:59:20 -0700
commitb9c96780b47b0ac3710202df884dfb3580fc4b76 (patch)
tree846c7a960fcf057579fdf0df3706b2410a10fdaf /tests/codegen
parentd6f5b437e598074a612fc72c053b00f70c38e607 (diff)
downloadrust-b9c96780b47b0ac3710202df884dfb3580fc4b76.tar.gz
rust-b9c96780b47b0ac3710202df884dfb3580fc4b76.zip
compiler: Revert -Zregparm handling for extern Rust
Diffstat (limited to 'tests/codegen')
-rw-r--r--tests/codegen/regparm-inreg-rust-cc.rs53
-rw-r--r--tests/codegen/regparm-inreg.rs7
2 files changed, 0 insertions, 60 deletions
diff --git a/tests/codegen/regparm-inreg-rust-cc.rs b/tests/codegen/regparm-inreg-rust-cc.rs
deleted file mode 100644
index a2d8d5349ea..00000000000
--- a/tests/codegen/regparm-inreg-rust-cc.rs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Checks how `regparm` flag works with Rust calling convention with array types.
-// When there is a small array type in signature (casted to combined int type),
-//   inregs will not be set. PassMode::Cast is unsupported.
-// x86 only.
-
-//@ compile-flags: --target i686-unknown-linux-gnu -O -C no-prepopulate-passes
-//@ needs-llvm-components: x86
-
-//@ revisions:regparm0 regparm1 regparm2 regparm3
-//@[regparm0] compile-flags: -Zregparm=0
-//@[regparm1] compile-flags: -Zregparm=1
-//@[regparm2] compile-flags: -Zregparm=2
-//@[regparm3] compile-flags: -Zregparm=3
-
-#![crate_type = "lib"]
-#![no_core]
-#![feature(no_core, lang_items)]
-
-#[lang = "sized"]
-trait Sized {}
-#[lang = "copy"]
-trait Copy {}
-
-pub mod tests {
-    // CHECK: @f1(i16 %0, i32 noundef %_2, i32 noundef %_3)
-    #[no_mangle]
-    pub extern "Rust" fn f1(_: [u8; 2], _: i32, _: i32) {}
-
-    // CHECK: @f2(i24 %0, i32 noundef %_2, i32 noundef %_3)
-    #[no_mangle]
-    pub extern "Rust" fn f2(_: [u8; 3], _: i32, _: i32) {}
-
-    // regparm0: @f3(ptr {{.*}} %_1, i32 noundef %_2, i32 noundef %_3)
-    // regparm1: @f3(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 noundef %_3)
-    // regparm2: @f3(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    // regparm3: @f3(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    #[no_mangle]
-    pub extern "Rust" fn f3(_: [u8; 7], _: i32, _: i32) {}
-
-    // regparm0: @f4(ptr {{.*}} %_1, i32 noundef %_2, i32 noundef %_3)
-    // regparm1: @f4(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 noundef %_3)
-    // regparm2: @f4(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    // regparm3: @f4(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    #[no_mangle]
-    pub extern "Rust" fn f4(_: [u8; 11], _: i32, _: i32) {}
-
-    // regparm0: @f5(ptr {{.*}} %_1, i32 noundef %_2, i32 noundef %_3)
-    // regparm1: @f5(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 noundef %_3)
-    // regparm2: @f5(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    // regparm3: @f5(ptr {{.*}} %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    #[no_mangle]
-    pub extern "Rust" fn f5(_: [u8; 33], _: i32, _: i32) {}
-}
diff --git a/tests/codegen/regparm-inreg.rs b/tests/codegen/regparm-inreg.rs
index 188cad9271e..c8c647bcc87 100644
--- a/tests/codegen/regparm-inreg.rs
+++ b/tests/codegen/regparm-inreg.rs
@@ -25,13 +25,6 @@ pub mod tests {
     #[no_mangle]
     pub extern "fastcall" fn f1(_: i32, _: i32, _: i32) {}
 
-    // regparm0: @f2(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3)
-    // regparm1: @f2(i32 inreg noundef %_1, i32 noundef %_2, i32 noundef %_3)
-    // regparm2: @f2(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3)
-    // regparm3: @f2(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 inreg noundef %_3)
-    #[no_mangle]
-    pub extern "Rust" fn f2(_: i32, _: i32, _: i32) {}
-
     // regparm0: @f3(i32 noundef %_1, i32 noundef %_2, i32 noundef %_3)
     // regparm1: @f3(i32 inreg noundef %_1, i32 noundef %_2, i32 noundef %_3)
     // regparm2: @f3(i32 inreg noundef %_1, i32 inreg noundef %_2, i32 noundef %_3)