This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/34522] inefficient code for long long multiply when only low bits are needed
- From: "bonzini at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2008 12:51:05 -0000
- Subject: [Bug rtl-optimization/34522] inefficient code for long long multiply when only low bits are needed
- References: <bug-34522-7849@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from bonzini at gnu dot org 2008-03-12 12:50 -------
The expand patch does not bootstrap, even with the tweaks Jakub suggested.
I'm also hesitant to fold it on the tree level because it's actually undefined
code unless -fwrapv. For example if a = b = 65536LL,
(int) a * (int) b = undefined
(int) (a * b) = (int) (1LL << 32) = 0
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34522