diff options
| author | Cherry Mui <cherryyz@google.com> | 2025-12-19 14:48:59 -0500 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2025-12-19 14:39:20 -0800 |
| commit | baa0ae3aaacfcef6ae04beba78a2d2b06776e423 (patch) | |
| tree | 457a2e7b82f7cd1cc4992ca83e0bf214580319ac /src/simd/archsimd | |
| parent | d46c58debba9d194a98388984931645c3aed0e3e (diff) | |
| download | go-baa0ae3aaacfcef6ae04beba78a2d2b06776e423.tar.xz | |
simd/archsimd: correct type and instruction for SaturateToUint8
It should be defined on unsigned types, not signed types, and use
unsigned conversion instructions.
Change-Id: I49694ccdf1d331cfde88591531c358d9886e83e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/731500
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/simd/archsimd')
| -rw-r--r-- | src/simd/archsimd/_gen/simdgen/ops/Converts/go.yaml | 6 | ||||
| -rw-r--r-- | src/simd/archsimd/ops_amd64.go | 40 |
2 files changed, 23 insertions, 23 deletions
diff --git a/src/simd/archsimd/_gen/simdgen/ops/Converts/go.yaml b/src/simd/archsimd/_gen/simdgen/ops/Converts/go.yaml index 64cd4cb24e..1d688b434d 100644 --- a/src/simd/archsimd/_gen/simdgen/ops/Converts/go.yaml +++ b/src/simd/archsimd/_gen/simdgen/ops/Converts/go.yaml @@ -390,11 +390,11 @@ bits: 128 - go: SaturateToUint8 regexpTag: "convert" - asm: "VPMOVS[WDQ]B" + asm: "VPMOVUS[WDQ]B" in: - - base: int + - base: uint out: - - base: int + - base: uint bits: 128 - go: SaturateToInt8 regexpTag: "convert" diff --git a/src/simd/archsimd/ops_amd64.go b/src/simd/archsimd/ops_amd64.go index 8e32533aec..304c0c0796 100644 --- a/src/simd/archsimd/ops_amd64.go +++ b/src/simd/archsimd/ops_amd64.go @@ -5464,53 +5464,53 @@ func (x Int64x8) SaturateToInt32() Int32x8 // SaturateToUint8 converts element values to uint8 with unsigned saturation. // Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSWB, CPU Feature: AVX512 -func (x Int16x8) SaturateToUint8() Int8x16 +// Asm: VPMOVUSWB, CPU Feature: AVX512 +func (x Uint16x8) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. // -// Asm: VPMOVSWB, CPU Feature: AVX512 -func (x Int16x16) SaturateToUint8() Int8x16 +// Asm: VPMOVUSWB, CPU Feature: AVX512 +func (x Uint16x16) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. -// Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSDB, CPU Feature: AVX512 -func (x Int32x4) SaturateToUint8() Int8x16 +// Asm: VPMOVUSWB, CPU Feature: AVX512 +func (x Uint16x32) SaturateToUint8() Uint8x32 // SaturateToUint8 converts element values to uint8 with unsigned saturation. // Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSDB, CPU Feature: AVX512 -func (x Int32x8) SaturateToUint8() Int8x16 +// Asm: VPMOVUSDB, CPU Feature: AVX512 +func (x Uint32x4) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. +// Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSDB, CPU Feature: AVX512 -func (x Int32x16) SaturateToUint8() Int8x16 +// Asm: VPMOVUSDB, CPU Feature: AVX512 +func (x Uint32x8) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. -// Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSQB, CPU Feature: AVX512 -func (x Int64x2) SaturateToUint8() Int8x16 +// Asm: VPMOVUSDB, CPU Feature: AVX512 +func (x Uint32x16) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. // Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSQB, CPU Feature: AVX512 -func (x Int64x4) SaturateToUint8() Int8x16 +// Asm: VPMOVUSQB, CPU Feature: AVX512 +func (x Uint64x2) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. // Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVSQB, CPU Feature: AVX512 -func (x Int64x8) SaturateToUint8() Int8x16 +// Asm: VPMOVUSQB, CPU Feature: AVX512 +func (x Uint64x4) SaturateToUint8() Uint8x16 // SaturateToUint8 converts element values to uint8 with unsigned saturation. +// Results are packed to low elements in the returned vector, its upper elements are zeroed. // -// Asm: VPMOVUSWB, CPU Feature: AVX512 -func (x Uint16x32) SaturateToUint8() Uint8x32 +// Asm: VPMOVUSQB, CPU Feature: AVX512 +func (x Uint64x8) SaturateToUint8() Uint8x16 /* SaturateToUint16 */ |
