mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
test/codegen: fix failing condmove wasm tests
These recently added tests failed when using the -all_codgen flag. Fixes #74770 Change-Id: Idea1ea02af2bd9f45c7d0a28d633c7442328e6df Reviewed-on: https://go-review.googlesource.com/c/go/+/690715 Reviewed-by: Jorropo <jorropo.pgm@gmail.com> Run-TryBot: Michael Munday <mikemndy@gmail.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Mark Freeman <mark@golang.org> Auto-Submit: Jorropo <jorropo.pgm@gmail.com> TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
98f301cf68
commit
46b5839231
1 changed files with 7 additions and 6 deletions
|
|
@ -459,7 +459,7 @@ func cmovmathadd(a uint, b bool) uint {
|
|||
// amd64:"ADDQ", -"CMOV"
|
||||
// arm64:"CSINC", -"CSEL"
|
||||
// ppc64x:"ADD", -"ISEL"
|
||||
// wasm:"Add", "-Select"
|
||||
// wasm:"I64Add", -"Select"
|
||||
return a
|
||||
}
|
||||
|
||||
|
|
@ -470,7 +470,7 @@ func cmovmathsub(a uint, b bool) uint {
|
|||
// amd64:"SUBQ", -"CMOV"
|
||||
// arm64:"SUB", -"CSEL"
|
||||
// ppc64x:"SUB", -"ISEL"
|
||||
// wasm:"Sub", "-Select"
|
||||
// wasm:"I64Sub", -"Select"
|
||||
return a
|
||||
}
|
||||
|
||||
|
|
@ -481,18 +481,19 @@ func cmovmathdouble(a uint, b bool) uint {
|
|||
// amd64:"SHL", -"CMOV"
|
||||
// amd64/v3:"SHL", -"CMOV", -"MOV"
|
||||
// arm64:"LSL", -"CSEL"
|
||||
// wasm:"Shl", "-Select"
|
||||
// wasm:"I64Shl", -"Select"
|
||||
return a
|
||||
}
|
||||
|
||||
func cmovmathhalvei(a int, b bool) int {
|
||||
if b {
|
||||
// For some reason on arm64 it attributes the ASR to inside this block rather than where the Phi node is.
|
||||
// For some reason the compiler attributes the shift to inside this block rather than where the Phi node is.
|
||||
// arm64:"ASR", -"CSEL"
|
||||
// wasm:"I64ShrS", -"Select"
|
||||
a /= 2
|
||||
}
|
||||
// arm64:-"CSEL"
|
||||
// wasm:"Shr", "-Select"
|
||||
// wasm:-"Select"
|
||||
return a
|
||||
}
|
||||
|
||||
|
|
@ -503,6 +504,6 @@ func cmovmathhalveu(a uint, b bool) uint {
|
|||
// amd64:"SHR", -"CMOV"
|
||||
// amd64/v3:"SHR", -"CMOV", -"MOV"
|
||||
// arm64:"LSR", -"CSEL"
|
||||
// wasm:"Shr", "-Select"
|
||||
// wasm:"I64ShrU", -"Select"
|
||||
return a
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue