aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/comparisons.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/comparisons.go')
-rw-r--r--test/codegen/comparisons.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/codegen/comparisons.go b/test/codegen/comparisons.go
index d5bade97cc..072393f3a6 100644
--- a/test/codegen/comparisons.go
+++ b/test/codegen/comparisons.go
@@ -183,6 +183,10 @@ func CmpToZero(a, b, d int32, e, f int64) int32 {
// arm:`AND`,-`TST`
// 386:`ANDL`
c6 := a&d >= 0
+ // arm64:`TST\sR[0-9]+<<3,\sR[0-9]+`
+ c7 := e&(f<<3) < 0
+ // arm64:`CMN\sR[0-9]+<<3,\sR[0-9]+`
+ c8 := e+(f<<3) < 0
if c0 {
return 1
} else if c1 {
@@ -197,6 +201,10 @@ func CmpToZero(a, b, d int32, e, f int64) int32 {
return b + d
} else if c6 {
return a & d
+ } else if c7 {
+ return 7
+ } else if c8 {
+ return 8
} else {
return 0
}