This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/53773] New: Vectorizer generates non-canonical multiplies
- From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Jun 2012 22:16:33 +0000
- Subject: [Bug tree-optimization/53773] New: Vectorizer generates non-canonical multiplies
- Auto-submitted: auto-generated
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