Skip to content

Commit abaac34

Browse files
committed
rustc_codegen_llvm: Split "Fixed in LLVM 20" cases
... in `update_target_reliable_float_cfg`, based on the actual changes. The AArch64 issue is fixed on LLVM 20.1.1 while the MIPS issue is fixed on LLVM 20.1.0 (the first LLVM 20 release). This commit distinguishes two separate cases.
1 parent ed0006a commit abaac34

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,12 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
360360
let target_abi = &sess.target.options.abi;
361361
let target_pointer_width = sess.target.pointer_width;
362362
let version = get_version();
363+
let lt_20_1_0 = version < (20, 1, 0);
363364
let lt_20_1_1 = version < (20, 1, 1);
364365
let lt_21_0_0 = version < (21, 0, 0);
365366

366367
cfg.has_reliable_f16 = match (target_arch, target_os) {
367-
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in llvm20)
368+
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in LLVM 20.1.1)
368369
(Arch::AArch64, _)
369370
if !cfg.target_features.iter().any(|f| f.as_str() == "neon") && lt_20_1_1 =>
370371
{
@@ -391,8 +392,8 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
391392
cfg.has_reliable_f128 = match (target_arch, target_os) {
392393
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
393394
(Arch::Arm64EC, _) => false,
394-
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in llvm20)
395-
(Arch::Mips64 | Arch::Mips64r6, _) if lt_20_1_1 => false,
395+
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in LLVM 20.1.0)
396+
(Arch::Mips64 | Arch::Mips64r6, _) if lt_20_1_0 => false,
396397
// Selection bug <https://github.com/llvm/llvm-project/issues/95471>. This issue is closed
397398
// but basic math still does not work.
398399
(Arch::Nvptx64, _) => false,

0 commit comments

Comments
 (0)