aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/bits.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen/bits.go')
-rw-r--r--test/codegen/bits.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/codegen/bits.go b/test/codegen/bits.go
index 8117a623072..8e973d5726e 100644
--- a/test/codegen/bits.go
+++ b/test/codegen/bits.go
@@ -6,6 +6,8 @@
package codegen
+import "math/bits"
+
/************************************
* 64-bit instructions
************************************/
@@ -355,3 +357,9 @@ func issue44228b(a []int32, i int) bool {
// amd64: "BTL", -"SHL"
return a[i>>5]&(1<<(i&31)) != 0
}
+
+func issue48467(x, y uint64) uint64 {
+ // arm64: -"NEG"
+ d, borrow := bits.Sub64(x, y, 0)
+ return x - d&(-borrow)
+}