cmd/compile: OpAMD64CMOV*EQF clobbers AX, doesn't tell regalloc #26097
Labels
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
release-blocker
Milestone
CL 98695 (commit 080187f) adds OpAMD64CMOV{Q,L,W}EQF. The generated assembly looks like:
go/src/cmd/compile/internal/amd64/ssa.go
Lines 461 to 463 in d144dd7
That is, it uses AX as a scratch register so that it can check both equality and NAN-ness. (I think.) The problem is, regalloc doesn't know about this:
go/src/cmd/compile/internal/ssa/gen/AMD64Ops.go
Line 400 in d144dd7
gp21
doesn't haveclobbers:ax
.I don't have a public repro, but given the below assembly I'm pretty sure I'm in the neighborhood of the problem. The three MOVLs clearly don't make sense.
cc @randall77 @TocarIP @rasky
This is Google-internal b/110810807.
The text was updated successfully, but these errors were encountered: