Skip to content

Update to LLVM 21 #143684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
shallow = true
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/20.1-2025-07-13
url = https://github.com/nikic/llvm-project.git
branch = rust-llvm-21
shallow = true
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
Expand Down
2 changes: 1 addition & 1 deletion src/ci/docker/scripts/build-clang.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -ex
source shared.sh

# Try to keep the LLVM version here in sync with src/ci/scripts/install-clang.sh
LLVM=llvmorg-20.1.0-rc2
LLVM=llvmorg-21.1.0-rc1

mkdir llvm-project
cd llvm-project
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-project
6 changes: 5 additions & 1 deletion tests/assembly/nvptx-safe-naming.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
//@ assembly-output: ptx-linker
//@ compile-flags: --crate-type cdylib -Z unstable-options -Clinker-flavor=llbc
//@ only-nvptx64
//@ revisions: LLVM20 LLVM21
//@ [LLVM21] min-llvm-version: 21
//@ [LLVM20] max-llvm-major-version: 20

#![feature(abi_ptx)]
#![no_std]
Expand All @@ -15,7 +18,8 @@ extern crate breakpoint_panic_handler;
#[no_mangle]
pub unsafe extern "ptx-kernel" fn top_kernel(a: *const u32, b: *mut u32) {
// CHECK: call.uni (retval0),
// CHECK-NEXT: [[IMPL_FN]]
// LLVM20-NEXT: [[IMPL_FN]]
// LLVM21-SAME: [[IMPL_FN]]
*b = deep::private::MyStruct::new(*a).square();
}

Expand Down
Loading