Fixes #58822
Change-Id: I9c44c57dac72884ec3209d87ddb25e7e1675a737
Reviewed-on: https://go-review.googlesource.com/c/go/+/472795
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@google.com>
AVPGATHERQD,
AVPGATHERDQ,
AVPGATHERQQ:
+ if p.GetFrom3() == nil {
+ // gathers need a 3rd arg. See issue 58822.
+ ctxt.Diag("need a third arg for gather instruction: %v", p)
+ return
+ }
// AVX512 gather requires explicit K mask.
if p.GetFrom3().Reg >= REG_K0 && p.GetFrom3().Reg <= REG_K7 {
if !avx512gatherValid(ctxt, p) {