From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender3-pp-o97.zoho.com (sender3-pp-o97.zoho.com [136.143.184.97]) by sourceware.org (Postfix) with ESMTPS id 6FAEA38319FA; Tue, 22 Aug 2023 15:26:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FAEA38319FA 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=1692717970; cv=none; d=zohomail.com; s=zohoarc; b=FfsAB5kw74PlgsHp7gTHjTtGkhD4auVVA7DFOIZxmneEldCCi1ujgIpUQWrVvj7fnjBAsW/7O77duU3IqI/2lWKLWhfyirc4o0x3h/4FPE/O/LhESNTBJ2qAB0NgzPFwuwWWPOUciVn0PtzpOsA6iNh4g9t6lEH5mQpCBaxjlqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1692717970; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=ubv7cSKiT5AK2ThFtJR9GP+4geQdOwcVgZH8xnasEYM=; b=jgDTAktg9IHYvqmItEPwR9crfeLT2ALt9glVLU7xddXX8PyJ6QVfGhALHlqrIzx7FJTfA0NSQkn/XNmPCyr8R2DyyNO3XkuWGp99eeMlt1OgaYT5owDrG7hkmylPQ8JGlHt44xFpB8rT5mfhP79taQEbzzMKmRcBYIbhBe4/e8o= 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=1692717970; 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:Feedback-ID:Message-Id:Reply-To; bh=ubv7cSKiT5AK2ThFtJR9GP+4geQdOwcVgZH8xnasEYM=; b=eRceOJ6Lgp+P0hoUKzp73Q7kwuqJ9ZJkNBssJWy+MyyNYtrc4WwXpJLhAaz/F+ky Q0kEwunkgX+yAVJi8Ru81EjT8K5wQQYThQ02hs3ozmR7+QthpTrZrgjGAFyI6kWNaOz zrbJRa/fbBswfdvGEk6h3ui9EbYyvIH+uaNlAcPA= Received: from [192.168.1.172] (38.87.11.6 [38.87.11.6]) by mx.zohomail.com with SMTPS id 1692717969886287.4817955100443; Tue, 22 Aug 2023 08:26:09 -0700 (PDT) Message-ID: Subject: Re: [PATCH] libgccjit: Add support for `restrict` attribute on function parameters From: Antoni Boucher To: Guillaume Gomez , David Malcolm Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Date: Tue, 22 Aug 2023 11:26:08 -0400 In-Reply-To: References: <059ffebd230df2dbbac3f138ec85016bb7a7306a.camel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 Feedback-ID: rr080112285b5e1c18ed40349a51cba7f20000f45f699df8c80ea1f07dbbc6e6c0fb4dc395cf5b8d4342ad0828:zu08011226e5b7f33d1f6b3039b4393c210000b0d95ce99abd8b8cd76bb3c879cdb8b3f757cb8bedefce77:rf080112329ee8b7ea581d84542718c2690000c451235934c6ccf562de6cfce5a4c6e707a4f42fc4aebcbef4a8609dafddfe06fc08c0e5:ZohoMail 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: Since the tests in the PR for rustc_codegen_gcc (https://github.com/rust-lang/rustc_codegen_gcc/pull/312) currently fails, let's wait a bit before merging the patch, in case it would need some fixes. On Thu, 2023-08-17 at 20:09 +0200, Guillaume Gomez via Jit wrote: > Quick question: do you plan to make the merge or should I ask Antoni? >=20 > Le jeu. 17 ao=C3=BBt 2023 =C3=A0 17:59, Guillaume Gomez > > a =C3=A9crit : >=20 > > Thanks for the review! > >=20 > > Le jeu. 17 ao=C3=BBt 2023 =C3=A0 17:50, David Malcolm a > > =C3=A9crit > > : > > >=20 > > > On Thu, 2023-08-17 at 17:41 +0200, Guillaume Gomez wrote: > > > > And now I just discovered that a lot of commits from Antoni's > > > > fork > > > > haven't been sent upstream which is why the ABI count is so > > > > high in > > > > his repository. Fixed that as well. > > >=20 > > > Thanks for the updated patch; I was about to comment on that. > > >=20 > > > This version is good for gcc trunk. > > >=20 > > > Dave > > >=20 > > > >=20 > > > > Le jeu. 17 ao=C3=BBt 2023 =C3=A0 17:26, Guillaume Gomez > > > > a =C3=A9crit : > > > > >=20 > > > > > Antoni spot a typo I made: > > > > >=20 > > > > > I added `LIBGCCJIT_HAVE_gcc_jit_type_get_size` instead of > > > > > `LIBGCCJIT_HAVE_gcc_jit_type_get_restrict`. Fixed in this > > > > > patch, > > > > > sorry > > > > > for the noise. > > > > >=20 > > > > > Le jeu. 17 ao=C3=BBt 2023 =C3=A0 11:30, Guillaume Gomez > > > > > a =C3=A9crit : > > > > > >=20 > > > > > > Hi Dave, > > > > > >=20 > > > > > > > What kind of testing has the patch had? (e.g. did you run > > > > > > > "make > > > > > > > check- > > > > > > > jit" ?=C2=A0 Has this been in use on real Rust code?) > > > > > >=20 > > > > > > I tested it as Rust backend directly on this code: > > > > > >=20 > > > > > > ``` > > > > > > pub fn foo(a: &mut i32, b: &mut i32, c: &i32) { > > > > > > =C2=A0=C2=A0=C2=A0 *a +=3D *c; > > > > > > =C2=A0=C2=A0=C2=A0 *b +=3D *c; > > > > > > } > > > > > > ``` > > > > > >=20 > > > > > > I ran it with `rustc` (and the GCC backend) with the > > > > > > following > > > > > > flags: > > > > > > `-C link-args=3D-lc --emit=3Dasm -O --crate-type=3Dlib` which > > > > > > gave the > > > > > > diff > > > > > > you can see in the attached file. Explanations: the diff on > > > > > > the > > > > > > right > > > > > > has the `__restrict__` attribute used whereas on the left > > > > > > it is > > > > > > the > > > > > > current version where we don't handle it. > > > > > >=20 > > > > > > As for C testing, I used this code: > > > > > >=20 > > > > > > ``` > > > > > > void t(int *__restrict__ a, int *__restrict__ b, char > > > > > > *__restrict__ c) { > > > > > > =C2=A0=C2=A0=C2=A0 *a +=3D *c; > > > > > > =C2=A0=C2=A0=C2=A0 *b +=3D *c; > > > > > > } > > > > > > ``` > > > > > >=20 > > > > > > (without the `__restrict__` of course when I need to have a > > > > > > witness > > > > > > ASM). I attached the diff as well, this time the file with > > > > > > the > > > > > > use of > > > > > > `__restrict__` in on the left. I compiled with the > > > > > > following > > > > > > flags: > > > > > > `-S -O3`. > > > > > >=20 > > > > > > > Please add a feature macro: > > > > > > > #define LIBGCCJIT_HAVE_gcc_jit_type_get_restrict > > > > > > > (see the similar ones in the header). > > > > > >=20 > > > > > > I added `LIBGCCJIT_HAVE_gcc_jit_type_get_size` and extended > > > > > > the > > > > > > documentation as well to mention the ABI change. > > > > > >=20 > > > > > > > Please add a new ABI tag (LIBGCCJIT_ABI_25 ?), rather > > > > > > > than > > > > > > > adding this > > > > > > > to ABI_0. > > > > > >=20 > > > > > > I added `LIBGCCJIT_ABI_34` as `LIBGCCJIT_ABI_33` was the > > > > > > last > > > > > > one. > > > > > >=20 > > > > > > > This refers to a "cold attribute"; is this a vestige of a > > > > > > > copy- > > > > > > > and- > > > > > > > paste from a different test case? > > > > > >=20 > > > > > > It is a vestige indeed... Missed this one. > > > > > >=20 > > > > > > > I see that the test scans the generated assembler.=C2=A0 Does > > > > > > > the > > > > > > > test > > > > > > > actually verify that restrict has an effect, or was that > > > > > > > another > > > > > > > vestige from a different test case? > > > > > >=20 > > > > > > No, this time it's what I wanted. Please see the C diff I > > > > > > provided > > > > > > above to see that the ASM has a small diff that allowed me > > > > > > to > > > > > > confirm > > > > > > that the `__restrict__` attribute was correctly set. > > > > > >=20 > > > > > > > If this test is meant to run at -O3 and thus can't be > > > > > > > part of > > > > > > > test- > > > > > > > combination.c, please add a comment about it to > > > > > > > gcc/testsuite/jit.dg/all-non-failing-tests.h (in the > > > > > > > alphabetical > > > > > > > place). > > > > > >=20 > > > > > > Below `-O3`, this ASM difference doesn't appear > > > > > > unfortunately. > > > > > >=20 > > > > > > > The patch also needs to add documentation for the new > > > > > > > entrypoint (in > > > > > > > topics/types.rst), and for the new ABI tag (in > > > > > > > topics/compatibility.rst). > > > > > >=20 > > > > > > Added! > > > > > >=20 > > > > > > > Thanks again for the patch; hope the above is > > > > > > > constructive > > > > > >=20 > > > > > > It was incredibly useful! Thanks for taking time to writing > > > > > > down > > > > > > the > > > > > > explanations. > > > > > >=20 > > > > > > The new patch is attached to this email. > > > > > >=20 > > > > > > Cordially. > > > > > >=20 > > > > > > Le jeu. 17 ao=C3=BBt 2023 =C3=A0 01:06, David Malcolm > > > > > > > > > > > > a =C3=A9crit : > > > > > > >=20 > > > > > > > On Wed, 2023-08-16 at 22:06 +0200, Guillaume Gomez via > > > > > > > Jit > > > > > > > wrote: > > > > > > > > My apologies, forgot to run the commit checkers. Here's > > > > > > > > the > > > > > > > > commit > > > > > > > > with the errors fixed. > > > > > > > >=20 > > > > > > > > Le mer. 16 ao=C3=BBt 2023 =C3=A0 18:32, Guillaume Gomez > > > > > > > > a =C3=A9crit : > > > > > > > > >=20 > > > > > > > > > Hi, > > > > > > >=20 > > > > > > > Hi Guillaume, thanks for the patch. > > > > > > >=20 > > > > > > > > >=20 > > > > > > > > > This patch adds the possibility to specify the > > > > > > > > > __restrict__ > > > > > > > > > attribute > > > > > > > > > for function parameters. It is used by the Rust GCC > > > > > > > > > backend. > > > > > > >=20 > > > > > > > What kind of testing has the patch had? (e.g. did you run > > > > > > > "make > > > > > > > check- > > > > > > > jit" ?=C2=A0 Has this been in use on real Rust code?) > > > > > > >=20 > > > > > > > Overall, this patch looks close to being ready, but some > > > > > > > nits > > > > > > > below... > > > > > > >=20 > > > > > > > [...] > > > > > > >=20 > > > > > > > > diff --git a/gcc/jit/libgccjit.h b/gcc/jit/libgccjit.h > > > > > > > > index 60eaf39bff6..2e0d08a06d8 100644 > > > > > > > > --- a/gcc/jit/libgccjit.h > > > > > > > > +++ b/gcc/jit/libgccjit.h > > > > > > > > @@ -635,6 +635,10 @@ gcc_jit_type_get_const > > > > > > > > (gcc_jit_type > > > > > > > > *type); > > > > > > > > =C2=A0extern gcc_jit_type * > > > > > > > > =C2=A0gcc_jit_type_get_volatile (gcc_jit_type *type); > > > > > > > >=20 > > > > > > > > +/* Given type "T", get type "restrict T".=C2=A0 */ > > > > > > > > +extern gcc_jit_type * > > > > > > > > +gcc_jit_type_get_restrict (gcc_jit_type *type); > > > > > > > > + > > > > > > > > =C2=A0#define LIBGCCJIT_HAVE_SIZED_INTEGERS > > > > > > > >=20 > > > > > > > > =C2=A0/* Given types LTYPE and RTYPE, return non-zero if > > > > > > > > they are > > > > > > > compatible. > > > > > > >=20 > > > > > > > Please add a feature macro: > > > > > > > #define LIBGCCJIT_HAVE_gcc_jit_type_get_restrict > > > > > > > (see the similar ones in the header). > > > > > > >=20 > > > > > > > > diff --git a/gcc/jit/libgccjit.map > > > > > > > > b/gcc/jit/libgccjit.map > > > > > > > > index e52de0057a5..b7289b13845 100644 > > > > > > > > --- a/gcc/jit/libgccjit.map > > > > > > > > +++ b/gcc/jit/libgccjit.map > > > > > > > > @@ -104,6 +104,7 @@ LIBGCCJIT_ABI_0 > > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type_as_object; > > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type_get_const; > > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type_get_pointer; > > > > > > > > +=C2=A0=C2=A0=C2=A0 gcc_jit_type_get_restrict; > > > > > > > > =C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type_get_volatile; > > > > > > >=20 > > > > > > > Please add a new ABI tag (LIBGCCJIT_ABI_25 ?), rather > > > > > > > than > > > > > > > adding this > > > > > > > to ABI_0. > > > > > > >=20 > > > > > > > > diff --git a/gcc/testsuite/jit.dg/test-restrict.c > > > > > > > b/gcc/testsuite/jit.dg/test-restrict.c > > > > > > > > new file mode 100644 > > > > > > > > index 00000000000..4c8c4407f91 > > > > > > > > --- /dev/null > > > > > > > > +++ b/gcc/testsuite/jit.dg/test-restrict.c > > > > > > > > @@ -0,0 +1,77 @@ > > > > > > > > +/* { dg-do compile { target x86_64-*-* } } */ > > > > > > > > + > > > > > > > > +#include > > > > > > > > +#include > > > > > > > > + > > > > > > > > +#include "libgccjit.h" > > > > > > > > + > > > > > > > > +/* We don't want set_options() in harness.h to set -O3 > > > > > > > > to > > > > > > > > see that > > > > > > > the cold > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 attribute affects the optim= izations. */ > > > > > > >=20 > > > > > > > This refers to a "cold attribute"; is this a vestige of a > > > > > > > copy- > > > > > > > and- > > > > > > > paste from a different test case? > > > > > > >=20 > > > > > > > I see that the test scans the generated assembler.=C2=A0 Does > > > > > > > the > > > > > > > test > > > > > > > actually verify that restrict has an effect, or was that > > > > > > > another > > > > > > > vestige from a different test case? > > > > > > >=20 > > > > > > > > +#define TEST_ESCHEWS_SET_OPTIONS > > > > > > > > +static void set_options (gcc_jit_context *ctxt, const > > > > > > > > char > > > > > > > > *argv0) > > > > > > > > +{ > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 // Set "-O3". > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_context_set_int_option(ct= xt, > > > > > > > GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL, 3); > > > > > > > > +} > > > > > > > > + > > > > > > > > +#define TEST_COMPILING_TO_FILE > > > > > > > > +#define OUTPUT_KIND=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 GCC_JIT_= OUTPUT_KIND_ASSEMBLER > > > > > > > > +#define OUTPUT_FILENAME=C2=A0 "output-of-test-restrict.c.s= " > > > > > > > > +#include "harness.h" > > > > > > > > + > > > > > > > > +void > > > > > > > > +create_code (gcc_jit_context *ctxt, void *user_data) > > > > > > > > +{ > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 /* Let's try to inject the equiva= lent of: > > > > > > > > +void t(int *__restrict__ a, int *__restrict__ b, char > > > > > > > > *__restrict__ > > > > > > > c) { > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 *a +=3D *c; > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 *b +=3D *c; > > > > > > > > +} > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 */ > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type *int_type =3D > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_context_get_type (ctxt, > > > > > > > > GCC_JIT_TYPE_INT); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type *pint_type =3D > > > > > > > > gcc_jit_type_get_pointer(int_type); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type *pint_restrict_type = =3D > > > > > > > gcc_jit_type_get_restrict(pint_type); > > > > > > > > + > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_type *void_type =3D > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_context_get_type (ctxt, > > > > > > > > GCC_JIT_TYPE_VOID); > > > > > > > > + > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_param *a =3D > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_context_new_param (ctxt, NULL, > > > > > > > pint_restrict_type, "a"); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_param *b =3D > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_context_new_param (ctxt, NULL, > > > > > > > pint_restrict_type, "b"); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_param *c =3D > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_context_new_param (ctxt, NULL, > > > > > > > pint_restrict_type, "c"); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_param *params[3] =3D {a, = b, c}; > > > > > > > > + > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_function *func_t =3D > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_context_new_function (ctxt, NULL, > > > > > > > > + > > > > > > > > GCC_JIT_FUNCTION_EXPORTED, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 void_type, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 "t", > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 3, params, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 0); > > > > > > > > + > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_block *block =3D gcc_jit_= function_new_block > > > > > > > > (func_t, > > > > > > > NULL); > > > > > > > > + > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 /* *a +=3D *c; */ > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_block_add_assignment_op ( > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 block, NULL, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_rvalue_dereference > > > > > > > > (gcc_jit_param_as_rvalue > > > > > > > (a), NULL), > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 GCC_JIT_BINARY_OP_PLUS, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_lvalue_as_rvalue ( > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_rva= lue_dereference > > > > > > > (gcc_jit_param_as_rvalue (c), NULL))); > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 /* *b +=3D *c; */ > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_block_add_assignment_op ( > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 block, NULL, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_rvalue_dereference > > > > > > > > (gcc_jit_param_as_rvalue > > > > > > > (b), NULL), > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 GCC_JIT_BINARY_OP_PLUS, > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 gcc_jit_lvalue_as_rvalue ( > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_rva= lue_dereference > > > > > > > (gcc_jit_param_as_rvalue (c), NULL))); > > > > > > > > + > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 gcc_jit_block_end_with_void_retur= n (block, NULL); > > > > > > > > +} > > > > > > > > + > > > > > > > > +/* { dg-final { jit-verify-output-file-was-created "" > > > > > > > > } } */ > > > > > > > > +/* { dg-final { jit-verify-assembler-output "addl=C2=A0=C2= =A0=C2=A0 > > > > > > > > %eax, > > > > > > > > (%rdi) > > > > > > > > +=C2=A0=C2=A0=C2=A0=C2=A0 addl=C2=A0=C2=A0=C2=A0 %eax, (%rs= i)" } } */ > > > > > > > > -- > > > > > > > > 2.34.1 > > > > > > > >=20 > > > > > > >=20 > > > > > > > If this test is meant to run at -O3 and thus can't be > > > > > > > part of > > > > > > > test- > > > > > > > combination.c, please add a comment about it to > > > > > > > gcc/testsuite/jit.dg/all-non-failing-tests.h (in the > > > > > > > alphabetical > > > > > > > place). > > > > > > >=20 > > > > > > > The patch also needs to add documentation for the new > > > > > > > entrypoint (in > > > > > > > topics/types.rst), and for the new ABI tag (in > > > > > > > topics/compatibility.rst). > > > > > > >=20 > > > > > > >=20 > > > > > > > Thanks again for the patch; hope the above is > > > > > > > constructive > > > > > > > Dave > > > > > > >=20 > > >=20 > >=20