Skip to content

Commit 708b154

Browse files
committed
[AArch64][GlobalISel] Add gisel run lines for more MULL tests. NFC
1 parent 04546a0 commit 708b154

8 files changed

+5773
-2577
lines changed

llvm/test/CodeGen/AArch64/aarch64-dup-ext.ll

+414-199
Large diffs are not rendered by default.

llvm/test/CodeGen/AArch64/aarch64-matrix-umull-smull.ll

+784-357
Large diffs are not rendered by default.

llvm/test/CodeGen/AArch64/aarch64-mull-masks.ll

+1,223-530
Large diffs are not rendered by default.

llvm/test/CodeGen/AArch64/aarch64-wide-mul.ll

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc < %s -mtriple aarch64-unknown-linux-gnu | FileCheck %s --check-prefixes=CHECK-SD
3-
; RUN: llc -mtriple=aarch64 -global-isel -global-isel-abort=2 -verify-machineinstrs %s -o - 2>&1 | FileCheck %s --check-prefixes=CHECK-GI
2+
; RUN: llc -mtriple aarch64-unknown-linux-gnu < %s | FileCheck %s --check-prefixes=CHECK,CHECK-SD
3+
; RUN: llc -mtriple=aarch64 -global-isel -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-GI
44

55
; Tests for wider-than-legal extensions into mul/mla.
66

@@ -223,3 +223,5 @@ entry:
223223
%d = add <16 x i64> %m, %c
224224
ret <16 x i64> %d
225225
}
226+
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
227+
; CHECK: {{.*}}

llvm/test/CodeGen/AArch64/arm64-mul.ll

+48-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2-
; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s
2+
; RUN: llc < %s -mtriple=arm64-eabi | FileCheck %s --check-prefixes=CHECK,CHECK-SD
3+
; RUN: llc < %s -mtriple=arm64-eabi -global-isel | FileCheck %s --check-prefixes=CHECK,CHECK-GI
34

45
; rdar://9296808
56
; rdar://9349137
@@ -19,12 +20,24 @@ entry:
1920
}
2021

2122
define i128 @t2(i64 %a, i64 %b) nounwind readnone ssp {
22-
; CHECK-LABEL: t2:
23-
; CHECK: // %bb.0: // %entry
24-
; CHECK-NEXT: mul x8, x0, x1
25-
; CHECK-NEXT: smulh x1, x0, x1
26-
; CHECK-NEXT: mov x0, x8
27-
; CHECK-NEXT: ret
23+
; CHECK-SD-LABEL: t2:
24+
; CHECK-SD: // %bb.0: // %entry
25+
; CHECK-SD-NEXT: mul x8, x0, x1
26+
; CHECK-SD-NEXT: smulh x1, x0, x1
27+
; CHECK-SD-NEXT: mov x0, x8
28+
; CHECK-SD-NEXT: ret
29+
;
30+
; CHECK-GI-LABEL: t2:
31+
; CHECK-GI: // %bb.0: // %entry
32+
; CHECK-GI-NEXT: asr x9, x1, #63
33+
; CHECK-GI-NEXT: asr x10, x0, #63
34+
; CHECK-GI-NEXT: mul x8, x0, x1
35+
; CHECK-GI-NEXT: mul x9, x0, x9
36+
; CHECK-GI-NEXT: umulh x11, x0, x1
37+
; CHECK-GI-NEXT: mov x0, x8
38+
; CHECK-GI-NEXT: madd x9, x10, x1, x9
39+
; CHECK-GI-NEXT: add x1, x9, x11
40+
; CHECK-GI-NEXT: ret
2841
entry:
2942
%tmp1 = sext i64 %a to i128
3043
%tmp2 = sext i64 %b to i128
@@ -139,12 +152,20 @@ entry:
139152

140153
; Check the sext_inreg case.
141154
define i64 @t11(i64 %a) nounwind {
142-
; CHECK-LABEL: t11:
143-
; CHECK: // %bb.0: // %entry
144-
; CHECK-NEXT: mov w8, #29594 // =0x739a
145-
; CHECK-NEXT: movk w8, #65499, lsl #16
146-
; CHECK-NEXT: smnegl x0, w0, w8
147-
; CHECK-NEXT: ret
155+
; CHECK-SD-LABEL: t11:
156+
; CHECK-SD: // %bb.0: // %entry
157+
; CHECK-SD-NEXT: mov w8, #29594 // =0x739a
158+
; CHECK-SD-NEXT: movk w8, #65499, lsl #16
159+
; CHECK-SD-NEXT: smnegl x0, w0, w8
160+
; CHECK-SD-NEXT: ret
161+
;
162+
; CHECK-GI-LABEL: t11:
163+
; CHECK-GI: // %bb.0: // %entry
164+
; CHECK-GI-NEXT: sxtw x8, w0
165+
; CHECK-GI-NEXT: mov x9, #-35942 // =0xffffffffffff739a
166+
; CHECK-GI-NEXT: movk x9, #65499, lsl #16
167+
; CHECK-GI-NEXT: mneg x0, x8, x9
168+
; CHECK-GI-NEXT: ret
148169
entry:
149170
%tmp1 = trunc i64 %a to i32
150171
%tmp2 = sext i32 %tmp1 to i64
@@ -154,12 +175,20 @@ entry:
154175
}
155176

156177
define i64 @t12(i64 %a, i64 %b) nounwind {
157-
; CHECK-LABEL: t12:
158-
; CHECK: // %bb.0: // %entry
159-
; CHECK-NEXT: mov w8, #35118 // =0x892e
160-
; CHECK-NEXT: movk w8, #65008, lsl #16
161-
; CHECK-NEXT: smaddl x0, w0, w8, x1
162-
; CHECK-NEXT: ret
178+
; CHECK-SD-LABEL: t12:
179+
; CHECK-SD: // %bb.0: // %entry
180+
; CHECK-SD-NEXT: mov w8, #35118 // =0x892e
181+
; CHECK-SD-NEXT: movk w8, #65008, lsl #16
182+
; CHECK-SD-NEXT: smaddl x0, w0, w8, x1
183+
; CHECK-SD-NEXT: ret
184+
;
185+
; CHECK-GI-LABEL: t12:
186+
; CHECK-GI: // %bb.0: // %entry
187+
; CHECK-GI-NEXT: sxtw x8, w0
188+
; CHECK-GI-NEXT: mov x9, #-30418 // =0xffffffffffff892e
189+
; CHECK-GI-NEXT: movk x9, #65008, lsl #16
190+
; CHECK-GI-NEXT: madd x0, x8, x9, x1
191+
; CHECK-GI-NEXT: ret
163192
entry:
164193
%tmp1 = trunc i64 %a to i32
165194
%tmp2 = sext i32 %tmp1 to i64

0 commit comments

Comments
 (0)