This is the mail archive of the
mailing list for the GCC project.
Re: RTL gensupport - fix warning when using a match_scratch predicate
- From: Jeff Law <law at redhat dot com>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 24 Apr 2013 14:59:32 -0600
- Subject: Re: RTL gensupport - fix warning when using a match_scratch predicate
- References: <1366825269 dot 37866 dot YahooMailNeo at web87402 dot mail dot ir2 dot yahoo dot com>
On 04/24/2013 11:41 AM, Graham Stott wrote:
My question would be in what context does it make sense to use a SCRATCH
as a destination?
Currently using the match_scratch predicate on a destination operand will trigger the warning
"warning: destination operand 0 allows non-lvalue",
This happends because add_predicate_code() will set the pred->allows_non_lvalue when
it encounters a SCRATCH rtx code which subsequently triggers the above genrecog warning/
* gensupport.c:: (add_predicate_code) Also exclude SCRATCH from rtx codes which allow
Do you have a multi-output insn where you need to allocate a reg for one
of the outputs, but you never use that output value? Or is it something
SCRATCH as an rtx code is painfully under-documented. Though I think
treating it just like a REG in add_predicate_code probably makes sense.
Approved. Graham, do you still have write access to the repo?