This is the mail archive of the gcc-patches@gcc.gnu.org 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: Canonicalization of compares performed as side-effect operations


> Why is it incorrect?  It's not canonical, sure.  But the cannonical form
> does NOT describe what the instruction does.

Yes, you run into this when you try to be clever with the carry.  For the 
Visium port I kludged around it by using:

  [(set (reg:CCC R_FLAGS)
	(compare:CCC (not:I (match_operand:I 0 "register_operand" "r"))
		     (const_int -1)))]

and recognizing the -1 in SELECT_CC_MODE.  Obviously cumbersome though.

-- 
Eric Botcazou


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