Skip to content

Commit 5244760

Browse files
committed
rustc_codegen_llvm: Simplify wide-arithmetic conversion
This commit simplifies conversion of the target feature `wide-arithmetic` on WebAssembly architectures as only the major version is relevant. It also slightly changes the corresponding comment.
1 parent df5aaa6 commit 5244760

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ pub(crate) fn to_llvm_features<'a>(sess: &Session, s: &'a str) -> Option<LLVMFea
287287
s,
288288
smallvec![TargetFeatureFoldStrength::EnableOnly("evex512")],
289289
)),
290-
// Support for `wide-arithmetic` will first land in LLVM 20 as part of
290+
// Support for `wide-arithmetic` landed in LLVM 20 as part of
291291
// llvm/llvm-project#111598
292-
("wasm32" | "wasm64", "wide-arithmetic") if get_version() < (20, 0, 0) => None,
292+
("wasm32" | "wasm64", "wide-arithmetic") if major < 20 => None,
293293
("sparc", "leoncasa") => Some(LLVMFeature::new("hasleoncasa")),
294294
// In LLVM 19, there is no `v8plus` feature and `v9` means "SPARC-V9 instruction available and SPARC-V8+ ABI used".
295295
// https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp#L27-L28

0 commit comments

Comments
 (0)