@@ -335,3 +335,27 @@ define void @store_v8f16(<8 x half> %v, ptr %p) {
335
335
store <8 x half > %v , ptr %p
336
336
ret void
337
337
}
338
+
339
+ ; ==============================================================================
340
+ ; Shuffle
341
+ ; ==============================================================================
342
+ define <8 x half > @shuffle_v8f16 (<8 x half > %x , <8 x half > %y ) {
343
+ ; CHECK-LABEL: shuffle_v8f16:
344
+ ; CHECK: .functype shuffle_v8f16 (v128, v128) -> (v128)
345
+ ; CHECK-NEXT: i8x16.shuffle $push0=, $0, $1, 0, 1, 18, 19, 4, 5, 22, 23, 8, 9, 26, 27, 12, 13, 30, 31
346
+ ; CHECK-NEXT: return $pop0
347
+ %res = shufflevector <8 x half > %x , <8 x half > %y ,
348
+ <8 x i32 > <i32 0 , i32 9 , i32 2 , i32 11 , i32 4 , i32 13 , i32 6 , i32 15 >
349
+ ret <8 x half > %res
350
+ }
351
+
352
+ define <8 x half > @shuffle_poison_v8f16 (<8 x half > %x , <8 x half > %y ) {
353
+ ; CHECK-LABEL: shuffle_poison_v8f16:
354
+ ; CHECK: .functype shuffle_poison_v8f16 (v128, v128) -> (v128)
355
+ ; CHECK-NEXT: i8x16.shuffle $push0=, $0, $0, 2, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1
356
+ ; CHECK-NEXT: return $pop0
357
+ %res = shufflevector <8 x half > %x , <8 x half > %y ,
358
+ <8 x i32 > <i32 1 , i32 poison, i32 poison, i32 poison,
359
+ i32 poison, i32 poison, i32 poison, i32 poison>
360
+ ret <8 x half > %res
361
+ }
0 commit comments