cmd/compile: replace indirect call with direct call when target is known after inlining #32577
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Performance
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
I compiled the following functions: https://godbolt.org/z/dHW0pK.
What did you expect to see?
I expected the last function not to contain any unnecessary instructions or, in a perfect world, that it would be compiled to a simple return.
What did you see instead?
Instead, there was an ineffective instruction on line 37 of the assembly code generated in the website mentioned above.
PS: Thanks to @mundaym for helping me figure this out.
The text was updated successfully, but these errors were encountered: