Skip to content

Commit 4ed92eb

Browse files
committed
Update test case with update_llc_test_checks.py
1 parent 36a78bb commit 4ed92eb

File tree

1 file changed

+62
-43
lines changed

1 file changed

+62
-43
lines changed

llvm/test/CodeGen/Mips/msa/i6500.ll

Lines changed: 62 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,88 @@
1+
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
12
; Test the MSA intrinsics that are encoded with the SPECIAL instruction format.
23

34
; RUN: llc -mtriple=mips-elf -mcpu=i6500 < %s | \
45
; RUN: FileCheck %s --check-prefix=MIPS32
5-
; RUN: llc -mtriple=mips64-elf -mcpu=i6500 < %s | \
6-
; RUN: FileCheck %s --check-prefix=MIPS64
7-
; RUN: llc -mtriple=mips-elf -mcpu=i6500 < %s | \
8-
; RUN: FileCheck %s --check-prefix=MIPS32
6+
; RUN: llc -mtriple=mips-elf -mcpu=i6500 -mattr=-msa < %s | \
7+
; RUN: FileCheck %s --check-prefix=MIPS32-NO-LSA
8+
99
; RUN: llc -mtriple=mips64-elf -mcpu=i6500 < %s | \
1010
; RUN: FileCheck %s --check-prefix=MIPS64
1111
; RUN: llc -mtriple=mips64-elf -mcpu=i6500 -mattr=-msa < %s | \
12-
; RUN: FileCheck %s --check-prefix=NO-DSLA
13-
; RUN: llc -mtriple=mips-elf -mcpu=i6400 < %s | \
14-
; RUN: FileCheck %s --check-prefix=MIPS32
15-
; RUN: llc -mtriple=mips64-elf -mcpu=i6400 < %s | \
16-
; RUN: FileCheck %s --check-prefix=MIPS64
12+
; RUN: FileCheck %s --check-prefix=MIPS64-NO-DLSA
13+
1714
; RUN: llc -mtriple=mips-elf -mcpu=i6400 < %s | \
1815
; RUN: FileCheck %s --check-prefix=MIPS32
16+
; RUN: llc -mtriple=mips-elf -mcpu=i6400 -mattr=-msa < %s | \
17+
; RUN: FileCheck %s --check-prefix=MIPS32-NO-LSA
18+
1919
; RUN: llc -mtriple=mips64-elf -mcpu=i6400 < %s | \
2020
; RUN: FileCheck %s --check-prefix=MIPS64
2121
; RUN: llc -mtriple=mips64-elf -mcpu=i6400 -mattr=-msa < %s | \
22-
; RUN: FileCheck %s --check-prefix=NO-DSLA
22+
; RUN: FileCheck %s --check-prefix=MIPS64-NO-DLSA
2323

2424
define i32 @llvm_mips_lsa_test(i32 %a, i32 %b) nounwind {
25+
; MIPS32-LABEL: llvm_mips_lsa_test:
26+
; MIPS32: # %bb.0: # %entry
27+
; MIPS32-NEXT: jr $ra
28+
; MIPS32-NEXT: lsa $2, $5, $4, 2
29+
;
30+
; MIPS32-NO-LSA-LABEL: llvm_mips_lsa_test:
31+
; MIPS32-NO-LSA: # %bb.0: # %entry
32+
; MIPS32-NO-LSA-NEXT: sll $1, $5, 2
33+
; MIPS32-NO-LSA-NEXT: jr $ra
34+
; MIPS32-NO-LSA-NEXT: addu $2, $4, $1
35+
;
36+
; MIPS64-LABEL: llvm_mips_lsa_test:
37+
; MIPS64: # %bb.0: # %entry
38+
; MIPS64-NEXT: sll $1, $4, 0
39+
; MIPS64-NEXT: sll $2, $5, 0
40+
; MIPS64-NEXT: jr $ra
41+
; MIPS64-NEXT: lsa $2, $2, $1, 2
42+
;
43+
; MIPS64-NO-DLSA-LABEL: llvm_mips_lsa_test:
44+
; MIPS64-NO-DLSA: # %bb.0: # %entry
45+
; MIPS64-NO-DLSA-NEXT: sll $1, $4, 0
46+
; MIPS64-NO-DLSA-NEXT: sll $2, $5, 0
47+
; MIPS64-NO-DLSA-NEXT: sll $2, $2, 2
48+
; MIPS64-NO-DLSA-NEXT: jr $ra
49+
; MIPS64-NO-DLSA-NEXT: addu $2, $1, $2
2550
entry:
2651
%0 = tail call i32 @llvm.mips.lsa(i32 %a, i32 %b, i32 2)
2752
ret i32 %0
2853
}
29-
3054
declare i32 @llvm.mips.lsa(i32, i32, i32) nounwind
3155

32-
; MIPS32: llvm_mips_lsa_test:
33-
; MIPS32: lsa {{\$[0-9]+}}, $5, $4, 2
34-
; MIPS32: .size llvm_mips_lsa_test
35-
36-
define i32 @lsa_test(i32 %a, i32 %b) nounwind {
37-
entry:
38-
%0 = shl i32 %b, 2
39-
%1 = add i32 %a, %0
40-
ret i32 %1
41-
}
42-
43-
; MIPS32: lsa_test:
44-
; MIPS32: lsa {{\$[0-9]+}}, $5, $4, 2
45-
; MIPS32: .size lsa_test
46-
4756
define i64 @llvm_mips_dlsa_test(i64 %a, i64 %b) nounwind {
57+
; MIPS32-LABEL: llvm_mips_dlsa_test:
58+
; MIPS32: # %bb.0: # %entry
59+
; MIPS32-NEXT: dmfc1 $1, $f14
60+
; MIPS32-NEXT: dmfc1 $2, $f12
61+
; MIPS32-NEXT: dlsa $1, $1, $2, 2
62+
; MIPS32-NEXT: jr $ra
63+
; MIPS32-NEXT: sd $1, 0($4)
64+
;
65+
; MIPS32-NO-LSA-LABEL: llvm_mips_dlsa_test:
66+
; MIPS32-NO-LSA: # %bb.0: # %entry
67+
; MIPS32-NO-LSA-NEXT: dmfc1 $1, $f14
68+
; MIPS32-NO-LSA-NEXT: dmfc1 $2, $f12
69+
; MIPS32-NO-LSA-NEXT: dsll $1, $1, 2
70+
; MIPS32-NO-LSA-NEXT: daddu $1, $2, $1
71+
; MIPS32-NO-LSA-NEXT: jr $ra
72+
; MIPS32-NO-LSA-NEXT: sd $1, 0($4)
73+
;
74+
; MIPS64-LABEL: llvm_mips_dlsa_test:
75+
; MIPS64: # %bb.0: # %entry
76+
; MIPS64-NEXT: jr $ra
77+
; MIPS64-NEXT: dlsa $2, $5, $4, 2
78+
;
79+
; MIPS64-NO-DLSA-LABEL: llvm_mips_dlsa_test:
80+
; MIPS64-NO-DLSA: # %bb.0: # %entry
81+
; MIPS64-NO-DLSA-NEXT: dsll $1, $5, 2
82+
; MIPS64-NO-DLSA-NEXT: jr $ra
83+
; MIPS64-NO-DLSA-NEXT: daddu $2, $4, $1
4884
entry:
4985
%0 = tail call i64 @llvm.mips.dlsa(i64 %a, i64 %b, i32 2)
5086
ret i64 %0
5187
}
52-
5388
declare i64 @llvm.mips.dlsa(i64, i64, i32) nounwind
54-
55-
; MIPS64: llvm_mips_dlsa_test:
56-
; MIPS64: dlsa {{\$[0-9]+}}, $5, $4, 2
57-
; MIPS64: .size llvm_mips_dlsa_test
58-
; NO-DSLA-NOT: dlsa {{\$[0-9]+}}, $5, $4, 2
59-
define i64 @dlsa_test(i64 %a, i64 %b) nounwind {
60-
entry:
61-
%0 = shl i64 %b, 2
62-
%1 = add i64 %a, %0
63-
ret i64 %1
64-
}
65-
66-
; MIPS64: dlsa_test:
67-
; MIPS64: dlsa {{\$[0-9]+}}, $5, $4, 2
68-
; MIPS64: .size dlsa_test
69-
; NO-DSLA-NOT: dlsa {{\$[0-9]+}}, $5, $4, 2

0 commit comments

Comments
 (0)