diff options
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/abi-main-signature-16bit-c-int.rs | 20 | ||||
| -rw-r--r-- | tests/codegen/abi-main-signature-32bit-c-int.rs | 1 | ||||
| -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 (renamed from tests/codegen/repr-transparent-aggregates-2.rs) | 22 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent-mips64.rs (renamed from tests/codegen/repr-transparent-aggregates-3.rs) | 2 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent-struct-ptr.rs (renamed from tests/codegen/repr-transparent-aggregates-1.rs) | 22 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent-sysv64.rs (renamed from tests/codegen/repr-transparent-sysv64.rs) | 0 | ||||
| -rw-r--r-- | tests/codegen/repr/transparent.rs (renamed from tests/codegen/repr-transparent.rs) | 9 | ||||
| -rw-r--r-- | tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs | 4 | ||||
| -rw-r--r-- | tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs | 4 |
12 files changed, 44 insertions, 112 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/abi-main-signature-32bit-c-int.rs b/tests/codegen/abi-main-signature-32bit-c-int.rs index 0258ad9534b..34571823f13 100644 --- a/tests/codegen/abi-main-signature-32bit-c-int.rs +++ b/tests/codegen/abi-main-signature-32bit-c-int.rs @@ -3,6 +3,7 @@ // This test is for targets with 32bit c_int only. // ignore-msp430 +// ignore-avr 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-aggregates-2.rs b/tests/codegen/repr/transparent-imm-array.rs index 33f4f222b0a..6d712778509 100644 --- a/tests/codegen/repr-transparent-aggregates-2.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-aggregates-3.rs b/tests/codegen/repr/transparent-mips64.rs index 0db17e6b13a..245daf13e28 100644 --- a/tests/codegen/repr-transparent-aggregates-3.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-aggregates-1.rs b/tests/codegen/repr/transparent-struct-ptr.rs index c783a75a400..d2120f7ec14 100644 --- a/tests/codegen/repr-transparent-aggregates-1.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-sysv64.rs b/tests/codegen/repr/transparent-sysv64.rs index 886b0dd9e7b..886b0dd9e7b 100644 --- a/tests/codegen/repr-transparent-sysv64.rs +++ b/tests/codegen/repr/transparent-sysv64.rs 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. diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs index 7fe3ffd2086..0bb21019685 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-gather.rs @@ -23,7 +23,7 @@ extern "platform-intrinsic" { #[no_mangle] pub unsafe fn gather_f32x2(pointers: Vec2<*const f32>, mask: Vec2<i32>, values: Vec2<f32>) -> Vec2<f32> { - // CHECK: call <2 x float> @llvm.masked.gather.v2f32.{{.+}}(<2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x float> {{.*}}) + // CHECK: call <2 x float> @llvm.masked.gather.v2f32.v2p0(<2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x float> {{.*}}) simd_gather(values, pointers, mask) } @@ -31,6 +31,6 @@ pub unsafe fn gather_f32x2(pointers: Vec2<*const f32>, mask: Vec2<i32>, #[no_mangle] pub unsafe fn gather_pf32x2(pointers: Vec2<*const *const f32>, mask: Vec2<i32>, values: Vec2<*const f32>) -> Vec2<*const f32> { - // CHECK: call <2 x ptr> @llvm.masked.gather.{{.+}}(<2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x ptr> {{.*}}) + // CHECK: call <2 x ptr> @llvm.masked.gather.v2p0.v2p0(<2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}, <2 x ptr> {{.*}}) simd_gather(values, pointers, mask) } diff --git a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs index 5c917474e45..51953560b4f 100644 --- a/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs +++ b/tests/codegen/simd-intrinsic/simd-intrinsic-generic-scatter.rs @@ -23,7 +23,7 @@ extern "platform-intrinsic" { #[no_mangle] pub unsafe fn scatter_f32x2(pointers: Vec2<*mut f32>, mask: Vec2<i32>, values: Vec2<f32>) { - // CHECK: call void @llvm.masked.scatter.v2f32.v2p0{{.*}}(<2 x float> {{.*}}, <2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}) + // CHECK: call void @llvm.masked.scatter.v2f32.v2p0(<2 x float> {{.*}}, <2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}) simd_scatter(values, pointers, mask) } @@ -32,6 +32,6 @@ pub unsafe fn scatter_f32x2(pointers: Vec2<*mut f32>, mask: Vec2<i32>, #[no_mangle] pub unsafe fn scatter_pf32x2(pointers: Vec2<*mut *const f32>, mask: Vec2<i32>, values: Vec2<*const f32>) { - // CHECK: call void @llvm.masked.scatter.v2p0{{.*}}.v2p0{{.*}}(<2 x ptr> {{.*}}, <2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}) + // CHECK: call void @llvm.masked.scatter.v2p0.v2p0(<2 x ptr> {{.*}}, <2 x ptr> {{.*}}, i32 {{.*}}, <2 x i1> {{.*}}) simd_scatter(values, pointers, mask) } |
