The g++.dg/vect/pr36648.cc (a P1 4.3/4.4 regression) test fails on powerpc64: FAIL: g++.dg/vect/pr36648.cc -std=c++98 scan-tree-dump-times vect "vectorized 1 loops" 1 FAIL: g++.dg/vect/pr36648.cc -std=c++98 scan-tree-dump-times vect "vectorizing stmts using SLP" 1 ... The verbose runtest output shows the test is being compiled with the undocumented -mno-allow-movmisalign option (see pr65482): Executing on host: /build/gcc-5.0/gcc/testsuite/g++/../../xg++ -B/build/gcc-5.0/gcc/testsuite/g++/../../ /src/gcc-trunk-git/gcc/testsuite/g++.dg/vect/pr36648.cc ... -O2 -ftree-vectorize -fno-vect-cost-model -maltivec -mvsx -mno-allow-movmisalign -fdump-tree-vect-details ... -o ./pr36648.exe (timeout = 300) The .vect dump shows gcc decides not to vectorize the code because of an (apparently) unsupported unaligned store: $ grep -e vectorized -e vectorizing pr36648.cc.126t.vect /src/gcc-trunk-git/gcc/testsuite/g++.dg/vect/pr36648.cc:9:8: note: === vect_mark_stmts_to_be_vectorized === /src/gcc-trunk-git/gcc/testsuite/g++.dg/vect/pr36648.cc:9:8: note: not vectorized: unsupported unaligned store._14->x /src/gcc-trunk-git/gcc/testsuite/g++.dg/vect/pr36648.cc:18:14: note: vectorized 0 loops in function. The -mno-allow-movmisalign option likely gets added to the command line in check_vect_support_and_set_flags in lib/target-supports.exp. Since the pr36648 regression was about GCC generating incorrect code with -O3 (that led to the program crashing at runtime) and not about it necessarily being able to vectorize it, the use of the option seems questionable. It should be sufficient to verify that the test compiles and runs successfully to completion.
This does not reproduce on current trunk on a POWER8 system, where the -mno-allow-movmisalign option is not present in the options selected by the testsuite machinery. If I add that option by hand, it fails as shown here. Our automated testers show the problem seen here on GCC 5 and GCC 6. These testers run on a POWER7 system. Current trunk also fails on a POWER7 system, where the -mno-allow-movmisalign option is once again present. This is consistent with the purpose of -mallow-movmisalign, which is to allow a code generation pattern that requires ISA 2.07 (POWER8 and above). Without the ability to use these patterns, it isn't reasonable to vectorize this loop on POWER. So we'll need to adjust the testcase to be skipped for POWER when the movmisalign pattern isn't available. I'll look into the best way to represent that tomorrow. Meanwhile, this isn't indicative of a problem, so downgrading the priority.
Author: wschmidt Date: Fri Jan 27 15:59:02 2017 New Revision: 244985 URL: https://gcc.gnu.org/viewcvs?rev=244985&root=gcc&view=rev Log: 2017-01-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/65484 * g++.dg/vect/pr36648.cc: Modify to reflect that the loop is not vectorized on POWER unless hardware misaligned loads are available. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/vect/pr36648.cc
Fixed on trunk so far. Will backport to 5 and 6 if approved after a week or so.
Author: wschmidt Date: Fri Feb 3 19:06:58 2017 New Revision: 245164 URL: https://gcc.gnu.org/viewcvs?rev=245164&root=gcc&view=rev Log: 2017-02-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Backport from mainline 2017-01-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/65484 * g++.dg/vect/pr36648.cc: Modify to reflect that the loop is not vectorized on POWER unless hardware misaligned loads are available. Modified: branches/gcc-5-branch/gcc/testsuite/ChangeLog branches/gcc-5-branch/gcc/testsuite/g++.dg/vect/pr36648.cc
Author: wschmidt Date: Fri Feb 3 19:08:10 2017 New Revision: 245165 URL: https://gcc.gnu.org/viewcvs?rev=245165&root=gcc&view=rev Log: 2017-02-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Backport from mainline 2017-01-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/65484 * g++.dg/vect/pr36648.cc: Modify to reflect that the loop is not vectorized on POWER unless hardware misaligned loads are available. Modified: branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/testsuite/g++.dg/vect/pr36648.cc
Fixed everywhere.