cmd/compile: regalloc can leave unused instructions after performing rematerialization and removing the only dependent #67911
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
Go version
go version go1.22.4 linux/amd64
Output of
go env
in your module/workspace:What did you do?
https://go.godbolt.org/z/EMn16qvPY
What did you see happen?
On amd64, an unnecessary CMPB instruction is generated, immediately followed by another CMPB.
Similarly on arm64, two CMPWs one after the other.
What did you expect to see?
No unnecessary compares.
The text was updated successfully, but these errors were encountered: