diff options
| author | bors <bors@rust-lang.org> | 2023-11-30 15:21:09 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-30 15:21:09 +0000 |
| commit | d368c4043c26800bf1d45103e482d3e9d3bf6010 (patch) | |
| tree | 9500da2a806a8fa2c229e97350fe90c02bcd5f1d /tests/codegen | |
| parent | 33e8232b82efb5f57760fcf08045cb36b93ed8e4 (diff) | |
| parent | cd124409335f8830becb7f7ec7de1c6aa8a504e3 (diff) | |
| download | rust-d368c4043c26800bf1d45103e482d3e9d3bf6010.tar.gz rust-d368c4043c26800bf1d45103e482d3e9d3bf6010.zip | |
Auto merge of #3197 - RalfJung:rustup, r=RalfJung
Rustup also move some fail tests into suitable subdirectories
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/ascii-char.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/function-return.rs | 28 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-101048.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-101082.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-101814.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-103132.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-103327.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-103840.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-75978.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/issues/issue-99960.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/sanitizer/kasan-emits-instrumentation.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/slice-iter-fold.rs | 1 | ||||
| -rw-r--r-- | tests/codegen/stack-probes-call.rs | 24 | ||||
| -rw-r--r-- | tests/codegen/stack-probes-inline.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/vec-in-place.rs | 1 |
15 files changed, 29 insertions, 39 deletions
diff --git a/tests/codegen/ascii-char.rs b/tests/codegen/ascii-char.rs index 4167becf5e9..711ffe7e1a5 100644 --- a/tests/codegen/ascii-char.rs +++ b/tests/codegen/ascii-char.rs @@ -14,7 +14,7 @@ pub fn unwrap_digit_from_remainder(v: u32) -> AsciiChar { // CHECK: %[[R:.+]] = urem i32 %v, 10 // CHECK-NEXT: %[[T:.+]] = trunc i32 %[[R]] to i8 - // CHECK-NEXT: %[[D:.+]] = or i8 %[[T]], 48 + // CHECK-NEXT: %[[D:.+]] = or{{( disjoint)?}} i8 %[[T]], 48 // CHECK-NEXT: ret i8 %[[D]] // CHECK-NOT: icmp diff --git a/tests/codegen/function-return.rs b/tests/codegen/function-return.rs new file mode 100644 index 00000000000..d832d19ac39 --- /dev/null +++ b/tests/codegen/function-return.rs @@ -0,0 +1,28 @@ +// Test that the `fn_ret_thunk_extern` function attribute is (not) emitted when +// the `-Zfunction-return={keep,thunk-extern}` flag is (not) set. + +// revisions: unset keep thunk-extern keep-thunk-extern thunk-extern-keep +// needs-llvm-components: x86 +// compile-flags: --target x86_64-unknown-linux-gnu +// [keep] compile-flags: -Zfunction-return=keep +// [thunk-extern] compile-flags: -Zfunction-return=thunk-extern +// [keep-thunk-extern] compile-flags: -Zfunction-return=keep -Zfunction-return=thunk-extern +// [thunk-extern-keep] compile-flags: -Zfunction-return=thunk-extern -Zfunction-return=keep + +#![crate_type = "lib"] +#![feature(no_core, lang_items)] +#![no_core] + +#[lang = "sized"] +trait Sized {} + +#[no_mangle] +pub fn foo() { + // CHECK: @foo() unnamed_addr #0 + + // unset-NOT: fn_ret_thunk_extern + // keep-NOT: fn_ret_thunk_extern + // thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} } + // keep-thunk-extern: attributes #0 = { {{.*}}fn_ret_thunk_extern{{.*}} } + // thunk-extern-keep-NOT: fn_ret_thunk_extern +} diff --git a/tests/codegen/issues/issue-101048.rs b/tests/codegen/issues/issue-101048.rs index efa4db93ec2..e4712cf9cb3 100644 --- a/tests/codegen/issues/issue-101048.rs +++ b/tests/codegen/issues/issue-101048.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-101082.rs b/tests/codegen/issues/issue-101082.rs index 2cbe99942cb..58fcd75a8f2 100644 --- a/tests/codegen/issues/issue-101082.rs +++ b/tests/codegen/issues/issue-101082.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16 // ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-101814.rs b/tests/codegen/issues/issue-101814.rs index 13796352c02..63a8cebcb60 100644 --- a/tests/codegen/issues/issue-101814.rs +++ b/tests/codegen/issues/issue-101814.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16 // ignore-debug: the debug assertions get in the way #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-103132.rs b/tests/codegen/issues/issue-103132.rs index cc87d7cd2b9..521d424c269 100644 --- a/tests/codegen/issues/issue-103132.rs +++ b/tests/codegen/issues/issue-103132.rs @@ -1,5 +1,4 @@ // compile-flags: -O -C overflow-checks -// min-llvm-version: 16 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-103327.rs b/tests/codegen/issues/issue-103327.rs index cee00faccc8..021f1ca0c3a 100644 --- a/tests/codegen/issues/issue-103327.rs +++ b/tests/codegen/issues/issue-103327.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs index da64692d27d..f19d7031bb3 100644 --- a/tests/codegen/issues/issue-103840.rs +++ b/tests/codegen/issues/issue-103840.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16.0 #![crate_type = "lib"] pub fn foo(t: &mut Vec<usize>) { diff --git a/tests/codegen/issues/issue-75978.rs b/tests/codegen/issues/issue-75978.rs index f335e92c3dc..abfafc35f0b 100644 --- a/tests/codegen/issues/issue-75978.rs +++ b/tests/codegen/issues/issue-75978.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16 #![crate_type = "lib"] diff --git a/tests/codegen/issues/issue-99960.rs b/tests/codegen/issues/issue-99960.rs index e9c9367fa64..ad0315a8227 100644 --- a/tests/codegen/issues/issue-99960.rs +++ b/tests/codegen/issues/issue-99960.rs @@ -1,5 +1,4 @@ // compile-flags: -O -// min-llvm-version: 16 #![crate_type = "lib"] diff --git a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs index 29d50d8df24..18d315c9598 100644 --- a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs +++ b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs @@ -6,10 +6,8 @@ //[aarch64] needs-llvm-components: aarch64 //[riscv64imac] compile-flags: --target riscv64imac-unknown-none-elf //[riscv64imac] needs-llvm-components: riscv -//[riscv64imac] min-llvm-version: 16 //[riscv64gc] compile-flags: --target riscv64gc-unknown-none-elf //[riscv64gc] needs-llvm-components: riscv -//[riscv64gc] min-llvm-version: 16 //[x86_64] compile-flags: --target x86_64-unknown-none //[x86_64] needs-llvm-components: x86 diff --git a/tests/codegen/slice-iter-fold.rs b/tests/codegen/slice-iter-fold.rs index 9391c176130..a55425cb6bb 100644 --- a/tests/codegen/slice-iter-fold.rs +++ b/tests/codegen/slice-iter-fold.rs @@ -1,6 +1,5 @@ // ignore-debug: the debug assertions get in the way // compile-flags: -O -// min-llvm-version: 16 #![crate_type = "lib"] // CHECK-LABEL: @slice_fold_to_last diff --git a/tests/codegen/stack-probes-call.rs b/tests/codegen/stack-probes-call.rs deleted file mode 100644 index a18fd41c28c..00000000000 --- a/tests/codegen/stack-probes-call.rs +++ /dev/null @@ -1,24 +0,0 @@ -// Check the "probe-stack" attribute for targets with `StackProbeType::Call`, -// or `StackProbeType::InlineOrCall` when running on older LLVM. - -// compile-flags: -C no-prepopulate-passes -// revisions: i686 x86_64 -//[i686] compile-flags: --target i686-unknown-linux-gnu -//[i686] needs-llvm-components: x86 -//[i686] ignore-llvm-version: 16 - 99 -//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu -//[x86_64] needs-llvm-components: x86 -//[x86_64] ignore-llvm-version: 16 - 99 - -#![crate_type = "rlib"] -#![feature(no_core, lang_items)] -#![no_core] - -#[lang = "sized"] -trait Sized {} - -#[no_mangle] -pub fn foo() { -// CHECK: @foo() unnamed_addr #0 -// CHECK: attributes #0 = { {{.*}}"probe-stack"="__rust_probestack"{{.*}} } -} diff --git a/tests/codegen/stack-probes-inline.rs b/tests/codegen/stack-probes-inline.rs index a6b781de531..058c363969f 100644 --- a/tests/codegen/stack-probes-inline.rs +++ b/tests/codegen/stack-probes-inline.rs @@ -13,10 +13,8 @@ //[s390x] needs-llvm-components: systemz //[i686] compile-flags: --target i686-unknown-linux-gnu //[i686] needs-llvm-components: x86 -//[i686] min-llvm-version: 16 //[x86_64] compile-flags: --target x86_64-unknown-linux-gnu //[x86_64] needs-llvm-components: x86 -//[x86_64] min-llvm-version: 16 #![crate_type = "rlib"] #![feature(no_core, lang_items)] diff --git a/tests/codegen/vec-in-place.rs b/tests/codegen/vec-in-place.rs index d68067ceb19..5cf7add836d 100644 --- a/tests/codegen/vec-in-place.rs +++ b/tests/codegen/vec-in-place.rs @@ -1,6 +1,5 @@ // ignore-debug: the debug assertions get in the way // compile-flags: -O -Z merge-functions=disabled -// min-llvm-version: 16 #![crate_type = "lib"] // Ensure that trivial casts of vec elements are O(1) |
