aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/arithmetic.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go
index 67adb50fa5..beabfe24eb 100644
--- a/test/codegen/arithmetic.go
+++ b/test/codegen/arithmetic.go
@@ -624,6 +624,11 @@ func AddMul(x int) int {
return 2*x + 1
}
+func AddShift(a, b int) int {
+ // loong64: "ALSLV"
+ return a + (b << 4)
+}
+
func MULA(a, b, c uint32) (uint32, uint32, uint32) {
// arm:`MULA`,-`MUL\s`
// arm64:`MADDW`,-`MULW`