cmd/compile: static allocation should work with constant propagation and inlining #66671
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
Go version
go1.22.0
Output of
go env
in your module/workspace:What did you do?
Run the following benchmark:
What did you see happen?
I see:
What did you expect to see?
I expect to see:
The
MaxWindowSize
function is inlineable, so I would expect it to be identical to declaring amaxWindowSize
literal directly.This seems to be an odd interaction between static allocations, constant propagation, and inlining. I'm not sure if the title properly reflects what's going on.
The text was updated successfully, but these errors were encountered: