diff options
| author | Jubilee Young <workingjubilee@gmail.com> | 2023-07-29 14:57:53 -0700 |
|---|---|---|
| committer | Jubilee Young <workingjubilee@gmail.com> | 2023-07-29 15:49:07 -0700 |
| commit | 20ebbf467d5bc6eca39ca014c4258aa6835b18db (patch) | |
| tree | 8ee9c2a2e7fbb374a850742ce90e60ebab770e6c /tests/codegen | |
| parent | 040bc3447e3d43ce79dee8420f4ab05d6aa3a8c7 (diff) | |
| download | rust-20ebbf467d5bc6eca39ca014c4258aa6835b18db.tar.gz rust-20ebbf467d5bc6eca39ca014c4258aa6835b18db.zip | |
Replace ignore-everything with only-arch
Combining revisions with only-arch allows specifying that a test only applies to a handful of targets. This allows removing a large amount of repetition in the test suite for tests that do not benefit. The revisions are suboptimal for this for some tests, so they aren't preferred in those cases.
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/abi-main-signature-16bit-c-int.rs | 20 | ||||
| -rw-r--r-- | tests/codegen/global_asm.rs | 24 | ||||
| -rw-r--r-- | tests/codegen/global_asm_include.rs | 24 | ||||
| -rw-r--r-- | tests/codegen/global_asm_x2.rs | 24 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent-imm-array.rs | 22 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent-mips64.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent-struct-ptr.rs | 22 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent.rs | 9 |
8 files changed, 39 insertions, 108 deletions
diff --git a/tests/codegen/abi-main-signature-16bit-c-int.rs b/tests/codegen/abi-main-signature-16bit-c-int.rs index 353e7489b55..ce4d35dea0c 100644 --- a/tests/codegen/abi-main-signature-16bit-c-int.rs +++ b/tests/codegen/abi-main-signature-16bit-c-int.rs @@ -2,22 +2,10 @@ // entry point. It must match C's `int main(int, char **)`. // This test is for targets with 16bit c_int only. -// ignore-aarch64 -// ignore-arm -// ignore-asmjs -// ignore-hexagon -// ignore-mips -// ignore-mips64 -// ignore-powerpc -// ignore-powerpc64 -// ignore-riscv64 -// ignore-s390x -// ignore-sparc -// ignore-sparc64 -// ignore-wasm32 -// ignore-x86 -// ignore-x86_64 -// ignore-loongarch64 +// revisions: avr msp +//[avr] only-avr +//[msp] only-msp430 + fn main() { } diff --git a/tests/codegen/global_asm.rs b/tests/codegen/global_asm.rs index 41a99530ad2..4c2ccf4e0e9 100644 --- a/tests/codegen/global_asm.rs +++ b/tests/codegen/global_asm.rs @@ -1,24 +1,6 @@ -// ignore-aarch64 -// ignore-arm -// ignore-avr -// ignore-bpf -// ignore-bpf -// ignore-hexagon -// ignore-mips -// ignore-mips64 -// ignore-msp430 -// ignore-powerpc64 -// ignore-powerpc -// ignore-sparc -// ignore-sparc64 -// ignore-s390x -// ignore-thumb -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 -// ignore-wasm64 -// ignore-emscripten -// ignore-loongarch64 +// revisions: x32 x64 +//[x32] only-x86 +//[x64] only-x86_64 // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/global_asm_include.rs b/tests/codegen/global_asm_include.rs index e25c164f407..0fede8c71e4 100644 --- a/tests/codegen/global_asm_include.rs +++ b/tests/codegen/global_asm_include.rs @@ -1,24 +1,6 @@ -// ignore-aarch64 -// ignore-arm -// ignore-avr -// ignore-bpf -// ignore-bpf -// ignore-hexagon -// ignore-mips -// ignore-mips64 -// ignore-msp430 -// ignore-powerpc64 -// ignore-powerpc -// ignore-sparc -// ignore-sparc64 -// ignore-s390x -// ignore-thumb -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 -// ignore-wasm64 -// ignore-emscripten -// ignore-loongarch64 +// revisions: x32 x64 +//[x32] only-x86 +//[x64] only-x86_64 // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/global_asm_x2.rs b/tests/codegen/global_asm_x2.rs index 71ecef124f1..1fc2825b2bd 100644 --- a/tests/codegen/global_asm_x2.rs +++ b/tests/codegen/global_asm_x2.rs @@ -1,24 +1,6 @@ -// ignore-aarch64 -// ignore-arm -// ignore-avr -// ignore-bpf -// ignore-bpf -// ignore-hexagon -// ignore-mips -// ignore-mips64 -// ignore-msp430 -// ignore-powerpc64 -// ignore-powerpc -// ignore-sparc -// ignore-sparc64 -// ignore-s390x -// ignore-thumb -// ignore-nvptx64 -// ignore-spirv -// ignore-wasm32 -// ignore-wasm64 -// ignore-emscripten -// ignore-loongarch64 +// revisions: x32 x64 +//[x32] only-x86 +//[x64] only-x86_64 // compile-flags: -C no-prepopulate-passes #![crate_type = "lib"] diff --git a/tests/codegen/repr/transparent-imm-array.rs b/tests/codegen/repr/transparent-imm-array.rs index 33f4f222b0a..6d712778509 100644 --- a/tests/codegen/repr/transparent-imm-array.rs +++ b/tests/codegen/repr/transparent-imm-array.rs @@ -1,19 +1,15 @@ +// revisions: arm mips thumb wasm32 // compile-flags: -C no-prepopulate-passes // - -// ignore-aarch64 +//[arm] only-arm +//[mips] only-mips +//[thumb] only-thumb +//[wasm32] only-wasm32 // ignore-emscripten -// ignore-mips64 -// ignore-powerpc -// ignore-powerpc64 -// ignore-riscv64 see codegen/riscv-abi -// ignore-s390x -// ignore-sparc -// ignore-sparc64 -// ignore-x86 -// ignore-x86_64 -// ignore-loongarch64 -// See repr-transparent.rs +// See ./transparent.rs +// Some platforms pass large aggregates using immediate arrays in LLVMIR +// Other platforms pass large aggregates using struct pointer in LLVMIR +// This covers the "immediate array" case. #![feature(transparent_unions)] diff --git a/tests/codegen/repr/transparent-mips64.rs b/tests/codegen/repr/transparent-mips64.rs index 0db17e6b13a..245daf13e28 100644 --- a/tests/codegen/repr/transparent-mips64.rs +++ b/tests/codegen/repr/transparent-mips64.rs @@ -2,7 +2,7 @@ // // only-mips64 -// See repr-transparent.rs +// See ./transparent.rs #![feature(transparent_unions)] diff --git a/tests/codegen/repr/transparent-struct-ptr.rs b/tests/codegen/repr/transparent-struct-ptr.rs index c783a75a400..d2120f7ec14 100644 --- a/tests/codegen/repr/transparent-struct-ptr.rs +++ b/tests/codegen/repr/transparent-struct-ptr.rs @@ -1,18 +1,16 @@ +// revisions: x32 x64 sparc sparc64 // compile-flags: -O -C no-prepopulate-passes // - -// ignore-arm -// ignore-aarch64 -// ignore-mips -// ignore-mips64 -// ignore-powerpc -// ignore-powerpc64 -// ignore-riscv64 see codegen/riscv-abi -// ignore-s390x +//[x32] only-x86 +//[x64] only-x86_64 +//[sparc] only-sparc +//[sparc64] only-sparc64 // ignore-windows -// ignore-loongarch64 -// ignore-wasm32-bare -// See repr-transparent.rs +// See ./transparent.rs +// Some platforms pass large aggregates using immediate arrays in LLVMIR +// Other platforms pass large aggregates using struct pointer in LLVMIR +// This covers the "struct pointer" case. + #![feature(transparent_unions)] diff --git a/tests/codegen/repr/transparent.rs b/tests/codegen/repr/transparent.rs index 64f3ce5a43c..b140fc719da 100644 --- a/tests/codegen/repr/transparent.rs +++ b/tests/codegen/repr/transparent.rs @@ -1,10 +1,13 @@ // compile-flags: -O -C no-prepopulate-passes - // ignore-riscv64 riscv64 has an i128 type used with test_Vector -// see codegen/riscv-abi for riscv functiona call tests // ignore-s390x s390x with default march passes vector types per reference // ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests +// This codegen test embeds assumptions about how certain "C" psABIs are handled +// so it doesn't apply to all architectures or even all OS +// For RISCV: see codegen/riscv-abi +// For LoongArch: see codegen/loongarch-abi + #![crate_type="lib"] #![feature(repr_simd, transparent_unions)] @@ -159,7 +162,7 @@ pub union UnionF32WithZsts { pub extern "C" fn test_UnionF32WithZsts(_: UnionF32WithZsts) -> UnionF32WithZsts { loop {} } -// All that remains to be tested are aggregates. They are tested in separate files called repr- +// All that remains to be tested are aggregates. They are tested in separate files called // transparent-*.rs with `only-*` or `ignore-*` directives, because the expected LLVM IR // function signatures vary so much that it's not reasonably possible to cover all of them with a // single CHECK line. |
