]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: mark PCMPEQB as commutative
authorJakub Ciolek <jakub@ciolek.dev>
Sat, 8 Feb 2025 22:35:51 +0000 (23:35 +0100)
committerGopher Robot <gobot@golang.org>
Mon, 10 Feb 2025 16:44:42 +0000 (08:44 -0800)
compilecmp linux/amd64:

internal/runtime/maps
internal/runtime/maps.(*table).Delete changed

internal/runtime/maps [cmd/compile]
internal/runtime/maps.(*Map).Delete changed
internal/runtime/maps.(*table).Delete changed

Change-Id: Ic3c95411c23cab7427e63105170de41e5766f809
Reviewed-on: https://go-review.googlesource.com/c/go/+/647935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>

src/cmd/compile/internal/ssa/_gen/AMD64Ops.go
src/cmd/compile/internal/ssa/opGen.go

index 23fb2361b561987c79e15007dee35c71a5fd1ca8..7be70c7737240336c379bdf7acb80b2c2d3b1196 100644 (file)
@@ -1156,7 +1156,7 @@ func init() {
                //
                // output[i] = input.
                {name: "PSHUFBbroadcast", argLength: 1, reg: fp11, resultInArg0: true, asm: "PSHUFB"}, // PSHUFB with mask zero, (GOAMD64=v1)
-               {name: "VPBROADCASTB", argLength: 1, reg: gpfp, asm: "VPBROADCASTB"}, // Broadcast input byte from gp (GOAMD64=v3)
+               {name: "VPBROADCASTB", argLength: 1, reg: gpfp, asm: "VPBROADCASTB"},                  // Broadcast input byte from gp (GOAMD64=v3)
 
                // Byte negate/zero/preserve (GOAMD64=v2).
                //
@@ -1180,7 +1180,7 @@ func init() {
                // } else {
                //   output[i] = 0
                // }
-               {name: "PCMPEQB", argLength: 2, reg: fp21, resultInArg0: true, asm: "PCMPEQB"},
+               {name: "PCMPEQB", argLength: 2, reg: fp21, resultInArg0: true, asm: "PCMPEQB", commutative: true},
 
                // Byte sign mask. Output is a bitmap of sign bits from each input byte.
                //
index df1ddfa69edfc101c757899c8f03f837bcd34062..13ec9dc9e3fc3abec04c319a8dcbf29ec700470f 100644 (file)
@@ -15414,6 +15414,7 @@ var opcodeTable = [...]opInfo{
        {
                name:         "PCMPEQB",
                argLen:       2,
+               commutative:  true,
                resultInArg0: true,
                asm:          x86.APCMPEQB,
                reg: regInfo{