This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/11877] gcc should use xor trick with -Os
- From: "kazu at cs dot umass dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Dec 2003 21:19:29 -0000
- Subject: [Bug target/11877] gcc should use xor trick with -Os
- References: <20030810154728.11877.debian-gcc@lists.debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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