1 ; RUN: llc -mtriple=thumb-eabi -mcpu=arm1156t2-s -mattr=+thumb2 %s -o - | FileCheck %s
2 ; Check generated signed and unsigned multiply accumulate long.
4 define i64 @MACLongTest1(i32 %a, i32 %b, i64 %c) {
5 ;CHECK-LABEL: MACLongTest1:
7 %conv = zext i32 %a to i64
8 %conv1 = zext i32 %b to i64
9 %mul = mul i64 %conv1, %conv
10 %add = add i64 %mul, %c
14 define i64 @MACLongTest2(i32 %a, i32 %b, i64 %c) {
15 ;CHECK-LABEL: MACLongTest2:
17 %conv = sext i32 %a to i64
18 %conv1 = sext i32 %b to i64
19 %mul = mul nsw i64 %conv1, %conv
20 %add = add nsw i64 %mul, %c
24 define i64 @MACLongTest3(i32 %a, i32 %b, i32 %c) {
25 ;CHECK-LABEL: MACLongTest3:
27 %conv = zext i32 %b to i64
28 %conv1 = zext i32 %a to i64
29 %mul = mul i64 %conv, %conv1
30 %conv2 = zext i32 %c to i64
31 %add = add i64 %mul, %conv2
35 define i64 @MACLongTest4(i32 %a, i32 %b, i32 %c) {
36 ;CHECK-LABEL: MACLongTest4:
38 %conv = sext i32 %b to i64
39 %conv1 = sext i32 %a to i64
40 %mul = mul nsw i64 %conv, %conv1
41 %conv2 = sext i32 %c to i64
42 %add = add nsw i64 %mul, %conv2