From 3a29ebeef985efb12d2b8670f50b146e9a2815ca Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sat, 21 Feb 2026 03:29:09 +1100 Subject: cmd/compile: additional optimisation for CZEROEQZ/CZERONEZ on riscv64 Negation on a condition can be eliminated. Change-Id: I94fab5f019cbaebb2ca589e1d8796a9cb72f3894 Reviewed-on: https://go-review.googlesource.com/c/go/+/748401 Reviewed-by: Xueqi Luo <1824368278@qq.com> Reviewed-by: Cherry Mui Reviewed-by: Keith Randall Reviewed-by: Keith Randall Reviewed-by: Julian Zhu LUCI-TryBot-Result: Go LUCI Auto-Submit: Keith Randall --- test/codegen/condmove.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/codegen') diff --git a/test/codegen/condmove.go b/test/codegen/condmove.go index bd2d1540b4..93159d1ca4 100644 --- a/test/codegen/condmove.go +++ b/test/codegen/condmove.go @@ -534,6 +534,6 @@ func constantTimeSelect(v, x, y int) int { // amd64:"CMOVQ" // arm64:"CSEL" // riscv64/rva20u64,riscv64/rva22u64:"SNEZ" "NEG" "AND" "OR" - // riscv64/rva23u64:"NEG" "CZERONEZ" "CZEROEQZ" "OR" -"SNEZ" -"AND" + // riscv64/rva23u64:"CZERONEZ" "CZEROEQZ" "OR" -"SNEZ" -"NEG" -"AND" return subtle.ConstantTimeSelect(v, x, y) } -- cgit v1.3-5-g9baa