From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2157 invoked by alias); 27 Mar 2009 17:26:37 -0000 Received: (qmail 456 invoked by uid 48); 27 Mar 2009 17:26:13 -0000 Date: Fri, 27 Mar 2009 17:26:00 -0000 Message-ID: <20090327172613.454.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug middle-end/29274] [4.2/4.3/4.4 Regression] not using mulsidi3 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-03/txt/msg01851.txt.bz2 ------- 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