#2053·gonum

graph/layout: test failed with GOAMD64=v3

Author: wdvxdr1123Created Aug 15, 2025Updated Jan 13, 2026

What did you do?

set GOAMD64=v3

What actually happened?

--- FAIL: TestEadesR2 (0.22s)
    eades_test.go:207: unexpected number of iterations for "tube-steep": got:92 want:96
    layout_test.go:79: image mismatch for testdata/tube-steep.png
    layout_test.go:93: image bounds union:(0,0)-(378,378) diff bounds intersection:(0,0)-(378,378)
    layout_test.go:101: IMAGE: ***
    eades_test.go:227: got node positions: map[int64]r2.Vec{0:r2.Vec{X:-1.1808378614892858e+283, Y:-1.5714385467534952e+283}, 1:r2.Vec{X:-9.696915772546706e+282, Y:-1.187457576688631e+283}, 2:r2.Vec{X:2.1528597344521888e+283, Y:2.7618634381487446e+283}, 3:r2.Vec{X:2.3642518543223084e+283, Y:3.1463053615673166e+283}, 4:r2.Vec{X:1.9414994898398996e+283, Y:2.3775067628023844e+283}, 5:r2.Vec{X:-4.310411935578673e+283, Y:-5.52974675378294e+283}, 6:r2.Vec{X:-1.1808378614892858e+283, Y:-1.5714385467534952e+283}, 7:r2.Vec{X:-9.6969157725467e+282, Y:-1.1874575766886301e+283}, 8:r2.Vec{X:2.1528597344521883e+283, Y:2.7618634381487446e+283}}
--- FAIL: TestIsomapR2 (0.31s)
    layout_test.go:79: image mismatch for testdata/tetrahedron_isomap.png
    layout_test.go:93: image bounds union:(0,0)-(378,378) diff bounds intersection:(0,0)-(378,378)
    layout_test.go:101: IMAGE: ***
    isomap_test.go:186: got node positions: map[int64]r2.Vec{0:r2.Vec{X:-0.35227568905245743, Y:0.4928215491326982}, 1:r2.Vec{X:-0.11594611720751916, Y:-0.4155402569571915}, 2:r2.Vec{X:-0.121446762290432, Y:-0.24046608613216497}, 3:r2.Vec{X:0.5896685685504085, Y:0.1631847939566583}}
    layout_test.go:79: image mismatch for testdata/sheet_isomap.png
    layout_test.go:93: image bounds union:(0,0)-(378,378) diff bounds intersection:(0,0)-(378,378)
    layout_test.go:101: IMAGE: ***
    isomap_test.go:186: got node positions: map[int64]r2.Vec{0:r2.Vec{X:-2.0449066815226367, Y:0.06920498757007701}, 1:r2.Vec{X:-0.8993230827161286, Y:-0.8404447900783851}, 2:r2.Vec{X:-0.06920498757007697, Y:-2.0449066815226344}, 3:r2.Vec{X:-0.840444790078386, Y:0.8993230827161277}, 4:r2.Vec{X:-1.3325501486774093e-17, Y:-7.546789384409016e-17}, 5:r2.Vec{X:0.8404447900783864, Y:-0.8993230827161269}, 6:r2.Vec{X:0.06920498757007706, Y:2.044906681522634}, 7:r2.Vec{X:0.8993230827161286, Y:0.8404447900783849}, 8:r2.Vec{X:2.044906681522636, Y:-0.06920498757007705}}
    layout_test.go:79: image mismatch for testdata/tube_isomap.png
    layout_test.go:93: image bounds union:(0,0)-(378,378) diff bounds intersection:(0,0)-(378,378)
    layout_test.go:101: IMAGE: ***
    isomap_test.go:186: got node positions: map[int64]r2.Vec{0:r2.Vec{X:-1.2909944487358056, Y:0.6672125261277253}, 1:r2.Vec{X:-1.2909944487358063, Y:0.34459052021611747}, 2:r2.Vec{X:-1.2909944487358052, Y:-1.011803046343843}, 3:r2.Vec{X:-2.234658857455373e-16, Y:0.5392031104617515}, 4:r2.Vec{X:-3.721990903958779e-16, Y:0.2784784053958163}, 5:r2.Vec{X:1.5343411180185954e-16, Y:-0.8176815158575682}, 6:r2.Vec{X:1.290994448735806, Y:0.6672125261277255}, 7:r2.Vec{X:1.2909944487358058, Y:0.34459052021611714}, 8:r2.Vec{X:1.2909944487358058, Y:-1.0118030463438428}}
FAIL

What version of Go and Gonum are you using?

Go 1.25.0 [email protected]

Does this issue reproduce with the current master?

Yes.

Maybe related to compiler optimization rules https://github.com/golang/go/blob/a8564bd412d4495a6048f981d30d4d7abb1e45a7/src/cmd/compile/internal/ssa/_gen/AMD64.rules#L1500-L1501