On Mon, Feb 25, 2019 at 09:25:19AM +0000, Kyrill Tkachov wrote:
> > --- gcc/config/arm/vfp.md.jj    2019-02-18 20:48:32.642732323 +0100
> > +++ gcc/config/arm/vfp.md       2019-02-22 00:37:36.730795663 +0100
> > @@ -871,14 +871,15 @@ (define_insn_and_split "*negdf2_vfp"
> >    if (REGNO (operands[0]) == REGNO (operands[1]))
> >      {
> >        operands[0] = gen_highpart (SImode, operands[0]);
> > -      operands[1] = gen_rtx_XOR (SImode, operands[0], GEN_INT
> > (0x80000000));
> > +      operands[1] = gen_rtx_XOR (SImode, operands[0],
> > +                                GEN_INT (HOST_WIDE_INT_C (-0x80000000)));
> 
> 
> const_int generation in RTL always subtly confuses me :(
> 
> So why is 0x80000000 now -0x80000000? Shouldn't we be using
> trunc_int_for_mode?

We surely can, it will be tiny bit slower though.
HOST_WIDE_INT_C (-0x80000000) is basically inlining of what
trunc_int_for_mode (0x80000000, SImode) will do.

Or we could use gen_int_mode (0x80000000, SImode); instead of
the whole GEN_INT (HOST_WIDE_INT_C (-0x80000000)).

Whatever you prefer.

        Jakub

Reply via email to