diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-05 09:36:46 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-02-05 09:36:46 +0100 |
| commit | 7f95fa4cee10dc63d55341e5643f9ab93c1ee077 (patch) | |
| tree | d0f201630e67d152cf124985f618998146d4cec9 /tests/codegen | |
| parent | 6b969d799cc783fdcb63b08e88abb5d0d5f8c4a3 (diff) | |
| parent | fab6d8ae8c14cf3b4a53b7a716ce4809be35ffaf (diff) | |
| download | rust-7f95fa4cee10dc63d55341e5643f9ab93c1ee077.tar.gz rust-7f95fa4cee10dc63d55341e5643f9ab93c1ee077.zip | |
Merge from rustc
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/bigint-helpers.rs | 13 | ||||
| -rw-r--r-- | tests/codegen/debug-column.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/force-no-unwind-tables.rs | 2 | ||||
| -rw-r--r-- | tests/codegen/intrinsics/disjoint_bitor.rs | 30 | ||||
| -rw-r--r-- | tests/codegen/thread-local.rs | 2 |
5 files changed, 46 insertions, 3 deletions
diff --git a/tests/codegen/bigint-helpers.rs b/tests/codegen/bigint-helpers.rs new file mode 100644 index 00000000000..355cccb8150 --- /dev/null +++ b/tests/codegen/bigint-helpers.rs @@ -0,0 +1,13 @@ +//@ compile-flags: -C opt-level=3 + +#![crate_type = "lib"] +#![feature(bigint_helper_methods)] + +// CHECK-LABEL: @u32_carrying_add +#[no_mangle] +pub fn u32_carrying_add(a: u32, b: u32, c: bool) -> (u32, bool) { + // CHECK: @llvm.uadd.with.overflow.i32 + // CHECK: @llvm.uadd.with.overflow.i32 + // CHECK: or disjoint i1 + u32::carrying_add(a, b, c) +} diff --git a/tests/codegen/debug-column.rs b/tests/codegen/debug-column.rs index d14a5c29142..2aa0a8a864c 100644 --- a/tests/codegen/debug-column.rs +++ b/tests/codegen/debug-column.rs @@ -1,6 +1,6 @@ // Verify that debuginfo column numbers are 1-based byte offsets. // -//@ ignore-windows +//@ ignore-msvc //@ compile-flags: -C debuginfo=2 #[rustfmt::skip] diff --git a/tests/codegen/force-no-unwind-tables.rs b/tests/codegen/force-no-unwind-tables.rs index e823bedac0f..1de5e0858e0 100644 --- a/tests/codegen/force-no-unwind-tables.rs +++ b/tests/codegen/force-no-unwind-tables.rs @@ -1,5 +1,5 @@ //@ compile-flags: -C no-prepopulate-passes -C panic=abort -C force-unwind-tables=n -//@ ignore-windows +//@ ignore-windows: unwind tables are required for panics on Windows #![crate_type = "lib"] diff --git a/tests/codegen/intrinsics/disjoint_bitor.rs b/tests/codegen/intrinsics/disjoint_bitor.rs new file mode 100644 index 00000000000..fc45439ee0b --- /dev/null +++ b/tests/codegen/intrinsics/disjoint_bitor.rs @@ -0,0 +1,30 @@ +//@ compile-flags: -C no-prepopulate-passes -Z mir-opt-level=0 + +#![crate_type = "lib"] +#![feature(core_intrinsics)] + +use std::intrinsics::disjoint_bitor; + +// CHECK-LABEL: @disjoint_bitor_signed +#[no_mangle] +pub unsafe fn disjoint_bitor_signed(x: i32, y: i32) -> i32 { + // CHECK: or disjoint i32 %x, %y + disjoint_bitor(x, y) +} + +// CHECK-LABEL: @disjoint_bitor_unsigned +#[no_mangle] +pub unsafe fn disjoint_bitor_unsigned(x: u64, y: u64) -> u64 { + // CHECK: or disjoint i64 %x, %y + disjoint_bitor(x, y) +} + +// CHECK-LABEL: @disjoint_bitor_literal +#[no_mangle] +pub unsafe fn disjoint_bitor_literal() -> u8 { + // This is a separate check because even without any passes, + // LLVM will fold so it's not an instruction, which can assert in LLVM. + + // CHECK: store i8 3 + disjoint_bitor(1, 2) +} diff --git a/tests/codegen/thread-local.rs b/tests/codegen/thread-local.rs index 2ee15811cc3..3cd81652f5a 100644 --- a/tests/codegen/thread-local.rs +++ b/tests/codegen/thread-local.rs @@ -1,6 +1,6 @@ //@ compile-flags: -O //@ aux-build:thread_local_aux.rs -//@ ignore-windows FIXME(#84933) +//@ ignore-windows FIXME(#134939) //@ ignore-wasm globals are used instead of thread locals //@ ignore-emscripten globals are used instead of thread locals //@ ignore-android does not use #[thread_local] |
