Skip to content

Commit 572ca1e

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 f51d1bc commit 572ca1e

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
@@ -364,11 +364,12 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
364364
let target_abi = &sess.target.options.abi;
365365
let target_pointer_width = sess.target.pointer_width;
366366
let version = get_version();
367+
let lt_20_1_0 = version < (20, 1, 0);
367368
let lt_20_1_1 = version < (20, 1, 1);
368369
let lt_21_0_0 = version < (21, 0, 0);
369370

370371
cfg.has_reliable_f16 = match (target_arch, target_os) {
371-
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in llvm20)
372+
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in LLVM 20.1.1)
372373
(Arch::AArch64, _)
373374
if !cfg.target_features.iter().any(|f| f.as_str() == "neon") && lt_20_1_1 =>
374375
{
@@ -395,8 +396,8 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
395396
cfg.has_reliable_f128 = match (target_arch, target_os) {
396397
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
397398
(Arch::Arm64EC, _) => false,
398-
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in llvm20)
399-
(Arch::Mips64 | Arch::Mips64r6, _) if lt_20_1_1 => false,
399+
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in LLVM 20.1.0)
400+
(Arch::Mips64 | Arch::Mips64r6, _) if lt_20_1_0 => false,
400401
// Selection bug <https://github.com/llvm/llvm-project/issues/95471>. This issue is closed
401402
// but basic math still does not work.
402403
(Arch::Nvptx64, _) => false,

0 commit comments

Comments
 (0)