You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: exponential traversal of shared OR expressions #82671
Then run go tool compile -d=ssa/memcombine/time=1 diamond-22.go.
What did you see happen?
memcombineLoads traverses the shared expression graph as a tree. A separate instrumented compiler counted 16,777,213 visits for 67 unique OR values. The uninstrumented full compile took a median 1.867 seconds over six alternating comparison pairs. A separate allocation profile attributed approximately 789 MiB of cumulative allocation to memcombineLoads.
What did you expect to see?
Shared expressions should not cause exponential traversal.
CartoGopher tooling for source navigation; reproduction, implementation and testing with Codex.
Activity
gopherbot commentedon Oct 28, 2026
Change https://go.dev/cl/855621 mentions this issue:
cmd/compile: avoid revisiting shared OR expressions