1 # RUN: llc -mtriple=aarch64-none-linux-gnu -run-pass none -o - %s | FileCheck %s
2 # This test ensures that the MIR parser parses shufflemask correctly
4 # CHECK-LABEL: name: test_shuffle_1_0
5 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(1, 0)
8 tracksRegLiveness: true
13 %0:_(<2 x s32>) = COPY $d0
14 %2:_(<2 x s32>) = G_IMPLICIT_DEF
15 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1, 0)
16 $d0 = COPY %1(<2 x s32>)
17 RET_ReallyLR implicit $d0
21 # CHECK-LABEL: name: test_shuffle_nospace
22 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(1, 0)
24 name: test_shuffle_nospace
25 tracksRegLiveness: true
30 %0:_(<2 x s32>) = COPY $d0
31 %2:_(<2 x s32>) = G_IMPLICIT_DEF
32 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1,0)
33 $d0 = COPY %1(<2 x s32>)
34 RET_ReallyLR implicit $d0
38 # CHECK-LABEL: name: test_shuffle_0_0
39 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(0, 0)
41 name: test_shuffle_0_0
42 tracksRegLiveness: true
47 %0:_(<2 x s32>) = COPY $d0
48 %2:_(<2 x s32>) = G_IMPLICIT_DEF
49 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(0, 0)
50 $d0 = COPY %1(<2 x s32>)
51 RET_ReallyLR implicit $d0
55 # CHECK-LABEL: name: test_shuffle_1_1
56 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(1, 1)
58 name: test_shuffle_1_1
59 tracksRegLiveness: true
64 %0:_(<2 x s32>) = COPY $d0
65 %2:_(<2 x s32>) = G_IMPLICIT_DEF
66 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1, 1)
67 $d0 = COPY %1(<2 x s32>)
68 RET_ReallyLR implicit $d0
72 # CHECK-LABEL: name: test_shuffle_undef_undef
73 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(undef, undef)
76 name: test_shuffle_undef_undef
77 tracksRegLiveness: true
82 %0:_(<2 x s32>) = COPY $d0
83 %2:_(<2 x s32>) = G_IMPLICIT_DEF
84 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(undef, undef)
85 $d0 = COPY %1(<2 x s32>)
86 RET_ReallyLR implicit $d0
90 # CHECK-LABEL: name: test_shuffle_undef_0
91 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(undef, 0)
94 name: test_shuffle_undef_0
95 tracksRegLiveness: true
100 %0:_(<2 x s32>) = COPY $d0
101 %2:_(<2 x s32>) = G_IMPLICIT_DEF
102 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(undef, 0)
103 $d0 = COPY %1(<2 x s32>)
104 RET_ReallyLR implicit $d0
108 # CHECK-LABEL: name: test_shuffle_0_undef
109 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(0, undef)
112 name: test_shuffle_0_undef
113 tracksRegLiveness: true
118 %0:_(<2 x s32>) = COPY $d0
119 %2:_(<2 x s32>) = G_IMPLICIT_DEF
120 %1:_(<2 x s32>) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(0, undef)
121 $d0 = COPY %1(<2 x s32>)
122 RET_ReallyLR implicit $d0
126 # CHECK-LABEL: name: test_shuffle_0
127 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(0)
130 tracksRegLiveness: true
135 %0:_(<2 x s32>) = COPY $d0
136 %2:_(<2 x s32>) = G_IMPLICIT_DEF
137 %1:_(s32) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(0)
139 RET_ReallyLR implicit $w0
143 # CHECK-LABEL: name: test_shuffle_1
144 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(1)
147 tracksRegLiveness: true
152 %0:_(<2 x s32>) = COPY $d0
153 %2:_(<2 x s32>) = G_IMPLICIT_DEF
154 %1:_(s32) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(1)
156 RET_ReallyLR implicit $w0
160 # CHECK-LABEL: name: test_shuffle_undef
161 # CHECK: G_SHUFFLE_VECTOR %0(<2 x s32>), %1, shufflemask(undef)
163 name: test_shuffle_undef
164 tracksRegLiveness: true
169 %0:_(<2 x s32>) = COPY $d0
170 %2:_(<2 x s32>) = G_IMPLICIT_DEF
171 %1:_(s32) = G_SHUFFLE_VECTOR %0(<2 x s32>), %2, shufflemask(undef)
173 RET_ReallyLR implicit $w0