From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id C775A3858D20 for ; Fri, 5 May 2023 06:09:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C775A3858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id C4FDD22645; Fri, 5 May 2023 06:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1683266953; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EjmW19gW3KZ0ZS0vs55hfpUdfHfKbsF+x8Cq/w2CNn8=; b=pTy44tzuUAy/CJgT263pzNQF65neJed7tUUqsAN6GL1EOpBHomTYUKgidkr2R1SObRXH6x sikPXAs4OR3P0ZWe8VenWceWkHQR7KK4YylgnmLgjXipt49UnyQ0v4WtQJhT2Pgdpp9Ktw isc/qfFOAyN1E28S6xDkMSIF6adO4+8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1683266953; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=EjmW19gW3KZ0ZS0vs55hfpUdfHfKbsF+x8Cq/w2CNn8=; b=S9lDYB0lhejD1J0IquAvaEAJ32s6xGRETpmpTEBrMzHsLw9+MPPib9m+2wuIkEe/kePc1k sIHEbdCYO01WMZDA== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id ACC102C141; Fri, 5 May 2023 06:09:13 +0000 (UTC) Date: Fri, 5 May 2023 06:09:13 +0000 (UTC) From: Richard Biener To: "Andre Vieira (lists)" cc: Richard Biener , Richard Sandiford , "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH 1/3] Refactor to allow internal_fn's In-Reply-To: <2d38873e-bd4d-394c-6e8a-e4b1e75678d4@arm.com> Message-ID: References: <51ce8969-3130-452e-092e-f9d91eff2dad@arm.com> <2d38873e-bd4d-394c-6e8a-e4b1e75678d4@arm.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 Thu, 4 May 2023, Andre Vieira (lists) wrote: > > > On 03/05/2023 12:55, Richard Biener wrote: > > On Fri, 28 Apr 2023, Andre Vieira (lists) wrote: > > > >> Hi, > >> > >> I'm posting the patches separately now with ChangeLogs. > >> > >> I made the suggested changes and tried to simplify the code a bit further. > >> Where internal to tree-vect-stmts I changed most functions to use > >> code_helper > >> to avoid having to check at places we didn't need to. I was trying to > >> simplify > >> things further by also modifying supportable_half_widening_operation and > >> supportable_convert_operation but the result of that was that I ended up > >> moving the code to cast to tree code inside them rather than at the call > >> site > >> and it didn't look simpler, so I left those. Though if we did make those > >> changes we'd no longer need to keep around the tc1 variable in > >> vectorizable_conversion... Let me know what you think. > > > > I see that > > > > - else if (CONVERT_EXPR_CODE_P (code) > > + else if (CONVERT_EXPR_CODE_P (code.safe_as_tree_code ()) > > > > is convenient (as much as I dislike safe_as_tree_code). Isn't > > the following > > > > - if (!CONVERT_EXPR_CODE_P (code)) > > + if (!CONVERT_EXPR_CODE_P ((tree_code) code)) > > return false; > For some reason I thought the code could only reach here if code was a tree > code, but I guess if we have an ifn and the modes aren't the same as the > wide_vectype it would fall to this, which for an ifn this would fail. I am > wondering whether it needs to though, the multi-step widening should also work > for ifn's no? We'd need to adapt it, to not use c1, c2 but hi, lo in case of > ifn I guess.. and then use a different optab look up too? > > Though I'm thinking, maybe this should be a follow-up and just not have that > 'feature' for now. The feature being, supporting multi-step conversion for new > widening IFN's. Yes, I think we should address this in a followup if needed. Richard.