From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 2476F3853D65 for ; Mon, 28 Nov 2022 16:49:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2476F3853D65 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pj1-x1036.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so14585157pjs.4 for ; Mon, 28 Nov 2022 08:49:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=gx/qWp4nXJME0kBaEYDd+pickYK9oCfydZ/FgzfXLFo=; b=Iwul+zDMJ38EYBqfo7ACzHus7QcrQkhgxjV9L2LaZiklYsXOxOKSL7Ld5E1BlxTUij lGLe0YvLuLNyCvn7Lac8KmM6JL+I8Ieq3rThSG8IwiLrDXZD9pbKFU43U3ReayR81JD7 10F/SXgwfzc0K6N4A13fe/SfAOax7l41dUgqMqrWXoWcpOLdr0e6OgbqD0M6SjCNgirH Q0Zs10jDOBziMkx8T8zt8LSAev5CJI82CBrLREVHeSUc4AlBJPAjZNFf71QCZB0udbwX fyKc0kIQctjE3bvbMbvfcYZgQey41PzHXqOMDx2lHr8pp7CU/Ymv+PGXNJUNIVxvn91+ JYBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gx/qWp4nXJME0kBaEYDd+pickYK9oCfydZ/FgzfXLFo=; b=ekcom1RC3jnLdlpGPFcc0G+b+5Y7yCFFv2IyNCX1afSNDfAB4rTsdQgBLHOC8NZicB f7MxA9Kt/Qnz1Ovgm/f/HVjrKEaG18zJcoBvTn4uHHm8Pkjl+rsV+mwBN0IqDKrKakv8 OHbVYNt98E+o42DO9Rjip5JJKDNfZBz2tf6OfXA2bDBeilli0yLnO1ovwlMcKq5Ius2f CEcPJdfGOD1BQXC/8oUxGjvoYJpSXAxrdBDNG5QprbsiAUas9fBXB5GYw+pvuxjG9yl4 Zkhnib/Poh1hZKQ5KitU0SziqZw90KL68KYn7SEGReoqWrSMaMWcuPXK3Ah2pVe+DGjm hpgw== X-Gm-Message-State: ANoB5pnGvQGz/qb02uJ4Zo0HuXZTe6MS3FtsT1N6lGm7/YFQbeToOjUg cilHziYoe/tCrkST+9cHvXQ= X-Google-Smtp-Source: AA0mqf771XbiWoniuoKYdUpQG8dwNYuQSTKZ5dl7jxxjjbL2t1BGM+l8FrWWx7w61FogQ12qU96eIA== X-Received: by 2002:a17:902:f78a:b0:186:5bbc:2ad9 with SMTP id q10-20020a170902f78a00b001865bbc2ad9mr45101592pln.157.1669654168949; Mon, 28 Nov 2022 08:49:28 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id 125-20020a620683000000b0056be1581126sm8521658pfg.143.2022.11.28.08.49.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Nov 2022 08:49:28 -0800 (PST) Message-ID: <4e4383b5-a7a0-315b-568d-4931313eaaef@gmail.com> Date: Mon, 28 Nov 2022 09:49:27 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH] RISC-V: Add duplicate vector support. Content-Language: en-US To: juzhe.zhong@rivai.ai, gcc-patches@gcc.gnu.org Cc: kito.cheng@gmail.com References: <20221125160639.43024-1-juzhe.zhong@rivai.ai> From: Jeff Law In-Reply-To: <20221125160639.43024-1-juzhe.zhong@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 List-Id: On 11/25/22 09:06, juzhe.zhong@rivai.ai wrote: > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/constraints.md (Wdm): New constraint. > * config/riscv/predicates.md (direct_broadcast_operand): New predicate. > * config/riscv/riscv-protos.h (RVV_VLMAX): New macro. > (emit_pred_op): Refine function. > * config/riscv/riscv-selftests.cc (run_const_vector_selftests): New function. > (run_broadcast_selftests): Ditto. > (BROADCAST_TEST): New tests. > (riscv_run_selftests): More tests. > * config/riscv/riscv-v.cc (emit_pred_move): Refine function. > (emit_vlmax_vsetvl): Ditto. > (emit_pred_op): Ditto. > (expand_const_vector): New function. > (legitimize_move): Add constant vector support. > * config/riscv/riscv.cc (riscv_print_operand): New asm print rule for const vector. > * config/riscv/riscv.h (X0_REGNUM): New macro. > * config/riscv/vector-iterators.md: New attribute. > * config/riscv/vector.md (vec_duplicate): New pattern. > (@pred_broadcast): New pattern. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/base/dup-1.c: New test. > * gcc.target/riscv/rvv/base/dup-2.c: New test. I think this should wait for the next stage1 cycle. jeff