From patchwork Mon Mar 13 08:28:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "juzhe.zhong@rivai.ai" X-Patchwork-Id: 66288 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 17E6E3858413 for ; Mon, 13 Mar 2023 08:29:49 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtpbguseast3.qq.com (smtpbguseast3.qq.com [54.243.244.52]) by sourceware.org (Postfix) with ESMTPS id 837D73858D32 for ; Mon, 13 Mar 2023 08:29:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 837D73858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivai.ai Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivai.ai X-QQ-mid: bizesmtp84t1678696139t4m1af8i Received: from rios-cad5.localdomain ( [58.60.1.11]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 13 Mar 2023 16:28:58 +0800 (CST) X-QQ-SSF: 01400000000000E0N000000A0000000 X-QQ-FEAT: DViCT0MMEKyx95c2+015fteMZPNm2C+Z30VjO8oID2emub2hsc1W6gkHZhcbq 4/rFogvzorXeuVFhYfTc4XvqXtl6pKhzV4cA6nyekAItAZwwtKBM6hWR+wVTa5xn2QHdW0L QB2fyvUWiQ16HrqVXFRYCKBjTxouOZ1fgeaKIVaViTHYH+tmTs/ivVPxcJGoL2ZR+q9RJgr FU6sazvZduBYnypATYut3nTvWdAFOS6CTZUQ56aiwZUHMkucRgBGaOroiBSR/qSwOwDbN0A Fe6rQH0Vl22gRNQDhCngD53DB7OP4UY3DKIskwHEYV5SV+TMyDUw1/EDxwKNaGiDiKohjX9 /mInwgwYQKbmrIId1QsfcIT2KMAwjU/hZeatU6vFN/Xb8pomGawRI4wVC7zIUpWwmWMwMPV z/B8nIO78FI= X-QQ-GoodBg: 2 From: juzhe.zhong@rivai.ai To: gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com, Ju-Zhe Zhong Subject: [PATCH] RISC-V: Fine tune gather load RA constraint Date: Mon, 13 Mar 2023 16:28:55 +0800 Message-Id: <20230313082855.248118-1-juzhe.zhong@rivai.ai> X-Mailer: git-send-email 2.36.3 MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:rivai.ai:qybglogicsvr:qybglogicsvr7 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" From: Ju-Zhe Zhong For DEST EEW < SOURCE EEW, we can partial overlap register according to RVV ISA. gcc/ChangeLog: * config/riscv/vector.md: Fix RA constraint. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/narrow_constraint-12.c: New test. --- gcc/config/riscv/vector.md | 54 ++-- .../riscv/rvv/base/narrow_constraint-12.c | 303 ++++++++++++++++++ 2 files changed, 330 insertions(+), 27 deletions(-) create mode 100644 gcc/testsuite/gcc.target/riscv/rvv/base/narrow_constraint-12.c diff --git a/gcc/config/riscv/vector.md b/gcc/config/riscv/vector.md index 37a539b4852..4ea74372de5 100644 --- a/gcc/config/riscv/vector.md +++ b/gcc/config/riscv/vector.md @@ -1434,63 +1434,63 @@ ;; DEST eew is smaller than SOURCE eew. (define_insn "@pred_indexed_load_x2_smaller_eew" - [(set (match_operand:VEEWTRUNC2 0 "register_operand" "=&vr, &vr") + [(set (match_operand:VEEWTRUNC2 0 "register_operand" "=vd, vd, vr, vr, &vr, &vr") (if_then_else:VEEWTRUNC2 (unspec: - [(match_operand: 1 "vector_mask_operand" "vmWc1,vmWc1") - (match_operand 5 "vector_length_operand" " rK, rK") - (match_operand 6 "const_int_operand" " i, i") - (match_operand 7 "const_int_operand" " i, i") - (match_operand 8 "const_int_operand" " i, i") + [(match_operand: 1 "vector_mask_operand" " vm, vm,Wc1,Wc1,vmWc1,vmWc1") + (match_operand 5 "vector_length_operand" " rK, rK, rK, rK, rK, rK") + (match_operand 6 "const_int_operand" " i, i, i, i, i, i") + (match_operand 7 "const_int_operand" " i, i, i, i, i, i") + (match_operand 8 "const_int_operand" " i, i, i, i, i, i") (reg:SI VL_REGNUM) (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) (unspec:VEEWTRUNC2 - [(match_operand 3 "pmode_register_operand" " r, r") + [(match_operand 3 "pmode_register_operand" " r, r, r, r, r, r") (mem:BLK (scratch)) - (match_operand: 4 "register_operand" " vr, vr")] ORDER) - (match_operand:VEEWTRUNC2 2 "vector_merge_operand" " vu, 0")))] + (match_operand: 4 "register_operand" " 0, 0, 0, 0, vr, vr")] ORDER) + (match_operand:VEEWTRUNC2 2 "vector_merge_operand" " vu, 0, vu, 0, vu, 0")))] "TARGET_VECTOR" "vlxei.v\t%0,(%3),%4%p1" [(set_attr "type" "vldx") (set_attr "mode" "")]) (define_insn "@pred_indexed_load_x4_smaller_eew" - [(set (match_operand:VEEWTRUNC4 0 "register_operand" "=&vr, &vr") + [(set (match_operand:VEEWTRUNC4 0 "register_operand" "=vd, vd, vr, vr, &vr, &vr") (if_then_else:VEEWTRUNC4 (unspec: - [(match_operand: 1 "vector_mask_operand" "vmWc1,vmWc1") - (match_operand 5 "vector_length_operand" " rK, rK") - (match_operand 6 "const_int_operand" " i, i") - (match_operand 7 "const_int_operand" " i, i") - (match_operand 8 "const_int_operand" " i, i") + [(match_operand: 1 "vector_mask_operand" " vm, vm,Wc1,Wc1,vmWc1,vmWc1") + (match_operand 5 "vector_length_operand" " rK, rK, rK, rK, rK, rK") + (match_operand 6 "const_int_operand" " i, i, i, i, i, i") + (match_operand 7 "const_int_operand" " i, i, i, i, i, i") + (match_operand 8 "const_int_operand" " i, i, i, i, i, i") (reg:SI VL_REGNUM) (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) (unspec:VEEWTRUNC4 - [(match_operand 3 "pmode_register_operand" " r, r") + [(match_operand 3 "pmode_register_operand" " r, r, r, r, r, r") (mem:BLK (scratch)) - (match_operand: 4 "register_operand" " vr, vr")] ORDER) - (match_operand:VEEWTRUNC4 2 "vector_merge_operand" " vu, 0")))] + (match_operand: 4 "register_operand" " 0, 0, 0, 0, vr, vr")] ORDER) + (match_operand:VEEWTRUNC4 2 "vector_merge_operand" " vu, 0, vu, 0, vu, 0")))] "TARGET_VECTOR" "vlxei.v\t%0,(%3),%4%p1" [(set_attr "type" "vldx") (set_attr "mode" "")]) (define_insn "@pred_indexed_load_x8_smaller_eew" - [(set (match_operand:VEEWTRUNC8 0 "register_operand" "=&vr, &vr") + [(set (match_operand:VEEWTRUNC8 0 "register_operand" "=vd, vd, vr, vr, &vr, &vr") (if_then_else:VEEWTRUNC8 (unspec: - [(match_operand: 1 "vector_mask_operand" "vmWc1,vmWc1") - (match_operand 5 "vector_length_operand" " rK, rK") - (match_operand 6 "const_int_operand" " i, i") - (match_operand 7 "const_int_operand" " i, i") - (match_operand 8 "const_int_operand" " i, i") + [(match_operand: 1 "vector_mask_operand" " vm, vm,Wc1,Wc1,vmWc1,vmWc1") + (match_operand 5 "vector_length_operand" " rK, rK, rK, rK, rK, rK") + (match_operand 6 "const_int_operand" " i, i, i, i, i, i") + (match_operand 7 "const_int_operand" " i, i, i, i, i, i") + (match_operand 8 "const_int_operand" " i, i, i, i, i, i") (reg:SI VL_REGNUM) (reg:SI VTYPE_REGNUM)] UNSPEC_VPREDICATE) (unspec:VEEWTRUNC8 - [(match_operand 3 "pmode_register_operand" " r, r") + [(match_operand 3 "pmode_register_operand" " r, r, r, r, r, r") (mem:BLK (scratch)) - (match_operand: 4 "register_operand" " vr, vr")] ORDER) - (match_operand:VEEWTRUNC8 2 "vector_merge_operand" " vu, 0")))] + (match_operand: 4 "register_operand" " 0, 0, 0, 0, vr, vr")] ORDER) + (match_operand:VEEWTRUNC8 2 "vector_merge_operand" " vu, 0, vu, 0, vu, 0")))] "TARGET_VECTOR" "vlxei.v\t%0,(%3),%4%p1" [(set_attr "type" "vldx") diff --git a/gcc/testsuite/gcc.target/riscv/rvv/base/narrow_constraint-12.c b/gcc/testsuite/gcc.target/riscv/rvv/base/narrow_constraint-12.c new file mode 100644 index 00000000000..df5b2dc5c51 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/rvv/base/narrow_constraint-12.c @@ -0,0 +1,303 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gcv -mabi=lp64d -O3" } */ + +#include "riscv_vector.h" + +void f0 (void *base,void *out,size_t vl) +{ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base, vl); + vint8mf8_t v = __riscv_vluxei64_v_i8mf8(base,bindex,vl); + __riscv_vse8_v_i8mf8 (out,v,vl); +} + +void f1 (void *base,void *out,size_t vl) +{ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base, vl); + vint8mf8_t bindex2 = __riscv_vle8_v_i8mf8 ((void *)(base + 100), vl); + vint8mf8_t v = __riscv_vluxei64_v_i8mf8_tu(bindex2,base,bindex,vl); + __riscv_vse8_v_i8mf8 (out,v,vl); +} + +void f2 (void *base,void *out,size_t vl) +{ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base, vl); + vint8mf8_t v = __riscv_vluxei64_v_i8mf8(base,bindex,vl); + vuint64m1_t v2 = __riscv_vadd_vv_u64m1 (bindex, bindex,vl); + __riscv_vse8_v_i8mf8 (out,v,vl); + __riscv_vse64_v_u64m1 ((void *)out,v2,vl); +} + +void f3 (void *base,void *out,size_t vl, int n) +{ + for (int i = 0; i < n; i++){ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base + 100*i, vl); + vint8mf8_t v = __riscv_vluxei64_v_i8mf8(base,bindex,vl); + vuint64m1_t v2 = __riscv_vadd_vv_u64m1 (bindex, bindex,vl); + __riscv_vse8_v_i8mf8 (out + 100*i,v,vl); + __riscv_vse64_v_u64m1 ((void *)(out + 200*i),v2,vl); + } +} + +void f4 (void *base,void *out,size_t vl) +{ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base, vl); + vint8mf8_t v = __riscv_vluxei64_v_i8mf8(base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + vuint64m1_t v2 = __riscv_vadd_vv_u64m1 (bindex, bindex,vl); + __riscv_vse8_v_i8mf8 (out,v,vl); + __riscv_vse64_v_u64m1 ((void *)out,v2,vl); +} + +void f5 (void *base,void *base2,void *out,size_t vl, int n) +{ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base + 100, vl); + for (int i = 0; i < n; i++){ + vbool64_t m = __riscv_vlm_v_b64 (base + i, vl); + vint8mf8_t v = __riscv_vluxei64_v_i8mf8_m(m,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vle8_v_i8mf8_tu (v, base2, vl); + __riscv_vse8_v_i8mf8 (out + 100*i,v,vl); + } +} + +void f6 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + vint8m1_t v = __riscv_vluxei64_v_i8m1(base,bindex,vl); + __riscv_vse8_v_i8m1 (out,v,vl); +} + +void f7 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + vint8m1_t src = __riscv_vle8_v_i8m1 ((void *)(base + 100), vl); + vint8m1_t v = __riscv_vluxei64_v_i8m1_tu(src,base,bindex,vl); + __riscv_vse8_v_i8m1 (out,v,vl); +} + +void f8 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + vint8m1_t v = __riscv_vluxei64_v_i8m1(base,bindex,vl); + vuint64m8_t v2 = __riscv_vadd_vv_u64m8 (bindex, bindex,vl); + __riscv_vse8_v_i8m1 (out,v,vl); + __riscv_vse64_v_u64m8 ((void *)out,v2,vl); +} + +void f9 (void *base,void *out,size_t vl, int n) +{ + for (int i = 0; i < n; i++){ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100*i, vl); + vint8m1_t v = __riscv_vluxei64_v_i8m1(base,bindex,vl); + vuint64m8_t v2 = __riscv_vadd_vv_u64m8 (bindex, bindex,vl); + __riscv_vse8_v_i8m1 (out + 100*i,v,vl); + __riscv_vse64_v_u64m8 ((void *)(out + 200*i),v2,vl); + } +} + +void f10 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + vint8m1_t v = __riscv_vluxei64_v_i8m1(base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + vuint64m8_t v2 = __riscv_vadd_vv_u64m8 (bindex, bindex,vl); + __riscv_vse8_v_i8m1 (out,v,vl); + __riscv_vse64_v_u64m8 ((void *)out,v2,vl); +} + +void f11 (void *base,void *base2,void *out,size_t vl, int n) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100, vl); + for (int i = 0; i < n; i++){ + vbool8_t m = __riscv_vlm_v_b8 (base + i, vl); + vint8m1_t v = __riscv_vluxei64_v_i8m1_m(m,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vle8_v_i8m1_tu (v, base2, vl); + __riscv_vse8_v_i8m1 (out + 100*i,v,vl); + } +} + +void f12 (void *base,void *out,size_t vl, int n) +{ + vint8mf8_t v = __riscv_vle8_v_i8mf8 ((void *)(base + 1000), vl); + for (int i = 0; i < n; i++){ + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base + 100*i, vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + __riscv_vse8_v_i8mf8 (out + 100*i,v,vl); + } +} + +void f13 (void *base,void *out,size_t vl, int n) +{ + vint8m1_t v = __riscv_vle8_v_i8m1 ((void *)(base + 1000), vl); + for (int i = 0; i < n; i++){ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100*i, vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + __riscv_vse8_v_i8m1 (out + 100*i,v,vl); + } +} + +void f14 (void *base,void *out,size_t vl, int n) +{ + for (int i = 0; i < n; i++){ + vint8mf8_t v = __riscv_vle8_v_i8mf8 ((void *)(base + 1000 * i), vl); + vuint64m1_t bindex = __riscv_vle64_v_u64m1 (base + 100*i, vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex,vl); + __riscv_vse8_v_i8mf8 (out + 100*i,v,vl); + } +} + +void f15 (void *base,void *out,size_t vl, int n) +{ + for (int i = 0; i < n; i++){ + vint8m1_t v = __riscv_vle8_v_i8m1 ((void *)(base + 1000 * i), vl); + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100*i, vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex,vl); + __riscv_vse8_v_i8m1 (out + 100*i,v,vl); + } +} + +void f16 (void *base,void *out,size_t vl, int n) +{ + for (int i = 0; i < n; i++){ + vint8mf8_t v = __riscv_vle8_v_i8mf8 ((void *)(base + 1000 * i), vl); + vuint64m1_t bindex1 = __riscv_vle64_v_u64m1 (base + 100*i, vl); + vuint64m1_t bindex2 = __riscv_vle64_v_u64m1 (base + 200*i, vl); + vuint64m1_t bindex3 = __riscv_vle64_v_u64m1 (base + 300*i, vl); + vuint64m1_t bindex4 = __riscv_vle64_v_u64m1 (base + 400*i, vl); + vuint64m1_t bindex5 = __riscv_vle64_v_u64m1 (base + 500*i, vl); + vuint64m1_t bindex6 = __riscv_vle64_v_u64m1 (base + 600*i, vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex1,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex2,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex3,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex4,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex5,vl); + v = __riscv_vluxei64_v_i8mf8_tu(v,base,bindex6,vl); + __riscv_vse8_v_i8mf8 (out + 100*i,v,vl); + } +} + +void f17 (void *base,void *out,size_t vl, int n) +{ + for (int i = 0; i < n; i++){ + vint8m1_t v = __riscv_vle8_v_i8m1 ((void *)(base + 1000 * i), vl); + vuint64m8_t bindex1 = __riscv_vle64_v_u64m8 (base + 100*i, vl); + vuint64m8_t bindex2 = __riscv_vle64_v_u64m8 (base + 200*i, vl); + vuint64m8_t bindex3 = __riscv_vle64_v_u64m8 (base + 300*i, vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex1,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex2,vl); + v = __riscv_vluxei64_v_i8m1_tu(v,base,bindex3,vl); + __riscv_vse8_v_i8m1 (out + 100*i,v,vl); + } +} + +void f18 (void *base,void *base2,void *out,size_t vl, int n) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100, vl); + for (int i = 0; i < n; i++){ + vbool8_t m = __riscv_vlm_v_b8 (base + i, vl); + vuint32m4_t v = __riscv_vluxei64_v_u32m4_m(m,base,bindex,vl); + vuint32m4_t v2 = __riscv_vle32_v_u32m4_tu (v, base2 + i, vl); + vint8m1_t v3 = __riscv_vluxei32_v_i8m1_m(m,base,v2,vl); + __riscv_vse8_v_i8m1 (out + 100*i,v3,vl); + } +} + +void f19 (void *base,void *base2,void *out,size_t vl, int n) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base + 100, vl); + for (int i = 0; i < n; i++){ + vbool8_t m = __riscv_vlm_v_b8 (base + i, vl); + vuint64m8_t v = __riscv_vluxei64_v_u64m8_m(m,base,bindex,vl); + vuint64m8_t v2 = __riscv_vle64_v_u64m8_tu (v, base2 + i, vl); + vint8m1_t v3 = __riscv_vluxei64_v_i8m1_m(m,base,v,vl); + vint8m1_t v4 = __riscv_vluxei64_v_i8m1_m(m,base,v2,vl); + __riscv_vse8_v_i8m1 (out + 100*i,v3,vl); + __riscv_vse8_v_i8m1 (out + 222*i,v4,vl); + } +} +void f20 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + asm volatile("#" :: + : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23"); + + vint8m1_t v = __riscv_vluxei64_v_i8m1(base,bindex,vl); + asm volatile("#" :: + : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23", "v25", + "v26", "v27", "v28", "v29", "v30", "v31"); + + __riscv_vse8_v_i8m1 (out,v,vl); +} + +void f21 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + vbool8_t m = __riscv_vlm_v_b8 (base, vl); + asm volatile("#" :: + : "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23"); + + vint8m1_t v = __riscv_vluxei64_v_i8m1_m(m,base,bindex,vl); + asm volatile("#" :: + : "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23", "v25", + "v26", "v27", "v28", "v29", "v30", "v31"); + + __riscv_vse8_v_i8m1 (out,v,vl); +} + +void f22 (void *base,void *out,size_t vl) +{ + vuint64m8_t bindex = __riscv_vle64_v_u64m8 (base, vl); + asm volatile("#" :: + : "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23"); + + vint8m1_t v = __riscv_vluxei64_v_i8m1(base,bindex,vl); + asm volatile("#" :: + : "v0", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", + "v26", "v27", "v28", "v29", "v30", "v31"); + v = __riscv_vadd_vv_i8m1 (v,v,vl); + asm volatile("#" :: + : "v0", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", + "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", + "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", + "v26", "v27", "v28", "v29", "v30", "v31"); + + __riscv_vse8_v_i8m1 (out,v,vl); +} + +/* { dg-final { scan-assembler-times {vmv} 1 } } */ +/* { dg-final { scan-assembler-not {csrr} } } */