summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/thread-local.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/codegen/thread-local.rs
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/codegen/thread-local.rs')
-rw-r--r--src/test/codegen/thread-local.rs49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/test/codegen/thread-local.rs b/src/test/codegen/thread-local.rs
deleted file mode 100644
index 0f1b29ca7..000000000
--- a/src/test/codegen/thread-local.rs
+++ /dev/null
@@ -1,49 +0,0 @@
-// compile-flags: -O
-// aux-build:thread_local_aux.rs
-// ignore-windows FIXME(#84933)
-// 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]
-
-#![crate_type = "lib"]
-
-extern crate thread_local_aux as aux;
-
-use std::cell::Cell;
-
-thread_local!(static A: Cell<u32> = const { Cell::new(1) });
-
-// CHECK: [[TLS_AUX:@.+]] = external thread_local local_unnamed_addr global i64
-// CHECK: [[TLS:@.+]] = internal thread_local unnamed_addr global
-
-// CHECK-LABEL: @get
-#[no_mangle]
-fn get() -> u32 {
- // CHECK: %0 = load i32, {{.*}}[[TLS]]{{.*}}
- // CHECK-NEXT: ret i32 %0
- A.with(|a| a.get())
-}
-
-// CHECK-LABEL: @set
-#[no_mangle]
-fn set(v: u32) {
- // CHECK: store i32 %0, {{.*}}[[TLS]]{{.*}}
- // CHECK-NEXT: ret void
- A.with(|a| a.set(v))
-}
-
-// CHECK-LABEL: @get_aux
-#[no_mangle]
-fn get_aux() -> u64 {
- // CHECK: %0 = load i64, {{.*}}[[TLS_AUX]]
- // CHECK-NEXT: ret i64 %0
- aux::A.with(|a| a.get())
-}
-
-// CHECK-LABEL: @set_aux
-#[no_mangle]
-fn set_aux(v: u64) {
- // CHECK: store i64 %0, {{.*}}[[TLS_AUX]]
- // CHECK-NEXT: ret void
- aux::A.with(|a| a.set(v))
-}