diff options
| author | Cherry Mui <cherryyz@google.com> | 2025-12-16 11:16:47 -0500 |
|---|---|---|
| committer | David Chase <drchase@google.com> | 2025-12-16 09:06:04 -0800 |
| commit | 3f6eabdf09cd660c7881b75c5dfaef09609ba7e6 (patch) | |
| tree | 5fc24e3bb68ca5cf0d3c0896f024c49fec15daad /src/simd | |
| parent | a4b5b92055d24da007ae13c4586aa0a229fa337b (diff) | |
| download | go-3f6eabdf09cd660c7881b75c5dfaef09609ba7e6.tar.xz | |
cmd/compile: use unsigned constant when folding loads for SIMD ops with constants
When folding loads into a SIMD op with a constant, in the SSA
rules we use makeValAndOff to create an AuxInt for the constant
and the offset. For the SIMD ops of concern (for now), the
constants are always unsigned. So pass the constant unsigned.
Fixes #76756.
Change-Id: Ia5910e689ff510ce54d3a0c2ed0e950bc54f8862
Reviewed-on: https://go-review.googlesource.com/c/go/+/730420
Reviewed-by: David Chase <drchase@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/simd')
| -rw-r--r-- | src/simd/archsimd/_gen/simdgen/gen_simdrules.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/simd/archsimd/_gen/simdgen/gen_simdrules.go b/src/simd/archsimd/_gen/simdgen/gen_simdrules.go index 90c3fb620e..7a8823483a 100644 --- a/src/simd/archsimd/_gen/simdgen/gen_simdrules.go +++ b/src/simd/archsimd/_gen/simdgen/gen_simdrules.go @@ -275,7 +275,7 @@ func writeSIMDRules(ops []Operation) *bytes.Buffer { origArgs = after } immArg = "[c] " - immArgCombineOff = " [makeValAndOff(int32(int8(c)),off)] " + immArgCombineOff = " [makeValAndOff(int32(uint8(c)),off)] " } memOpData.ArgsLoadAddr = immArg + origArgs + fmt.Sprintf("l:(VMOVDQUload%d {sym} [off] ptr mem)", *lastVreg.Bits) // Remove the last vreg from the arg and change it to "ptr". |
