[Bug rtl-optimization/18560] better optimalization of EOR/MOV block.

pluto at pld-linux dot org gcc-bugzilla@gcc.gnu.org
Thu Feb 10 23:07:00 GMT 2005

------- Additional Comments From pluto at pld-linux dot org  2005-02-10 20:17 -------
(In reply to comment #2) 
> As Andrew pointed out, the merge of the eor and the rotate is now done on 
> mainline in 4.0. 
Hmm, it doesn't work on my gcc. 
# arm-pld-linux-gcc reversing_the_bytes_in_word.c -s -S -O2 
        .file   "reversing_the_bytes_in_word.c" 
        .align  2 
        .global reverse 
        .type   reverse, %function 
        @ args = 0, pretend = 0, frame = 0 
        @ frame_needed = 0, uses_anonymous_args = 0 
        @ link register save eliminated. 
        mov     r3, r0 
        eor     r0, r0, r0, ror #16 
        bic     r0, r0, #16711680 
        mov     r0, r0, lsr #8 
        eor     r0, r0, r3, ror #8 
        @ lr needed for prologue 
        mov     pc, lr 
        .size   reverse, .-reverse 
        .ident  "GCC: (GNU) 4.0.0 20050130 (experimental)" 
> The initial redundant MOV is a register allocation artifact.  
> This particular testcase compiles optimally with the new register allocator: 
Is there a special option I need to set? 



More information about the Gcc-bugs mailing list