]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.simd] cmd/compile: output of simdgen with invariant type order
authorDavid Chase <drchase@google.com>
Wed, 2 Jul 2025 19:13:24 +0000 (15:13 -0400)
committerDavid Chase <drchase@google.com>
Mon, 7 Jul 2025 15:12:30 +0000 (08:12 -0700)
The old order was somewhat input-dependent, and sometimes
produced spurious changes.  This is the last spurious change,
"once and for all!!!"

Generated by simdgen CL 685595

Change-Id: Ic66d0263f3dd9f1ef9502c2deeeb8300ca3bac75
Reviewed-on: https://go-review.googlesource.com/c/go/+/685615
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
src/cmd/compile/internal/ssagen/simdintrinsics.go
src/simd/types_amd64.go

index 903febac371eebe04bd29836d146b5367007acaf..9837f07fc47dd7213626333ff9e3736125fb76f6 100644 (file)
@@ -1986,30 +1986,6 @@ func simdIntrinsics(addF func(pkg, fn string, b intrinsicBuilder, archFamilies .
        addF(simdPackage, "Uint64x8.AsUint8x64", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return args[0] }, sys.AMD64)
        addF(simdPackage, "Uint64x8.AsUint16x32", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return args[0] }, sys.AMD64)
        addF(simdPackage, "Uint64x8.AsUint32x16", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return args[0] }, sys.AMD64)
-       addF(simdPackage, "LoadMask8x16", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask8x16.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask8x32", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask8x32.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask8x64", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask8x64.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask16x8", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask16x8.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask16x16", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask16x16.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask16x32", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask16x32.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask32x4", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask32x4.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask32x8", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask32x8.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask32x16", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask32x16.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask64x2", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask64x2.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask64x4", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask64x4.Store", simdStore(), sys.AMD64)
-       addF(simdPackage, "LoadMask64x8", simdLoad(), sys.AMD64)
-       addF(simdPackage, "Mask64x8.Store", simdStore(), sys.AMD64)
        addF(simdPackage, "LoadFloat32x4", simdLoad(), sys.AMD64)
        addF(simdPackage, "Float32x4.Store", simdStore(), sys.AMD64)
        addF(simdPackage, "LoadFloat32x8", simdLoad(), sys.AMD64)
@@ -2070,6 +2046,30 @@ func simdIntrinsics(addF func(pkg, fn string, b intrinsicBuilder, archFamilies .
        addF(simdPackage, "Uint64x4.Store", simdStore(), sys.AMD64)
        addF(simdPackage, "LoadUint64x8", simdLoad(), sys.AMD64)
        addF(simdPackage, "Uint64x8.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask8x16", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask8x16.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask8x32", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask8x32.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask8x64", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask8x64.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask16x8", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask16x8.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask16x16", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask16x16.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask16x32", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask16x32.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask32x4", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask32x4.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask32x8", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask32x8.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask32x16", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask32x16.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask64x2", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask64x2.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask64x4", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask64x4.Store", simdStore(), sys.AMD64)
+       addF(simdPackage, "LoadMask64x8", simdLoad(), sys.AMD64)
+       addF(simdPackage, "Mask64x8.Store", simdStore(), sys.AMD64)
        addF(simdPackage, "Mask8x16.AsInt8x16", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return args[0] }, sys.AMD64)
        addF(simdPackage, "Int8x16.AsMask8x16", func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return args[0] }, sys.AMD64)
        addF(simdPackage, "Mask8x16.And", opLen2(ssa.OpAndInt32x4, types.TypeVec128), sys.AMD64)
index 67f4d297024b01fe14ab691db2fa12ed49c15fd9..6cc79275767c4c1597fecb7d3c5b44700dec1e24 100644 (file)
@@ -9,6 +9,44 @@ type v128 struct {
        _128 struct{}
 }
 
+// Float32x4 is a 128-bit SIMD vector of 4 float32
+type Float32x4 struct {
+       float32x4 v128
+       vals      [4]float32
+}
+
+// Len returns the number of elements in a Float32x4
+func (x Float32x4) Len() int { return 4 }
+
+// LoadFloat32x4 loads a Float32x4 from an array
+//
+//go:noescape
+func LoadFloat32x4(y *[4]float32) Float32x4
+
+// Store stores a Float32x4 to an array
+//
+//go:noescape
+func (x Float32x4) Store(y *[4]float32)
+
+// Float64x2 is a 128-bit SIMD vector of 2 float64
+type Float64x2 struct {
+       float64x2 v128
+       vals      [2]float64
+}
+
+// Len returns the number of elements in a Float64x2
+func (x Float64x2) Len() int { return 2 }
+
+// LoadFloat64x2 loads a Float64x2 from an array
+//
+//go:noescape
+func LoadFloat64x2(y *[2]float64) Float64x2
+
+// Store stores a Float64x2 to an array
+//
+//go:noescape
+func (x Float64x2) Store(y *[2]float64)
+
 // Int8x16 is a 128-bit SIMD vector of 16 int8
 type Int8x16 struct {
        int8x16 v128
@@ -85,50 +123,6 @@ func LoadInt64x2(y *[2]int64) Int64x2
 //go:noescape
 func (x Int64x2) Store(y *[2]int64)
 
-// Mask64x2 is a 128-bit SIMD vector of 2 int64
-type Mask64x2 struct {
-       int64x2 v128
-       vals    [2]int64
-}
-
-// Float32x4 is a 128-bit SIMD vector of 4 float32
-type Float32x4 struct {
-       float32x4 v128
-       vals      [4]float32
-}
-
-// Len returns the number of elements in a Float32x4
-func (x Float32x4) Len() int { return 4 }
-
-// LoadFloat32x4 loads a Float32x4 from an array
-//
-//go:noescape
-func LoadFloat32x4(y *[4]float32) Float32x4
-
-// Store stores a Float32x4 to an array
-//
-//go:noescape
-func (x Float32x4) Store(y *[4]float32)
-
-// Float64x2 is a 128-bit SIMD vector of 2 float64
-type Float64x2 struct {
-       float64x2 v128
-       vals      [2]float64
-}
-
-// Len returns the number of elements in a Float64x2
-func (x Float64x2) Len() int { return 2 }
-
-// LoadFloat64x2 loads a Float64x2 from an array
-//
-//go:noescape
-func LoadFloat64x2(y *[2]float64) Float64x2
-
-// Store stores a Float64x2 to an array
-//
-//go:noescape
-func (x Float64x2) Store(y *[2]float64)
-
 // Uint8x16 is a 128-bit SIMD vector of 16 uint8
 type Uint8x16 struct {
        uint8x16 v128
@@ -205,12 +199,6 @@ func LoadUint64x2(y *[2]uint64) Uint64x2
 //go:noescape
 func (x Uint64x2) Store(y *[2]uint64)
 
-// Mask32x4 is a 128-bit SIMD vector of 4 int32
-type Mask32x4 struct {
-       int32x4 v128
-       vals    [4]int32
-}
-
 // Mask8x16 is a 128-bit SIMD vector of 16 int8
 type Mask8x16 struct {
        int8x16 v128
@@ -223,11 +211,61 @@ type Mask16x8 struct {
        vals    [8]int16
 }
 
+// Mask32x4 is a 128-bit SIMD vector of 4 int32
+type Mask32x4 struct {
+       int32x4 v128
+       vals    [4]int32
+}
+
+// Mask64x2 is a 128-bit SIMD vector of 2 int64
+type Mask64x2 struct {
+       int64x2 v128
+       vals    [2]int64
+}
+
 // v256 is a tag type that tells the compiler that this is really 256-bit SIMD
 type v256 struct {
        _256 struct{}
 }
 
+// Float32x8 is a 256-bit SIMD vector of 8 float32
+type Float32x8 struct {
+       float32x8 v256
+       vals      [8]float32
+}
+
+// Len returns the number of elements in a Float32x8
+func (x Float32x8) Len() int { return 8 }
+
+// LoadFloat32x8 loads a Float32x8 from an array
+//
+//go:noescape
+func LoadFloat32x8(y *[8]float32) Float32x8
+
+// Store stores a Float32x8 to an array
+//
+//go:noescape
+func (x Float32x8) Store(y *[8]float32)
+
+// Float64x4 is a 256-bit SIMD vector of 4 float64
+type Float64x4 struct {
+       float64x4 v256
+       vals      [4]float64
+}
+
+// Len returns the number of elements in a Float64x4
+func (x Float64x4) Len() int { return 4 }
+
+// LoadFloat64x4 loads a Float64x4 from an array
+//
+//go:noescape
+func LoadFloat64x4(y *[4]float64) Float64x4
+
+// Store stores a Float64x4 to an array
+//
+//go:noescape
+func (x Float64x4) Store(y *[4]float64)
+
 // Int8x32 is a 256-bit SIMD vector of 32 int8
 type Int8x32 struct {
        int8x32 v256
@@ -304,50 +342,6 @@ func LoadInt64x4(y *[4]int64) Int64x4
 //go:noescape
 func (x Int64x4) Store(y *[4]int64)
 
-// Mask64x4 is a 256-bit SIMD vector of 4 int64
-type Mask64x4 struct {
-       int64x4 v256
-       vals    [4]int64
-}
-
-// Float32x8 is a 256-bit SIMD vector of 8 float32
-type Float32x8 struct {
-       float32x8 v256
-       vals      [8]float32
-}
-
-// Len returns the number of elements in a Float32x8
-func (x Float32x8) Len() int { return 8 }
-
-// LoadFloat32x8 loads a Float32x8 from an array
-//
-//go:noescape
-func LoadFloat32x8(y *[8]float32) Float32x8
-
-// Store stores a Float32x8 to an array
-//
-//go:noescape
-func (x Float32x8) Store(y *[8]float32)
-
-// Float64x4 is a 256-bit SIMD vector of 4 float64
-type Float64x4 struct {
-       float64x4 v256
-       vals      [4]float64
-}
-
-// Len returns the number of elements in a Float64x4
-func (x Float64x4) Len() int { return 4 }
-
-// LoadFloat64x4 loads a Float64x4 from an array
-//
-//go:noescape
-func LoadFloat64x4(y *[4]float64) Float64x4
-
-// Store stores a Float64x4 to an array
-//
-//go:noescape
-func (x Float64x4) Store(y *[4]float64)
-
 // Uint8x32 is a 256-bit SIMD vector of 32 uint8
 type Uint8x32 struct {
        uint8x32 v256
@@ -424,12 +418,6 @@ func LoadUint64x4(y *[4]uint64) Uint64x4
 //go:noescape
 func (x Uint64x4) Store(y *[4]uint64)
 
-// Mask32x8 is a 256-bit SIMD vector of 8 int32
-type Mask32x8 struct {
-       int32x8 v256
-       vals    [8]int32
-}
-
 // Mask8x32 is a 256-bit SIMD vector of 32 int8
 type Mask8x32 struct {
        int8x32 v256
@@ -442,11 +430,61 @@ type Mask16x16 struct {
        vals     [16]int16
 }
 
+// Mask32x8 is a 256-bit SIMD vector of 8 int32
+type Mask32x8 struct {
+       int32x8 v256
+       vals    [8]int32
+}
+
+// Mask64x4 is a 256-bit SIMD vector of 4 int64
+type Mask64x4 struct {
+       int64x4 v256
+       vals    [4]int64
+}
+
 // v512 is a tag type that tells the compiler that this is really 512-bit SIMD
 type v512 struct {
        _512 struct{}
 }
 
+// Float32x16 is a 512-bit SIMD vector of 16 float32
+type Float32x16 struct {
+       float32x16 v512
+       vals       [16]float32
+}
+
+// Len returns the number of elements in a Float32x16
+func (x Float32x16) Len() int { return 16 }
+
+// LoadFloat32x16 loads a Float32x16 from an array
+//
+//go:noescape
+func LoadFloat32x16(y *[16]float32) Float32x16
+
+// Store stores a Float32x16 to an array
+//
+//go:noescape
+func (x Float32x16) Store(y *[16]float32)
+
+// Float64x8 is a 512-bit SIMD vector of 8 float64
+type Float64x8 struct {
+       float64x8 v512
+       vals      [8]float64
+}
+
+// Len returns the number of elements in a Float64x8
+func (x Float64x8) Len() int { return 8 }
+
+// LoadFloat64x8 loads a Float64x8 from an array
+//
+//go:noescape
+func LoadFloat64x8(y *[8]float64) Float64x8
+
+// Store stores a Float64x8 to an array
+//
+//go:noescape
+func (x Float64x8) Store(y *[8]float64)
+
 // Int8x64 is a 512-bit SIMD vector of 64 int8
 type Int8x64 struct {
        int8x64 v512
@@ -466,12 +504,6 @@ func LoadInt8x64(y *[64]int8) Int8x64
 //go:noescape
 func (x Int8x64) Store(y *[64]int8)
 
-// Mask8x64 is a 512-bit SIMD vector of 64 int8
-type Mask8x64 struct {
-       int8x64 v512
-       vals    [64]int8
-}
-
 // Int16x32 is a 512-bit SIMD vector of 32 int16
 type Int16x32 struct {
        int16x32 v512
@@ -491,12 +523,6 @@ func LoadInt16x32(y *[32]int16) Int16x32
 //go:noescape
 func (x Int16x32) Store(y *[32]int16)
 
-// Mask16x32 is a 512-bit SIMD vector of 32 int16
-type Mask16x32 struct {
-       int16x32 v512
-       vals     [32]int16
-}
-
 // Int32x16 is a 512-bit SIMD vector of 16 int32
 type Int32x16 struct {
        int32x16 v512
@@ -516,12 +542,6 @@ func LoadInt32x16(y *[16]int32) Int32x16
 //go:noescape
 func (x Int32x16) Store(y *[16]int32)
 
-// Mask32x16 is a 512-bit SIMD vector of 16 int32
-type Mask32x16 struct {
-       int32x16 v512
-       vals     [16]int32
-}
-
 // Int64x8 is a 512-bit SIMD vector of 8 int64
 type Int64x8 struct {
        int64x8 v512
@@ -541,50 +561,6 @@ func LoadInt64x8(y *[8]int64) Int64x8
 //go:noescape
 func (x Int64x8) Store(y *[8]int64)
 
-// Mask64x8 is a 512-bit SIMD vector of 8 int64
-type Mask64x8 struct {
-       int64x8 v512
-       vals    [8]int64
-}
-
-// Float32x16 is a 512-bit SIMD vector of 16 float32
-type Float32x16 struct {
-       float32x16 v512
-       vals       [16]float32
-}
-
-// Len returns the number of elements in a Float32x16
-func (x Float32x16) Len() int { return 16 }
-
-// LoadFloat32x16 loads a Float32x16 from an array
-//
-//go:noescape
-func LoadFloat32x16(y *[16]float32) Float32x16
-
-// Store stores a Float32x16 to an array
-//
-//go:noescape
-func (x Float32x16) Store(y *[16]float32)
-
-// Float64x8 is a 512-bit SIMD vector of 8 float64
-type Float64x8 struct {
-       float64x8 v512
-       vals      [8]float64
-}
-
-// Len returns the number of elements in a Float64x8
-func (x Float64x8) Len() int { return 8 }
-
-// LoadFloat64x8 loads a Float64x8 from an array
-//
-//go:noescape
-func LoadFloat64x8(y *[8]float64) Float64x8
-
-// Store stores a Float64x8 to an array
-//
-//go:noescape
-func (x Float64x8) Store(y *[8]float64)
-
 // Uint8x64 is a 512-bit SIMD vector of 64 uint8
 type Uint8x64 struct {
        uint8x64 v512
@@ -660,3 +636,27 @@ func LoadUint64x8(y *[8]uint64) Uint64x8
 //
 //go:noescape
 func (x Uint64x8) Store(y *[8]uint64)
+
+// Mask8x64 is a 512-bit SIMD vector of 64 int8
+type Mask8x64 struct {
+       int8x64 v512
+       vals    [64]int8
+}
+
+// Mask16x32 is a 512-bit SIMD vector of 32 int16
+type Mask16x32 struct {
+       int16x32 v512
+       vals     [32]int16
+}
+
+// Mask32x16 is a 512-bit SIMD vector of 16 int32
+type Mask32x16 struct {
+       int32x16 v512
+       vals     [16]int32
+}
+
+// Mask64x8 is a 512-bit SIMD vector of 8 int64
+type Mask64x8 struct {
+       int64x8 v512
+       vals    [8]int64
+}