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


On 06/08/2019 18:30, Eric Botcazou wrote:
>> 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.
> 

Interesting.  Does it work for the general case of a reverse subtract,
which I need to handle as wel?


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