From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22480 invoked by alias); 25 Jun 2012 22:16:48 -0000 Received: (qmail 22462 invoked by uid 22791); 25 Jun 2012 22:16:47 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jun 2012 22:16:34 +0000 From: "wschmidt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/53773] New: Vectorizer generates non-canonical multiplies Date: Mon, 25 Jun 2012 22:16:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wschmidt at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-06/txt/msg01689.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53773 Bug #: 53773 Summary: Vectorizer generates non-canonical multiplies Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: wschmidt@gcc.gnu.org CC: bergner@vnet.ibm.com, rguenther@suse.de There are two tests in the regression testsuite for which the vectorizer generates GIMPLE multiplies that are not canonical. Specifically, they generate multiplies where rhs1 is a constant and rhs2 is an SSA name. The two tests are: (1) gcc.dg/vect/pr50451.c (2) gfortran.dg/pr17143.f90 For (1), the generated GIMPLE includes: integral_7 = 10 * integral_17; ... decimal_8 = 10 * decimal_18; For (2): i.3_3 = 2 * prephitmp.9_23; Probably best just to run these tests from the test suite to reproduce, but here are the commands I used. Example invocation for (1): /home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/gcc/xgcc -B/home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/gcc/ /home/wschmidt/gcc/gcc-mainline-slsrpt1a/gcc/testsuite/gcc.dg/vect/pr50451.c -fno-diagnostics-show-caret -flto -maltivec -mvsx -mno-allow-movmisalign -ftree-vectorize -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details -S -m64 -o pr50451.s Example invocation for (2): /home/wschmidt/gcc/install/gcc-mainline-slsrpt1a-debug/bin/gfortran -B/home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/gcc/testsuite/gfortran3/../../ -B/home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/powerpc64-linux/32/libgfortran/ /home/wschmidt/gcc/gcc-mainline-slsrpt1a/gcc/testsuite/gfortran.dg/pr17143.f90 -fno-diagnostics-show-caret -O3 -fomit-frame-pointer -std=legacy -B/home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/powerpc64-linux/32/libgfortran/.libs -L/home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/powerpc64-linux/32/libgfortran/.libs -L/home/wschmidt/gcc/build/gcc-mainline-slsrpt1a-debug/powerpc64-linux/32/libgfortran/.libs -lm -m32 -o ./pr17143.exe