Destructive comparison

Jim Wilson wilson@codesourcery.com
Sun May 17 18:28:00 GMT 2009


Michael Hope wrote:
>  * Using a define_insn to mark it as both a destructive xor and
> compare in parallel, such as:

When a compare is in a parallel, the compare must be the first 
operation.  You have it second.  This kind of pattern should work.  You 
can find many examples of it in the sparc.md file for instance.  Of 
course, in this case, they aren't generated at RTL generation time. 
They are generated at combine time.  Still, I'd expect this to work, 
though there might be some early RTL optimization passes that are not 
prepared to handle it.

See for instance the cmp_cc_xor_not_set pattern in the sparc.md file, 
which is similar to what you want.

Jim



More information about the Gcc mailing list