aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/bitfield.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/codegen/bitfield.go b/test/codegen/bitfield.go
index 8327da6cf8..11f31ecf25 100644
--- a/test/codegen/bitfield.go
+++ b/test/codegen/bitfield.go
@@ -321,6 +321,12 @@ func ubfx15(x uint64) bool {
return false
}
+// merge ANDconst and ubfx into ubfx
+func ubfx16(x uint64) uint64 {
+ // arm64:"UBFX\t[$]4, R[0-9]+, [$]6",-"AND\t[$]63"
+ return ((x >> 3) & 0xfff) >> 1 & 0x3f
+}
+
// Check that we don't emit comparisons for constant shifts.
//go:nosplit
func shift_no_cmp(x int) int {