diff options
| author | Cherry Mui <cherryyz@google.com> | 2025-12-29 11:30:33 -0500 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2025-12-29 16:20:42 -0800 |
| commit | 76dddce29302681bdddafd4cbc27db66802414dd (patch) | |
| tree | a3170ce19a1c23e87bc59e9b5374a172189da693 /src/cmd/compile/internal/ssa | |
| parent | 6ecdd2fc6e58c0cd2b788032a85f7845af10c922 (diff) | |
| download | go-76dddce29302681bdddafd4cbc27db66802414dd.tar.xz | |
simd/archsimd: remove redundant suffix of ExtendLo operations
For methods like ExtendLo2ToInt64x2, the last "x2" is redundant, as
it is already mentioned in "Lo2". Remove it, so it is just
ExtendLo2ToInt64.
Change-Id: I490afd818c40bb7a4ef15c249723895735bd6488
Reviewed-on: https://go-review.googlesource.com/c/go/+/733100
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa')
| -rw-r--r-- | src/cmd/compile/internal/ssa/_gen/simdAMD64.rules | 40 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/_gen/simdgenericOps.go | 40 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/opGen.go | 80 | ||||
| -rw-r--r-- | src/cmd/compile/internal/ssa/rewriteAMD64.go | 40 |
4 files changed, 100 insertions, 100 deletions
diff --git a/src/cmd/compile/internal/ssa/_gen/simdAMD64.rules b/src/cmd/compile/internal/ssa/_gen/simdAMD64.rules index a7a6a3f7a1..8a5b70da30 100644 --- a/src/cmd/compile/internal/ssa/_gen/simdAMD64.rules +++ b/src/cmd/compile/internal/ssa/_gen/simdAMD64.rules @@ -376,26 +376,26 @@ (ExpandUint64x2 x mask) => (VPEXPANDQMasked128 x (VPMOVVec64x2ToM <types.TypeMask> mask)) (ExpandUint64x4 x mask) => (VPEXPANDQMasked256 x (VPMOVVec64x4ToM <types.TypeMask> mask)) (ExpandUint64x8 x mask) => (VPEXPANDQMasked512 x (VPMOVVec64x8ToM <types.TypeMask> mask)) -(ExtendLo2ToInt64x2Int8x16 ...) => (VPMOVSXBQ128 ...) -(ExtendLo2ToInt64x2Int16x8 ...) => (VPMOVSXWQ128 ...) -(ExtendLo2ToInt64x2Int32x4 ...) => (VPMOVSXDQ128 ...) -(ExtendLo2ToUint64x2Uint8x16 ...) => (VPMOVZXBQ128 ...) -(ExtendLo2ToUint64x2Uint16x8 ...) => (VPMOVZXWQ128 ...) -(ExtendLo2ToUint64x2Uint32x4 ...) => (VPMOVZXDQ128 ...) -(ExtendLo4ToInt32x4Int8x16 ...) => (VPMOVSXBD128 ...) -(ExtendLo4ToInt32x4Int16x8 ...) => (VPMOVSXWD128 ...) -(ExtendLo4ToInt64x4Int8x16 ...) => (VPMOVSXBQ256 ...) -(ExtendLo4ToInt64x4Int16x8 ...) => (VPMOVSXWQ256 ...) -(ExtendLo4ToUint32x4Uint8x16 ...) => (VPMOVZXBD128 ...) -(ExtendLo4ToUint32x4Uint16x8 ...) => (VPMOVZXWD128 ...) -(ExtendLo4ToUint64x4Uint8x16 ...) => (VPMOVZXBQ256 ...) -(ExtendLo4ToUint64x4Uint16x8 ...) => (VPMOVZXWQ256 ...) -(ExtendLo8ToInt16x8Int8x16 ...) => (VPMOVSXBW128 ...) -(ExtendLo8ToInt32x8Int8x16 ...) => (VPMOVSXBD256 ...) -(ExtendLo8ToInt64x8Int8x16 ...) => (VPMOVSXBQ512 ...) -(ExtendLo8ToUint16x8Uint8x16 ...) => (VPMOVZXBW128 ...) -(ExtendLo8ToUint32x8Uint8x16 ...) => (VPMOVZXBD256 ...) -(ExtendLo8ToUint64x8Uint8x16 ...) => (VPMOVZXBQ512 ...) +(ExtendLo2ToInt64Int8x16 ...) => (VPMOVSXBQ128 ...) +(ExtendLo2ToInt64Int16x8 ...) => (VPMOVSXWQ128 ...) +(ExtendLo2ToInt64Int32x4 ...) => (VPMOVSXDQ128 ...) +(ExtendLo2ToUint64Uint8x16 ...) => (VPMOVZXBQ128 ...) +(ExtendLo2ToUint64Uint16x8 ...) => (VPMOVZXWQ128 ...) +(ExtendLo2ToUint64Uint32x4 ...) => (VPMOVZXDQ128 ...) +(ExtendLo4ToInt32Int8x16 ...) => (VPMOVSXBD128 ...) +(ExtendLo4ToInt32Int16x8 ...) => (VPMOVSXWD128 ...) +(ExtendLo4ToInt64Int8x16 ...) => (VPMOVSXBQ256 ...) +(ExtendLo4ToInt64Int16x8 ...) => (VPMOVSXWQ256 ...) +(ExtendLo4ToUint32Uint8x16 ...) => (VPMOVZXBD128 ...) +(ExtendLo4ToUint32Uint16x8 ...) => (VPMOVZXWD128 ...) +(ExtendLo4ToUint64Uint8x16 ...) => (VPMOVZXBQ256 ...) +(ExtendLo4ToUint64Uint16x8 ...) => (VPMOVZXWQ256 ...) +(ExtendLo8ToInt16Int8x16 ...) => (VPMOVSXBW128 ...) +(ExtendLo8ToInt32Int8x16 ...) => (VPMOVSXBD256 ...) +(ExtendLo8ToInt64Int8x16 ...) => (VPMOVSXBQ512 ...) +(ExtendLo8ToUint16Uint8x16 ...) => (VPMOVZXBW128 ...) +(ExtendLo8ToUint32Uint8x16 ...) => (VPMOVZXBD256 ...) +(ExtendLo8ToUint64Uint8x16 ...) => (VPMOVZXBQ512 ...) (ExtendToInt16Int8x16 ...) => (VPMOVSXBW256 ...) (ExtendToInt16Int8x32 ...) => (VPMOVSXBW512 ...) (ExtendToInt32Int8x16 ...) => (VPMOVSXBD512 ...) diff --git a/src/cmd/compile/internal/ssa/_gen/simdgenericOps.go b/src/cmd/compile/internal/ssa/_gen/simdgenericOps.go index fd43f3d61f..af1007cd54 100644 --- a/src/cmd/compile/internal/ssa/_gen/simdgenericOps.go +++ b/src/cmd/compile/internal/ssa/_gen/simdgenericOps.go @@ -364,26 +364,26 @@ func simdGenericOps() []opData { {name: "ExpandUint64x2", argLength: 2, commutative: false}, {name: "ExpandUint64x4", argLength: 2, commutative: false}, {name: "ExpandUint64x8", argLength: 2, commutative: false}, - {name: "ExtendLo2ToInt64x2Int8x16", argLength: 1, commutative: false}, - {name: "ExtendLo2ToInt64x2Int16x8", argLength: 1, commutative: false}, - {name: "ExtendLo2ToInt64x2Int32x4", argLength: 1, commutative: false}, - {name: "ExtendLo2ToUint64x2Uint8x16", argLength: 1, commutative: false}, - {name: "ExtendLo2ToUint64x2Uint16x8", argLength: 1, commutative: false}, - {name: "ExtendLo2ToUint64x2Uint32x4", argLength: 1, commutative: false}, - {name: "ExtendLo4ToInt32x4Int8x16", argLength: 1, commutative: false}, - {name: "ExtendLo4ToInt32x4Int16x8", argLength: 1, commutative: false}, - {name: "ExtendLo4ToInt64x4Int8x16", argLength: 1, commutative: false}, - {name: "ExtendLo4ToInt64x4Int16x8", argLength: 1, commutative: false}, - {name: "ExtendLo4ToUint32x4Uint8x16", argLength: 1, commutative: false}, - {name: "ExtendLo4ToUint32x4Uint16x8", argLength: 1, commutative: false}, - {name: "ExtendLo4ToUint64x4Uint8x16", argLength: 1, commutative: false}, - {name: "ExtendLo4ToUint64x4Uint16x8", argLength: 1, commutative: false}, - {name: "ExtendLo8ToInt16x8Int8x16", argLength: 1, commutative: false}, - {name: "ExtendLo8ToInt32x8Int8x16", argLength: 1, commutative: false}, - {name: "ExtendLo8ToInt64x8Int8x16", argLength: 1, commutative: false}, - {name: "ExtendLo8ToUint16x8Uint8x16", argLength: 1, commutative: false}, - {name: "ExtendLo8ToUint32x8Uint8x16", argLength: 1, commutative: false}, - {name: "ExtendLo8ToUint64x8Uint8x16", argLength: 1, commutative: false}, + {name: "ExtendLo2ToInt64Int8x16", argLength: 1, commutative: false}, + {name: "ExtendLo2ToInt64Int16x8", argLength: 1, commutative: false}, + {name: "ExtendLo2ToInt64Int32x4", argLength: 1, commutative: false}, + {name: "ExtendLo2ToUint64Uint8x16", argLength: 1, commutative: false}, + {name: "ExtendLo2ToUint64Uint16x8", argLength: 1, commutative: false}, + {name: "ExtendLo2ToUint64Uint32x4", argLength: 1, commutative: false}, + {name: "ExtendLo4ToInt32Int8x16", argLength: 1, commutative: false}, + {name: "ExtendLo4ToInt32Int16x8", argLength: 1, commutative: false}, + {name: "ExtendLo4ToInt64Int8x16", argLength: 1, commutative: false}, + {name: "ExtendLo4ToInt64Int16x8", argLength: 1, commutative: false}, + {name: "ExtendLo4ToUint32Uint8x16", argLength: 1, commutative: false}, + {name: "ExtendLo4ToUint32Uint16x8", argLength: 1, commutative: false}, + {name: "ExtendLo4ToUint64Uint8x16", argLength: 1, commutative: false}, + {name: "ExtendLo4ToUint64Uint16x8", argLength: 1, commutative: false}, + {name: "ExtendLo8ToInt16Int8x16", argLength: 1, commutative: false}, + {name: "ExtendLo8ToInt32Int8x16", argLength: 1, commutative: false}, + {name: "ExtendLo8ToInt64Int8x16", argLength: 1, commutative: false}, + {name: "ExtendLo8ToUint16Uint8x16", argLength: 1, commutative: false}, + {name: "ExtendLo8ToUint32Uint8x16", argLength: 1, commutative: false}, + {name: "ExtendLo8ToUint64Uint8x16", argLength: 1, commutative: false}, {name: "ExtendToInt16Int8x16", argLength: 1, commutative: false}, {name: "ExtendToInt16Int8x32", argLength: 1, commutative: false}, {name: "ExtendToInt32Int8x16", argLength: 1, commutative: false}, diff --git a/src/cmd/compile/internal/ssa/opGen.go b/src/cmd/compile/internal/ssa/opGen.go index f318adfd2f..d2ba15f740 100644 --- a/src/cmd/compile/internal/ssa/opGen.go +++ b/src/cmd/compile/internal/ssa/opGen.go @@ -6518,26 +6518,26 @@ const ( OpExpandUint64x2 OpExpandUint64x4 OpExpandUint64x8 - OpExtendLo2ToInt64x2Int8x16 - OpExtendLo2ToInt64x2Int16x8 - OpExtendLo2ToInt64x2Int32x4 - OpExtendLo2ToUint64x2Uint8x16 - OpExtendLo2ToUint64x2Uint16x8 - OpExtendLo2ToUint64x2Uint32x4 - OpExtendLo4ToInt32x4Int8x16 - OpExtendLo4ToInt32x4Int16x8 - OpExtendLo4ToInt64x4Int8x16 - OpExtendLo4ToInt64x4Int16x8 - OpExtendLo4ToUint32x4Uint8x16 - OpExtendLo4ToUint32x4Uint16x8 - OpExtendLo4ToUint64x4Uint8x16 - OpExtendLo4ToUint64x4Uint16x8 - OpExtendLo8ToInt16x8Int8x16 - OpExtendLo8ToInt32x8Int8x16 - OpExtendLo8ToInt64x8Int8x16 - OpExtendLo8ToUint16x8Uint8x16 - OpExtendLo8ToUint32x8Uint8x16 - OpExtendLo8ToUint64x8Uint8x16 + OpExtendLo2ToInt64Int8x16 + OpExtendLo2ToInt64Int16x8 + OpExtendLo2ToInt64Int32x4 + OpExtendLo2ToUint64Uint8x16 + OpExtendLo2ToUint64Uint16x8 + OpExtendLo2ToUint64Uint32x4 + OpExtendLo4ToInt32Int8x16 + OpExtendLo4ToInt32Int16x8 + OpExtendLo4ToInt64Int8x16 + OpExtendLo4ToInt64Int16x8 + OpExtendLo4ToUint32Uint8x16 + OpExtendLo4ToUint32Uint16x8 + OpExtendLo4ToUint64Uint8x16 + OpExtendLo4ToUint64Uint16x8 + OpExtendLo8ToInt16Int8x16 + OpExtendLo8ToInt32Int8x16 + OpExtendLo8ToInt64Int8x16 + OpExtendLo8ToUint16Uint8x16 + OpExtendLo8ToUint32Uint8x16 + OpExtendLo8ToUint64Uint8x16 OpExtendToInt16Int8x16 OpExtendToInt16Int8x32 OpExtendToInt32Int8x16 @@ -90896,102 +90896,102 @@ var opcodeTable = [...]opInfo{ generic: true, }, { - name: "ExtendLo2ToInt64x2Int8x16", + name: "ExtendLo2ToInt64Int8x16", argLen: 1, generic: true, }, { - name: "ExtendLo2ToInt64x2Int16x8", + name: "ExtendLo2ToInt64Int16x8", argLen: 1, generic: true, }, { - name: "ExtendLo2ToInt64x2Int32x4", + name: "ExtendLo2ToInt64Int32x4", argLen: 1, generic: true, }, { - name: "ExtendLo2ToUint64x2Uint8x16", + name: "ExtendLo2ToUint64Uint8x16", argLen: 1, generic: true, }, { - name: "ExtendLo2ToUint64x2Uint16x8", + name: "ExtendLo2ToUint64Uint16x8", argLen: 1, generic: true, }, { - name: "ExtendLo2ToUint64x2Uint32x4", + name: "ExtendLo2ToUint64Uint32x4", argLen: 1, generic: true, }, { - name: "ExtendLo4ToInt32x4Int8x16", + name: "ExtendLo4ToInt32Int8x16", argLen: 1, generic: true, }, { - name: "ExtendLo4ToInt32x4Int16x8", + name: "ExtendLo4ToInt32Int16x8", argLen: 1, generic: true, }, { - name: "ExtendLo4ToInt64x4Int8x16", + name: "ExtendLo4ToInt64Int8x16", argLen: 1, generic: true, }, { - name: "ExtendLo4ToInt64x4Int16x8", + name: "ExtendLo4ToInt64Int16x8", argLen: 1, generic: true, }, { - name: "ExtendLo4ToUint32x4Uint8x16", + name: "ExtendLo4ToUint32Uint8x16", argLen: 1, generic: true, }, { - name: "ExtendLo4ToUint32x4Uint16x8", + name: "ExtendLo4ToUint32Uint16x8", argLen: 1, generic: true, }, { - name: "ExtendLo4ToUint64x4Uint8x16", + name: "ExtendLo4ToUint64Uint8x16", argLen: 1, generic: true, }, { - name: "ExtendLo4ToUint64x4Uint16x8", + name: "ExtendLo4ToUint64Uint16x8", argLen: 1, generic: true, }, { - name: "ExtendLo8ToInt16x8Int8x16", + name: "ExtendLo8ToInt16Int8x16", argLen: 1, generic: true, }, { - name: "ExtendLo8ToInt32x8Int8x16", + name: "ExtendLo8ToInt32Int8x16", argLen: 1, generic: true, }, { - name: "ExtendLo8ToInt64x8Int8x16", + name: "ExtendLo8ToInt64Int8x16", argLen: 1, generic: true, }, { - name: "ExtendLo8ToUint16x8Uint8x16", + name: "ExtendLo8ToUint16Uint8x16", argLen: 1, generic: true, }, { - name: "ExtendLo8ToUint32x8Uint8x16", + name: "ExtendLo8ToUint32Uint8x16", argLen: 1, generic: true, }, { - name: "ExtendLo8ToUint64x8Uint8x16", + name: "ExtendLo8ToUint64Uint8x16", argLen: 1, generic: true, }, diff --git a/src/cmd/compile/internal/ssa/rewriteAMD64.go b/src/cmd/compile/internal/ssa/rewriteAMD64.go index 5fed6a8063..0c04410074 100644 --- a/src/cmd/compile/internal/ssa/rewriteAMD64.go +++ b/src/cmd/compile/internal/ssa/rewriteAMD64.go @@ -3274,64 +3274,64 @@ func rewriteValueAMD64(v *Value) bool { return rewriteValueAMD64_OpExpandUint8x32(v) case OpExpandUint8x64: return rewriteValueAMD64_OpExpandUint8x64(v) - case OpExtendLo2ToInt64x2Int16x8: + case OpExtendLo2ToInt64Int16x8: v.Op = OpAMD64VPMOVSXWQ128 return true - case OpExtendLo2ToInt64x2Int32x4: + case OpExtendLo2ToInt64Int32x4: v.Op = OpAMD64VPMOVSXDQ128 return true - case OpExtendLo2ToInt64x2Int8x16: + case OpExtendLo2ToInt64Int8x16: v.Op = OpAMD64VPMOVSXBQ128 return true - case OpExtendLo2ToUint64x2Uint16x8: + case OpExtendLo2ToUint64Uint16x8: v.Op = OpAMD64VPMOVZXWQ128 return true - case OpExtendLo2ToUint64x2Uint32x4: + case OpExtendLo2ToUint64Uint32x4: v.Op = OpAMD64VPMOVZXDQ128 return true - case OpExtendLo2ToUint64x2Uint8x16: + case OpExtendLo2ToUint64Uint8x16: v.Op = OpAMD64VPMOVZXBQ128 return true - case OpExtendLo4ToInt32x4Int16x8: + case OpExtendLo4ToInt32Int16x8: v.Op = OpAMD64VPMOVSXWD128 return true - case OpExtendLo4ToInt32x4Int8x16: + case OpExtendLo4ToInt32Int8x16: v.Op = OpAMD64VPMOVSXBD128 return true - case OpExtendLo4ToInt64x4Int16x8: + case OpExtendLo4ToInt64Int16x8: v.Op = OpAMD64VPMOVSXWQ256 return true - case OpExtendLo4ToInt64x4Int8x16: + case OpExtendLo4ToInt64Int8x16: v.Op = OpAMD64VPMOVSXBQ256 return true - case OpExtendLo4ToUint32x4Uint16x8: + case OpExtendLo4ToUint32Uint16x8: v.Op = OpAMD64VPMOVZXWD128 return true - case OpExtendLo4ToUint32x4Uint8x16: + case OpExtendLo4ToUint32Uint8x16: v.Op = OpAMD64VPMOVZXBD128 return true - case OpExtendLo4ToUint64x4Uint16x8: + case OpExtendLo4ToUint64Uint16x8: v.Op = OpAMD64VPMOVZXWQ256 return true - case OpExtendLo4ToUint64x4Uint8x16: + case OpExtendLo4ToUint64Uint8x16: v.Op = OpAMD64VPMOVZXBQ256 return true - case OpExtendLo8ToInt16x8Int8x16: + case OpExtendLo8ToInt16Int8x16: v.Op = OpAMD64VPMOVSXBW128 return true - case OpExtendLo8ToInt32x8Int8x16: + case OpExtendLo8ToInt32Int8x16: v.Op = OpAMD64VPMOVSXBD256 return true - case OpExtendLo8ToInt64x8Int8x16: + case OpExtendLo8ToInt64Int8x16: v.Op = OpAMD64VPMOVSXBQ512 return true - case OpExtendLo8ToUint16x8Uint8x16: + case OpExtendLo8ToUint16Uint8x16: v.Op = OpAMD64VPMOVZXBW128 return true - case OpExtendLo8ToUint32x8Uint8x16: + case OpExtendLo8ToUint32Uint8x16: v.Op = OpAMD64VPMOVZXBD256 return true - case OpExtendLo8ToUint64x8Uint8x16: + case OpExtendLo8ToUint64Uint8x16: v.Op = OpAMD64VPMOVZXBQ512 return true case OpExtendToInt16Int8x16: |
