diff options
Diffstat (limited to 'test/codegen/bits.go')
-rw-r--r-- | test/codegen/bits.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/codegen/bits.go b/test/codegen/bits.go index 8117a62307..8e973d5726 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) +} |