1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc --mtriple=loongarch64 --mattr=+lsx %s -o - | FileCheck %s
5 define <16 x i8> @shufflevector_pack_ev_v16i8(<16 x i8> %a, <16 x i8> %b) {
6 ; CHECK-LABEL: shufflevector_pack_ev_v16i8:
8 ; CHECK-NEXT: vpackev.b $vr0, $vr1, $vr0
10 %c = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 0, i32 16, i32 2, i32 18, i32 4, i32 20, i32 6, i32 22, i32 8, i32 24, i32 10, i32 26, i32 12, i32 28, i32 14, i32 30>
15 define <8 x i16> @shufflevector_pack_ev_v8i16(<8 x i16> %a, <8 x i16> %b) {
16 ; CHECK-LABEL: shufflevector_pack_ev_v8i16:
18 ; CHECK-NEXT: vpackev.h $vr0, $vr1, $vr0
20 %c = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
25 define <4 x i32> @shufflevector_pack_ev_v4i32(<4 x i32> %a, <4 x i32> %b) {
26 ; CHECK-LABEL: shufflevector_pack_ev_v4i32:
28 ; CHECK-NEXT: vpackev.w $vr0, $vr1, $vr0
30 %c = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
34 ;; vpickev.d/vpackev.d/vilvl.d
35 define <2 x i64> @shufflevector_pack_ev_v2i64(<2 x i64> %a, <2 x i64> %b) {
36 ; CHECK-LABEL: shufflevector_pack_ev_v2i64:
38 ; CHECK-NEXT: vpackev.d $vr0, $vr1, $vr0
40 %c = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 0, i32 2>
45 define <4 x float> @shufflevector_pack_ev_v4f32(<4 x float> %a, <4 x float> %b) {
46 ; CHECK-LABEL: shufflevector_pack_ev_v4f32:
48 ; CHECK-NEXT: vpackev.w $vr0, $vr1, $vr0
50 %c = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 4, i32 2, i32 6>
54 ;; vpickev.d/vpackev.d/vilvl.d
55 define <2 x double> @shufflevector_pack_ev_v2f64(<2 x double> %a, <2 x double> %b) {
56 ; CHECK-LABEL: shufflevector_pack_ev_v2f64:
58 ; CHECK-NEXT: vpackev.d $vr0, $vr1, $vr0
60 %c = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 0, i32 2>
65 define <16 x i8> @shufflevector_pack_od_v16i8(<16 x i8> %a, <16 x i8> %b) {
66 ; CHECK-LABEL: shufflevector_pack_od_v16i8:
68 ; CHECK-NEXT: vpackod.b $vr0, $vr1, $vr0
70 %c = shufflevector <16 x i8> %a, <16 x i8> %b, <16 x i32> <i32 1, i32 17, i32 3, i32 19, i32 5, i32 21, i32 7, i32 23, i32 9, i32 25, i32 11, i32 27, i32 13, i32 29, i32 15, i32 31>
75 define <8 x i16> @shufflevector_pack_od_v8i16(<8 x i16> %a, <8 x i16> %b) {
76 ; CHECK-LABEL: shufflevector_pack_od_v8i16:
78 ; CHECK-NEXT: vpackod.h $vr0, $vr1, $vr0
80 %c = shufflevector <8 x i16> %a, <8 x i16> %b, <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
85 define <4 x i32> @shufflevector_pack_od_v4i32(<4 x i32> %a, <4 x i32> %b) {
86 ; CHECK-LABEL: shufflevector_pack_od_v4i32:
88 ; CHECK-NEXT: vpackod.w $vr0, $vr1, $vr0
90 %c = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
94 ;; vpickod.d/vpackod.d/vilvh.d
95 define <2 x i64> @shufflodector_pack_od_v2i64(<2 x i64> %a, <2 x i64> %b) {
96 ; CHECK-LABEL: shufflodector_pack_od_v2i64:
98 ; CHECK-NEXT: vpackod.d $vr0, $vr1, $vr0
100 %c = shufflevector <2 x i64> %a, <2 x i64> %b, <2 x i32> <i32 1, i32 3>
105 define <4 x float> @shufflodector_pack_od_v4f32(<4 x float> %a, <4 x float> %b) {
106 ; CHECK-LABEL: shufflodector_pack_od_v4f32:
108 ; CHECK-NEXT: vpackod.w $vr0, $vr1, $vr0
110 %c = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 5, i32 3, i32 7>
114 ;; vpickod.d/vpackod.d/vilvh.d
115 define <2 x double> @shufflodector_pack_od_v2f64(<2 x double> %a, <2 x double> %b) {
116 ; CHECK-LABEL: shufflodector_pack_od_v2f64:
118 ; CHECK-NEXT: vpackod.d $vr0, $vr1, $vr0
120 %c = shufflevector <2 x double> %a, <2 x double> %b, <2 x i32> <i32 1, i32 3>