Skip to content

Update amdgpu datalayout for LLVM 24 - #165424

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
zmodem:amdgpu_datalayout
Nov 5, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
zmodem:amdgpu_datalayout

Conversation

@zmodem

@zmodem zmodem commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

It changed in llvm/llvm-project#209746

@rustbot

rustbot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs

cc @Flakebi

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 3, 2026
@rustbot

rustbot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

r? @hanna-kruppe

rustbot has assigned @hanna-kruppe.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 21 candidates

@zmodem

zmodem commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@rustbot label llvm-main

@rustbot rustbot added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label Nov 3, 2026
@zmodem

zmodem commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

There is one remaining test failure after this:

tests/ui/target-cpu/explicit-target-cpu.rs:?: WARN: codegen with no subarch in the target triple is deprecated and will become an error; use the target triple 'amdgpu9.00-amd-amdhsa' instead

That's due to llvm/llvm-project#220245 Is there a reason that rust refers to the target as amdgcn rather than amdgpu, or can we update it?

@rust-log-analyzer

This comment has been minimized.

@zmodem
zmodem force-pushed the amdgpu_datalayout branch 2 times, most recently from 39fa07d to f9e0dc3 Compare November 3, 2026 18:57
@hanna-kruppe

Copy link
Copy Markdown
Contributor

cc @Flakebi (target maintainer)

@hanna-kruppe hanna-kruppe left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment, otherwise looks correct to me. I don't know anything about the other test failure, though.

View changes since this review

@Flakebi

Flakebi commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Thanks for making this update!

amdgcn and amdgpu are used somewhat interchangeably, though amdgpu is generally preferred (gcn refers to one specific architecture, though the triple name in both LLVM and Rust is amdgcn-amd-amdhsa).

There is one remaining test failure after this

Is that a failure or just a warning? If it can be ignored, I think we should do that for now.
Longer term we need to switch away from the old amdgcn-amd-amdhsa target, though older LLVM that is used by Rust only supports that target, which makes it somewhat more complicated…

Really unrelated to this PR, but I’m thinking that the spirv64-amd-amdhsa LLVM target might be the best way forward.
It would get rid of the target-cpu and allow shipping pre-compiled core and alloc with Rust.

@zmodem
zmodem force-pushed the amdgpu_datalayout branch from f9e0dc3 to facc493 Compare November 4, 2026 08:45
@zmodem

zmodem commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Is that a failure or just a warning? If it can be ignored, I think we should do that for now.

It's a warning, but it becomes a test failure for tests/ui/target-cpu/explicit-target-cpu.rs#amdgcn_cpu.

I'm not sure it's possible to suppress this warning specifically without suppressing all backend warnings, which seems like a bad idea. Also the upstream PR says it will become an error in the next LLVM version, so it would need to be fixed before then anyway.

But this is all separate from this PR. I just thought I should flag it.

@hanna-kruppe

Copy link
Copy Markdown
Contributor

Thanks! @bors r+ rollup

@rust-bors

rust-bors Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit facc493 has been tentatively approved by hanna-kruppe

It will be put into the queue for this repository once PR CI succeeds.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 4, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 4, 2026
…kruppe

Update amdgpu datalayout for LLVM 24

It changed in llvm/llvm-project#209746
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Nov 4, 2026
…kruppe

Update amdgpu datalayout for LLVM 24

It changed in llvm/llvm-project#209746
rust-bors Bot pushed a commit that referenced this pull request Nov 4, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #164752 (Apply the Cortex-A53 843419 CC mitigation to aarch64 targets )
 - #165376 (Add `Forget` trait feature gate)
 - #165257 (Revert FCW on lint attributes on macro calls)
 - #165364 (Update books)
 - #165424 (Update amdgpu datalayout for LLVM 24)
 - #165443 (Add `Discriminant::ord`)
 - #165445 (Add an unstable option to increase the chain depth of the next solver overflow FCW)
rust-bors Bot pushed a commit that referenced this pull request Nov 4, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #164752 (Apply the Cortex-A53 843419 CC mitigation to aarch64 targets )
 - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros)
 - #165376 (Add `Forget` trait feature gate)
 - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs)
 - #165201 (Move a bunch of methods out of `AttributeExt`)
 - #165268 (Fix constant-pattern  equality suggestion spans in macros)
 - #165318 (Fix explicit destructor-call suggestion spans in macros)
 - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc))
 - #165001 (Document allocator swap in BinaryHeap::append)
 - #165257 (Revert FCW on lint attributes on macro calls)
 - #165330 (Impl read_le/read_be for f16 and f128)
 - #165364 (Update books)
 - #165414 (Remove unusued query key impl)
 - #165424 (Update amdgpu datalayout for LLVM 24)
 - #165440 (docker: bump node to v24.22.2 in shared script)
 - #165443 (Add `Discriminant::ord`)
 - #165445 (Add an unstable option to increase the chain depth of the next solver overflow FCW)
rust-bors Bot pushed a commit that referenced this pull request Nov 4, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #164752 (Apply the Cortex-A53 843419 CC mitigation to aarch64 targets )
 - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros)
 - #165376 (Add `Forget` trait feature gate)
 - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs)
 - #165201 (Move a bunch of methods out of `AttributeExt`)
 - #165268 (Fix constant-pattern  equality suggestion spans in macros)
 - #165318 (Fix explicit destructor-call suggestion spans in macros)
 - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc))
 - #165001 (Document allocator swap in BinaryHeap::append)
 - #165257 (Revert FCW on lint attributes on macro calls)
 - #165330 (Impl read_le/read_be for f16 and f128)
 - #165364 (Update books)
 - #165414 (Remove unusued query key impl)
 - #165424 (Update amdgpu datalayout for LLVM 24)
 - #165440 (docker: bump node to v24.22.2 in shared script)
 - #165443 (Add `Discriminant::ord`)
 - #165445 (Add an unstable option to increase the chain depth of the next solver overflow FCW)
rust-bors Bot pushed a commit that referenced this pull request Nov 4, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #164752 (Apply the Cortex-A53 843419 CC mitigation to aarch64 targets )
 - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros)
 - #165376 (Add `Forget` trait feature gate)
 - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs)
 - #165201 (Move a bunch of methods out of `AttributeExt`)
 - #165268 (Fix constant-pattern  equality suggestion spans in macros)
 - #165318 (Fix explicit destructor-call suggestion spans in macros)
 - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc))
 - #165001 (Document allocator swap in BinaryHeap::append)
 - #165257 (Revert FCW on lint attributes on macro calls)
 - #165330 (Impl read_le/read_be for f16 and f128)
 - #165364 (Update books)
 - #165414 (Remove unusued query key impl)
 - #165424 (Update amdgpu datalayout for LLVM 24)
 - #165440 (docker: bump node to v24.22.2 in shared script)
 - #165443 (Add `Discriminant::ord`)
 - #165445 (Add an unstable option to increase the chain depth of the next solver overflow FCW)
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #164752 (Apply the Cortex-A53 843419 CC mitigation to aarch64 targets )
 - #165011 (std: Clean up and improve errors for `is_*_feature_detected` macros)
 - #165376 (Add `Forget` trait feature gate)
 - #164482 (Remove the label starting with 0 in the test binary_asm_labels_allowed.rs)
 - #165201 (Move a bunch of methods out of `AttributeExt`)
 - #165268 (Fix constant-pattern  equality suggestion spans in macros)
 - #165318 (Fix explicit destructor-call suggestion spans in macros)
 - #164440 ([Outreachy] alloc: Add test coverage for try_clone_from_ref_in (Box, Arc, Rc))
 - #165001 (Document allocator swap in BinaryHeap::append)
 - #165257 (Revert FCW on lint attributes on macro calls)
 - #165330 (Impl read_le/read_be for f16 and f128)
 - #165364 (Update books)
 - #165414 (Remove unusued query key impl)
 - #165424 (Update amdgpu datalayout for LLVM 24)
 - #165440 (docker: bump node to v24.22.2 in shared script)
 - #165443 (Add `Discriminant::ord`)
 - #165445 (Add an unstable option to increase the chain depth of the next solver overflow FCW)
@rust-bors
rust-bors Bot merged commit 80de91f into rust-lang:main Nov 5, 2026
14 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Nov 5, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 5, 2026
Rollup merge of #165424 - zmodem:amdgpu_datalayout, r=hanna-kruppe

Update amdgpu datalayout for LLVM 24

It changed in llvm/llvm-project#209746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants