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/repr | |
| parent | 040bc3447e3d43ce79dee8420f4ab05d6aa3a8c7 (diff) | |
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/repr')
| -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 |
4 files changed, 26 insertions, 29 deletions
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. |
