1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-linux-gnu | FileCheck %s
4 define i64 @addimm_mulimm_accept_00(i64 %a) {
5 ; CHECK-LABEL: addimm_mulimm_accept_00:
7 ; CHECK-NEXT: mov w8, #37
8 ; CHECK-NEXT: mov x9, #1147
9 ; CHECK-NEXT: madd x0, x0, x8, x9
11 %tmp0 = add i64 %a, 31
12 %tmp1 = mul i64 %tmp0, 37
16 define i64 @addimm_mulimm_accept_01(i64 %a) {
17 ; CHECK-LABEL: addimm_mulimm_accept_01:
19 ; CHECK-NEXT: mov w8, #37
20 ; CHECK-NEXT: mov x9, #-1147
21 ; CHECK-NEXT: madd x0, x0, x8, x9
23 %tmp0 = add i64 %a, -31
24 %tmp1 = mul i64 %tmp0, 37
28 define signext i32 @addimm_mulimm_accept_02(i32 signext %a) {
29 ; CHECK-LABEL: addimm_mulimm_accept_02:
31 ; CHECK-NEXT: mov w8, #37
32 ; CHECK-NEXT: mov w9, #1147
33 ; CHECK-NEXT: madd w0, w0, w8, w9
35 %tmp0 = add i32 %a, 31
36 %tmp1 = mul i32 %tmp0, 37
40 define signext i32 @addimm_mulimm_accept_03(i32 signext %a) {
41 ; CHECK-LABEL: addimm_mulimm_accept_03:
43 ; CHECK-NEXT: mov w8, #37
44 ; CHECK-NEXT: mov w9, #-1147
45 ; CHECK-NEXT: madd w0, w0, w8, w9
47 %tmp0 = add i32 %a, -31
48 %tmp1 = mul i32 %tmp0, 37
52 define i64 @addimm_mulimm_accept_10(i64 %a) {
53 ; CHECK-LABEL: addimm_mulimm_accept_10:
55 ; CHECK-NEXT: mov w8, #37
56 ; CHECK-NEXT: mov w9, #32888
57 ; CHECK-NEXT: movk w9, #17, lsl #16
58 ; CHECK-NEXT: madd x0, x0, x8, x9
60 %tmp0 = add i64 %a, 31000
61 %tmp1 = mul i64 %tmp0, 37
65 define i64 @addimm_mulimm_accept_11(i64 %a) {
66 ; CHECK-LABEL: addimm_mulimm_accept_11:
68 ; CHECK-NEXT: mov w8, #37
69 ; CHECK-NEXT: mov x9, #-32888
70 ; CHECK-NEXT: movk x9, #65518, lsl #16
71 ; CHECK-NEXT: madd x0, x0, x8, x9
73 %tmp0 = add i64 %a, -31000
74 %tmp1 = mul i64 %tmp0, 37
78 define signext i32 @addimm_mulimm_accept_12(i32 signext %a) {
79 ; CHECK-LABEL: addimm_mulimm_accept_12:
81 ; CHECK-NEXT: mov w8, #37
82 ; CHECK-NEXT: mov w9, #32888
83 ; CHECK-NEXT: movk w9, #17, lsl #16
84 ; CHECK-NEXT: madd w0, w0, w8, w9
86 %tmp0 = add i32 %a, 31000
87 %tmp1 = mul i32 %tmp0, 37
91 define signext i32 @addimm_mulimm_accept_13(i32 signext %a) {
92 ; CHECK-LABEL: addimm_mulimm_accept_13:
94 ; CHECK-NEXT: mov w8, #37
95 ; CHECK-NEXT: mov w9, #32648
96 ; CHECK-NEXT: movk w9, #65518, lsl #16
97 ; CHECK-NEXT: madd w0, w0, w8, w9
99 %tmp0 = add i32 %a, -31000
100 %tmp1 = mul i32 %tmp0, 37
104 define i64 @addimm_mulimm_reject_00(i64 %a) {
105 ; CHECK-LABEL: addimm_mulimm_reject_00:
107 ; CHECK-NEXT: mov w8, #3700
108 ; CHECK-NEXT: add x9, x0, #3100
109 ; CHECK-NEXT: mul x0, x9, x8
111 %tmp0 = add i64 %a, 3100
112 %tmp1 = mul i64 %tmp0, 3700
116 define i64 @addimm_mulimm_reject_01(i64 %a) {
117 ; CHECK-LABEL: addimm_mulimm_reject_01:
119 ; CHECK-NEXT: mov w8, #3700
120 ; CHECK-NEXT: sub x9, x0, #3100
121 ; CHECK-NEXT: mul x0, x9, x8
123 %tmp0 = add i64 %a, -3100
124 %tmp1 = mul i64 %tmp0, 3700
128 define signext i32 @addimm_mulimm_reject_02(i32 signext %a) {
129 ; CHECK-LABEL: addimm_mulimm_reject_02:
131 ; CHECK-NEXT: mov w8, #3700
132 ; CHECK-NEXT: add w9, w0, #3100
133 ; CHECK-NEXT: mul w0, w9, w8
135 %tmp0 = add i32 %a, 3100
136 %tmp1 = mul i32 %tmp0, 3700
140 define signext i32 @addimm_mulimm_reject_03(i32 signext %a) {
141 ; CHECK-LABEL: addimm_mulimm_reject_03:
143 ; CHECK-NEXT: mov w8, #3700
144 ; CHECK-NEXT: sub w9, w0, #3100
145 ; CHECK-NEXT: mul w0, w9, w8
147 %tmp0 = add i32 %a, -3100
148 %tmp1 = mul i32 %tmp0, 3700