From f0e9dc09752cc2f03fcedff458660ab2276bcf8d Mon Sep 17 00:00:00 2001 From: Junyang Shao Date: Thu, 17 Jul 2025 22:23:15 +0000 Subject: [PATCH] [dev.simd] cmd/compile: fix opLen(2|3)Imm8_2I intrinsic function This function reads the const from the wrong arg, this CL fixes it. Change-Id: Icd38977a35f0df9064efb290fa6390453d6b9e5b Reviewed-on: https://go-review.googlesource.com/c/go/+/688595 Reviewed-by: David Chase LUCI-TryBot-Result: Go LUCI --- src/cmd/compile/internal/ssagen/intrinsics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cmd/compile/internal/ssagen/intrinsics.go b/src/cmd/compile/internal/ssagen/intrinsics.go index 337f0b86e6..5415143ec3 100644 --- a/src/cmd/compile/internal/ssagen/intrinsics.go +++ b/src/cmd/compile/internal/ssagen/intrinsics.go @@ -1722,7 +1722,7 @@ func opLen3Imm8(op ssa.Op, t *types.Type, offset int) func(s *state, n *ir.CallE func opLen2Imm8_2I(op ssa.Op, t *types.Type, offset int) func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { return func(s *state, n *ir.CallExpr, args []*ssa.Value) *ssa.Value { - if args[1].Op == ssa.OpConst8 { + if args[2].Op == ssa.OpConst8 { return s.newValue2I(op, t, args[2].AuxInt<