[Bug target/65456] powerpc64le autovectorized copy loop missed optimization

wschmidt at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 23 00:22:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65456

--- Comment #17 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Author: wschmidt
Date: Thu Apr 23 00:21:39 2015
New Revision: 222349

URL: https://gcc.gnu.org/viewcvs?rev=222349&root=gcc&view=rev
Log:
[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.


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



More information about the Gcc-bugs mailing list