4
4
5
5
;; TODO: Add optimization to ISD::ROTL
6
6
7
- define i32 @rotl_32 (i32 %x , i32 %y ) nounwind {
7
+ define signext i32 @rotl_32 (i32 signext %x , i32 signext %y ) nounwind {
8
8
; LA32-LABEL: rotl_32:
9
9
; LA32: # %bb.0:
10
10
; LA32-NEXT: ori $a2, $zero, 32
@@ -26,7 +26,7 @@ define i32 @rotl_32(i32 %x, i32 %y) nounwind {
26
26
ret i32 %d
27
27
}
28
28
29
- define i32 @rotr_32 (i32 %x , i32 %y ) nounwind {
29
+ define signext i32 @rotr_32 (i32 signext %x , i32 signext %y ) nounwind {
30
30
; LA32-LABEL: rotr_32:
31
31
; LA32: # %bb.0:
32
32
; LA32-NEXT: rotr.w $a0, $a0, $a1
@@ -143,7 +143,7 @@ define i64 @rotr_64(i64 %x, i64 %y) nounwind {
143
143
ret i64 %d
144
144
}
145
145
146
- define i32 @rotl_32_mask (i32 %x , i32 %y ) nounwind {
146
+ define signext i32 @rotl_32_mask (i32 signext %x , i32 signext %y ) nounwind {
147
147
; LA32-LABEL: rotl_32_mask:
148
148
; LA32: # %bb.0:
149
149
; LA32-NEXT: sub.w $a1, $zero, $a1
@@ -165,7 +165,7 @@ define i32 @rotl_32_mask(i32 %x, i32 %y) nounwind {
165
165
ret i32 %d
166
166
}
167
167
168
- define i32 @rotl_32_mask_and_63_and_31 (i32 %x , i32 %y ) nounwind {
168
+ define signext i32 @rotl_32_mask_and_63_and_31 (i32 signext %x , i32 signext %y ) nounwind {
169
169
; LA32-LABEL: rotl_32_mask_and_63_and_31:
170
170
; LA32: # %bb.0:
171
171
; LA32-NEXT: sub.w $a1, $zero, $a1
@@ -188,7 +188,7 @@ define i32 @rotl_32_mask_and_63_and_31(i32 %x, i32 %y) nounwind {
188
188
ret i32 %f
189
189
}
190
190
191
- define i32 @rotl_32_mask_or_64_or_32 (i32 %x , i32 %y ) nounwind {
191
+ define signext i32 @rotl_32_mask_or_64_or_32 (i32 signext %x , i32 signext %y ) nounwind {
192
192
; LA32-LABEL: rotl_32_mask_or_64_or_32:
193
193
; LA32: # %bb.0:
194
194
; LA32-NEXT: sub.w $a1, $zero, $a1
@@ -211,7 +211,7 @@ define i32 @rotl_32_mask_or_64_or_32(i32 %x, i32 %y) nounwind {
211
211
ret i32 %f
212
212
}
213
213
214
- define i32 @rotr_32_mask (i32 %x , i32 %y ) nounwind {
214
+ define signext i32 @rotr_32_mask (i32 signext %x , i32 signext %y ) nounwind {
215
215
; LA32-LABEL: rotr_32_mask:
216
216
; LA32: # %bb.0:
217
217
; LA32-NEXT: rotr.w $a0, $a0, $a1
@@ -229,7 +229,7 @@ define i32 @rotr_32_mask(i32 %x, i32 %y) nounwind {
229
229
ret i32 %d
230
230
}
231
231
232
- define i32 @rotr_32_mask_and_63_and_31 (i32 %x , i32 %y ) nounwind {
232
+ define signext i32 @rotr_32_mask_and_63_and_31 (i32 signext %x , i32 signext %y ) nounwind {
233
233
; LA32-LABEL: rotr_32_mask_and_63_and_31:
234
234
; LA32: # %bb.0:
235
235
; LA32-NEXT: rotr.w $a0, $a0, $a1
@@ -248,7 +248,7 @@ define i32 @rotr_32_mask_and_63_and_31(i32 %x, i32 %y) nounwind {
248
248
ret i32 %f
249
249
}
250
250
251
- define i32 @rotr_32_mask_or_64_or_32 (i32 %x , i32 %y ) nounwind {
251
+ define signext i32 @rotr_32_mask_or_64_or_32 (i32 signext %x , i32 signext %y ) nounwind {
252
252
; LA32-LABEL: rotr_32_mask_or_64_or_32:
253
253
; LA32: # %bb.0:
254
254
; LA32-NEXT: rotr.w $a0, $a0, $a1
@@ -510,7 +510,7 @@ define i64 @rotr_64_mask_or_128_or_64(i64 %x, i64 %y) nounwind {
510
510
ret i64 %f
511
511
}
512
512
513
- define i32 @rotri_i32 (i32 %a ) nounwind {
513
+ define signext i32 @rotri_i32 (i32 signext %a ) nounwind {
514
514
; LA32-LABEL: rotri_i32:
515
515
; LA32: # %bb.0:
516
516
; LA32-NEXT: rotri.w $a0, $a0, 16
0 commit comments