SIGN IN SIGN UP

cmd/compile: use AuxInt for OpMove size in DSE

The generic "inline runtime.memmove" rule generates
Move {uint8} [N], where the Aux type is used only for alignment
and pointer-bit information; the actual byte count is in AuxInt.
But DSE was sizing OpMove from Aux. Oops.
An 8-byte inlined memmove ended up looking like a 1-byte write;
a subsequent single-byte store appeared to fully shadow it.

For ordinary frontend-generated OpMoves, Aux matches the move size;
the mismatch only shows up for rewrite-generated values,
making this easy to miss (and rare!).

This fix didn't change any generated code in std.

Use a switch statement instead of a comment for greater clarity,
while we're here.

Introduced by CL 771780.

Change-Id: I5a11d3821c5a8588dfde67629eafa5922d5e8071
Reviewed-on: https://go-review.googlesource.com/c/go/+/784180
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
J
Josh Bleecher Snyder committed
6559f48782bb66c156947d306659a32e3dc10463
Parent: 7bd8072
Committed by Gopher Robot <gobot@golang.org> on 6/1/2026, 2:11:23 PM