From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender4-pp-o90.zoho.com (sender4-pp-o90.zoho.com [136.143.188.90]) by sourceware.org (Postfix) with ESMTPS id 71CA8385B1A6; Tue, 13 Dec 2022 21:27:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 71CA8385B1A6 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=zoho.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=zoho.com ARC-Seal: i=1; a=rsa-sha256; t=1670966834; cv=none; d=zohomail.com; s=zohoarc; b=G7DdXvAbl56jIDSnFOHxOW7RUiuJQPGSSRpF64WlUJlM75g1gLMXBUSOU/K16j5+xzot08pnypat2GXgkFWbI05CCjfSUq2nt24MzoWru6R97WS2GS4ePc2UKdR8oIwC8esX/yu5Uqb1ec+KxptPl9oXI+rbHUTGb0ULqDPOfPM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670966834; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=zRHW33JkbruQ1g6EfvcyFMFe2ddg65Uzf//TCvlEAlw=; b=JW3f1XaKuhS1kivetYqkc3LHe6hH6P0DhbY9D1l0ao5rbrMEUXKF5PejcJRWDiIOkZqMMwilEAFgtmYdsqtVljjrJcUoXi+OV3+U+BlJ63Yiq1w94Wo+V2mYRTbMab1S3PGxiWSu3NcdofDjR94S6hOpgeG40StXSfOavontwkY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=bouanto@zoho.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670966834; s=zm2022; d=zoho.com; i=bouanto@zoho.com; h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To; bh=zRHW33JkbruQ1g6EfvcyFMFe2ddg65Uzf//TCvlEAlw=; b=fa8LjqfDHsn01lI57OrKOOX7YFTpcFHI7AgmtmLG1vbbpR3ESn5/S1aqvZT+avd4 QzAzlRdamFYIoJJuTBZY/A1P1qfhtiuwQsfDoPSdMkETt/Br5LftAgLO7FU34u/Z7He Rz3ltnvVFxcTlMVLjUKbZ/D4cMQKO45nNpAhiLAQ= Received: from [192.168.1.174] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1670966834203624.3848370118766; Tue, 13 Dec 2022 13:27:14 -0800 (PST) Message-ID: <641a5a1ab74c5f92962035d32acb64828b17d1cc.camel@zoho.com> Subject: Re: [PATCH] libgccjit: Allow comparing vector types From: Antoni Boucher To: David Malcolm , gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Cc: Guillaume Gomez Date: Tue, 13 Dec 2022 16:27:12 -0500 In-Reply-To: <03070a2e198b1e4a9f85c99bf52ecea567796b32.camel@redhat.com> References: <1aec893b44d81c5558db3c3b2ac8b63e8c456469.camel@zoho.com> <03070a2e198b1e4a9f85c99bf52ecea567796b32.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.2 MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: Thanks! David: you mentioned gcc 10. For now, I only intend to make changes to the next release (13). Is this OK or should I backport all my fixes to all active releases? (I'm not sure what are GCC policies here.) On Tue, 2022-12-13 at 16:24 -0500, David Malcolm wrote: > On Mon, 2022-12-12 at 21:31 -0500, Antoni Boucher via Jit wrote: > > Hi. > > This fixes bug 108078. > > Thanks for the review. >=20 > [...snip...] >=20 > > diff --git a/gcc/jit/jit-recording.h b/gcc/jit/jit-recording.h > > index 5d7c7177cc3..4ec0fff4843 100644 > > --- a/gcc/jit/jit-recording.h > > +++ b/gcc/jit/jit-recording.h > > @@ -806,6 +806,15 @@ public: > > =C2=A0 > > =C2=A0=C2=A0 void replay_into (replayer *) final override; > > =C2=A0 > > +=C2=A0 virtual bool is_same_type_as (type *other) >=20 > This would be better with a "final override" (and without the > "virtual"). >=20 > > +=C2=A0 { > > +=C2=A0=C2=A0=C2=A0 vector_type *other_vec_type =3D other->dyn_cast_vec= tor_type (); > > +=C2=A0=C2=A0=C2=A0 if (other_vec_type =3D=3D NULL) > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return false; > > +=C2=A0=C2=A0=C2=A0 return get_num_units () =3D=3D other_vec_type->get_= num_units () > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 && get_element_type () =3D=3D other_vec= _type->get_element_type > > (); > > +=C2=A0 } > > + >=20 > OK for active branches with that nit fixed (though for gcc 10 you'd > have to spell final and override as "FINAL" and "OVERRIDE" due to > needing to be buildable with a C++98 compiler; not sure if gcc 10's > libgccjit even has vector types though). >=20 > [...snip...] >=20 > Thanks for the patch >=20 > Dave >=20