1 ; RUN: llc < %s -march=xcore | FileCheck %s
2 define i64 @add64(i64 %a, i64 %b) {
3 %result = add i64 %a, %b
8 ; CHECK-NEXT: ladd r2, r0, r0, r2, r11
9 ; CHECK-NEXT: ladd r2, r1, r1, r3, r2
12 define i64 @sub64(i64 %a, i64 %b) {
13 %result = sub i64 %a, %b
18 ; CHECK-NEXT: lsub r2, r0, r0, r2, r11
19 ; CHECK-NEXT: lsub r2, r1, r1, r3, r2
22 define i64 @maccu(i64 %a, i32 %b, i32 %c) {
24 %0 = zext i32 %b to i64
25 %1 = zext i32 %c to i64
31 ; CHECK: maccu r1, r0, r3, r2
34 define i64 @maccs(i64 %a, i32 %b, i32 %c) {
36 %0 = sext i32 %b to i64
37 %1 = sext i32 %c to i64
43 ; CHECK: maccs r1, r0, r3, r2
46 define i64 @lmul(i32 %a, i32 %b, i32 %c, i32 %d) {
48 %0 = zext i32 %a to i64
49 %1 = zext i32 %b to i64
50 %2 = zext i32 %c to i64
51 %3 = zext i32 %d to i64
58 ; CHECK: lmul r1, r0, r1, r0, r2, r3