From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 091B0383FF6E for ; Tue, 13 Dec 2022 21:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 091B0383FF6E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670966649; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WE1mJSWSifVq7gLJCWqVSWZ319J4Xbp0Vwux8ottgmE=; b=TOxAUJWepT9YG41GMsIO+x6Fawd88zKtOdP8144WDf7/vNVkhgeUWwymNFrZLVlHKgfXwh n4ruj+Z8mFLBP+ID6JNBq80cz86KDrAyK1g6BUSJy+To9Y8YDNvZuxhBQstAmitRb3VuMd Ult9SCYMx5qotajBA23TwvAwFJ8tl6U= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-378-LWSQhlxqOmunB7yLqPa5rg-1; Tue, 13 Dec 2022 16:24:07 -0500 X-MC-Unique: LWSQhlxqOmunB7yLqPa5rg-1 Received: by mail-ua1-f69.google.com with SMTP id 89-20020a9f26e2000000b004183c5c5b7aso7403422uay.10 for ; Tue, 13 Dec 2022 13:24:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=WE1mJSWSifVq7gLJCWqVSWZ319J4Xbp0Vwux8ottgmE=; b=jlDL9N9RqaR3BT22BndUww3jMrYJECpL0SExiimmCa+/OPaM4lMpgkiVfreq8QUULq AsmkUD2KD5T8ehwjGh3IlkMzP3kyDNrIkxb6TWVc7kVeSPRiE+nrCSJovj75OexgOHo5 j/KmR1f3jMsAbNI+CBL2/VMV33CVfECS3G790kV7Fk8xC0bfg7Y0TceYe6kTaFWRE77E I9G/nFRVly0m09U9JII2WkdM+/Kpa3LfQvPcTqQUorAOPbPknKFwBwPmcA9aUFCDDbrT TT1zx0/PwXu2SLaP1qnpnACd47eYoH3C5JE0KzkZh9eG9wBBwXHq+4YjFmEWh1rEdRH6 iM/Q== X-Gm-Message-State: ANoB5pkHBbSMAjRlSNDd0cm+F5+Htywzq8G0UGqYw+EgvyOLpFHpdEN8 EF5NLYTVLnBs7gTGQHRr3BpmJQsB0IeGdni0yctJFNgj2+W/IOlCiKIpq4g5QnXiEiy6y4sf4k3 t/UKyrH7n6SQRCQThsw== X-Received: by 2002:a05:6102:7a5:b0:3b1:4b76:5b45 with SMTP id x5-20020a05610207a500b003b14b765b45mr11260900vsg.33.1670966647236; Tue, 13 Dec 2022 13:24:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf64CG/Mk+OdQ+Wzys0ZhrHsEd+jUmuk0pNariTt00kB5IJdcroiFUNdSazVmeBA6bR85gzH2Q== X-Received: by 2002:a05:6102:7a5:b0:3b1:4b76:5b45 with SMTP id x5-20020a05610207a500b003b14b765b45mr11260885vsg.33.1670966646957; Tue, 13 Dec 2022 13:24:06 -0800 (PST) Received: from t14s.localdomain (c-73-69-212-193.hsd1.nh.comcast.net. [73.69.212.193]) by smtp.gmail.com with ESMTPSA id u2-20020a37ab02000000b006b615cd8c13sm8353296qke.106.2022.12.13.13.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 13:24:06 -0800 (PST) Message-ID: <03070a2e198b1e4a9f85c99bf52ecea567796b32.camel@redhat.com> Subject: Re: [PATCH] libgccjit: Allow comparing vector types From: David Malcolm To: Antoni Boucher , gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Cc: Guillaume Gomez Date: Tue, 13 Dec 2022 16:24:05 -0500 In-Reply-To: <1aec893b44d81c5558db3c3b2ac8b63e8c456469.camel@zoho.com> References: <1aec893b44d81c5558db3c3b2ac8b63e8c456469.camel@zoho.com> User-Agent: Evolution 3.44.4 (3.44.4-1.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=unavailable 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 Mon, 2022-12-12 at 21:31 -0500, Antoni Boucher via Jit wrote: > Hi. > This fixes bug 108078. > Thanks for the review. [...snip...] > 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: > =20 > void replay_into (replayer *) final override; > =20 > + virtual bool is_same_type_as (type *other) This would be better with a "final override" (and without the "virtual"). > + { > + vector_type *other_vec_type =3D other->dyn_cast_vector_type (); > + if (other_vec_type =3D=3D NULL) > + return false; > + return get_num_units () =3D=3D other_vec_type->get_num_units () > + && get_element_type () =3D=3D other_vec_type->get_element_type (); > + } > + 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). [...snip...] Thanks for the patch Dave