Skip to content

Commit 917820a

Browse files
committed
Auto merge of #150722 - nikic:llvm-22, r=cuviper
Update to LLVM 22 Scheduled release date: Feb 24 1.94 becomes stable: Mar 5 Changes: * Update to rc2, with one patch to work around our outdated illumos sysroot (rust-lang/llvm-project@41256ab). * Update the host toolchain as well, otherwise we lose cross-language LTO, in particular for jemalloc. * Adjust one loongarch assembly test. The split into r and s variants is based on the suggestion in #151134. Depends on: * [x] #151410 * [ ] #150756 * [x] llvm/llvm-project#175190 * [x] llvm/llvm-project#175912 * [x] llvm/llvm-project#175965 * [x] llvm/llvm-project#176195 * [x] llvm/llvm-project#157073 * [x] llvm/llvm-project#176421 * [x] llvm/llvm-project#176925 * [x] llvm/llvm-project#177187
2 parents e96bb7e + e015fc8 commit 917820a

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
[submodule "src/llvm-project"]
2626
path = src/llvm-project
2727
url = https://github.com/rust-lang/llvm-project.git
28-
branch = rustc/21.1-2025-08-01
28+
branch = rustc/22.1-2026-01-27
2929
shallow = true
3030
[submodule "src/doc/embedded-book"]
3131
path = src/doc/embedded-book

src/ci/docker/scripts/build-clang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -ex
55
source shared.sh
66

77
# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh
8-
LLVM=llvmorg-21.1.0-rc2
8+
LLVM=llvmorg-22.1.0-rc2
99

1010
mkdir llvm-project
1111
cd llvm-project

src/llvm-project

tests/assembly-llvm/asm/loongarch-type.rs

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
//@ add-minicore
2-
//@ revisions: loongarch32 loongarch64
2+
//@ revisions: loongarch32s loongarch32r loongarch64
33

44
//@ assembly-output: emit-asm
55

6-
//@[loongarch32] compile-flags: --target loongarch32-unknown-none
7-
//@[loongarch32] needs-llvm-components: loongarch
6+
//@[loongarch32s] compile-flags: --target loongarch32-unknown-none -Ctarget-feature=+32s
7+
//@[loongarch32s] needs-llvm-components: loongarch
8+
9+
//@[loongarch32r] compile-flags: --target loongarch32-unknown-none
10+
//@[loongarch32r] needs-llvm-components: loongarch
11+
//@[loongarch32r] min-llvm-version: 22
812

913
//@[loongarch64] compile-flags: --target loongarch64-unknown-none
1014
//@[loongarch64] needs-llvm-components: loongarch
@@ -28,8 +32,12 @@ extern "C" {
2832

2933
// CHECK-LABEL: sym_fn:
3034
// CHECK: #APP
31-
// CHECK: pcalau12i $t0, %got_pc_hi20(extern_func)
32-
// CHECK: ld.{{[wd]}} $t0, $t0, %got_pc_lo12(extern_func)
35+
// loongarch64: pcalau12i $t0, %got_pc_hi20(extern_func)
36+
// loongarch64: ld.d $t0, $t0, %got_pc_lo12(extern_func)
37+
// loongarch32s: pcalau12i $t0, %got_pc_hi20(extern_func)
38+
// loongarch32s: ld.w $t0, $t0, %got_pc_lo12(extern_func)
39+
// loongarch32r: pcaddu12i $t0, %got_pcadd_hi20(extern_func)
40+
// loongarch32r: ld.w $t0, $t0, %got_pcadd_lo12(.Lpcadd_hi0)
3341
// CHECK: #NO_APP
3442
#[no_mangle]
3543
pub unsafe fn sym_fn() {
@@ -38,8 +46,13 @@ pub unsafe fn sym_fn() {
3846

3947
// CHECK-LABEL: sym_static:
4048
// CHECK: #APP
41-
// CHECK: pcalau12i $t0, %got_pc_hi20(extern_static)
42-
// CHECK: ld.{{[wd]}} $t0, $t0, %got_pc_lo12(extern_static)
49+
// loongarch64: pcalau12i $t0, %got_pc_hi20(extern_static)
50+
// loongarch64: ld.d $t0, $t0, %got_pc_lo12(extern_static)
51+
// loongarch32s: pcalau12i $t0, %got_pc_hi20(extern_static)
52+
// loongarch32s: ld.w $t0, $t0, %got_pc_lo12(extern_static)
53+
// loongarch32r: pcaddu12i $t0, %got_pcadd_hi20(extern_static)
54+
// loongarch32r: ld.w $t0, $t0, %got_pcadd_lo12(.Lpcadd_hi1)
55+
4356
// CHECK: #NO_APP
4457
#[no_mangle]
4558
pub unsafe fn sym_static() {

0 commit comments

Comments
 (0)