Closed
Description
The compiler produces identical binaries whatever value is set.
In this example:
const LEN: usize = 20;
pub fn test(vals1: &[usize; LEN], vals2: &[usize; LEN]) -> bool {
test_inner(vals1) || test_inner(vals2)
}
fn test_inner(vals: &[usize; LEN]) -> bool {
vals.iter().any(|v| v % 2 == 0)
}
test_inner
is not inlined when compiled with -C opt-level=3 -C inline-threshold=9000
unless the new pass manager is manually disabled via -Z new-llvm-pass-manager=no
.
https://rust.godbolt.org/z/TKGoz3h6n
Related: #61088
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Category: This is a bug.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Help is requested to fix this issue.Low priorityRelevant to the compiler team, which will review and decide on the PR/issue.