Rollup merge of #93004 - krasimirgg:threadlocal-llvm-up, r=nikic

update codegen test for LLVM 14

Fixes https://github.com/rust-lang/rust/issues/93003.
This commit is contained in:
Matthias Krüger 2022-01-18 04:42:10 +01:00 committed by GitHub
commit b8c544de71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,7 @@ thread_local!(static A: Cell<u32> = const { Cell::new(1) });
// CHECK-LABEL: @get
#[no_mangle]
fn get() -> u32 {
// CHECK: %0 = load i32, i32* bitcast ({{.*}} [[TLS]] to i32*)
// CHECK: %0 = load i32, i32* {{.*}}[[TLS]]{{.*}}
// CHECK-NEXT: ret i32 %0
A.with(|a| a.get())
}
@ -27,7 +27,7 @@ fn get() -> u32 {
// CHECK-LABEL: @set
#[no_mangle]
fn set(v: u32) {
// CHECK: store i32 %0, i32* bitcast ({{.*}} [[TLS]] to i32*)
// CHECK: store i32 %0, i32* {{.*}}[[TLS]]{{.*}}
// CHECK-NEXT: ret void
A.with(|a| a.set(v))
}