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 optimization/4079] unnecessary register move on simple code


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-29 05:32 -------
Using unions make the code not use a "mv" instruction:
unsigned mulh(unsigned a, unsigned b)
{
    union a{
    unsigned long long ull;
    unsigned long ul[2];
    }ullul;
    ullul.ull = ((unsigned long long)a * (unsigned long long)b);
    return ullul.ul[1];
}

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-11-28 07:53:38         |2004-03-29 05:32:12
               date|                            |


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


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