Skip to content

Commit a76f7a2

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 2f4dfc7 commit a76f7a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,12 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
335335
let target_abi = sess.target.options.abi.as_ref();
336336
let target_pointer_width = sess.target.pointer_width;
337337
let version = get_version();
338+
let lt_20_1_0 = version < (20, 1, 0);
338339
let lt_20_1_1 = version < (20, 1, 1);
339340
let lt_21_0_0 = version < (21, 0, 0);
340341

341342
cfg.has_reliable_f16 = match (target_arch, target_os) {
342-
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in llvm20)
343+
// LLVM crash without neon <https://github.com/llvm/llvm-project/issues/129394> (fixed in LLVM 20.1.1)
343344
("aarch64", _)
344345
if !cfg.target_features.iter().any(|f| f.as_str() == "neon") && lt_20_1_1 =>
345346
{
@@ -367,7 +368,7 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
367368
// Unsupported <https://github.com/llvm/llvm-project/issues/94434>
368369
("arm64ec", _) => false,
369370
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> (fixed in llvm20)
370-
("mips64" | "mips64r6", _) if lt_20_1_1 => false,
371+
("mips64" | "mips64r6", _) if lt_20_1_0 => false,
371372
// Selection bug <https://github.com/llvm/llvm-project/issues/95471>. This issue is closed
372373
// but basic math still does not work.
373374
("nvptx64", _) => false,

0 commit comments

Comments
 (0)