Skip to content

Conversation

@maurer
Copy link
Contributor

@maurer maurer commented Nov 14, 2025

ARM has withdrawn FEAT_TME

https://developer.arm.com/documentation/102105/lb-05/

LLVM has dropped support for generating it
llvm/llvm-project#167687

@rustbot label llvm-main

r? @durin42

@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. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) labels Nov 14, 2025
@rustbot

This comment has been minimized.

@maurer maurer force-pushed the remove-tme branch 2 times, most recently from 688954b to 8f7dadd Compare November 14, 2025 19:00
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 14, 2025

stdarch is developed in its own repository. If possible, consider making this change to rust-lang/stdarch instead.

cc @Amanieu, @folkertdev, @sayantn

@maurer
Copy link
Contributor Author

maurer commented Nov 14, 2025

stdarch is developed in its own repository. If possible, consider making this change to rust-lang/stdarch instead.

cc @Amanieu, @folkertdev, @sayantn

Having this patch up with the llvm-main tag should allow the LLVM integration test to continue running. I will produce a separate patch removing usage of FEAT_TME from stdarch and merge that first.

@maurer
Copy link
Contributor Author

maurer commented Nov 14, 2025

See rust-lang/stdarch#1960

@sayantn
Copy link
Contributor

sayantn commented Nov 14, 2025

I don't think we can just remove it, this is in stable

@folkertdev
Copy link
Contributor

The feature is apparently stable, but none of the intrinsics are, so we can remove those at least I think

Comment on lines 340 to 341
// FEAT_TME
("tme", Stable, &[]),
Copy link
Contributor

Choose a reason for hiding this comment

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

But yeah removing a stable target feature will require T-lang involvement, even though I assume it'll be fine to remove the feature.

@maurer
Copy link
Contributor Author

maurer commented Nov 14, 2025

This causes build failures when using the latest LLVM when building tests (and so if we leave it in, anyone using the feature will hit a build failure on LLVM as soon as we update LLVM). If we want to keep tme as an available feature, we may need to add a filter on cpu features being passed to LLVM to not send ones that have been removed from LLVM. Would that be reasonable?

@sayantn
Copy link
Contributor

sayantn commented Nov 14, 2025

we can just add a "tme" => [] in rustc_codegen_llvm::llvm_util, this will just pass nothing to LLVM for tme, which will avoid the error. then we can phase this out maybe. But anyway, for now let's remove the intrinsics

@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Nov 14, 2025
@folkertdev
Copy link
Contributor

you can even make that conditional on the LLVM version, to not break anything overnight. I think that is the best step forward right now, and then T-lang can decide what to do long term. We can probably do a crater run and then remove it, but maybe they want to see a warning for a while.

ARM has withdrawn FEAT_TME

https://developer.arm.com/documentation/102105/lb-05/

LLVM has dropped support for it recently as a result.
@maurer
Copy link
Contributor Author

maurer commented Nov 14, 2025

you can even make that conditional on the LLVM version, to not break anything overnight.

While I understand keeping the feature around in case someone explicitly turned it on even though it does nothing, my understanding is that this feature was withdrawn because there are very few (no?) CPU implementations actually supporting it, just simulators and specs, so just ceasing to pass the feature shouldn't break anything.

If you'd still prefer to, I'll re-alter the patch again, but I suppose there's no rush because we need to land the stdarch change first and merge it back.

@folkertdev
Copy link
Contributor

If you'd still prefer to, I'll re-alter the patch again, but I suppose there's no rush because we need to land the stdarch change first and merge it back.

I understand, it's just that we have procedures to never merge any breaking changes to the language without the green light from T-lang. Things have slipped through in the past, and it's just easier to have that strict rule.

I suspect T-lang will just rule to remove the feature, given that it likely has zero usage: all intrinsics to use it were unstable, I don't think this feature changes codegen, so the only theoretical risk is if someone wrote some code using inline assembly that relies on the target feature being enabled?

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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants