1 ; RUN: llc -march=mips -mattr=+msa,+fp64,+mips32r2 < %s | FileCheck %s
3 define void @ashr_v4i32(<4 x i32>* %c) nounwind {
4 ; CHECK-LABEL: ashr_v4i32:
6 %1 = ashr <4 x i32> <i32 1, i32 2, i32 4, i32 8>,
7 <i32 0, i32 1, i32 2, i32 3>
9 ; CHECK-DAG: ldi.w [[R1:\$w[0-9]+]], 1
11 store volatile <4 x i32> %1, <4 x i32>* %c
12 ; CHECK-DAG: st.w [[R1]], 0($4)
14 %2 = ashr <4 x i32> <i32 -2, i32 -4, i32 -8, i32 -16>,
15 <i32 0, i32 1, i32 2, i32 3>
17 ; CHECK-DAG: ldi.w [[R1:\$w[0-9]+]], -2
19 store volatile <4 x i32> %2, <4 x i32>* %c
20 ; CHECK-DAG: st.w [[R1]], 0($4)
23 ; CHECK-LABEL: .size ashr_v4i32
26 define void @lshr_v4i32(<4 x i32>* %c) nounwind {
27 ; CHECK-LABEL: lshr_v4i32:
29 %1 = lshr <4 x i32> <i32 1, i32 2, i32 4, i32 8>,
30 <i32 0, i32 1, i32 2, i32 3>
32 ; CHECK-DAG: ldi.w [[R1:\$w[0-9]+]], 1
34 store volatile <4 x i32> %1, <4 x i32>* %c
35 ; CHECK-DAG: st.w [[R1]], 0($4)
37 %2 = lshr <4 x i32> <i32 -2, i32 -4, i32 -8, i32 -16>,
38 <i32 0, i32 1, i32 2, i32 3>
40 ; CHECK-DAG: addiu [[CPOOL:\$[0-9]+]], {{.*}}, %lo($
41 ; CHECK-DAG: ld.w [[R1:\$w[0-9]+]], 0([[CPOOL]])
43 store volatile <4 x i32> %2, <4 x i32>* %c
44 ; CHECK-DAG: st.w [[R1]], 0($4)
47 ; CHECK-LABEL: .size lshr_v4i32
50 define void @shl_v4i32(<4 x i32>* %c) nounwind {
51 ; CHECK-LABEL: shl_v4i32:
53 %1 = shl <4 x i32> <i32 8, i32 4, i32 2, i32 1>,
54 <i32 0, i32 1, i32 2, i32 3>
56 ; CHECK-DAG: ldi.w [[R1:\$w[0-9]+]], 8
58 store volatile <4 x i32> %1, <4 x i32>* %c
59 ; CHECK-DAG: st.w [[R1]], 0($4)
61 %2 = shl <4 x i32> <i32 -8, i32 -4, i32 -2, i32 -1>,
62 <i32 0, i32 1, i32 2, i32 3>
64 ; CHECK-DAG: ldi.w [[R1:\$w[0-9]+]], -8
66 store volatile <4 x i32> %2, <4 x i32>* %c
67 ; CHECK-DAG: st.w [[R1]], 0($4)
70 ; CHECK-LABEL: .size shl_v4i32