cmd/compile: runtime check for availability of popcount is spammy #30946
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
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
seems to
What operating system and processor architecture are you using (
go env
)?amd64
What did you do?
Was looking at an unrolled loop.
https://godbolt.org/z/GQuZaf
What did you expect to see?
A test for whether the target system had popcount.
What did you see instead?
Four separate tests per unrolled loop, and the tests repeating every time through the loop.
This seems like it should be a cacheable result. It might even be worth generating two copies of the loop; the cost of all those branches is large, and doing a single branch up front would be nicer. I don't think there's any facility available to me to let me write the branch in my own code.
The text was updated successfully, but these errors were encountered: