re PR target/65456 (powerpc64le autovectorized copy loop missed optimization)
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Thu, 23 Apr 2015 00:21:39 +0000 (00:21 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Thu, 23 Apr 2015 00:21:39 +0000 (00:21 +0000)
commit047b83ff58666092c0fb368d47bbcd75f198a453
tree3f5c3fe44e6d8dd2bbe1d945877428dde4163012
parented4c75f949739fbddb7c80aed8962abb8f9428f9
re PR target/65456 (powerpc64le autovectorized copy loop missed optimization)

[gcc]

2015-04-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/65456
* config/rs6000/rs6000.c (rs6000_option_override_internal):  For
VSX + POWER8, enable TARGET_ALLOW_MOVMISALIGN and
TARGET_EFFICIENT_UNALIGNED_VSX if not selected by command line
option.
(rs6000_builtin_mask_for_load): Return 0 for targets with
efficient unaligned VSX accesses so that the vectorizer will use
direct unaligned loads.
(rs6000_builtin_support_vector_misalignment): Always return true
for targets with efficient unaligned VSX accesses.
(rs6000_builtin_vectorization_cost): Cost of unaligned loads and
stores on targets with efficient unaligned VSX accesses is almost
always the same as the cost of an aligned load or store, so model
it that way.
* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Return 0 for
unaligned vectors if we have efficient unaligned VSX accesses.
* config/rs6000/rs6000.opt (mefficient-unaligned-vector): New
undocumented option.

[gcc/testsuite]

2015-04-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/65456
* gcc.dg/vect/bb-slp-24.c: Exclude test for POWER8.
* gcc.dg/vect/bb-slp-25.c: Likewise.
* gcc.dg/vect/bb-slp-29.c: Likewise.
* gcc.dg/vect/bb-slp-32.c: Replace vect_no_align with
vect_no_align && { ! vect_hw_misalign }.
* gcc.dg/vect/bb-slp-9.c: Likewise.
* gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c: Exclude test for
vect_hw_misalign.
* gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Likewise.
* gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Adjust tests to
account for POWER8, where peeling for alignment is not needed.
* gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c: Replace
vect_no_align with vect_no_align && { ! vect_hw_misalign }.
* gcc.dg.vect.if-cvt-stores-vect-ifcvt-18.c: Likewise.
* gcc.dg/vect/no-scevccp-outer-6-global.c: Likewise.
* gcc.dg/vect/no-scevccp-outer-6.c: Likewise.
* gcc.dg/vect/no-vfa-vect-43.c: Likewise.
* gcc.dg/vect/no-vfa-vect-57.c: Likewise.
* gcc.dg/vect/no-vfa-vect-61.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-1.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-2.c: Likewise.
* gcc.dg/vect/no-vfa-vect-depend-3.c: Likewise.
* gcc.dg/vect/pr16105.c: Likewise.
* gcc.dg/vect/pr20122.c: Likewise.
* gcc.dg/vect/pr33804.c: Likewise.
* gcc.dg/vect/pr33953.c: Likewise.
* gcc.dg/vect/pr56787.c: Likewise.
* gcc.dg/vect/pr58508.c: Likewise.
* gcc.dg/vect/slp-25.c: Likewise.
* gcc.dg/vect/vect-105-bit-array.c: Likewise.
* gcc.dg/vect/vect-105.c: Likewise.
* gcc.dg/vect/vect-27.c: Likewise.
* gcc.dg/vect/vect-29.c: Likewise.
* gcc.dg/vect/vect-33.c: Exclude unaligned access test for
POWER8.
* gcc.dg/vect/vect-42.c: Replace vect_no_align with vect_no_align
&& { ! vect_hw_misalign }.
* gcc.dg/vect/vect-44.c: Likewise.
* gcc.dg/vect/vect-48.c: Likewise.
* gcc.dg/vect/vect-50.c: Likewise.
* gcc.dg/vect/vect-52.c: Likewise.
* gcc.dg/vect/vect-56.c: Likewise.
* gcc.dg/vect/vect-60.c: Likewise.
* gcc.dg/vect/vect-72.c: Likewise.
* gcc.dg/vect/vect-75-big-array.c: Likewise.
* gcc.dg/vect/vect-75.c: Likewise.
* gcc.dg/vect/vect-77-alignchecks.c: Likewise.
* gcc.dg/vect/vect-77-global.c: Likewise.
* gcc.dg/vect/vect-78-alignchecks.c: Likewise.
* gcc.dg/vect/vect-78-global.c: Likewise.
* gcc.dg/vect/vect-93.c: Likewise.
* gcc.dg/vect/vect-95.c: Likewise.
* gcc.dg/vect/vect-96.c: Likewise.
* gcc.dg/vect/vect-cond-1.c: Likewise.
* gcc.dg/vect/vect-cond-3.c: Likewise.
* gcc.dg/vect/vect-cond-4.c: Likewise.
* gcc.dg/vect/vect-cselim-1.c: Likewise.
* gcc.dg/vect/vect-multitypes-1.c: Likewise.
* gcc.dg/vect/vect-multitypes-3.c: Likewise.
* gcc.dg/vect/vect-multitypes-4.c: Likewise.
* gcc.dg/vect/vect-multitypes-6.c: Likewise.
* gcc.dg/vect/vect-nest-cycle-1.c: Likewise.
* gcc.dg/vect/vect-nest-cycle-2.c: Likewise.
* gcc.dg/vect/vect-outer-3a-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-3a.c: Likewise.
* gcc.dg/vect/vect-outer-5.c: Likewise.
* gcc.dg/vect/vect-outer-fir-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-fir-lb-big-array.c: Likewise.
* gcc.dg/vect/vect-outer-fir-lb.c: Likewise.
* gcc.dg/vect/vect-outer-fir.c: Likewise.
* gcc.dg/vect/vect-peel-3.c: Likewise.
* gcc.dg/vect/vect-peel-4.c: Likewise.
* gcc.dg/vect/vect-pre-interact.c: Likewise.
* gcc.target/powerpc/pr65456.c: New test.
* gcc.target/powerpc/vsx-vectorize-2.c: Exclude test for POWER8.
* gcc.target/powerpc/vsx-vectorize-4.c: Likewise.
* gcc.target/powerpc/vsx-vectorize-6.c: Likewise.
* gcc.target/powerpc/vsx-vectorize-7.c: Likewise.
* gfortran.dg/vect/vect-2.f90: Replace vect_no_align with
vect_no_align && { ! vect_hw_misalign }.
* gfortran.dg/vect/vect-3.f90: Likewise.
* gfortran.dg/vect/vect-4.f90: Likewise.
* gfortran.dg/vect/vect-5.f90: Likewise.
* lib/target-supports.exp (check_effective_target_vect_no_align):
Return 1 for POWER8.
(check_effective_target_vect_hw_misalign): Return 1 for POWER8.

From-SVN: r222349
82 files changed:
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/rs6000.h
gcc/config/rs6000/rs6000.opt
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/bb-slp-24.c
gcc/testsuite/gcc.dg/vect/bb-slp-25.c
gcc/testsuite/gcc.dg/vect/bb-slp-29.c
gcc/testsuite/gcc.dg/vect/bb-slp-32.c
gcc/testsuite/gcc.dg/vect/bb-slp-9.c
gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-33.c
gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c
gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c
gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-outer-fir.c
gcc/testsuite/gcc.dg/vect/if-cvt-stores-vect-ifcvt-18.c
gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6-global.c
gcc/testsuite/gcc.dg/vect/no-scevccp-outer-6.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-43.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-57.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-61.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
gcc/testsuite/gcc.dg/vect/pr16105.c
gcc/testsuite/gcc.dg/vect/pr20122.c
gcc/testsuite/gcc.dg/vect/pr33804.c
gcc/testsuite/gcc.dg/vect/pr33953.c
gcc/testsuite/gcc.dg/vect/pr56787.c
gcc/testsuite/gcc.dg/vect/pr58508.c
gcc/testsuite/gcc.dg/vect/slp-25.c
gcc/testsuite/gcc.dg/vect/vect-105-big-array.c
gcc/testsuite/gcc.dg/vect/vect-105.c
gcc/testsuite/gcc.dg/vect/vect-27.c
gcc/testsuite/gcc.dg/vect/vect-29.c
gcc/testsuite/gcc.dg/vect/vect-33.c
gcc/testsuite/gcc.dg/vect/vect-42.c
gcc/testsuite/gcc.dg/vect/vect-44.c
gcc/testsuite/gcc.dg/vect/vect-48.c
gcc/testsuite/gcc.dg/vect/vect-50.c
gcc/testsuite/gcc.dg/vect/vect-52.c
gcc/testsuite/gcc.dg/vect/vect-56.c
gcc/testsuite/gcc.dg/vect/vect-60.c
gcc/testsuite/gcc.dg/vect/vect-72.c
gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
gcc/testsuite/gcc.dg/vect/vect-75.c
gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
gcc/testsuite/gcc.dg/vect/vect-77-global.c
gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
gcc/testsuite/gcc.dg/vect/vect-78-global.c
gcc/testsuite/gcc.dg/vect/vect-93.c
gcc/testsuite/gcc.dg/vect/vect-95.c
gcc/testsuite/gcc.dg/vect/vect-96.c
gcc/testsuite/gcc.dg/vect/vect-cond-1.c
gcc/testsuite/gcc.dg/vect/vect-cond-3.c
gcc/testsuite/gcc.dg/vect/vect-cond-4.c
gcc/testsuite/gcc.dg/vect/vect-cselim-1.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
gcc/testsuite/gcc.dg/vect/vect-nest-cycle-1.c
gcc/testsuite/gcc.dg/vect/vect-nest-cycle-2.c
gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
gcc/testsuite/gcc.dg/vect/vect-outer-5.c
gcc/testsuite/gcc.dg/vect/vect-outer-fir-big-array.c
gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb-big-array.c
gcc/testsuite/gcc.dg/vect/vect-outer-fir-lb.c
gcc/testsuite/gcc.dg/vect/vect-outer-fir.c
gcc/testsuite/gcc.dg/vect/vect-peel-3.c
gcc/testsuite/gcc.dg/vect/vect-peel-4.c
gcc/testsuite/gcc.dg/vect/vect-pre-interact.c
gcc/testsuite/gcc.target/powerpc/pr65456.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/vsx-vectorize-2.c
gcc/testsuite/gcc.target/powerpc/vsx-vectorize-4.c
gcc/testsuite/gcc.target/powerpc/vsx-vectorize-6.c
gcc/testsuite/gcc.target/powerpc/vsx-vectorize-7.c
gcc/testsuite/gfortran.dg/vect/vect-2.f90
gcc/testsuite/gfortran.dg/vect/vect-3.f90
gcc/testsuite/gfortran.dg/vect/vect-4.f90
gcc/testsuite/gfortran.dg/vect/vect-5.f90
gcc/testsuite/lib/target-supports.exp