cmd/compile/internal/ssa: occurred the wrong rewrite cycle detection #51639
Labels
FrozenDueToAge
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 operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
https://go.dev/play/p/sw3yvtCuPYW?v=gotip
I tried to build this program with
-gcflags='-d "ssa/opt/debug=2"'
What did you expect to see?
debug logs.
What did you see instead?
Note
I investigated the cause of this issue.
it only rewrote
rewriting v13 = Convert <unsafe.Pointer> v12 v1 -> v13 = AddPtr <unsafe.Pointer> v7 v8
on the 1st step.and then calculate the hash of this function, store it to the states.
on the 2nd step, it only proceeded to remove dead values.
go/src/cmd/compile/internal/ssa/rewrite.go
Lines 69 to 80 in baf61e4
it calculated the hash of this function again, got the same result to trigger the rewrite cycle detected.
The text was updated successfully, but these errors were encountered: