Missed optimization: The optimizer forgets that Some(function) is Some(_) #74425
Labels
C-bug
Category: This is a bug.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I expected to see this happen: The branch in
test_inner
is optimized out and thetest
function compiles down to a single call toext_fn0
.Instead, this happened: The compiled
test
function includes a branch that checks ifSome(inner0)
isSome(_)
or not.Compiler Explorer (Nightly, 1.45.0)
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: