aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/comparisons.go48
1 files changed, 48 insertions, 0 deletions
diff --git a/test/codegen/comparisons.go b/test/codegen/comparisons.go
index 5fbb31c00c..702ea275cc 100644
--- a/test/codegen/comparisons.go
+++ b/test/codegen/comparisons.go
@@ -730,6 +730,54 @@ func cmpToCmnLessThan(a, b, c, d int) int {
return c1 + c2 + c3 + c4
}
+func less128Signed32(x int32) bool {
+ // amd64:`CMPL.*127`
+ // amd64:`SETLE`
+ return x < 128
+}
+
+func less128Signed64(x int64) bool {
+ // amd64:`CMPQ.*127`
+ // amd64:`SETLE`
+ return x < 128
+}
+
+func less128Unsigned32(x uint32) bool {
+ // amd64:`CMPL.*127`
+ // amd64:`SETLS`
+ return x < 128
+}
+
+func less128Unsigned64(x uint64) bool {
+ // amd64:`CMPQ.*127`
+ // amd64:`SETLS`
+ return x < 128
+}
+
+func ge128Unsigned32(x uint32) bool {
+ // amd64:`CMPL.*127`
+ // amd64:`SETHI`
+ return x >= 128
+}
+
+func ge128Unsigned64(x uint64) bool {
+ // amd64:`CMPQ.*127`
+ // amd64:`SETHI`
+ return x >= 128
+}
+
+func ge128Signed32(x int32) bool {
+ // amd64:`CMPL.*127`
+ // amd64:`SETGT`
+ return x >= 128
+}
+
+func ge128Signed64(x int64) bool {
+ // amd64:`CMPQ.*127`
+ // amd64:`SETGT`
+ return x >= 128
+}
+
func cmpToCmnGreaterThanEqual(a, b, c, d int) int {
var c1, c2, c3, c4 int
// arm64:`CMN`,`CSET\tPL`,-`CMP`