Skip to content

Commit bf2f665

Browse files
committed
Revert machine outliner disabling on LLVM 13
1 parent ac50a53 commit bf2f665

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,14 @@ unsafe fn configure_llvm(sess: &Session) {
8989
add("-generate-arange-section", false);
9090
}
9191

92-
// FIXME(nagisa): disable the machine outliner by default in LLVM versions 11, where it was
93-
// introduced and up.
92+
// Disable the machine outliner by default in LLVM versions 11 and LLVM
93+
// version 12, where it leads to miscompilation.
9494
//
95-
// This should remain in place until https://reviews.llvm.org/D103167 is fixed. If LLVM
96-
// has been upgraded since, consider adjusting the version check below to contain an upper
97-
// bound.
98-
if llvm_util::get_version() >= (11, 0, 0) {
95+
// Ref:
96+
// - https://github.com/rust-lang/rust/issues/85351
97+
// - https://reviews.llvm.org/D103167
98+
let llvm_version = llvm_util::get_version();
99+
if llvm_version >= (11, 0, 0) && llvm_version < (13, 0, 0) {
99100
add("-enable-machine-outliner=never", false);
100101
}
101102

0 commit comments

Comments
 (0)