This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29274] [4.2/4.3/4.4 Regression] not using mulsidi3
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Mar 2009 17:26:13 -0000
- Subject: [Bug middle-end/29274] [4.2/4.3/4.4 Regression] not using mulsidi3
- References: <bug-29274-9933@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-03-27 17:26 -------
The issue is that TER does not build large trees for the multiplications as
the factors are used multiple times (and come from memory). Thus the expander
does not see the widened multiplication and appearantly combine / lower-subreg
is not able to optimize this.
I think with expand-from-SSA we could enable this optimization during expand.
Simplified testcase:
long long foo (int i, int j)
{
return (long long)i * (long long)j * (long long)i;
}
because we CSE (long long)i we don't optimize this case. Disabling tree-level
CSE re-enables the optimizations: -fno-tree-fre -fno-tree-pre
-fno-tree-dominator-opts
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|target |middle-end
GCC target triplet|arm-unkown-elf |arm-unkown-elf, i?86-*-*
Keywords| |missed-optimization
Summary|4.1, 4.2 (possibly 4.0?) not|[4.2/4.3/4.4 Regression] not
|using mulsidi3 |using mulsidi3
Target Milestone|--- |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29274