Skip to content

Commit 0d0d5c9

Browse files
committed
test/codegen: test negation with add/sub on riscv64
Change-Id: Ic0eca86d3c93707ebd7c716e774ebda55af4f196 Reviewed-on: https://go-review.googlesource.com/c/go/+/703755 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Julian Zhu <jz531210@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Joel Sing <joel@sing.id.au>
1 parent 2e509e6 commit 0d0d5c9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/codegen/arithmetic.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,20 +172,26 @@ func SubAddSimplify2(a, b, c int) (int, int, int, int, int, int) {
172172
// mips:"SUB" -"ADD"
173173
// mips64:"SUBV" -"ADDV"
174174
// loong64:"SUBV" -"ADDV"
175+
// riscv64:-"ADD"
175176
r := (a + b) - (a + c)
176177
// amd64:-"ADDQ"
178+
// riscv64:-"ADD"
177179
r1 := (a + b) - (c + a)
178180
// amd64:-"ADDQ"
181+
// riscv64:-"ADD"
179182
r2 := (b + a) - (a + c)
180183
// amd64:-"ADDQ"
184+
// riscv64:-"ADD"
181185
r3 := (b + a) - (c + a)
182186
// amd64:-"SUBQ"
183187
// arm64:-"SUB"
184188
// mips:"ADD" -"SUB"
185189
// mips64:"ADDV" -"SUBV"
186190
// loong64:"ADDV" -"SUBV"
191+
// riscv64:-"SUB"
187192
r4 := (a - c) + (c + b)
188193
// amd64:-"SUBQ"
194+
// riscv64:-"SUB"
189195
r5 := (a - c) + (b + c)
190196
return r, r1, r2, r3, r4, r5
191197
}

0 commit comments

Comments
 (0)