Skip to content

Conversation

heiher
Copy link
Contributor

@heiher heiher commented Mar 5, 2025

This patch adds new target features for LoongArch v1.1:

  • div32
  • lam-bh
  • lamcas
  • ld-seq-sa
  • scq

@rustbot
Copy link
Collaborator

rustbot commented Mar 5, 2025

r? @petrochenkov

rustbot has assigned @petrochenkov.
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

@rustbot rustbot added 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 Mar 5, 2025
@jieyouxu jieyouxu added the O-loongarch Target: LoongArch (LA32R, LA32S, LA64) label Mar 5, 2025
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 13, 2025
@heiher heiher force-pushed the loong64v1.1-features branch from d4188b1 to d989bf5 Compare March 14, 2025 01:51
@heiher
Copy link
Contributor Author

heiher commented Mar 14, 2025

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 14, 2025
@petrochenkov
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 14, 2025

📌 Commit d989bf5 has been approved by petrochenkov

It is now in the queue for this repository.

@bors bors 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 Mar 14, 2025
fmease added a commit to fmease/rust that referenced this pull request Mar 14, 2025
…rochenkov

rustc_target: Add target features for LoongArch v1.1

This patch adds new target features for LoongArch v1.1:

* div32
* lam-bh
* lamcas
* ld-seq-sa
* scq
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2025
Rollup of 8 pull requests

Successful merges:

 - rust-lang#138056 (rustc_target: Add target features for LoongArch v1.1)
 - rust-lang#138349 (Emit function declarations for functions with `#[linkage="extern_weak"]`)
 - rust-lang#138451 (Build GCC on CI with GCC, not Clang)
 - rust-lang#138454 (Improve post-merge workflow)
 - rust-lang#138460 (Pass struct field HirId when check_expr_struct_fields)
 - rust-lang#138482 (Fix HIR printing of parameters)
 - rust-lang#138507 (Mirror NetBSD sources)
 - rust-lang#138511 (Make `Parser::parse_expr_cond` public)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2025
Rollup of 9 pull requests

Successful merges:

 - rust-lang#138056 (rustc_target: Add target features for LoongArch v1.1)
 - rust-lang#138451 (Build GCC on CI with GCC, not Clang)
 - rust-lang#138454 (Improve post-merge workflow)
 - rust-lang#138460 (Pass struct field HirId when check_expr_struct_fields)
 - rust-lang#138474 (Refactor is_snake_case.)
 - rust-lang#138482 (Fix HIR printing of parameters)
 - rust-lang#138507 (Mirror NetBSD sources)
 - rust-lang#138511 (Make `Parser::parse_expr_cond` public)
 - rust-lang#138518 (Fix typo in hir lowering lint diag)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 10055fb into rust-lang:master Mar 15, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 15, 2025
@heiher heiher deleted the loong64v1.1-features branch March 15, 2025 05:29
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 15, 2025
Rollup merge of rust-lang#138056 - heiher:loong64v1.1-features, r=petrochenkov

rustc_target: Add target features for LoongArch v1.1

This patch adds new target features for LoongArch v1.1:

* div32
* lam-bh
* lamcas
* ld-seq-sa
* scq
@RalfJung
Copy link
Member

I noticed that since this PR landed, every use of rustc built with LLVM 19 with a loongarch target shows a bunch of warnings about these target features not being supported -- no matter whether the target features are being used or not.

  1. Is that expected? It's certainly not great, and I am surprised that it was not mentioned in the PR description. The tests were adjusted to account for this so it seems you were aware of this problem, @heiher?
  2. Does this affect only nightly rustc, or also stable builds?

@taiki-e
Copy link
Member

taiki-e commented Apr 29, 2025

Target features not available in older LLVM should be handled in to_llvm_features function in rustc_codegen_llvm/src/llvm_util.rs like some riscv features do:

// Filter out features that are not supported by the current LLVM version
("riscv32" | "riscv64", "zacas") if get_version().0 < 20 => None,

@RalfJung
Copy link
Member

Ah, that makes more sense. I opened an issue for this: #140455.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-loongarch Target: LoongArch (LA32R, LA32S, LA64) 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.

7 participants