From 47c0cd9929b82a0d95a8d0dffda47604081565ea Mon Sep 17 00:00:00 2001 From: Jorropo Date: Sat, 28 Mar 2026 02:31:48 +0100 Subject: [PATCH] test/codegen: remove noop Ands from test cases Theses test cases search for an AND that gets optimized away after CL 760307. Should help to fix riscv64 (coudn't check as builders don't appear on https://build.golang.org/ ) and loong64 CI on master. Change-Id: I57e4e5ab7d3003f239355137472585e46493d8dc Reviewed-on: https://go-review.googlesource.com/c/go/+/760640 LUCI-TryBot-Result: Go LUCI Reviewed-by: Keith Randall Reviewed-by: Dmitri Shuralyov Reviewed-by: Keith Randall Auto-Submit: Jorropo --- test/codegen/bits.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/codegen/bits.go b/test/codegen/bits.go index ca9d857164..7bedaff712 100644 --- a/test/codegen/bits.go +++ b/test/codegen/bits.go @@ -40,8 +40,8 @@ func bitsCheckConstLeftShiftU64(a uint64) (n int) { func bitsCheckConstRightShiftU64(a [8]uint64) (n int) { // amd64:"BTQ [$]63," // arm64:"TBNZ [$]63," -"LSR" - // loong64:"SRLV [$]63," "AND [$]1," "BNE" - // riscv64:"SRLI [$]63," "ANDI [$]1," "BNEZ" + // loong64:"SRLV [$]63," "BNE" + // riscv64:"SRLI [$]63," "BNEZ" if (a[0]>>63)&1 != 0 { return 1 } @@ -265,8 +265,8 @@ func bitsCheckConstShiftLeftU32(a uint32) (n int) { func bitsCheckConstRightShiftU32(a [8]uint32) (n int) { // amd64:"BTL [$]31," // arm64:"UBFX [$]31," "CBNZW" - // loong64:"SRL [$]31," "AND [$]1," "BNE" - // riscv64:"SRLIW [$]31," "ANDI [$]1," "BNEZ" + // loong64:"SRL [$]31," "BNE" + // riscv64:"SRLIW [$]31," "BNEZ" if (a[0]>>31)&1 != 0 { return 1 }