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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
This commit is contained in:
Jorropo
2026-03-28 02:31:48 +01:00
committed by Gopher Robot
parent e7e45d770c
commit 47c0cd9929

View File

@@ -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
}