> -----Original Message----- > From: Richard Henderson [mailto:r...@redhat.com] > Sent: Tuesday, November 22, 2011 9:55 AM > To: Jiangning Liu > Cc: gcc-patches@gcc.gnu.org; 'Richard Guenther' > Subject: Re: [RFC] Use REG_EXPR in back-end (introduced by optimization > to conditional and/or in ARM back-end) > > On 11/21/2011 05:31 PM, Jiangning Liu wrote: > > My question is essentially is "May I really use REG_EXPR in back-end > code?" > > like the patch I gave below? > > I suppose. > > Another alternative is to use BImode for booleans. Dunno how much of > that > you'd be able to gleen from mere rtl expansion or if you'd need boolean > decls to be expanded with BImode.
Hi Richard, The output of expand pass requires the operands must meet the requirement of general_operand for binary operations, i.e. all RTX operations on top level must meet the hardware instruction requirement. Generally for a hardware not directly supporting a single bit logic operation, we can't generate BI mode rtx dest. So if I simply generate BImode for NE in expand pass, like "subreg:SI (ne:BI (reg:SI xxx) (const_int 0)))", there would be an assertion failure due to failing to find an appropriate instruction code to operate on a single bit. This looks like a GCC design level issue. How would you suggest generating a legitimate rtx expression containing BImode? Thanks, -Jiangning > > The later would probably need a target hook. I've often wondered how > much > ia64 would benefit from that too, being able to store bool variables > directly > in predicate registers. > > All of this almost certainly must wait until stage1 opens up again > though... > > > r~