This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RTL gensupport - fix warning when using a match_scratch predicate

On 04/24/2013 11:41 AM, Graham Stott wrote:

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
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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]