-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Disable f16 on Aarch64 without neon for llvm < 20.1.1 #143125
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
base: master
Are you sure you want to change the base?
Conversation
4292cd7
to
a6d4975
Compare
Note that for Fedora, you will also need to add a similar patch here https://github.com/rust-lang/compiler-builtins/blob/674910e0fa6f0fb2cc055f4f7051ff0eb53c7735/compiler-builtins/configure.rs#L91 that checks |
if !sess.target_features.iter().any(|f| f.as_str() == "neon") | ||
&& version < (20, 1, 1) => | ||
{ | ||
panic!("hi"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is leftover from a local test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙃 yup, was double checking the features filter and apparently forgot to save
This comment has been minimized.
This comment has been minimized.
This check was added unconditionally in c51b229 ("Disable f16 on Aarch64 without `neon`") and reverted in 4a8d357 ("Revert "Disable `f16` on Aarch64 without `neon`"") since it did not fail in Rust's build. However, it is still possible to hit this crash if using LLVM 19 built with assertions, so disable the type conditionally based on version here. Note that for these builds, a similar patch is needed in the build script for `compiler-builtins` since it does not yet use `cfg(target_has_reliable_f16)` (hopefully to be resolved in the near future). Report: https://www.github.com/rust-lang/rust/pull/139276#issuecomment-3014781652 Original LLVM issue: https://www.github.com/llvm/llvm-project/issues/129394
a6d4975
to
950b096
Compare
Ok, makes sense.
Right, and so this PR won't be enough on its own for master either, but it may still make sense to land it in anticipation of that subtree change. |
The job Click to see the possible cause of the failure (guessed by this bot)
|
Oh, that's interesting; Cranelift now supports these types even though LLVM 19 doesn't. The situation here looks kind of weird; IIUC cranelift is building |
This check was added unconditionally in c51b229 ("Disable f16 on Aarch64 without
neon
") and reverted in 4a8d357 ("Revert "Disablef16
on Aarch64 withoutneon
"") since it did not fail in Rust's build. However, it is still possible to hit this crash if using LLVM 19 built with assertions, so disable the type conditionally based on version here.Note that for these builds, a similar patch is needed in the build script for
compiler-builtins
since it does not yet usecfg(target_has_reliable_f16)
(hopefully to be resolved in the near future).Report: #139276 (comment)
Original LLVM issue: llvm/llvm-project#129394
r? @cuviper