From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id 7A2FC3858C2C for ; Tue, 28 Sep 2021 01:48:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A2FC3858C2C Received: by mail-qt1-x834.google.com with SMTP id r1so18518441qta.12 for ; Mon, 27 Sep 2021 18:48:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=RIc/GEI/3CCjLGWWLssgf8GYIHTpgbjihKtc9ePWL6o=; b=MibVEW2HBcCRXni7aH2PyCCqy/F5D7a0nIxppFZRgGUAOd/HUMt1E2RsSYNDIOb7r2 crrrzuuILC/QgSJagHsK+89sOGkRCkbiVL/uQsn7LVZcYZY8F65KeNtQlA7o0ouff4zj xGl9yCWZ2VvSBNb+xM29KoIdjnLuCNAcH/9ekn2yKEZD+tQRqZ4u5kNQKqXRP1GIEGew IpARO7p2a9EYVt7l3OZY3ddlEm/Z8rTZdZ5w4hT0ReILVZGPecnJWkYHkEtF56sWa4nW EmRBvnljz/CbR3o57ckvbt3w93q6Mno87RJ/UvPszpKsyx+goQyvDc6tDORYORcDMKxG 8Fiw== X-Gm-Message-State: AOAM530RWdsix6EqMyss9Bm+KEipu5g2T6GAwE4blQnlEiwjdgvYOIFd t0gcDf0O0U85o5HR/ja00GA= X-Google-Smtp-Source: ABdhPJw0sQQvuKyj3MhH2tURTRWfwCOPwb3TWSpo1Q0gE/AZG90VlzgGo4rEp/P2JTZ0S1KvBRUhRw== X-Received: by 2002:ac8:5217:: with SMTP id r23mr3092878qtn.236.1632793690061; Mon, 27 Sep 2021 18:48:10 -0700 (PDT) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id q14sm13715443qkl.44.2021.09.27.18.48.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Sep 2021 18:48:09 -0700 (PDT) Subject: Re: [PATCH] Relax condition of (vec_concat:M(vec_select op0 idx0)(vec_select op0 idx1)) to allow different modes between op0 and M, but have same inner mode. To: Richard Biener , Hongtao Liu Cc: Richard Sandiford , liuhongt , GCC Patches , Segher Boessenkool References: <20210910043632.1087666-1-hongtao.liu@intel.com> <26b4306a-b939-becc-3ae8-e5525442f94d@gmail.com> <20210924130657.GB17780@gate.crashing.org> From: Jeff Law Message-ID: Date: Mon, 27 Sep 2021 19:48:06 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-4.0 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, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 28 Sep 2021 01:48:11 -0000 On 9/27/2021 6:07 AM, Richard Biener via Gcc-patches wrote: > On Mon, Sep 27, 2021 at 11:42 AM Hongtao Liu wrote: >> On Fri, Sep 24, 2021 at 9:08 PM Segher Boessenkool >> wrote: >>> On Mon, Sep 13, 2021 at 04:24:13PM +0200, Richard Biener wrote: >>>> On Mon, Sep 13, 2021 at 4:10 PM Jeff Law via Gcc-patches >>>> wrote: >>>>> I'm not convinced that we need the inner mode to match anything. As >>>>> long as the vec_concat's mode is twice the size of the vec_select modes >>>>> and the vec_select mode is <= the mode of its operands ISTM this is >>>>> fine. We might want the modes of the vec_select to match, but I don't >>>>> think that's strictly necessary either, they just need to be the same >>>>> size. ie, we could have somethig like >>>>> >>>>> (vec_concat:V2DF (vec_select:DF (reg:V4DF)) (vec_select:DI (reg:V4DI))) >>>>> >>>>> I'm not sure if that level of generality is useful though. If we want >>>>> the modes of the vec_selects to match I think we could still support >>>>> >>>>> (vec_concat:V2DF (vec_select:DF (reg:V4DF)) (vec_select:DF (reg:V8DF))) >>>>> >>>>> Thoughts? >>>> I think the component or scalar modes of the elements to concat need to match >>>> the component mode of the result. I don't think you example involving >>>> a cat of DF and DI is too useful - but you could use a subreg around the DI >>>> value ;) >>> I agree. >>> >>> If you want to concatenate components of different modes, you should >>> change mode first, using subregs for example. >> I don't really understand. >> >> for >>>>> (vec_concat:V2DF (vec_select:DF (reg:V4DF)) (vec_select:DF (reg:V8DF))) >>>>> >>>>> Thoughts? >> how can it be simplified when reg:V4DF is different from (reg:V8DF) >> to >> (vec_select: (vec_concat:(subreg V8DF (reg:V4DF) 0) (reg:V8DF)) >> (paralle[...]) >> ?, which doesn't look like a simpication. >> >> Similar for >>>>> (vec_concat:V2DF (vec_select:DF (reg:V4DF)) (vec_select:DI (reg:V4DI))) >> here we require rtx_equal_p (XEXP (trueop0, 0), XEXP (trueop1, 0)) so >> vec_concat (vec_select vec_select) can be simplified to just >> vec_select. > Yes, I think your patch is reasonable, I don't understand how we can > intermediately convert here either or how that would help. Agreed.  It was never my intention to hold things up.  I was just curious about whether or not we wanted to relax things even further. Jeff