This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/42587] bswap not recognized for memory
- From: "jamborm at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jan 2010 14:07:07 -0000
- Subject: [Bug tree-optimization/42587] bswap not recognized for memory
- References: <bug-42587-7834@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jamborm at gcc dot gnu dot org 2010-01-06 14:07 -------
(In reply to comment #2)
> SRA here again does somthing stupid:
>
As I have already told richi on IRC, if "in.value = value_1(D)" was an
assignment of two unions, it would have loaded the chars from the rhs
and thus make the union unnecessary. But it cannot get the chars from
the RHS as it is now and so uses the union to do the type conversion.
I see no way to avoid this other than a third SRA scan of the entire
function to catch cases like this and not pessimize other situations.
I have put this to the bottom of my TODO list nevertheless, just in
case, but will remove myself from the CC list as the main bug is
something entirely different. Feel free to add me if there is
anything else I should be aware of. Thanks.
--
jamborm at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jamborm at gcc dot gnu dot |
|org |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42587