mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] simd, cmd/compile: mark BLEND instructions as not-zero-mask
Change-Id: Ida9f29423d62a25be41dcf637ffb9275b7cae642 Reviewed-on: https://go-review.googlesource.com/c/go/+/697055 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
9a934d5080
commit
8ccd6c2034
3 changed files with 24 additions and 4 deletions
|
|
@ -1654,10 +1654,6 @@ func ssaGenSIMDValue(s *ssagen.State, v *ssa.Value) bool {
|
||||||
ssa.OpAMD64VPXORQMasked128,
|
ssa.OpAMD64VPXORQMasked128,
|
||||||
ssa.OpAMD64VPXORQMasked256,
|
ssa.OpAMD64VPXORQMasked256,
|
||||||
ssa.OpAMD64VPXORQMasked512,
|
ssa.OpAMD64VPXORQMasked512,
|
||||||
ssa.OpAMD64VPBLENDMBMasked512,
|
|
||||||
ssa.OpAMD64VPBLENDMWMasked512,
|
|
||||||
ssa.OpAMD64VPBLENDMDMasked512,
|
|
||||||
ssa.OpAMD64VPBLENDMQMasked512,
|
|
||||||
ssa.OpAMD64VPSLLWMasked128const,
|
ssa.OpAMD64VPSLLWMasked128const,
|
||||||
ssa.OpAMD64VPSLLWMasked256const,
|
ssa.OpAMD64VPSLLWMasked256const,
|
||||||
ssa.OpAMD64VPSLLWMasked512const,
|
ssa.OpAMD64VPSLLWMasked512const,
|
||||||
|
|
|
||||||
|
|
@ -253,6 +253,7 @@
|
||||||
# That means the signature is wrong.
|
# That means the signature is wrong.
|
||||||
- go: blend
|
- go: blend
|
||||||
asm: VPBLENDVB
|
asm: VPBLENDVB
|
||||||
|
zeroing: false
|
||||||
in:
|
in:
|
||||||
- &v
|
- &v
|
||||||
go: $t
|
go: $t
|
||||||
|
|
@ -269,6 +270,7 @@
|
||||||
# For AVX512
|
# For AVX512
|
||||||
- go: blend
|
- go: blend
|
||||||
asm: VPBLENDM[BWDQ]
|
asm: VPBLENDM[BWDQ]
|
||||||
|
zeroing: false
|
||||||
in:
|
in:
|
||||||
- &v
|
- &v
|
||||||
go: $t
|
go: $t
|
||||||
|
|
|
||||||
|
|
@ -397,6 +397,28 @@ func TestMergeFloat(t *testing.T) {
|
||||||
checkSlices[float64](t, s, []float64{4, 2, 3, 4})
|
checkSlices[float64](t, s, []float64{4, 2, 3, 4})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestMergeFloat512(t *testing.T) {
|
||||||
|
if !simd.HasAVX512() {
|
||||||
|
t.Skip("Test requires HasAVX512, not available on this hardware")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
a := simd.LoadFloat64x8Slice([]float64{1, 2, 3, 4, 5, 6, 7, 8})
|
||||||
|
b := simd.LoadFloat64x8Slice([]float64{8, 7, 6, 5, 4, 2, 3, 1})
|
||||||
|
g := a.Greater(b)
|
||||||
|
k := make([]int64, 8, 8)
|
||||||
|
g.AsInt64x8().StoreSlice(k)
|
||||||
|
checkSlices[int64](t, k, []int64{0, 0, 0, 0, -1, -1, -1, -1})
|
||||||
|
c := a.Merge(b, g)
|
||||||
|
d := a.Masked(g)
|
||||||
|
|
||||||
|
s := make([]float64, 8, 8)
|
||||||
|
c.StoreSlice(s)
|
||||||
|
checkSlices[float64](t, s, []float64{8, 7, 6, 5, 5, 6, 7, 8})
|
||||||
|
|
||||||
|
d.StoreSlice(s)
|
||||||
|
checkSlices[float64](t, s, []float64{0, 0, 0, 0, 5, 6, 7, 8})
|
||||||
|
}
|
||||||
|
|
||||||
var ro uint8 = 2
|
var ro uint8 = 2
|
||||||
|
|
||||||
func TestRotateAllVariable(t *testing.T) {
|
func TestRotateAllVariable(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue