From 8a0045fd5b833ede35196a78a427a9c5adec6f69 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 9 Mar 2022 09:51:12 +0100 Subject: [PATCH 1/3] Update LLVM submodule --- src/llvm-project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/llvm-project b/src/llvm-project index e29ac13bc97e2..c8eccf626fb5b 160000 --- a/src/llvm-project +++ b/src/llvm-project @@ -1 +1 @@ -Subproject commit e29ac13bc97e26f886c3bfe72f9135e994c3cd0a +Subproject commit c8eccf626fb5bb851b2ade93af8851ca1523807f From 0c7d0a19ddb2cca5ccfa3050b1e18a272c083118 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 9 Mar 2022 10:00:07 +0100 Subject: [PATCH 2/3] Use new pass manager on s390x with LLVM 14 The problematic compile-time issue should be resolved with this version. --- compiler/rustc_codegen_llvm/src/llvm_util.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index e9d13a4ebaf8c..4b324740a1f83 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -527,8 +527,9 @@ pub(crate) fn should_use_new_llvm_pass_manager(user_opt: &Option, target_a // The new pass manager is enabled by default for LLVM >= 13. // This matches Clang, which also enables it since Clang 13. - // FIXME: There are some perf issues with the new pass manager - // when targeting s390x, so it is temporarily disabled for that - // arch, see https://github.com/rust-lang/rust/issues/89609 - user_opt.unwrap_or_else(|| target_arch != "s390x" && llvm_util::get_version() >= (13, 0, 0)) + // There are some perf issues with the new pass manager when targeting + // s390x with LLVM 13, so enable the new pass manager only with LLVM 14. + // See https://github.com/rust-lang/rust/issues/89609. + let min_version = if target_arch == "s390x" { 14 } else { 13 }; + user_opt.unwrap_or_else(|| llvm_util::get_version() >= (min_version, 0, 0)) } From 6c58b5e1ab8c999f7dc64b30b07867ae1b0d3b4c Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 9 Mar 2022 10:03:58 +0100 Subject: [PATCH 3/3] Enable issue-23036.rs on wasm32 --- src/test/ui/issues/issue-23036.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/test/ui/issues/issue-23036.rs b/src/test/ui/issues/issue-23036.rs index ac24648e49e91..d67f184720e6c 100644 --- a/src/test/ui/issues/issue-23036.rs +++ b/src/test/ui/issues/issue-23036.rs @@ -1,5 +1,4 @@ // run-pass -// ignore-wasm32-bare FIXME(#93923) llvm miscompilation use std::collections::HashMap; use std::path::Path;