1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=aarch64-none-linux-gnu < %s -o -| FileCheck %s
4 define i64 @umull(i64 %x0, i64 %x1) {
6 ; CHECK: // %bb.0: // %entry
7 ; CHECK-NEXT: umull x0, w1, w0
10 %and = and i64 %x0, 4294967295
11 %and1 = and i64 %x1, 4294967295
12 %mul = mul nuw i64 %and1, %and
16 define i64 @umull2(i64 %x, i32 %y) {
17 ; CHECK-LABEL: umull2:
18 ; CHECK: // %bb.0: // %entry
19 ; CHECK-NEXT: umull x0, w0, w1
22 %and = and i64 %x, 4294967295
23 %conv = zext i32 %y to i64
24 %mul = mul nuw nsw i64 %and, %conv
28 define i64 @umull2_commuted(i64 %x, i32 %y) {
29 ; CHECK-LABEL: umull2_commuted:
30 ; CHECK: // %bb.0: // %entry
31 ; CHECK-NEXT: umull x0, w0, w1
34 %and = and i64 %x, 4294967295
35 %conv = zext i32 %y to i64
36 %mul = mul nuw nsw i64 %conv, %and
40 define i64 @smull(i64 %x0, i64 %x1) {
42 ; CHECK: // %bb.0: // %entry
43 ; CHECK-NEXT: smull x0, w1, w0
46 %sext = shl i64 %x0, 32
47 %conv1 = ashr exact i64 %sext, 32
48 %sext4 = shl i64 %x1, 32
49 %conv3 = ashr exact i64 %sext4, 32
50 %mul = mul nsw i64 %conv3, %conv1
54 define i64 @smull2(i64 %x, i32 %y) {
55 ; CHECK-LABEL: smull2:
56 ; CHECK: // %bb.0: // %entry
57 ; CHECK-NEXT: smull x0, w0, w1
61 %shr = ashr exact i64 %shl, 32
62 %conv = sext i32 %y to i64
63 %mul = mul nsw i64 %shr, %conv
67 define i64 @smull2_commuted(i64 %x, i32 %y) {
68 ; CHECK-LABEL: smull2_commuted:
69 ; CHECK: // %bb.0: // %entry
70 ; CHECK-NEXT: smull x0, w0, w1
74 %shr = ashr exact i64 %shl, 32
75 %conv = sext i32 %y to i64
76 %mul = mul nsw i64 %conv, %shr