From 46b5839231381e8b36eab10ba9b2c37ba579a75d Mon Sep 17 00:00:00 2001 From: Michael Munday Date: Sun, 27 Jul 2025 00:17:49 +0100 Subject: [PATCH] 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 Run-TryBot: Michael Munday LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek Reviewed-by: Mark Freeman Auto-Submit: Jorropo TryBot-Bypass: Michael Knyszek --- test/codegen/condmove.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/codegen/condmove.go b/test/codegen/condmove.go index 5659972eed..97be0ced75 100644 --- a/test/codegen/condmove.go +++ b/test/codegen/condmove.go @@ -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 } -- 2.51.0