cmd/compile: ineffective branch caused by defer #32930
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.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What did you do?
I was testing the behavior of
defer
, so I ended up compiling the following functions (https://godbolt.org/z/uALdNA):What did you expect to see?
I expected the generated assembly to not contain any unnecessary branches.
What did you see instead?
Instead, there is a repeated block of instructions that is preceded by a condicional jump (https://godbolt.org/z/uALdNA):
The text was updated successfully, but these errors were encountered: