This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH V2 2/8] bpf: new GCC port
On Tue, Aug 20, 2019 at 04:20:03PM +0200, Jose E. Marchesi wrote:
> > + (PLUS ADDR_BASE CONST_INT)
> > + (PLUS CONST_INT ADDR_BASE)
> The second one isn't canonical rtl, so you shouldn't (need to) handle it.
> Please raise a bug if you find a case where it's being generated. :-)
> Oooh, didn't know that, that's actually very handy :)
> Do you know if this is documented anywhere? I don't recall seeing this
> in the internals manual, but maybe I missed it.
@node Insn Canonicalizations
For commutative and comparison operators, a constant is always made the
second operand. If a machine only supports a constant as the second
operand, only patterns that match a constant in the second operand need
The whole section is worth reading :-)