summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/longMAC.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/longMAC.ll')
-rw-r--r--test/CodeGen/ARM/longMAC.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/longMAC.ll b/test/CodeGen/ARM/longMAC.ll
index 3f30fd40b7e78..cc2d745aae8e0 100644
--- a/test/CodeGen/ARM/longMAC.ll
+++ b/test/CodeGen/ARM/longMAC.ll
@@ -116,3 +116,32 @@ define i64 @MACLongTest8(i64 %acc, i32 %lhs, i32 %rhs) {
ret i64 %add
}
+define i64 @MACLongTest9(i32 %lhs, i32 %rhs, i32 %lo, i32 %hi) {
+;CHECK-LABEL: MACLongTest9:
+;CHECK-V7-LE:umaal
+;CHECK-V7-BE:umaal
+;CHECK-NOT:umaal
+ %conv = zext i32 %lhs to i64
+ %conv1 = zext i32 %rhs to i64
+ %mul = mul nuw i64 %conv1, %conv
+ %conv2 = zext i32 %lo to i64
+ %add = add i64 %mul, %conv2
+ %conv3 = zext i32 %hi to i64
+ %add2 = add i64 %add, %conv3
+ ret i64 %add2
+}
+
+define i64 @MACLongTest10(i32 %lhs, i32 %rhs, i32 %lo, i32 %hi) {
+;CHECK-LABEL: MACLongTest10:
+;CHECK-V7-LE:umaal
+;CHECK-V7-BE:umaal
+;CHECK-NOT:umaal
+ %conv = zext i32 %lhs to i64
+ %conv1 = zext i32 %rhs to i64
+ %mul = mul nuw i64 %conv1, %conv
+ %conv2 = zext i32 %lo to i64
+ %conv3 = zext i32 %hi to i64
+ %add = add i64 %conv2, %conv3
+ %add2 = add i64 %add, %mul
+ ret i64 %add2
+}