From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id C2A6738582B0 for ; Sun, 12 Jun 2022 18:05:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C2A6738582B0 Received: by mail-pj1-x1034.google.com with SMTP id e9so3724045pju.5 for ; Sun, 12 Jun 2022 11:05:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=gC/5GM0nmwtM6LcmExvo/ngfb2uV/jldLFX6DSegVCk=; b=uF900Xd0pKt8er5AnW88xnpHnnRMT+M5gua5t7yQ4NftHekp3/eSCLMLPNPUN8fTOR 8zYPuRN7LZMpzqM7cUkFJ9AbIY0z9uJJmFnInemzrZg91F4iHXJ2Is6p8BlV2Vanv9CG fDgw+S8qQf9fup+txsz3KIPYTsoDjL7E3MPZmmkhU6SpgF3lmDYgnfkKifiCZ1p4dk+W Ba+Ks2MkW6phRigSsPyfeVPTAjwO2NZSD6k8NUAyUSr0Ew1/4OkbHnLWtbvNHP+OjHA9 0Z6uIYxRb/eUH5yvYsS2LtP9kpzfzQOvSq+ZoTIrZP4labDNNveO3vUh1Yx6GAKzUDxV h2IQ== X-Gm-Message-State: AOAM533nmcPwHxhNex0KEZO6jayxtKD6XqrDHCuPl+O5jqXm7XaEokDJ 8wNJkiVC9+wXRIlLJ09pUnpPOIh1N3aBqQ== X-Google-Smtp-Source: ABdhPJx7iKNMks75y70TkTC5x67AVlUsKjTt7rzc3FLIzpZEKXOjijCsqVVBlKhfL93+ZFV3lYBASw== X-Received: by 2002:a17:903:248:b0:168:ce2f:cbd2 with SMTP id j8-20020a170903024800b00168ce2fcbd2mr6907730plh.63.1655057118560; Sun, 12 Jun 2022 11:05:18 -0700 (PDT) Received: from [172.31.0.204] (c-73-63-24-84.hsd1.ut.comcast.net. [73.63.24.84]) by smtp.gmail.com with ESMTPSA id g6-20020a056a00078600b0051ba2c0ff24sm3654330pfu.144.2022.06.12.11.05.18 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jun 2022 11:05:18 -0700 (PDT) Message-ID: <145cbbdd-278c-520a-d3a9-2892a3f3c402@gmail.com> Date: Sun, 12 Jun 2022 12:05:17 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH 1/2] Factor out common internal-fn idiom Content-Language: en-US To: gcc-patches@gcc.gnu.org References: From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SCC_BODY_URI_ONLY, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: , X-List-Received-Date: Sun, 12 Jun 2022 18:05:21 -0000 On 6/10/2022 3:13 AM, Richard Sandiford via Gcc-patches wrote: > internal-fn.c has quite a few functions that simply map the result > of the call to an instruction's output operand (if any) and map > each argument to an instruction's input operand, in order. > This patch adds a single function for doing that. It's really > just a generalisation of expand_direct_optab_fn, but with the > output operand being optional. > > Unfortunately, it isn't possible to do this for vcond_mask > because the internal function has a different argument order > from the optab. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? > > Richard > > > gcc/ > * internal-fn.cc (expand_fn_using_insn): New function, > split out and adapted from... > (expand_direct_optab_fn): ...here. > (expand_GOMP_SIMT_ENTER_ALLOC): Use it. > (expand_GOMP_SIMT_EXIT): Likewise. > (expand_GOMP_SIMT_LANE): Likewise. > (expand_GOMP_SIMT_LAST_LANE): Likewise. > (expand_GOMP_SIMT_ORDERED_PRED): Likewise. > (expand_GOMP_SIMT_VOTE_ANY): Likewise. > (expand_GOMP_SIMT_XCHG_BFLY): Likewise. > (expand_GOMP_SIMT_XCHG_IDX): Likewise. OK Jeff