This is the mail archive of the gcc-bugs@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]

[Bug target/11877] gcc should use xor trick with -Os


------- Additional Comments From kazu at cs dot umass dot edu  2003-12-31 21:19 -------
(set (mem:DI ...) (const_int 0)) is split into two moves in SImode after reload.
We could delay the split until after peephole2.
In peephole2, if a scratch reg is available,
load 0 into it with XOR and then copy that reg to two mem:SI locations.

Reduced to:

void
foo (long long *p)
{
  *p = 0;
}

The reduction from 13 bytes down to 7 bytes sounds impressive.
My proposed solution would still leave two XORs, though.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kazu at cs dot umass dot edu
         AssignedTo|unassigned at gcc dot gnu   |kazu at cs dot umass dot edu
                   |dot org                     |
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11877


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