Re: [PATCH] genemit: Handle `const_double_zero' rtx

2021-01-07 Thread Maciej W. Rozycki
On Wed, 6 Jan 2021, Richard Sandiford wrote: > VOIDmode const_doubles should only be used for integers that cannot > be expressed as a sign-extended HOST_WIDE_INT. So (const_double 0 0) > is an invalid rtx in both integer and FP contexts. The updated change makes the VAX and PDP-11 backends sto

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2021-01-06 Thread Richard Sandiford via Gcc-patches
"Maciej W. Rozycki" writes: > On Wed, 16 Dec 2020, Maciej W. Rozycki wrote: > >> > CONST_DOUBLE_ATOF ("0", VOIDmode) seems malformed though, and I'd expect >> > it to assert in REAL_MODE_FORMAT (via the format_helper constructor). >> > I'm not sure the patch is strictly safer than the status quo.

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2021-01-05 Thread Maciej W. Rozycki
On Wed, 16 Dec 2020, Maciej W. Rozycki wrote: > > CONST_DOUBLE_ATOF ("0", VOIDmode) seems malformed though, and I'd expect > > it to assert in REAL_MODE_FORMAT (via the format_helper constructor). > > I'm not sure the patch is strictly safer than the status quo. > > I may have missed that, thoug

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Maciej W. Rozycki
On Wed, 16 Dec 2020, Paul Koning wrote: > > NB the PDP-11 pieces affected here and tripping this assertion are I > > believe dead code, as these insns are only ever produced by splitters and > > do not appear to be referred by their names. > > Right; I gave them names for documentation purpos

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Paul Koning via Gcc-patches
> On Dec 16, 2020, at 6:35 AM, Maciej W. Rozycki wrote: > > ... > NB the PDP-11 pieces affected here and tripping this assertion are I > believe dead code, as these insns are only ever produced by splitters and > do not appear to be referred by their names. Right; I gave them names for do

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Maciej W. Rozycki
On Wed, 16 Dec 2020, Richard Sandiford wrote: > >> Presumably you can't use CONST0_RTX (mode) here?  Assuming that's the > >> case, then this is fine. > > > > Well, `mode' is VOID for simplicity and to match what the middle end > > presents as an operand to the COMPARE operation, as also shown w

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Richard Sandiford via Gcc-patches
"Maciej W. Rozycki" writes: > On Tue, 15 Dec 2020, Jeff Law wrote: > >> > @@ -1942,7 +1942,7 @@ gen_divdf3_cc (rtx operand0 ATTRIBUTE_UN >> >gen_rtx_DIV (DFmode, >> >operand1, >> >operand2), >> > - const0_rtx)), >> > + CONST_DOUBLE_ATOF ("0", VOIDmode))), >> >gen_rtx_SET

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-16 Thread Maciej W. Rozycki
On Tue, 15 Dec 2020, Jeff Law wrote: > > @@ -1942,7 +1942,7 @@ gen_divdf3_cc (rtx operand0 ATTRIBUTE_UN > > gen_rtx_DIV (DFmode, > > operand1, > > operand2), > > - const0_rtx)), > > + CONST_DOUBLE_ATOF ("0", VOIDmode))), > > gen_rtx_SET (operand0, > > gen_rtx_DIV (D

Re: [PATCH] genemit: Handle `const_double_zero' rtx

2020-12-15 Thread Jeff Law via Gcc-patches
On 12/15/20 1:38 PM, Maciej W. Rozycki wrote: > Complement commit 20ab43b5cad6 ("RTL: Add `const_double_zero' syntactic > rtx") and remove a commit c60d0736dff7 ("PDP11: Use `const_double_zero' > to express double zero constant") build regression observed with the > `pdp11-aout' target: > > g

[PATCH] genemit: Handle `const_double_zero' rtx

2020-12-15 Thread Maciej W. Rozycki
Complement commit 20ab43b5cad6 ("RTL: Add `const_double_zero' syntactic rtx") and remove a commit c60d0736dff7 ("PDP11: Use `const_double_zero' to express double zero constant") build regression observed with the `pdp11-aout' target: genemit: Internal error: abort in gen_exp, at genemit.c:202 m