Missed optimization with mir-opt-level 4 #100408
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
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.
This code with an inner immediately invoked lambda function:
Compiled using:
With arguments:
Gives a nice asm:
But cranking opt up to the 4th level:
Gives an asm similar to not using the lambda function at all:
(Inspired by: https://old.reddit.com/r/rust/comments/wkw55b/help_matching_c_codegen_for_a_small_function/ijr7o5x/ ).
The text was updated successfully, but these errors were encountered: