1
+ ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
1
2
; RUN: llc -O3 -mcpu=mips32r2 -mtriple=mipsel-linux-gnu < %s -o - \
2
3
; RUN: | FileCheck %s --check-prefixes=MIPS32R2
3
4
; RUN: llc -O3 -mcpu=mips64r2 -mtriple=mips64el < %s \
@@ -9,7 +10,14 @@ define i32 @or_and_shl(i32 %a, i32 %b) {
9
10
; MIPS32R2-NEXT: ins $4, $5, 31, 1
10
11
; MIPS32R2-NEXT: jr $ra
11
12
; MIPS32R2-NEXT: move $2, $4
12
-
13
+ ;
14
+ ; MIPS64R2-LABEL: or_and_shl:
15
+ ; MIPS64R2: # %bb.0: # %entry
16
+ ; MIPS64R2-NEXT: sll $2, $4, 0
17
+ ; MIPS64R2-NEXT: sll $1, $5, 0
18
+ ; MIPS64R2-NEXT: ins $2, $1, 31, 1
19
+ ; MIPS64R2-NEXT: jr $ra
20
+ ; MIPS64R2-NEXT: nop
13
21
entry:
14
22
%shl = shl i32 %b , 31
15
23
%and = and i32 %a , 2147483647
@@ -23,7 +31,14 @@ define i32 @or_shl_and(i32 %a, i32 %b) {
23
31
; MIPS32R2-NEXT: ins $4, $5, 31, 1
24
32
; MIPS32R2-NEXT: jr $ra
25
33
; MIPS32R2-NEXT: move $2, $4
26
-
34
+ ;
35
+ ; MIPS64R2-LABEL: or_shl_and:
36
+ ; MIPS64R2: # %bb.0: # %entry
37
+ ; MIPS64R2-NEXT: sll $2, $4, 0
38
+ ; MIPS64R2-NEXT: sll $1, $5, 0
39
+ ; MIPS64R2-NEXT: ins $2, $1, 31, 1
40
+ ; MIPS64R2-NEXT: jr $ra
41
+ ; MIPS64R2-NEXT: nop
27
42
entry:
28
43
%shl = shl i32 %b , 31
29
44
%and = and i32 %a , 2147483647
@@ -32,12 +47,20 @@ entry:
32
47
}
33
48
34
49
define i64 @dinsm (i64 %a , i64 %b ) {
50
+ ; MIPS32R2-LABEL: dinsm:
51
+ ; MIPS32R2: # %bb.0: # %entry
52
+ ; MIPS32R2-NEXT: ins $4, $6, 17, 15
53
+ ; MIPS32R2-NEXT: srl $1, $6, 15
54
+ ; MIPS32R2-NEXT: sll $2, $7, 17
55
+ ; MIPS32R2-NEXT: or $3, $2, $1
56
+ ; MIPS32R2-NEXT: jr $ra
57
+ ; MIPS32R2-NEXT: move $2, $4
58
+ ;
35
59
; MIPS64R2-LABEL: dinsm:
36
60
; MIPS64R2: # %bb.0: # %entry
37
61
; MIPS64R2-NEXT: dinsm $4, $5, 17, 47
38
62
; MIPS64R2-NEXT: jr $ra
39
63
; MIPS64R2-NEXT: move $2, $4
40
-
41
64
entry:
42
65
%shl = shl i64 %b , 17
43
66
%and = and i64 %a , 131071
@@ -46,12 +69,18 @@ entry:
46
69
}
47
70
48
71
define i64 @dinsu (i64 %a , i64 %b ) {
72
+ ; MIPS32R2-LABEL: dinsu:
73
+ ; MIPS32R2: # %bb.0: # %entry
74
+ ; MIPS32R2-NEXT: ins $5, $6, 3, 29
75
+ ; MIPS32R2-NEXT: move $2, $4
76
+ ; MIPS32R2-NEXT: jr $ra
77
+ ; MIPS32R2-NEXT: move $3, $5
78
+ ;
49
79
; MIPS64R2-LABEL: dinsu:
50
80
; MIPS64R2: # %bb.0: # %entry
51
81
; MIPS64R2-NEXT: dinsu $4, $5, 35, 29
52
82
; MIPS64R2-NEXT: jr $ra
53
83
; MIPS64R2-NEXT: move $2, $4
54
-
55
84
entry:
56
85
%shl = shl i64 %b , 35
57
86
%and = and i64 %a , 34359738367
0 commit comments