On 04/24/2013 11:41 AM, Graham Stott wrote:
All
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/
Graham
gcc/ChangeLog
* gensupport.c:: (add_predicate_code) Also exclude SCRATCH from rtx codes
which allow
non-lvalues.
My question would be in what context does it make sense to use a SCRATCH
as a destination?
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
totally different?
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?
jeff