[PATCH] Improve {f,g}{char,short,int,long}xor in pr49095.c (PR rtl-optimization/89865)

Jeff Law law@redhat.com
Fri Mar 29 21:07:00 GMT 2019


On 3/29/19 1:47 PM, Jakub Jelinek wrote:
> Hi!
> 
> The following patch improves the last 8 cases (both -m64 and ia32)
> that were using RMW cycle, for xor we actually emit
> new = old ^ other; new != old
> rather than
> new = old ^ other; new != 0 
> and thus the peephole2 needs to recognize that too.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?
> 
> 2019-03-29  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR rtl-optimization/89865
> 	* config/i386/i386.md: Add peepholes for z = x; x ^= y; x != z.
> 
> 	* gcc.target/i386/pr49095.c: Don't expect any RMW sequences.
Ewwww.  But OK.

jeff



More information about the Gcc-patches mailing list