445 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=riscv32 -mattr=+v,+zvfh,+zvfbfmin | FileCheck %s3; RUN: llc < %s -mtriple=riscv64 -mattr=+v,+zvfh,+zvfbfmin | FileCheck %s4; RUN: llc < %s -mtriple=riscv32 -mattr=+v,+zvfhmin,+zvfbfmin | FileCheck %s5; RUN: llc < %s -mtriple=riscv64 -mattr=+v,+zvfhmin,+zvfbfmin | FileCheck %s6 7; Integers8 9define {<16 x i1>, <16 x i1>} @vector_deinterleave_load_v16i1_v32i1(ptr %p) {10; CHECK-LABEL: vector_deinterleave_load_v16i1_v32i1:11; CHECK: # %bb.0:12; CHECK-NEXT: li a1, 3213; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma14; CHECK-NEXT: vlm.v v0, (a0)15; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma16; CHECK-NEXT: vmv.v.i v8, 017; CHECK-NEXT: vmerge.vim v9, v8, 1, v018; CHECK-NEXT: vsetivli zero, 2, e8, mf4, ta, ma19; CHECK-NEXT: vslidedown.vi v0, v0, 220; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma21; CHECK-NEXT: vnsrl.wi v10, v9, 022; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma23; CHECK-NEXT: vmerge.vim v8, v8, 1, v024; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma25; CHECK-NEXT: vnsrl.wi v9, v9, 826; CHECK-NEXT: vnsrl.wi v11, v8, 027; CHECK-NEXT: vnsrl.wi v8, v8, 828; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma29; CHECK-NEXT: vslideup.vi v10, v11, 830; CHECK-NEXT: vslideup.vi v9, v8, 831; CHECK-NEXT: vmsne.vi v0, v10, 032; CHECK-NEXT: vmsne.vi v8, v9, 033; CHECK-NEXT: ret34 %vec = load <32 x i1>, ptr %p35 %deinterleaved.results = call {<16 x i1>, <16 x i1>} @llvm.vector.deinterleave2.v32i1(<32 x i1> %vec)36 %t0 = extractvalue { <16 x i1>, <16 x i1> } %deinterleaved.results, 037 %t1 = extractvalue { <16 x i1>, <16 x i1> } %deinterleaved.results, 138 %res0 = insertvalue { <16 x i1>, <16 x i1> } poison, <16 x i1> %t0, 039 %res1 = insertvalue { <16 x i1>, <16 x i1> } %res0, <16 x i1> %t1, 140 ret {<16 x i1>, <16 x i1>} %res141}42 43define {<16 x i8>, <16 x i8>} @vector_deinterleave_load_v16i8_v32i8(ptr %p) {44; CHECK-LABEL: vector_deinterleave_load_v16i8_v32i8:45; CHECK: # %bb.0:46; CHECK-NEXT: vsetivli zero, 16, e8, m1, ta, ma47; CHECK-NEXT: vlseg2e8.v v8, (a0)48; CHECK-NEXT: ret49 %vec = load <32 x i8>, ptr %p50 %deinterleaved.results = call {<16 x i8>, <16 x i8>} @llvm.vector.deinterleave2.v32i8(<32 x i8> %vec)51 %t0 = extractvalue { <16 x i8>, <16 x i8> } %deinterleaved.results, 052 %t1 = extractvalue { <16 x i8>, <16 x i8> } %deinterleaved.results, 153 %res0 = insertvalue { <16 x i8>, <16 x i8> } poison, <16 x i8> %t0, 054 %res1 = insertvalue { <16 x i8>, <16 x i8> } %res0, <16 x i8> %t1, 155 ret {<16 x i8>, <16 x i8>} %res156}57 58; Shouldn't be lowered to vlseg because it's unaligned59define {<8 x i16>, <8 x i16>} @vector_deinterleave_load_v8i16_v16i16_align1(ptr %p) {60; CHECK-LABEL: vector_deinterleave_load_v8i16_v16i16_align1:61; CHECK: # %bb.0:62; CHECK-NEXT: li a1, 3263; CHECK-NEXT: vsetvli zero, a1, e8, m2, ta, ma64; CHECK-NEXT: vle8.v v10, (a0)65; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma66; CHECK-NEXT: vnsrl.wi v8, v10, 067; CHECK-NEXT: vnsrl.wi v9, v10, 1668; CHECK-NEXT: ret69 %vec = load <16 x i16>, ptr %p, align 170 %deinterleaved.results = call {<8 x i16>, <8 x i16>} @llvm.vector.deinterleave2.v16i16(<16 x i16> %vec)71 %t0 = extractvalue { <8 x i16>, <8 x i16> } %deinterleaved.results, 072 %t1 = extractvalue { <8 x i16>, <8 x i16> } %deinterleaved.results, 173 %res0 = insertvalue { <8 x i16>, <8 x i16> } poison, <8 x i16> %t0, 074 %res1 = insertvalue { <8 x i16>, <8 x i16> } %res0, <8 x i16> %t1, 175 ret {<8 x i16>, <8 x i16>} %res176}77 78define {<8 x i16>, <8 x i16>} @vector_deinterleave_load_v8i16_v16i16(ptr %p) {79; CHECK-LABEL: vector_deinterleave_load_v8i16_v16i16:80; CHECK: # %bb.0:81; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma82; CHECK-NEXT: vlseg2e16.v v8, (a0)83; CHECK-NEXT: ret84 %vec = load <16 x i16>, ptr %p85 %deinterleaved.results = call {<8 x i16>, <8 x i16>} @llvm.vector.deinterleave2.v16i16(<16 x i16> %vec)86 %t0 = extractvalue { <8 x i16>, <8 x i16> } %deinterleaved.results, 087 %t1 = extractvalue { <8 x i16>, <8 x i16> } %deinterleaved.results, 188 %res0 = insertvalue { <8 x i16>, <8 x i16> } poison, <8 x i16> %t0, 089 %res1 = insertvalue { <8 x i16>, <8 x i16> } %res0, <8 x i16> %t1, 190 ret {<8 x i16>, <8 x i16>} %res191}92 93define {<4 x i32>, <4 x i32>} @vector_deinterleave_load_v4i32_vv8i32(ptr %p) {94; CHECK-LABEL: vector_deinterleave_load_v4i32_vv8i32:95; CHECK: # %bb.0:96; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma97; CHECK-NEXT: vlseg2e32.v v8, (a0)98; CHECK-NEXT: ret99 %vec = load <8 x i32>, ptr %p100 %deinterleaved.results = call {<4 x i32>, <4 x i32>} @llvm.vector.deinterleave2.v8i32(<8 x i32> %vec)101 %t0 = extractvalue { <4 x i32>, <4 x i32> } %deinterleaved.results, 0102 %t1 = extractvalue { <4 x i32>, <4 x i32> } %deinterleaved.results, 1103 %res0 = insertvalue { <4 x i32>, <4 x i32> } poison, <4 x i32> %t0, 0104 %res1 = insertvalue { <4 x i32>, <4 x i32> } %res0, <4 x i32> %t1, 1105 ret {<4 x i32>, <4 x i32>} %res1106}107 108define {<2 x i64>, <2 x i64>} @vector_deinterleave_load_v2i64_v4i64(ptr %p) {109; CHECK-LABEL: vector_deinterleave_load_v2i64_v4i64:110; CHECK: # %bb.0:111; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma112; CHECK-NEXT: vlseg2e64.v v8, (a0)113; CHECK-NEXT: ret114 %vec = load <4 x i64>, ptr %p115 %deinterleaved.results = call {<2 x i64>, <2 x i64>} @llvm.vector.deinterleave2.v4i64(<4 x i64> %vec)116 %t0 = extractvalue { <2 x i64>, <2 x i64> } %deinterleaved.results, 0117 %t1 = extractvalue { <2 x i64>, <2 x i64> } %deinterleaved.results, 1118 %res0 = insertvalue { <2 x i64>, <2 x i64> } poison, <2 x i64> %t0, 0119 %res1 = insertvalue { <2 x i64>, <2 x i64> } %res0, <2 x i64> %t1, 1120 ret {<2 x i64>, <2 x i64>} %res1121}122 123; Floats124 125define {<2 x bfloat>, <2 x bfloat>} @vector_deinterleave_load_v2bf16_v4bf16(ptr %p) {126; CHECK-LABEL: vector_deinterleave_load_v2bf16_v4bf16:127; CHECK: # %bb.0:128; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma129; CHECK-NEXT: vlseg2e16.v v8, (a0)130; CHECK-NEXT: ret131 %vec = load <4 x bfloat>, ptr %p132 %deinterleaved.results = call {<2 x bfloat>, <2 x bfloat>} @llvm.vector.deinterleave2.v4bf16(<4 x bfloat> %vec)133 %t0 = extractvalue { <2 x bfloat>, <2 x bfloat> } %deinterleaved.results, 0134 %t1 = extractvalue { <2 x bfloat>, <2 x bfloat> } %deinterleaved.results, 1135 %res0 = insertvalue { <2 x bfloat>, <2 x bfloat> } poison, <2 x bfloat> %t0, 0136 %res1 = insertvalue { <2 x bfloat>, <2 x bfloat> } %res0, <2 x bfloat> %t1, 1137 ret {<2 x bfloat>, <2 x bfloat>} %res1138}139 140define {<4 x bfloat>, <4 x bfloat>} @vector_deinterleave_load_v4bf16_v8bf16(ptr %p) {141; CHECK-LABEL: vector_deinterleave_load_v4bf16_v8bf16:142; CHECK: # %bb.0:143; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma144; CHECK-NEXT: vlseg2e16.v v8, (a0)145; CHECK-NEXT: ret146 %vec = load <8 x bfloat>, ptr %p147 %deinterleaved.results = call {<4 x bfloat>, <4 x bfloat>} @llvm.vector.deinterleave2.v8bf16(<8 x bfloat> %vec)148 %t0 = extractvalue { <4 x bfloat>, <4 x bfloat> } %deinterleaved.results, 0149 %t1 = extractvalue { <4 x bfloat>, <4 x bfloat> } %deinterleaved.results, 1150 %res0 = insertvalue { <4 x bfloat>, <4 x bfloat> } poison, <4 x bfloat> %t0, 0151 %res1 = insertvalue { <4 x bfloat>, <4 x bfloat> } %res0, <4 x bfloat> %t1, 1152 ret {<4 x bfloat>, <4 x bfloat>} %res1153}154 155define {<2 x half>, <2 x half>} @vector_deinterleave_load_v2f16_v4f16(ptr %p) {156; CHECK-LABEL: vector_deinterleave_load_v2f16_v4f16:157; CHECK: # %bb.0:158; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma159; CHECK-NEXT: vlseg2e16.v v8, (a0)160; CHECK-NEXT: ret161 %vec = load <4 x half>, ptr %p162 %deinterleaved.results = call {<2 x half>, <2 x half>} @llvm.vector.deinterleave2.v4f16(<4 x half> %vec)163 %t0 = extractvalue { <2 x half>, <2 x half> } %deinterleaved.results, 0164 %t1 = extractvalue { <2 x half>, <2 x half> } %deinterleaved.results, 1165 %res0 = insertvalue { <2 x half>, <2 x half> } poison, <2 x half> %t0, 0166 %res1 = insertvalue { <2 x half>, <2 x half> } %res0, <2 x half> %t1, 1167 ret {<2 x half>, <2 x half>} %res1168}169 170define {<4 x half>, <4 x half>} @vector_deinterleave_load_v4f16_v8f16(ptr %p) {171; CHECK-LABEL: vector_deinterleave_load_v4f16_v8f16:172; CHECK: # %bb.0:173; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma174; CHECK-NEXT: vlseg2e16.v v8, (a0)175; CHECK-NEXT: ret176 %vec = load <8 x half>, ptr %p177 %deinterleaved.results = call {<4 x half>, <4 x half>} @llvm.vector.deinterleave2.v8f16(<8 x half> %vec)178 %t0 = extractvalue { <4 x half>, <4 x half> } %deinterleaved.results, 0179 %t1 = extractvalue { <4 x half>, <4 x half> } %deinterleaved.results, 1180 %res0 = insertvalue { <4 x half>, <4 x half> } poison, <4 x half> %t0, 0181 %res1 = insertvalue { <4 x half>, <4 x half> } %res0, <4 x half> %t1, 1182 ret {<4 x half>, <4 x half>} %res1183}184 185define {<2 x float>, <2 x float>} @vector_deinterleave_load_v2f32_v4f32(ptr %p) {186; CHECK-LABEL: vector_deinterleave_load_v2f32_v4f32:187; CHECK: # %bb.0:188; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma189; CHECK-NEXT: vlseg2e32.v v8, (a0)190; CHECK-NEXT: ret191 %vec = load <4 x float>, ptr %p192 %deinterleaved.results = call {<2 x float>, <2 x float>} @llvm.vector.deinterleave2.v4f32(<4 x float> %vec)193 %t0 = extractvalue { <2 x float>, <2 x float> } %deinterleaved.results, 0194 %t1 = extractvalue { <2 x float>, <2 x float> } %deinterleaved.results, 1195 %res0 = insertvalue { <2 x float>, <2 x float> } poison, <2 x float> %t0, 0196 %res1 = insertvalue { <2 x float>, <2 x float> } %res0, <2 x float> %t1, 1197 ret {<2 x float>, <2 x float>} %res1198}199 200define {<8 x bfloat>, <8 x bfloat>} @vector_deinterleave_load_v8bf16_v16bf16(ptr %p) {201; CHECK-LABEL: vector_deinterleave_load_v8bf16_v16bf16:202; CHECK: # %bb.0:203; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma204; CHECK-NEXT: vlseg2e16.v v8, (a0)205; CHECK-NEXT: ret206 %vec = load <16 x bfloat>, ptr %p207 %deinterleaved.results = call {<8 x bfloat>, <8 x bfloat>} @llvm.vector.deinterleave2.v16bf16(<16 x bfloat> %vec)208 %t0 = extractvalue { <8 x bfloat>, <8 x bfloat> } %deinterleaved.results, 0209 %t1 = extractvalue { <8 x bfloat>, <8 x bfloat> } %deinterleaved.results, 1210 %res0 = insertvalue { <8 x bfloat>, <8 x bfloat> } poison, <8 x bfloat> %t0, 0211 %res1 = insertvalue { <8 x bfloat>, <8 x bfloat> } %res0, <8 x bfloat> %t1, 1212 ret {<8 x bfloat>, <8 x bfloat>} %res1213}214 215define {<8 x half>, <8 x half>} @vector_deinterleave_load_v8f16_v16f16(ptr %p) {216; CHECK-LABEL: vector_deinterleave_load_v8f16_v16f16:217; CHECK: # %bb.0:218; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma219; CHECK-NEXT: vlseg2e16.v v8, (a0)220; CHECK-NEXT: ret221 %vec = load <16 x half>, ptr %p222 %deinterleaved.results = call {<8 x half>, <8 x half>} @llvm.vector.deinterleave2.v16f16(<16 x half> %vec)223 %t0 = extractvalue { <8 x half>, <8 x half> } %deinterleaved.results, 0224 %t1 = extractvalue { <8 x half>, <8 x half> } %deinterleaved.results, 1225 %res0 = insertvalue { <8 x half>, <8 x half> } poison, <8 x half> %t0, 0226 %res1 = insertvalue { <8 x half>, <8 x half> } %res0, <8 x half> %t1, 1227 ret {<8 x half>, <8 x half>} %res1228}229 230define {<4 x float>, <4 x float>} @vector_deinterleave_load_v4f32_v8f32(ptr %p) {231; CHECK-LABEL: vector_deinterleave_load_v4f32_v8f32:232; CHECK: # %bb.0:233; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma234; CHECK-NEXT: vlseg2e32.v v8, (a0)235; CHECK-NEXT: ret236 %vec = load <8 x float>, ptr %p237 %deinterleaved.results = call {<4 x float>, <4 x float>} @llvm.vector.deinterleave2.v8f32(<8 x float> %vec)238 %t0 = extractvalue { <4 x float>, <4 x float> } %deinterleaved.results, 0239 %t1 = extractvalue { <4 x float>, <4 x float> } %deinterleaved.results, 1240 %res0 = insertvalue { <4 x float>, <4 x float> } poison, <4 x float> %t0, 0241 %res1 = insertvalue { <4 x float>, <4 x float> } %res0, <4 x float> %t1, 1242 ret {<4 x float>, <4 x float>} %res1243}244 245define {<2 x double>, <2 x double>} @vector_deinterleave_load_v2f64_v4f64(ptr %p) {246; CHECK-LABEL: vector_deinterleave_load_v2f64_v4f64:247; CHECK: # %bb.0:248; CHECK-NEXT: vsetivli zero, 2, e64, m1, ta, ma249; CHECK-NEXT: vlseg2e64.v v8, (a0)250; CHECK-NEXT: ret251 %vec = load <4 x double>, ptr %p252 %deinterleaved.results = call {<2 x double>, <2 x double>} @llvm.vector.deinterleave2.v4f64(<4 x double> %vec)253 %t0 = extractvalue { <2 x double>, <2 x double> } %deinterleaved.results, 0254 %t1 = extractvalue { <2 x double>, <2 x double> } %deinterleaved.results, 1255 %res0 = insertvalue { <2 x double>, <2 x double> } poison, <2 x double> %t0, 0256 %res1 = insertvalue { <2 x double>, <2 x double> } %res0, <2 x double> %t1, 1257 ret {<2 x double>, <2 x double>} %res1258}259 260define { <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor3(ptr %p) {261; CHECK-LABEL: vector_deinterleave_load_factor3:262; CHECK: # %bb.0:263; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma264; CHECK-NEXT: vlseg3e8.v v8, (a0)265; CHECK-NEXT: ret266 %vec = load <24 x i8>, ptr %p267 %d0 = call {<8 x i8>, <8 x i8>, <8 x i8>} @llvm.vector.deinterleave3(<24 x i8> %vec)268 %t0 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 0269 %t1 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 1270 %t2 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 2271 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0272 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 1273 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 2274 ret { <8 x i8>, <8 x i8>, <8 x i8> } %res2275}276 277define { <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor3_partial(ptr %p) {278; CHECK-LABEL: vector_deinterleave_load_factor3_partial:279; CHECK: # %bb.0:280; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma281; CHECK-NEXT: vlseg3e8.v v7, (a0)282; CHECK-NEXT: vmv1r.v v8, v7283; CHECK-NEXT: ret284 %vec = load <24 x i8>, ptr %p285 %d0 = call {<8 x i8>, <8 x i8>, <8 x i8>} @llvm.vector.deinterleave3(<24 x i8> %vec)286 %t0 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 0287 %t2 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 2288 %res0 = insertvalue { <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0289 %res1 = insertvalue { <8 x i8>, <8 x i8> } %res0, <8 x i8> %t2, 1290 ret { <8 x i8>, <8 x i8> } %res1291}292 293; InterleavedAccess should kick in even if the users of deinterleave intrinsic are not extractvalue.294define { <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor3_no_extract(ptr %p, ptr %p1, i1 %c) {295; CHECK-LABEL: vector_deinterleave_load_factor3_no_extract:296; CHECK: # %bb.0:297; CHECK-NEXT: andi a2, a2, 1298; CHECK-NEXT: beqz a2, .LBB17_2299; CHECK-NEXT: # %bb.1: # %bb0300; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma301; CHECK-NEXT: vlseg3e8.v v6, (a0)302; CHECK-NEXT: ret303; CHECK-NEXT: .LBB17_2: # %bb1304; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma305; CHECK-NEXT: vlseg3e8.v v6, (a1)306; CHECK-NEXT: ret307 br i1 %c, label %bb0, label %bb1308 309bb0:310 %vec0 = load <24 x i8>, ptr %p311 %d0.0 = call {<8 x i8>, <8 x i8>, <8 x i8>} @llvm.vector.deinterleave3(<24 x i8> %vec0)312 br label %merge313 314bb1:315 %vec1 = load <24 x i8>, ptr %p1316 %d0.1 = call {<8 x i8>, <8 x i8>, <8 x i8>} @llvm.vector.deinterleave3(<24 x i8> %vec1)317 br label %merge318 319merge:320 %d0 = phi {<8 x i8>, <8 x i8>, <8 x i8>} [%d0.0, %bb0], [%d0.1, %bb1]321 %t0 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 0322 %t1 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 1323 %t2 = extractvalue {<8 x i8>, <8 x i8>, <8 x i8>} %d0, 2324 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0325 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 0326 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 0327 ret { <8 x i8>, <8 x i8>, <8 x i8> } %res2328}329 330define { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor4(ptr %p) {331; CHECK-LABEL: vector_deinterleave_load_factor4:332; CHECK: # %bb.0:333; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma334; CHECK-NEXT: vlseg4e8.v v8, (a0)335; CHECK-NEXT: ret336 %vec = load <32 x i8>, ptr %p337 %d0 = call { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @llvm.vector.deinterleave4(<32 x i8> %vec)338 %t0 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 0339 %t1 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 1340 %t2 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 2341 %t3 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 3342 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0343 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 1344 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 2345 %res3 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res2, <8 x i8> %t3, 3346 ret { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res3347}348 349define { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor5(ptr %p) {350; CHECK-LABEL: vector_deinterleave_load_factor5:351; CHECK: # %bb.0:352; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma353; CHECK-NEXT: vlseg5e8.v v8, (a0)354; CHECK-NEXT: ret355 %vec = load <40 x i8>, ptr %p356 %d0 = call {<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>} @llvm.vector.deinterleave5(<40 x i8> %vec)357 %t0 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 0358 %t1 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 1359 %t2 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 2360 %t3 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 3361 %t4 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 4362 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0363 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 1364 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 2365 %res3 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res2, <8 x i8> %t3, 3366 %res4 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res3, <8 x i8> %t4, 4367 ret { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res4368}369 370define { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor6(ptr %p) {371; CHECK-LABEL: vector_deinterleave_load_factor6:372; CHECK: # %bb.0:373; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma374; CHECK-NEXT: vlseg6e8.v v8, (a0)375; CHECK-NEXT: ret376 %vec = load <48 x i8>, ptr %p377 %d0 = call { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @llvm.vector.deinterleave6(<48 x i8> %vec)378 %t0 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 0379 %t1 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 1380 %t2 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 2381 %t3 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 3382 %t4 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 4383 %t5 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 5384 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0385 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 1386 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 2387 %res3 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res2, <8 x i8> %t3, 3388 %res4 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res3, <8 x i8> %t4, 4389 %res5 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res4, <8 x i8> %t5, 5390 ret { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res5391}392 393define { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor7(ptr %p) {394; CHECK-LABEL: vector_deinterleave_load_factor7:395; CHECK: # %bb.0:396; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma397; CHECK-NEXT: vlseg7e8.v v8, (a0)398; CHECK-NEXT: ret399 %vec = load <56 x i8>, ptr %p400 %d0 = call {<8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>} @llvm.vector.deinterleave7(<56 x i8> %vec)401 %t0 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 0402 %t1 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 1403 %t2 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 2404 %t3 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 3405 %t4 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 4406 %t5 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 5407 %t6 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 6408 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0409 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 1410 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 2411 %res3 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res2, <8 x i8> %t3, 3412 %res4 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res3, <8 x i8> %t4, 4413 %res5 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res4, <8 x i8> %t5, 5414 %res6 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res5, <8 x i8> %t6, 6415 ret { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res6416}417 418define { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @vector_deinterleave_load_factor8(ptr %p) {419; CHECK-LABEL: vector_deinterleave_load_factor8:420; CHECK: # %bb.0:421; CHECK-NEXT: vsetivli zero, 8, e8, mf2, ta, ma422; CHECK-NEXT: vlseg8e8.v v8, (a0)423; CHECK-NEXT: vmv1r.v v15, v14424; CHECK-NEXT: ret425 %vec = load <64 x i8>, ptr %p426 %d0 = call { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } @llvm.vector.deinterleave8(<64 x i8> %vec)427 %t0 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 0428 %t1 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 1429 %t2 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 2430 %t3 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 3431 %t4 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 4432 %t5 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 5433 %t6 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 6434 %t7 = extractvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %d0, 7435 %res0 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } poison, <8 x i8> %t0, 0436 %res1 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res0, <8 x i8> %t1, 1437 %res2 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res1, <8 x i8> %t2, 2438 %res3 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res2, <8 x i8> %t3, 3439 %res4 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res3, <8 x i8> %t4, 4440 %res5 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res4, <8 x i8> %t5, 5441 %res6 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res5, <8 x i8> %t6, 6442 %res7 = insertvalue { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res6, <8 x i8> %t6, 7443 ret { <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8>, <8 x i8> } %res7444}445