mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.simd] cmd/compile: make condtion of CanSSA smarter for SIMD fields
This CL tires to improve a situation pointed out by https://github.com/golang/go/issues/73787#issuecomment-3305494947. Change-Id: Ic23c80fe71344fc25383ab238ad6631e0f0cd22e Reviewed-on: https://go-review.googlesource.com/c/go/+/705416 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
c28b2a0ca1
commit
578777bf7c
3 changed files with 88 additions and 3 deletions
|
|
@ -27,3 +27,33 @@ func vptest2() bool {
|
|||
// amd64:`SETEQ\s(.*)$`
|
||||
return v1.And(v2).IsZero()
|
||||
}
|
||||
|
||||
type Args2 struct {
|
||||
V0 simd.Uint8x32
|
||||
V1 simd.Uint8x32
|
||||
x string
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func simdStructNoSpill(a Args2) simd.Uint8x32 {
|
||||
// amd64:-`VMOVDQU\s.*$`
|
||||
return a.V0.Xor(a.V1)
|
||||
}
|
||||
|
||||
func simdStructWrapperNoSpill(a Args2) simd.Uint8x32 {
|
||||
// amd64:-`VMOVDQU\s.*$`
|
||||
a.x = "test"
|
||||
return simdStructNoSpill(a)
|
||||
}
|
||||
|
||||
//go:noinline
|
||||
func simdArrayNoSpill(a [1]Args2) simd.Uint8x32 {
|
||||
// amd64:-`VMOVDQU\s.*$`
|
||||
return a[0].V0.Xor(a[0].V1)
|
||||
}
|
||||
|
||||
func simdArrayWrapperNoSpill(a [1]Args2) simd.Uint8x32 {
|
||||
// amd64:-`VMOVDQU\s.*$`
|
||||
a[0].x = "test"
|
||||
return simdArrayNoSpill(a)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue