mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] cmd/compile, simd: jump table for imm ops
This CL fixes some errors in prog generation for imm operations, please see the changes in ssa.go for details. This CL also implements the jump table for non-const immediate arg. The current implementation exhaust 0-255, the bound-checked version will be in the next CL. This CL is partially generated by CL 694375. Change-Id: I75fe9900430b4fca5b39b0c0958a13b20b1104b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/694395 Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
94d72355f6
commit
38b76bf2a3
10 changed files with 2258 additions and 2243 deletions
|
|
@ -396,3 +396,19 @@ func TestMergeFloat(t *testing.T) {
|
|||
c.StoreSlice(s)
|
||||
checkSlices[float64](t, s, []float64{4, 2, 3, 4})
|
||||
}
|
||||
|
||||
var ro uint8 = 2
|
||||
|
||||
func TestRotateAllVariable(t *testing.T) {
|
||||
if !simd.HasAVX512() {
|
||||
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||
return
|
||||
}
|
||||
got := make([]int32, 4)
|
||||
simd.LoadInt32x4Slice([]int32{0b11, 0b11, 0b11, 0b11}).RotateAllLeft(ro).StoreSlice(got)
|
||||
for _, v := range got {
|
||||
if v != 0b1100 {
|
||||
t.Errorf("Want 0b1100, got %b", v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue