[2/2,vect] Make vect-epilogues-nomask=1 default

Message ID 8be5d0a6-e14b-42af-6b46-738e5b760212@arm.com
State New
Headers show
Series
  • Improve vectorization of epilogues
Related show

Commit Message

Andre Vieira (lists) Aug. 23, 2019, 4:50 p.m.
Hi,

In this patch I turn epilogue vectorization on by default.  I had to 
make changes to the tests since the vectorizer dumps now show the 
analysis for both the first and second vectorization. This required 
checks like 'scan-tree-dump-times' to be raised to meet the new numbers. 
For some tests I simply disable the epilogue vectorization, because 
otherwise it makes it very difficult to test for the specific conditions 
the test was meant for.

Bootstrapped and regression tested on aarch64 and x86_64.

I am not sure whether this is the right thing to do, we might want to 
enable this only for certain targets and if so, I also don't know how to 
tackle the testing issue where all the tests that check the number of 
times a dump mentions something will now depend on whether that test 
enables epilogue vectorization or not. I was trying to avoid disabling 
the option for all tests, since if we do that then we aren't really 
testing it. Maybe we ought to enable the option for all tests, 
regardless of the targets default. For testing purposes.

Thoughts on this?

Cheers,
Andre

gcc/ChangeLog:

2019-08-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>

          * params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.

gcc/testsuite/ChangeLog:

2019-08-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>

          * gcc.dg/vect/fast-math-vect-call-1.c: Raise count for tree 
dump scans.
          * gcc.dg/vect/no-fast-math-vect16.c: Likewise.
          * gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Likewise.
          * gcc.dg/vect/no-scevccp-outer-7.c: Likewise.
          * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.
          * gcc.dg/vect/no-section-anchors-vect-31.c: Likewise.
          * gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.
          * gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.
          * gcc.dg/vect/no-section-anchors-vect-68.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/no-vfa-vect-dv-2.c: Likewise.
          * gcc.dg/vect/pr33804.c: Likewise.
          * gcc.dg/vect/pr53773.c: Likewise.
          * gcc.dg/vect/pr65947-1.c: Likewise.
          * gcc.dg/vect/pr65947-13.c: Likewise.
          * gcc.dg/vect/pr65947-14.c: Likewise.
          * gcc.dg/vect/pr65947-4.c: Likewise.
          * gcc.dg/vect/pr80631-1.c: Likewise.
          * gcc.dg/vect/pr80631-2.c: Likewise.
          * gcc.dg/vect/slp-25.c: Likewise.
          * gcc.dg/vect/slp-reduc-2.c: Likewise.
          * gcc.dg/vect/slp-reduc-5.c: Likewise.
          * gcc.dg/vect/slp-reduc-6.c: Likewise.
          * gcc.dg/vect/slp-widen-mult-half.c: Likewise.
          * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.
          * gcc.dg/vect/vect-103.c: Likewise.
          * gcc.dg/vect/vect-109.c: Likewise.
          * gcc.dg/vect/vect-119.c: Likewise.
          * gcc.dg/vect/vect-26.c: Likewise.
          * gcc.dg/vect/vect-27.c: Likewise.
          * gcc.dg/vect/vect-29.c: Likewise.
          * gcc.dg/vect/vect-42.c: Likewise.
          * 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-54.c: Likewise.
          * gcc.dg/vect/vect-56.c: Likewise.
          * gcc.dg/vect/vect-58.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-89-big-array.c: Likewise.
          * gcc.dg/vect/vect-89.c: Likewise.
          * gcc.dg/vect/vect-91.c: Likewise.
          * gcc.dg/vect/vect-92.c: Likewise.
          * gcc.dg/vect/vect-96.c: Likewise.
          * gcc.dg/vect/vect-alias-check-5.c: Likewise.
          * gcc.dg/vect/vect-live-2.c: Likewise.
          * gcc.dg/vect/vect-live-slp-1.c: Likewise.
          * gcc.dg/vect/vect-live-slp-3.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-outer-3a-big-array.c: Likewise.
          * gcc.dg/vect/vect-outer-3a.c: Likewise.
          * gcc.dg/vect/vect-outer-4.c: Likewise.
          * gcc.dg/vect/vect-outer-4c-big-array.c: Likewise.
          * gcc.dg/vect/vect-outer-6.c: Likewise.
          * gcc.dg/vect/vect-peel-1.c: Likewise.
          * gcc.dg/vect/vect-peel-2.c: Likewise.
          * gcc.dg/vect/vect-peel-3.c: Likewise.
          * gcc.dg/vect/vect-peel-4.c: Likewise.
          * gcc.dg/vect/vect-reduc-6.c: Likewise.
          * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.
          * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.
          * gcc.dg/vect/vect-reduc-dot-u16b.c: Likewise.
          * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
          * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
          * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.
          * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.
          * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.
          * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.
          * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.
          * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.
          * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.
          * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.
          * gcc.dg/vect/vect-widen-mult-half.c: Likewise.
          * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.
          * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Likewise.
          * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
          * gfortran.dg/vect/vect-4.f90: Likewise.
          * gcc.dg/vect/pr60092-2.c: Disable epilogue vectorization.
          * gcc.dg/vect/pr60092.c: Likewise.
          * gcc.dg/vect/slp-reduc-sad-2.c: Likewise.
          * gcc.dg/vect/vect-46.c: Likewise.
          * gcc.dg/vect/vect-86.c: Likewise.
          * gcc.dg/vect/vect-live-1.c: Likewise.
          * gcc.dg/vect/vect-live-3.c: Likewise.
          * gcc.dg/vect/vect-live-4.c: Likewise.
          * gcc.dg/vect/vect-live-slp-2.c: Likewise.
          * gcc.dg/vect/vect-multitypes-6.c: Likewise.
          * gcc.target/aarch64/sve/reduc_strict_3.c: Likewise.
          * gcc.target/aarch64/sve/spill_2.c: Likewise.
          * gcc.target/aarch64/sve/spill_6.c: Likewise.
          * gcc.target/i386/avx-vzeroupper-19.c: Likewise.
          * gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.
          * gcc.target/i386/avx512f-gather-2.c: Likewise.
          * gcc.target/i386/avx512f-gather-5.c: Likewise.
          * gcc.target/i386/avx512f-simd-1.c: Likewise.
          * gcc.target/i386/l_fma_double_1.c: Likewise.
          * gcc.target/i386/l_fma_double_2.c: Likewise.
          * gcc.target/i386/l_fma_double_3.c: Likewise.
          * gcc.target/i386/l_fma_double_4.c: Likewise.
          * gcc.target/i386/l_fma_double_5.c: Likewise.
          * gcc.target/i386/l_fma_double_6.c: Likewise.
          * gcc.target/i386/l_fma_float_1.c: Likewise.
          * gcc.target/i386/l_fma_float_2.c: Likewise.
          * gcc.target/i386/l_fma_float_3.c: Likewise.
          * gcc.target/i386/l_fma_float_4.c: Likewise.
          * gcc.target/i386/l_fma_float_5.c: Likewise.
          * gcc.target/i386/l_fma_float_6.c: Likewise.
          * gcc.target/i386/vect-perm-even-1.c: Likewise.

Comments

Richard Biener Aug. 26, 2019, 12:18 p.m. | #1
On Fri, 23 Aug 2019, Andre Vieira (lists) wrote:

> Hi,

> 

> In this patch I turn epilogue vectorization on by default.  I had to make

> changes to the tests since the vectorizer dumps now show the analysis for both

> the first and second vectorization. This required checks like

> 'scan-tree-dump-times' to be raised to meet the new numbers. For some tests I

> simply disable the epilogue vectorization, because otherwise it makes it very

> difficult to test for the specific conditions the test was meant for.


I'm not sure how reliable the updating will be since on x86_64 we now
have 4 vector sizes (MMX, SSE, AVX, AVX512) and depending on what
arch you enable you get possibly different epilogues vectorized?

But then you are right, disabling epilogue vectorization for the
whole testsuite seems bad.  Appearantly there were not too many
testcases affected, so maybe doing a more specific update like

{ scan-tree-dump-times "blah" 2 "vect" { target no_epilogue_vect } }
{ scan-tree-dump-times "blah" 2 "vect" { target vect_32B_16B } }
{ ... { target vect_64B_32B16B } }

etc.?  That is, your testcase updates should break archs with
a single vector size?

> Bootstrapped and regression tested on aarch64 and x86_64.


Changing the default is OK, I'm less sure about the testsuite updates.

Maybe the simplest solution is to disable it for the testsuite for now...

> I am not sure whether this is the right thing to do, we might want to enable

> this only for certain targets and if so, I also don't know how to tackle the

> testing issue where all the tests that check the number of times a dump

> mentions something will now depend on whether that test enables epilogue

> vectorization or not. I was trying to avoid disabling the option for all

> tests, since if we do that then we aren't really testing it. Maybe we ought to

> enable the option for all tests, regardless of the targets default. For

> testing purposes.

> 

> Thoughts on this?


I wonder if we can run a testcase for the testsuite coverage, ignoring
all scan-tree-dump stuff somehow?

Richard.

> Cheers,

> Andre

> 

> gcc/ChangeLog:

> 

> 2019-08-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>

> 

>          * params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.

> 

> gcc/testsuite/ChangeLog:

> 

> 2019-08-23  Andre Vieira  <andre.simoesdiasvieira@arm.com>

> 

>          * gcc.dg/vect/fast-math-vect-call-1.c: Raise count for tree dump

> scans.

>          * gcc.dg/vect/no-fast-math-vect16.c: Likewise.

>          * gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Likewise.

>          * gcc.dg/vect/no-scevccp-outer-7.c: Likewise.

>          * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.

>          * gcc.dg/vect/no-section-anchors-vect-31.c: Likewise.

>          * gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.

>          * gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.

>          * gcc.dg/vect/no-section-anchors-vect-68.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/no-vfa-vect-dv-2.c: Likewise.

>          * gcc.dg/vect/pr33804.c: Likewise.

>          * gcc.dg/vect/pr53773.c: Likewise.

>          * gcc.dg/vect/pr65947-1.c: Likewise.

>          * gcc.dg/vect/pr65947-13.c: Likewise.

>          * gcc.dg/vect/pr65947-14.c: Likewise.

>          * gcc.dg/vect/pr65947-4.c: Likewise.

>          * gcc.dg/vect/pr80631-1.c: Likewise.

>          * gcc.dg/vect/pr80631-2.c: Likewise.

>          * gcc.dg/vect/slp-25.c: Likewise.

>          * gcc.dg/vect/slp-reduc-2.c: Likewise.

>          * gcc.dg/vect/slp-reduc-5.c: Likewise.

>          * gcc.dg/vect/slp-reduc-6.c: Likewise.

>          * gcc.dg/vect/slp-widen-mult-half.c: Likewise.

>          * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.

>          * gcc.dg/vect/vect-103.c: Likewise.

>          * gcc.dg/vect/vect-109.c: Likewise.

>          * gcc.dg/vect/vect-119.c: Likewise.

>          * gcc.dg/vect/vect-26.c: Likewise.

>          * gcc.dg/vect/vect-27.c: Likewise.

>          * gcc.dg/vect/vect-29.c: Likewise.

>          * gcc.dg/vect/vect-42.c: Likewise.

>          * 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-54.c: Likewise.

>          * gcc.dg/vect/vect-56.c: Likewise.

>          * gcc.dg/vect/vect-58.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-89-big-array.c: Likewise.

>          * gcc.dg/vect/vect-89.c: Likewise.

>          * gcc.dg/vect/vect-91.c: Likewise.

>          * gcc.dg/vect/vect-92.c: Likewise.

>          * gcc.dg/vect/vect-96.c: Likewise.

>          * gcc.dg/vect/vect-alias-check-5.c: Likewise.

>          * gcc.dg/vect/vect-live-2.c: Likewise.

>          * gcc.dg/vect/vect-live-slp-1.c: Likewise.

>          * gcc.dg/vect/vect-live-slp-3.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-outer-3a-big-array.c: Likewise.

>          * gcc.dg/vect/vect-outer-3a.c: Likewise.

>          * gcc.dg/vect/vect-outer-4.c: Likewise.

>          * gcc.dg/vect/vect-outer-4c-big-array.c: Likewise.

>          * gcc.dg/vect/vect-outer-6.c: Likewise.

>          * gcc.dg/vect/vect-peel-1.c: Likewise.

>          * gcc.dg/vect/vect-peel-2.c: Likewise.

>          * gcc.dg/vect/vect-peel-3.c: Likewise.

>          * gcc.dg/vect/vect-peel-4.c: Likewise.

>          * gcc.dg/vect/vect-reduc-6.c: Likewise.

>          * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.

>          * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.

>          * gcc.dg/vect/vect-reduc-dot-u16b.c: Likewise.

>          * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.

>          * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.

>          * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.

>          * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.

>          * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.

>          * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.

>          * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.

>          * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.

>          * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.

>          * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.

>          * gcc.dg/vect/vect-widen-mult-half.c: Likewise.

>          * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.

>          * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Likewise.

>          * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.

>          * gfortran.dg/vect/vect-4.f90: Likewise.

>          * gcc.dg/vect/pr60092-2.c: Disable epilogue vectorization.

>          * gcc.dg/vect/pr60092.c: Likewise.

>          * gcc.dg/vect/slp-reduc-sad-2.c: Likewise.

>          * gcc.dg/vect/vect-46.c: Likewise.

>          * gcc.dg/vect/vect-86.c: Likewise.

>          * gcc.dg/vect/vect-live-1.c: Likewise.

>          * gcc.dg/vect/vect-live-3.c: Likewise.

>          * gcc.dg/vect/vect-live-4.c: Likewise.

>          * gcc.dg/vect/vect-live-slp-2.c: Likewise.

>          * gcc.dg/vect/vect-multitypes-6.c: Likewise.

>          * gcc.target/aarch64/sve/reduc_strict_3.c: Likewise.

>          * gcc.target/aarch64/sve/spill_2.c: Likewise.

>          * gcc.target/aarch64/sve/spill_6.c: Likewise.

>          * gcc.target/i386/avx-vzeroupper-19.c: Likewise.

>          * gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.

>          * gcc.target/i386/avx512f-gather-2.c: Likewise.

>          * gcc.target/i386/avx512f-gather-5.c: Likewise.

>          * gcc.target/i386/avx512f-simd-1.c: Likewise.

>          * gcc.target/i386/l_fma_double_1.c: Likewise.

>          * gcc.target/i386/l_fma_double_2.c: Likewise.

>          * gcc.target/i386/l_fma_double_3.c: Likewise.

>          * gcc.target/i386/l_fma_double_4.c: Likewise.

>          * gcc.target/i386/l_fma_double_5.c: Likewise.

>          * gcc.target/i386/l_fma_double_6.c: Likewise.

>          * gcc.target/i386/l_fma_float_1.c: Likewise.

>          * gcc.target/i386/l_fma_float_2.c: Likewise.

>          * gcc.target/i386/l_fma_float_3.c: Likewise.

>          * gcc.target/i386/l_fma_float_4.c: Likewise.

>          * gcc.target/i386/l_fma_float_5.c: Likewise.

>          * gcc.target/i386/l_fma_float_6.c: Likewise.

>          * gcc.target/i386/vect-perm-even-1.c: Likewise.

> 

> 


-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 247165 (AG München)
Jeff Law Sept. 4, 2019, 3:40 p.m. | #2
On 8/23/19 10:50 AM, Andre Vieira (lists) wrote:
> I am not sure whether this is the right thing to do, we might want to

> enable this only for certain targets and if so, I also don't know how to

> tackle the testing issue where all the tests that check the number of

> times a dump mentions something will now depend on whether that test

> enables epilogue vectorization or not. I was trying to avoid disabling

> the option for all tests, since if we do that then we aren't really

> testing it. Maybe we ought to enable the option for all tests,

> regardless of the targets default. For testing purposes.

In general we try to drive things with proper costing rather than
enabling/disabling transformations based on the target.  If we need to
adjust cost models, then we're better off getting the bits in now to
give developers a chance to make those adjustments.

WRT testing.  One approach would be to somehow indicate in the dump file
that we're dealing with an epilogue by prefixing the messages.  THen the
scanner could distinguish between main loop vectorization and epilogue
vectorization.  I'm not sure how invasive that would be.

I think the approach you've taken here is fine for now.


jeff
Andre Vieira (lists) Oct. 30, 2019, 6:16 p.m. | #3
Hi,

In this patch I turn epilogue vectorization on by default for all 
targets. After some discussions I decided to take the following testing 
approach:

1) I have disabled epilogue vectorization for all tests that failed due 
to scan-tree-dump failures inside:
   - gcc.dg/vect
   - gcc.target/i386
   - gcc.target/aarch6
   - gfortran.dg/vect

2) Added the Bugzilla's reported testcase but xfail the scan for 
EPILOGUE VECTORIZED for arm*-*-* as that target does not vectorize the 
epilogue.


I have only been able to test this for aarch64, arm and x86_64 (with 
avx512).  Other targets may also want to disable epilogue vectorization 
like I did for gcc.target and gcc.dg/vect tests or xfail the 
gcc.dg/vect/vect-epilogues.c test. I am relying on others to test this 
for their available targets, thanks in advance!

Is this OK for trunk?


Cheers,
Andre

gcc/ChangeLog:

2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

         * params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.

gcc/testsuite/ChangeLog:

2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

         * gcc.dg/vect/vect-epilogues.c: New test.
         * gcc.dg/vect/fast-math-vect-call-1.c: Disable for epilogue
         vectorization.
         * gcc.dg/vect/no-fast-math-vect16.c: Likewise.
         * gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Likewise.
         * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.
         * gcc.dg/vect/no-section-anchors-vect-31.c: Likewise.
         * gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.
         * gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.
         * gcc.dg/vect/no-section-anchors-vect-68.c: Likewise.
         * gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.
         * gcc.dg/vect/pr33804.c: Likewise.
         * gcc.dg/vect/pr53773.c: Likewise.
         * gcc.dg/vect/pr65947-1.c: Likewise.
         * gcc.dg/vect/pr65947-13.c: Likewise.
         * gcc.dg/vect/pr65947-14.c: Likewise.
         * gcc.dg/vect/pr65947-4.c: Likewise.
         * gcc.dg/vect/pr80631-1.c: Likewise.
         * gcc.dg/vect/pr80631-2.c: Likewise.
         * gcc.dg/vect/slp-23.c: Likewise.
         * gcc.dg/vect/slp-25.c: Likewise.
         * gcc.dg/vect/slp-reduc-2.c: Likewise.
         * gcc.dg/vect/slp-reduc-5.c: Likewise.
         * gcc.dg/vect/slp-reduc-6.c: Likewise.
         * gcc.dg/vect/slp-reduc-sad-2.c: Likewise.
         * gcc.dg/vect/slp-widen-mult-half.c: Likewise.
         * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.
         * gcc.dg/vect/vect-103.c: Likewise.
         * gcc.dg/vect/vect-109.c: Likewise.
         * gcc.dg/vect/vect-119.c: Likewise.
         * gcc.dg/vect/vect-24.c: Likewise.
         * gcc.dg/vect/vect-26.c: Likewise.
         * gcc.dg/vect/vect-27.c: Likewise.
         * gcc.dg/vect/vect-29.c: Likewise.
         * gcc.dg/vect/vect-42.c: Likewise.
         * 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-54.c: Likewise.
         * gcc.dg/vect/vect-56.c: Likewise.
         * gcc.dg/vect/vect-58.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-89-big-array.c: Likewise.
         * gcc.dg/vect/vect-89.c: Likewise.
         * gcc.dg/vect/vect-91.c: Likewise.
         * gcc.dg/vect/vect-92.c: Likewise.
         * gcc.dg/vect/vect-96.c: Likewise.
         * gcc.dg/vect/vect-cond-reduc-3.c: Likewise.
         * gcc.dg/vect/vect-cond-reduc-4.c: Likewise.
         * gcc.dg/vect/vect-live-1.c: Likewise.
         * gcc.dg/vect/vect-live-2.c: Likewise.
         * gcc.dg/vect/vect-live-3.c: Likewise.
         * gcc.dg/vect/vect-live-4.c: Likewise.
         * gcc.dg/vect/vect-live-slp-1.c: Likewise.
         * gcc.dg/vect/vect-live-slp-2.c: Likewise.
         * gcc.dg/vect/vect-live-slp-3.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-peel-1-epilogue.c: Likewise. New test.
         * gcc.dg/vect/vect-peel-1-src.c: Likewise. New test.
         * gcc.dg/vect/vect-peel-1.c: Likewise.
         * gcc.dg/vect/vect-peel-3-epilogue.c: Likewise. New test.
         * gcc.dg/vect/vect-peel-3-src.c: Likewise. New test.
         * gcc.dg/vect/vect-peel-3.c: Likewise.
         * gcc.dg/vect/vect-peel-4-epilogue.c: Likewise. New test.
         * gcc.dg/vect/vect-peel-4-src.c: Likewise. New test.
         * gcc.dg/vect/vect-peel-4.c: Likewise.
         * gcc.dg/vect/vect-reduc-6.c: Likewise.
         * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.
         * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.
         * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.
         * gcc.dg/vect/vect-reduc-dot-u16b.c: Likewise.
         * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.
         * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.
         * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.
         * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.
         * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.
         * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.
         * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.
         * gcc.dg/vect/vect-reduc-sad.c: Likewise.
         * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.
         * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.
         * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.
         * gcc.dg/vect/vect-widen-mult-half.c: Likewise.
         * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.
         * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Likewise.
         * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.
         * gcc.target/aarch64/sve/reduc_strict_3.c: Likewise.
         * gcc.target/i386/avx-vzeroupper-19.c: Likewise.
         * gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.
         * gcc.target/i386/avx512f-gather-2.c: Likewise.
         * gcc.target/i386/avx512f-gather-5.c: Likewise.
         * gcc.target/i386/l_fma_double_1.c: Likewise.
         * gcc.target/i386/l_fma_double_2.c: Likewise.
         * gcc.target/i386/l_fma_double_3.c: Likewise.
         * gcc.target/i386/l_fma_double_4.c: Likewise.
         * gcc.target/i386/l_fma_double_5.c: Likewise.
         * gcc.target/i386/l_fma_double_6.c: Likewise.
         * gcc.target/i386/l_fma_float_1.c: Likewise.
         * gcc.target/i386/l_fma_float_2.c: Likewise.
         * gcc.target/i386/l_fma_float_3.c: Likewise.
         * gcc.target/i386/l_fma_float_4.c: Likewise.
         * gcc.target/i386/l_fma_float_5.c: Likewise.
         * gcc.target/i386/l_fma_float_6.c: Likewise.
         * gcc.target/i386/mask-pack.c: Likewise.
         * gcc.target/i386/mask-unpack.c: Likewise.
         * gfortran.dg/vect/vect-4.f90: Likewise.
diff --git a/gcc/params.def b/gcc/params.def
index 7928f6f071ef8d2ac58307dd74a26e4624c14ded..942447d77e66a07736751ebf90bbce105b9dc267 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -1434,7 +1434,7 @@ DEFPARAM (PARAM_MAX_VRP_SWITCH_ASSERTIONS,
 DEFPARAM (PARAM_VECT_EPILOGUES_NOMASK,
 	  "vect-epilogues-nomask",
 	  "Enable loop epilogue vectorization using smaller vector size.",
-	  0, 0, 1)
+	  1, 0, 1)
 
 DEFPARAM(PARAM_UNROLL_JAM_MIN_PERCENT,
 	 "unroll-jam-min-percent",
diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c b/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c
index 228190ab05dc78f46411c5105f244986b07a1188..877de4eb5be18b6bac6406ee3f6a8015a5e3722d 100644
--- a/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c
+++ b/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 #include "tree-vect.h"
 
 extern float copysignf (float, float);
diff --git a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
index 7a148e41d513ea1d78693fc54a74b761ace81c3b..5f87128933746d258f836aa27d375ba55c148d5f 100644
--- a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
+++ b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float_strict } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
index 1d674504e2cdf03373f9827af4b47f0938f9becf..022d49f117571c6bbcd3122f9301f0e39dcb0031 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c
index 50b4998bb6c92427019561e0ab78cab77383e5b5..7049e4936b98f9c793e23f830ceeb4faf221cb5c 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
index c3b242157ce782f0b84975c65fcdc4a36eb08fc4..d2ae7976781e20c6e4257e0ad4141ceb21ed711b 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
index 470bbfb5537226e25d87b5bfbe84f281a42d986d..243e01e6dadf48d976fdd72bedd9547746cf73b5 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
index 805024d8058a9a8ef0abba7672193329049fdd79..e339590bacb494569558bfe9536c43f0d6339b8e 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
index 726c0de652fae1bca81752ef560b0f7e1dcff0c7..c403a8302d842a8eda96d2ee0fb25a94e8323254 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-skip-if "AArch64 tiny code model does not support programs larger than 1MiB" {aarch64_tiny} } */
 /* { dg-add-options bind_pic_locally } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
index 4513c40b34fdddcb2ff92caa65fa7323d14d6d3b..dcb537017951e1daf7c4daa253c77621dceb0e1c 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/pr33804.c b/gcc/testsuite/gcc.dg/vect/pr33804.c
index 86babbe60e7312d65fab371f94273af04f6eaff7..0db13674b426b8d6c82736c7f3e2328cb0f4f015 100644
--- a/gcc/testsuite/gcc.dg/vect/pr33804.c
+++ b/gcc/testsuite/gcc.dg/vect/pr33804.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr53773.c b/gcc/testsuite/gcc.dg/vect/pr53773.c
index 0bcc021767e636aff950eced04e778cb990976d0..7f8229571ecf10d8f3234a7ab7041ad53a86a3fa 100644
--- a/gcc/testsuite/gcc.dg/vect/pr53773.c
+++ b/gcc/testsuite/gcc.dg/vect/pr53773.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-additional-options "-fdump-tree-optimized" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-1.c b/gcc/testsuite/gcc.dg/vect/pr65947-1.c
index 8ebc385053cd737e800e6dff1c3843a514f274cd..9fc74a1ab28f8d8365ab6a83a8be7fa9c52ca0ab 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_condition } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-13.c b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
index b0755c0be651187c09bae258f9e072bb54f211ab..a703923151d74fc35bab877f56a8e58f5cc63b65 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-13.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_condition } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-14.c b/gcc/testsuite/gcc.dg/vect/pr65947-14.c
index c0df587e7fa62265fe6a8d660d1f131fefb3c6fc..3b76fda21223084af02273b4d4ce65ed1e3c41b0 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-14.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-14.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_condition } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-4.c b/gcc/testsuite/gcc.dg/vect/pr65947-4.c
index 99f9765038a3750df042c825462f65efea4b743c..471fbe2da21e4889e8a13c7d7940154bc2780853 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-4.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_condition } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-1.c b/gcc/testsuite/gcc.dg/vect/pr80631-1.c
index f430debb09d8d71764bf9da45cff10abe005236e..cbb9a6ff69add4ff1858c823b79dec3e0fb8188a 100644
--- a/gcc/testsuite/gcc.dg/vect/pr80631-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr80631-1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* PR tree-optimization/80631 */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-2.c b/gcc/testsuite/gcc.dg/vect/pr80631-2.c
index ca786f6f6471c2970da5fe63da6288f3fb65e08f..61e11316af2c08dc8aaf703dd19d67e7a37b4c02 100644
--- a/gcc/testsuite/gcc.dg/vect/pr80631-2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr80631-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* PR tree-optimization/80631 */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/slp-23.c b/gcc/testsuite/gcc.dg/vect/slp-23.c
index 7d330c787d1118591ecd31fda05cff108cf967e3..d7c67fe2c6e9c6ecf94a2ddc8c1d7a4c234933c8 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-23.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-23.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/slp-25.c b/gcc/testsuite/gcc.dg/vect/slp-25.c
index ff7eff202cb64ab5a4e6ff8feb71d7b1e1890bb3..1c33927c4342e01f80765d0ea723e01cec5fe2e6 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-25.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-25.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c
index 07c96c00eb0e312310a5b3434e103c2962692b77..15dd59922fcbd36b9f48724af891b6dec1b87167 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
index fc689e46ba16683b1d384207c148edb9ff938742..f457c11aa3c9743d50b0ae9e93d7182665f3ef77 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c
index 88591c5bdcbab0d066349b74503c3eb0a0a4cc8d..1fd15aa3c87daecedca12106a98f8b1848f49c9c 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c
index 5179fcc104dd45cc9cfb2d187f012f32d30e6b32..7d9255e48f2164363af82a491373dd80945605e7 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_usad_char } */
 /* With AVX256 or more we do not pull off the trick eliding the epilogue.  */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
index f5fb63e19f15988b5de4854923169aafa24d99e4..e3bfee33348c5164f657a1494f480db26a7aeffa 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
index 8a57eb69a91c3f48dce4385ae6e4058d2369383e..f09c964fdc185255d9f2435e7f647583615841ae 100644
--- a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-103.c b/gcc/testsuite/gcc.dg/vect/vect-103.c
index 4a9e1574eb0cd67f25fc95da6b59ee934ed30bd3..2a4510482d4d500254488076a49be8f8eaa423cd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-103.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-103.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-109.c b/gcc/testsuite/gcc.dg/vect/vect-109.c
index 9a5071058991fb9f855038132fcddd83d6057ef9..ac5d0827899471d6806ec719dab1dbbb7c3968d2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-109.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-109.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-skip-if "" { vect_no_align } } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-119.c b/gcc/testsuite/gcc.dg/vect/vect-119.c
index aa8c3002bff10ea1d0bc9c0389dfcd8a115a8cf0..29a9c51cd2937cdabc94f6c4ee1870d6f9e70b3f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-119.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-119.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-24.c b/gcc/testsuite/gcc.dg/vect/vect-24.c
index cbff6c55fa4f4701eab9150a714a8880f8f7b3bb..fa4c0620d29cd44b82fc75f0dc3bab8a862058d9 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-24.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-24.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-26.c b/gcc/testsuite/gcc.dg/vect/vect-26.c
index 4f0472b5d0f33dfaac536b2eda9b1fd971ca8f50..8a141f38400308c35a99aa77b0d181a4dce0643c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-26.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-26.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-27.c b/gcc/testsuite/gcc.dg/vect/vect-27.c
index 590217feee79c958999687239315c9ca4977a1bd..ac86b21aceb7b238665e86bbbd8a46e2aaa4d162 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-27.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-27.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-29.c b/gcc/testsuite/gcc.dg/vect/vect-29.c
index 86ec2cc1ddf89af2418d9bdea48b113acfcd646a..bbd446dfe63f1477f91e7d548513d99be4c11d7d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-29.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-29.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-42.c b/gcc/testsuite/gcc.dg/vect/vect-42.c
index a65b4a622764ddb12fa986d0c70128df5804336e..086cbf20c0a2cf7c38ede4e9db30042ac3237972 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-42.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-42.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-44.c b/gcc/testsuite/gcc.dg/vect/vect-44.c
index 03ef2c0f6717f33867de1d3a73f011248dcb1a89..f7f1fd28665f23560cd7a2f397a0c773290c923f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-44.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-44.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 /* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c
index bac6ef6b8dd6c457769881f357d97f23bc9a9a9d..b29fe47635a349c0a845c43655c1a44d569d765e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-48.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-48.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-50.c b/gcc/testsuite/gcc.dg/vect/vect-50.c
index c9500ca91e5bb451084335c4eb46bfdbb8360894..f43676896af4b9de482521b4aa915a47596ff4a9 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-50.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-50.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 /* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c
index 0343d9a24d156cb6b565bde3529be297e705b21e..c20a4be2edee6c958ae150b7de81121d01b2ab8a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-52.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-52.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-54.c b/gcc/testsuite/gcc.dg/vect/vect-54.c
index 58201abe069e8cc244eef6173cedadbbc1728201..2b236e48e196106b7892d3f28b4bd901a700ff9c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-54.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-54.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-56.c b/gcc/testsuite/gcc.dg/vect/vect-56.c
index 8060b05e7812941044990d6062f16036e9cbc4dd..c914126ece5f5929d316c5c107e7633efa4da55c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-56.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-56.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-58.c b/gcc/testsuite/gcc.dg/vect/vect-58.c
index 441af51860ea4b60da244d2c26113a977eb85ced..da4f9740e3358f67e9a05f82c87cf78bf3620e56 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-58.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-58.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-60.c b/gcc/testsuite/gcc.dg/vect/vect-60.c
index 3b7477c96ab4bbec85341b2d2351fb2cadcd795f..121c503c63afaf7cc5faa96bb537f4a184c82b00 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-60.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-60.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-72.c b/gcc/testsuite/gcc.dg/vect/vect-72.c
index 472d8d57549cf73c2357c81ed1e8ac018e179c01..9e8e91b7ae6a0bc61410ffcd3f0e5fdf4c3488f1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-72.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-72.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
index 42b2b8d91aacd87128385d41d6a288ab452b37ef..a3fb5053037fcca89d7518c47eb2debfc136ba7f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75.c b/gcc/testsuite/gcc.dg/vect/vect-75.c
index 2cdd703224284c1f1adf85331ca99f697c277778..88da97f0bb7cecee4ee93a9d3fa7f55f0ae9641c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c b/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
index 56ee797d10bfed44beb3229da0cde7e52ac58207..fb3e49927826f77149d4813185a6a2cac00232d4 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77-global.c b/gcc/testsuite/gcc.dg/vect/vect-77-global.c
index f0b73505d68c0bd66ecc5e61baf72a2d12aaae16..1580d6e075b018696c56de4d680a0999a837bbca 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77-global.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77-global.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c b/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
index c3ef8a36591a10b3600ad6ca96e2a3180f041779..57e8da0a9090cae7d501ecb83220afff0bf553b2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78-global.c b/gcc/testsuite/gcc.dg/vect/vect-78-global.c
index 241e7fa94b599a601c5d3a411388c992b43d770f..ea039b389b22fe16af9353bd5efa59a375a6a71c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78-global.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78-global.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
index decfbee318ae80936b7bf10ca2efadd3c9e1097f..59e1aae0017d92c5b98858777e7e55bceb73a90a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-89.c b/gcc/testsuite/gcc.dg/vect/vect-89.c
index 051698eada2d296afdc388a9e811259e6798a3d3..356ab96d330046c553364a585e770653609e5cfe 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-89.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-89.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-91.c b/gcc/testsuite/gcc.dg/vect/vect-91.c
index 9430da3290aa0d1822075c1ffb7cab2afd195dda..91264d9841dc7f211ea56cc4eca040edbf9c3663 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-91.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-91.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "--param vect-max-peeling-for-alignment=0" } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-92.c b/gcc/testsuite/gcc.dg/vect/vect-92.c
index b9a1ce23d0206dba28318b9c77c13492b45b5f3e..9ceb0fbadcd61ec9a5c3682cf3582abf464ce106 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-92.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-92.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-96.c b/gcc/testsuite/gcc.dg/vect/vect-96.c
index 0cb935b9f162233a3c3e35b5fbc9e22f177a81f2..c0d6c37b21db23b175de895a582f48b302255e9f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-96.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-96.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-3.c b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-3.c
index de9921cfcec1d729b413a3b9c4de99f217c089d9..bb99b95eca5fff17c79a26cbe3542d5ed5f47a53 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_condition } */
 /* { dg-require-effective-target vect_float } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
index 543504f6b0aabeecee8faf466bab58705fb88bb8..8820075b1dcc2230619471538d8dc8fbdf9bed6d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-reduc-4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_condition } */
 /* { dg-require-effective-target vect_double } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-epilogues.c b/gcc/testsuite/gcc.dg/vect/vect-epilogues.c
new file mode 100644
index 0000000000000000000000000000000000000000..946666e918ff9d019f07c0d891a9148692f86c92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-epilogues.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+/* Copied from PR 88915.  */
+void pixel_avg( unsigned char *dst, int i_dst_stride,
+                               unsigned char *src1, int i_src1_stride,
+                               unsigned char *src2, int i_src2_stride,
+                               int i_width, int i_height )
+ {
+     for( int y = 0; y < i_height; y++ )
+     {
+         for( int x = 0; x < i_width; x++ )
+             dst[x] = ( src1[x] + src2[x] + 1 ) >> 1;
+         dst += i_dst_stride;
+         src1 += i_src1_stride;
+         src2 += i_src2_stride;
+     }
+ }
+
+/* { dg-final { scan-tree-dump "LOOP EPILOGUE VECTORIZED" "vect" { xfail { arm*-*-* } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-1.c b/gcc/testsuite/gcc.dg/vect/vect-live-1.c
index e170875d7abe537782c1f4a96b01f26fbfe74a45..f628c5d3998930ea3e0cee271c20ff3eb17edf62 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-2.c b/gcc/testsuite/gcc.dg/vect/vect-live-2.c
index a6daa61829e7ca51ef2d1e8540cd60782cdeea8a..19d8c22859e0804ccab9d25ba69f22e50d635ebb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_long } */
 /* { dg-require-effective-target vect_shift } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-3.c b/gcc/testsuite/gcc.dg/vect/vect-live-3.c
index 3ffa5166f45e982088d7e66864c9c8df5d56c4dd..8f5ccb27365dea5e8cd8561d3c8a406e47469ebe 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-4.c b/gcc/testsuite/gcc.dg/vect/vect-live-4.c
index 21cc27320acb5a71c6a37d1439e1dabcf98252d3..553ffcd49f744cabd6bdd42e6aca8c12d15ceb01 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c b/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c
index aff37c100f046021b7834ef0bfa399744a618dd8..965437c8f03eaa707add3577c6c19e9ec4c50302 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c b/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c
index 35689665b548cf6ade0c8e8e2fbd490335ce7779..0d2f17f9003178d65c3dc5358e13c45f8ac980e3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c b/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
index 854116fa36efc12bd612385ffe19b177c1fc6813..a3f60f6ce6d24fa35e94d95f2dea4bfd14bfdc74 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_long } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
index 18bf5e80917ab38a56dfc7fbc0875b9b72683c62..1f82121df06181ad27478378a2323dbf478eacbe 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
index 43887865bf4db474bb9bb5092af9fd68a53fcdf9..b0f74083f2ba992620ebdf3a3874f6c5fa29f84d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
index b47a93ab326be666ba2037c2dead5703c5f2a229..864b17ac640577753d8164f1ae3ea84181a553c1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options double_vectors } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-1-epilogue.c b/gcc/testsuite/gcc.dg/vect/vect-peel-1-epilogue.c
new file mode 100644
index 0000000000000000000000000000000000000000..cc23c6b08669ea0a8e5024e2cfdc9ab98fd381b7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-1-epilogue.c
@@ -0,0 +1,3 @@
+/* { dg-require-effective-target vect_int } */
+
+#include "vect-peel-1-src.c"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-1-src.c b/gcc/testsuite/gcc.dg/vect/vect-peel-1-src.c
new file mode 100644
index 0000000000000000000000000000000000000000..7980d4dd6438d9a063051c78608f73f1cea1c740
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-1-src.c
@@ -0,0 +1,48 @@
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 128
+
+int ib[N+7];
+
+__attribute__ ((noinline))
+int main1 ()
+{
+  int i;
+  int ia[N+1];
+
+  /* All the accesses are misaligned. With cost model disabled, we
+     count the number of aligned accesses for each peeling option, and
+     in this case we align the two loads if possible (i.e., if
+     misaligned stores are supported).  */
+  for (i = 1; i <= N; i++)
+    {
+      ia[i] = ib[i+2] + ib[i+6];
+    }
+
+  /* check results:  */
+  for (i = 1; i <= N; i++)
+    {
+      if (ia[i] != ib[i+2] + ib[i+6])
+        abort ();
+    }
+
+  return 0;
+}
+
+int main (void)
+{ 
+  int i;
+
+  check_vect ();
+
+  for (i = 0; i <= N+6; i++)
+    {
+      asm volatile ("" : "+r" (i));
+      ib[i] = i;
+    }
+
+  return main1 ();
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-1.c b/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
index fae99ab0b08ab99953062a54193460baa7a271c0..a7660a381c44a7fc25611fc00a5bd62e91ce83eb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
@@ -1,51 +1,8 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 128
-
-int ib[N+7];
-
-__attribute__ ((noinline))
-int main1 ()
-{
-  int i;
-  int ia[N+1];
-
-  /* All the accesses are misaligned. With cost model disabled, we
-     count the number of aligned accesses for each peeling option, and
-     in this case we align the two loads if possible (i.e., if
-     misaligned stores are supported).  */
-  for (i = 1; i <= N; i++)
-    {
-      ia[i] = ib[i+2] + ib[i+6];
-    }
-
-  /* check results:  */
-  for (i = 1; i <= N; i++)
-    {
-      if (ia[i] != ib[i+2] + ib[i+6])
-        abort ();
-    }
-
-  return 0;
-}
-
-int main (void)
-{ 
-  int i;
-
-  check_vect ();
-
-  for (i = 0; i <= N+6; i++)
-    {
-      asm volatile ("" : "+r" (i));
-      ib[i] = i;
-    }
-
-  return main1 ();
-}
+#include "vect-peel-1-src.c"
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } xfail { ! vect_unaligned_possible } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-3-epilogue.c b/gcc/testsuite/gcc.dg/vect/vect-peel-3-epilogue.c
new file mode 100644
index 0000000000000000000000000000000000000000..8af0fcdca0e21af5d0aea2a61c76094d03ec9e92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-3-epilogue.c
@@ -0,0 +1,4 @@
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options bind_pic_locally } */
+
+#include "vect-peel-3-src.c"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-3-src.c b/gcc/testsuite/gcc.dg/vect/vect-peel-3-src.c
new file mode 100644
index 0000000000000000000000000000000000000000..a21ce8c3d6acf0c29c853ceba5cb3bfb00282042
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-3-src.c
@@ -0,0 +1,58 @@
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#if VECTOR_BITS > 128
+#define NINTS (VECTOR_BITS / 32)
+#define EXTRA (NINTS * 2)
+#else
+#define NINTS 4
+#define EXTRA 10
+#endif
+
+#define N 128
+
+#define RES_A (N * N / 4)
+#define RES_B (N * (N + 1) / 2 + (NINTS + 3) * (N + 1))
+#define RES_C (N * (N + 1) / 2 + (N + 1))
+#define RES (RES_A + RES_B + RES_C)
+
+int ib[N + EXTRA];
+int ia[N + EXTRA];
+int ic[N + EXTRA];
+
+__attribute__ ((noinline))
+int main1 ()
+{
+  int i, suma = 0, sumb = 0, sumc = 0;
+
+  /* ib and ic have same misalignment, we peel to align them.  */
+  for (i = 0; i <= N; i++)
+    {
+      suma += ia[i];
+      sumb += ib[i + NINTS + 1];
+      sumc += ic[i + 1];
+    }
+
+  /* check results:  */
+  if (suma + sumb + sumc != RES)
+    abort ();
+
+  return 0;
+}
+
+int main (void)
+{
+  int i;
+
+  check_vect ();
+
+  for (i = 0; i < N + EXTRA; i++)
+    {
+      asm volatile ("" : "+r" (i));
+      ib[i] = i;
+      ic[i] = i+2;
+      ia[i] = i/2;
+    }
+
+  return main1 ();
+}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-3.c b/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
index d5c0cf10ce1a9725350d64d56e9e26395968eb25..2cd99573fd134211f001c29eb5b8203a6ce0188d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
@@ -1,64 +1,9 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#if VECTOR_BITS > 128
-#define NINTS (VECTOR_BITS / 32)
-#define EXTRA (NINTS * 2)
-#else
-#define NINTS 4
-#define EXTRA 10
-#endif
-
-#define N 128
-
-#define RES_A (N * N / 4)
-#define RES_B (N * (N + 1) / 2 + (NINTS + 3) * (N + 1))
-#define RES_C (N * (N + 1) / 2 + (N + 1))
-#define RES (RES_A + RES_B + RES_C)
-
-int ib[N + EXTRA];
-int ia[N + EXTRA];
-int ic[N + EXTRA];
-
-__attribute__ ((noinline))
-int main1 ()
-{
-  int i, suma = 0, sumb = 0, sumc = 0;
-
-  /* ib and ic have same misalignment, we peel to align them.  */
-  for (i = 0; i <= N; i++)
-    {
-      suma += ia[i];
-      sumb += ib[i + NINTS + 1];
-      sumc += ic[i + 1];
-    }
-
-  /* check results:  */
-  if (suma + sumb + sumc != RES)
-    abort ();
-
-  return 0;
-}
-
-int main (void)
-{
-  int i;
-
-  check_vect ();
-
-  for (i = 0; i < N + EXTRA; i++)
-    {
-      asm volatile ("" : "+r" (i));
-      ib[i] = i;
-      ic[i] = i+2;
-      ia[i] = i/2;
-    }
-
-  return main1 ();
-}
+#include "vect-peel-3-src.c"
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-4-epilogue.c b/gcc/testsuite/gcc.dg/vect/vect-peel-4-epilogue.c
new file mode 100644
index 0000000000000000000000000000000000000000..783982f04f67fc5a51cdf7f7ef44cbae6d477672
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-4-epilogue.c
@@ -0,0 +1,4 @@
+/* { dg-require-effective-target vect_int } */
+/* { dg-add-options bind_pic_locally } */
+
+#include "vect-peel-4-src.c"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-4-src.c b/gcc/testsuite/gcc.dg/vect/vect-peel-4-src.c
new file mode 100644
index 0000000000000000000000000000000000000000..33088fb090271c3b97fae2300e5d7fc86242e246
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-4-src.c
@@ -0,0 +1,45 @@
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 128
+
+int ib[N+7];
+int ia[N+1];
+
+__attribute__ ((noinline))
+int main1 ()
+{
+  int i;
+
+  /* Don't peel keeping one load and the store aligned.  */
+  for (i = 0; i <= N; i++)
+    {
+      ia[i] = ib[i] + ib[i+5];
+    }
+
+  /* check results:  */
+  for (i = 1; i <= N; i++)
+    {
+      if (ia[i] != ib[i] + ib[i+5])
+        abort ();
+    }
+
+  return 0;
+}
+
+int main (void)
+{ 
+  int i;
+
+  check_vect ();
+
+  for (i = 0; i <= N+6; i++)
+    {
+      asm volatile ("" : "+r" (i));
+      ib[i] = i;
+    }
+
+  return main1 ();
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
index 88f9f0ddcbab55b84e619d9fb2086e093be95820..3b5272f284f7eb1f528d46524abdc931c77e4795 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
@@ -1,49 +1,9 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
 
-#include <stdarg.h>
-#include "tree-vect.h"
-
-#define N 128
-
-int ib[N+7];
-int ia[N+1];
-
-__attribute__ ((noinline))
-int main1 ()
-{
-  int i;
-
-  /* Don't peel keeping one load and the store aligned.  */
-  for (i = 0; i <= N; i++)
-    {
-      ia[i] = ib[i] + ib[i+5];
-    }
-
-  /* check results:  */
-  for (i = 1; i <= N; i++)
-    {
-      if (ia[i] != ib[i] + ib[i+5])
-        abort ();
-    }
-
-  return 0;
-}
-
-int main (void)
-{ 
-  int i;
-
-  check_vect ();
-
-  for (i = 0; i <= N+6; i++)
-    {
-      asm volatile ("" : "+r" (i));
-      ib[i] = i;
-    }
-
-  return main1 ();
-}
+#include "vect-peel-4-src.c"
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail { ! vect_unaligned_possible } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c
index ad148046a8eca15bfdb41335f4f91c219c31b71a..cc0d9694a4fef838a5fc75fb49fe8cc30a8f9969 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_float_strict } */
 /* { dg-additional-options "-fno-fast-math" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c
index 171451872e56c7d9596c42e829d336b93c5ed796..ffbc9706901cb1e3376df0ec554da5f0cb2677fc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c
index ac674749b6fe09f3c0adc991c825fb9eacc9eee5..05e343ad78204e4c006e0c4039e03122d4ee9634 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */
 /* { dg-additional-options "-march=armv8.2-a+dotprod" { target { aarch64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c
index b55cf6f64b655d6cf8fa4aef21b10a3237403d4f..82c648cc73c6de791dad08a406f603c4177a5d2f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8b.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c
index 57e18040cf24b71cf77788716078f6c1f08fa3a0..0fc112012cfc1d6ff38886001b18487414716697 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
index d020f643bb88e739601f96d606c47406332a9db5..e23ebd9b0727205f3b8f5509984b0db56f409cf2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-require-effective-target arm_v8_2a_dotprod_neon_hw { target { aarch64*-*-* || arm*-*-* } } } */
 /* { dg-additional-options "-march=armv8.2-a+dotprod" { target { aarch64*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
index 3155d97b3cd18cfa61dfbdea22ad2b7226192b00..288be13440d0baeef339bfb6f53385b182d0d0fb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c
index b06b234072b84b04182d52f1470f6568c71598dd..1ddbe96ebc3b0829a6c49664c7700fbe23c1ffe1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c
index be03c7d011da3422d64f25d6a185c40ea8ab4d8a..7ae2c838344ac343c538b6b126fffc1b25a5df81 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c
index c30c85ce911b945703ea972955972088214ea2b7..91ce0ef934ec6fb9905bd5b15b068d55b836848c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c
index a98edd3045ad61da4c501f258f9af7a05ebdb671..2190eaa624277eb073043458261ce054eb3719ce 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c
index 570e56a8c9b7c77e509f256d0fd1a371c9e39909..6ad645b3bddadad9d8b1a92880dcdf83ea5dcc5c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
index a033a7d27d191ce593657c6fc4d0d14a25dcc7e2..2f0bb692564daa00c9ab82225f97c8ae893d4f8c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_usad_char } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
index 89f983cad062c4e58b1906530f775672dd5d004d..4c95dd2017922904122aee2925491e9b9b48fe8e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-ipa-icf" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
index e319699cd92103f3fba580825e131517ed203306..4075f815cea0ffbad1e05e0ac8b9b232bf3efe61 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-ipa-icf" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
index ee0538c0635de5272e8a28016b1ffd9e2ff87401..c4ac88e186dbc1a8f36f4d7567a9983446557eea 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-ipa-icf" } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
index 6d74c693316ab462316dd91394ec2800a709d198..ebbf4f5e841b75cb1f5171ddedec85cd327f385e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c
index 942f63d6f3108ed7fd1dc8777d29ac7fd12fa045..2e28baae0b804cf76ad74926c35126df98857482 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c
index 98f78d3b37a37b0d96a218c1962a7da8e77e0884..d277f0b2b9492db77237a489cc8bea4749d8d719 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
index 176f183f3cee1836f9d7da495beb781d7e8c0587..6fc7a28235120cf6337a4e033b6835bbfad318ff 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target vect_int } */
 
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c b/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c
index a815c93bcebd89ad6b141ea6ed9eef72a6146eb1..9ddd9128c0de40bf428a7eb33fa170e6b25a34da 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -fno-inline -msve-vector-bits=256 -fdump-tree-vect-details" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
index ae2f8611ea60297505421f41f0351c77e81b104e..9d926ca5dfecb6936a711242d2b815d92470a6d8 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -mavx -mtune=generic -dp" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c b/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c
index 2a105601c7107f4411a6466082c11d9286396d9b..51765900fcfb1550dcf521a40dc362eb5879d773 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-options "-O3 -mavx2 -fdump-tree-vect-details" } */
 /* { dg-require-effective-target avx2 } */
 
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
index a26aa6529e87daaf18986b762d803f61ccc6ae29..4de04511934d2efaa7a886af08bb0047397c03d4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */ /* PR59617 */
 /* { dg-options "-O3 -mavx512f -fdump-tree-vect-details -mtune=knl" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
index 2bb9c5c090b3538e5811a6b93bb1459adfb97f86..946117d9d30755631925888748bdf236e683ed52 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -mavx512f -mtune=knl" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
index e5bcdabcf7930c34c34541dbfbec1174059d64ae..2472fb016eebc122f0f8c5cb826bcb66167123f3 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
index dbd078abc817851ef3a5800d050a301f9e6d1a16..3d569733b1e7d971b59bde474d0458c6bc5b9cf3 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
index d0844f208e51f7018bdcb107a8ce3bee3e9c99b7..8e5ec4150cc1aaf7b58f55e1749538aaf81cbba1 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
index b9498a0ff1323b98e25e8c27343942a2818c053d..0d2a0408d0bafde6b1ceba18098477362e7d5354 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
index 0292ba040a318b5752619cd67f94dbf4b63177bf..fcf1a6ceac14412b50598daa8686c37185235c64 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
index a716006eda89354146ddbbe5f25cad3c89efe05c..650e608117f128c318ef3f75598c3baa5365542e 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
index b386b83e39a7c22e0f5138c9a2e87779c275c75b..c29198ba66645563edbb2e5549ecff061de73d16 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
index 81193b2d8b12cfcb049d28e6d4aab0bd9ca0fa23..cb38b77344f4873a40d9f99fdc7564fcbd4c7024 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
index d86cb9043572a7c22c3dfe38bd62a60a23567da0..10a350e9e10c1fc0c096af8f3d833c712d26b5fa 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
index 68ca8388d70aad146a21267134daaf2768ec29b9..020e5d86f35497bf2f85056f2b90db7908eb13a0 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
index 4db4749c024cd7a412e99a1dfe3132102f2b6294..3ff23c17aab5f0e8fa7b391945da3422fd212f93 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
index 0b86e6256bdb50136511f4a3ed77987ce724d482..34671baa28a4f589787117478aa715b47fb46f2f 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
 
diff --git a/gcc/testsuite/gcc.target/i386/mask-pack.c b/gcc/testsuite/gcc.target/i386/mask-pack.c
index 0b564ef4284790511f48a90b934b9d0311bd7f8d..a607dfb460ccd6835573acdb834a6609a80ffe2d 100644
--- a/gcc/testsuite/gcc.target/i386/mask-pack.c
+++ b/gcc/testsuite/gcc.target/i386/mask-pack.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-mavx512bw -O3 -fopenmp-simd -fdump-tree-vect-details" } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 10 "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/mask-unpack.c b/gcc/testsuite/gcc.target/i386/mask-unpack.c
index 4291480cfff04fa4ddf3ccd6f2c4af11a06cee65..ca71ea2e29d7a711c09d26b568ec014ee9f47f55 100644
--- a/gcc/testsuite/gcc.target/i386/mask-unpack.c
+++ b/gcc/testsuite/gcc.target/i386/mask-unpack.c
@@ -1,3 +1,5 @@
+/* Disabling epilogues until we find a better way to deal with scans.  */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-do compile } */
 /* { dg-options "-mavx512bw -mavx512dq -mno-stackrealign -O3 -fopenmp-simd -fdump-tree-vect-details" } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 10 "vect" } } */
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-4.f90 b/gcc/testsuite/gfortran.dg/vect/vect-4.f90
index b567cbd8644fc196c922f2b9e9418262cea5be91..c2eeafd39005e15a1ae470104c2d3be972c27d9f 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-4.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-4.f90
@@ -1,3 +1,5 @@
+! Disabling epilogues until we find a better way to deal with scans.
+! { dg-additional-options "--param vect-epilogues-nomask=0" }
 ! { dg-do compile }
 ! { dg-require-effective-target vect_float }
 ! { dg-additional-options "--param vect-max-peeling-for-alignment=0" }
Richard Biener Oct. 30, 2019, 7:42 p.m. | #4
On October 30, 2019 7:16:43 PM GMT+01:00, "Andre Vieira (lists)" <andre.simoesdiasvieira@arm.com> wrote:
>Hi,

>

>In this patch I turn epilogue vectorization on by default for all 

>targets. After some discussions I decided to take the following testing

>

>approach:

>

>1) I have disabled epilogue vectorization for all tests that failed due

>

>to scan-tree-dump failures inside:

>   - gcc.dg/vect

>   - gcc.target/i386

>   - gcc.target/aarch6

>   - gfortran.dg/vect

>

>2) Added the Bugzilla's reported testcase but xfail the scan for 

>EPILOGUE VECTORIZED for arm*-*-* as that target does not vectorize the 

>epilogue.

>

>

>I have only been able to test this for aarch64, arm and x86_64 (with 

>avx512).  Other targets may also want to disable epilogue vectorization

>

>like I did for gcc.target and gcc.dg/vect tests or xfail the 

>gcc.dg/vect/vect-epilogues.c test. I am relying on others to test this 

>for their available targets, thanks in advance!

>

>Is this OK for trunk?


Ok. 

Thanks, 
Richard. 

>

>Cheers,

>Andre

>

>gcc/ChangeLog:

>

>2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

>

>         * params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.

>

>gcc/testsuite/ChangeLog:

>

>2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

>

>         * gcc.dg/vect/vect-epilogues.c: New test.

>         * gcc.dg/vect/fast-math-vect-call-1.c: Disable for epilogue

>         vectorization.

>         * gcc.dg/vect/no-fast-math-vect16.c: Likewise.

>         * gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Likewise.

>         * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-31.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-68.c: Likewise.

>         * gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.

>         * gcc.dg/vect/pr33804.c: Likewise.

>         * gcc.dg/vect/pr53773.c: Likewise.

>         * gcc.dg/vect/pr65947-1.c: Likewise.

>         * gcc.dg/vect/pr65947-13.c: Likewise.

>         * gcc.dg/vect/pr65947-14.c: Likewise.

>         * gcc.dg/vect/pr65947-4.c: Likewise.

>         * gcc.dg/vect/pr80631-1.c: Likewise.

>         * gcc.dg/vect/pr80631-2.c: Likewise.

>         * gcc.dg/vect/slp-23.c: Likewise.

>         * gcc.dg/vect/slp-25.c: Likewise.

>         * gcc.dg/vect/slp-reduc-2.c: Likewise.

>         * gcc.dg/vect/slp-reduc-5.c: Likewise.

>         * gcc.dg/vect/slp-reduc-6.c: Likewise.

>         * gcc.dg/vect/slp-reduc-sad-2.c: Likewise.

>         * gcc.dg/vect/slp-widen-mult-half.c: Likewise.

>         * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.

>         * gcc.dg/vect/vect-103.c: Likewise.

>         * gcc.dg/vect/vect-109.c: Likewise.

>         * gcc.dg/vect/vect-119.c: Likewise.

>         * gcc.dg/vect/vect-24.c: Likewise.

>         * gcc.dg/vect/vect-26.c: Likewise.

>         * gcc.dg/vect/vect-27.c: Likewise.

>         * gcc.dg/vect/vect-29.c: Likewise.

>         * gcc.dg/vect/vect-42.c: Likewise.

>         * 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-54.c: Likewise.

>         * gcc.dg/vect/vect-56.c: Likewise.

>         * gcc.dg/vect/vect-58.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-89-big-array.c: Likewise.

>         * gcc.dg/vect/vect-89.c: Likewise.

>         * gcc.dg/vect/vect-91.c: Likewise.

>         * gcc.dg/vect/vect-92.c: Likewise.

>         * gcc.dg/vect/vect-96.c: Likewise.

>         * gcc.dg/vect/vect-cond-reduc-3.c: Likewise.

>         * gcc.dg/vect/vect-cond-reduc-4.c: Likewise.

>         * gcc.dg/vect/vect-live-1.c: Likewise.

>         * gcc.dg/vect/vect-live-2.c: Likewise.

>         * gcc.dg/vect/vect-live-3.c: Likewise.

>         * gcc.dg/vect/vect-live-4.c: Likewise.

>         * gcc.dg/vect/vect-live-slp-1.c: Likewise.

>         * gcc.dg/vect/vect-live-slp-2.c: Likewise.

>         * gcc.dg/vect/vect-live-slp-3.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-peel-1-epilogue.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-1-src.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-1.c: Likewise.

>         * gcc.dg/vect/vect-peel-3-epilogue.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-3-src.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-3.c: Likewise.

>         * gcc.dg/vect/vect-peel-4-epilogue.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-4-src.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-4.c: Likewise.

>         * gcc.dg/vect/vect-reduc-6.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-u16b.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.

>         * gcc.dg/vect/vect-reduc-sad.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-half.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Likewise.

>         * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.

>         * gcc.target/aarch64/sve/reduc_strict_3.c: Likewise.

>         * gcc.target/i386/avx-vzeroupper-19.c: Likewise.

>         * gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.

>         * gcc.target/i386/avx512f-gather-2.c: Likewise.

>         * gcc.target/i386/avx512f-gather-5.c: Likewise.

>         * gcc.target/i386/l_fma_double_1.c: Likewise.

>         * gcc.target/i386/l_fma_double_2.c: Likewise.

>         * gcc.target/i386/l_fma_double_3.c: Likewise.

>         * gcc.target/i386/l_fma_double_4.c: Likewise.

>         * gcc.target/i386/l_fma_double_5.c: Likewise.

>         * gcc.target/i386/l_fma_double_6.c: Likewise.

>         * gcc.target/i386/l_fma_float_1.c: Likewise.

>         * gcc.target/i386/l_fma_float_2.c: Likewise.

>         * gcc.target/i386/l_fma_float_3.c: Likewise.

>         * gcc.target/i386/l_fma_float_4.c: Likewise.

>         * gcc.target/i386/l_fma_float_5.c: Likewise.

>         * gcc.target/i386/l_fma_float_6.c: Likewise.

>         * gcc.target/i386/mask-pack.c: Likewise.

>         * gcc.target/i386/mask-unpack.c: Likewise.

>         * gfortran.dg/vect/vect-4.f90: Likewise.
Tobias Burnus Oct. 31, 2019, 2:30 p.m. | #5
This patch seems to break
    libgomp.fortran/examples-4/simd-3.f90
at run time as the calculated value is way off: "diff = sum - sum_ref" 
is -12576 while abs(diff) < 1e-16 is the check.
It works with -O0 or without -mavx; (Hence, -Os or -O1 + -mavx cause the 
fail.)

Please have a look.

Tobias

PS: I also see other failures, namely, libgomp.fortran/nestedfn5.f90 and 
libgomp.fortran/simd1.f90 – but I have not checked whether the reason is 
the same or due to my tree or … For 
libgomp.fortran/examples-4/simd-3.f90 I did a proper bisecting.


On 10/30/19 7:16 PM, Andre Vieira (lists) wrote:
> Hi,

>

> In this patch I turn epilogue vectorization on by default for all 

> targets. After some discussions I decided to take the following 

> testing approach:

>

> 1) I have disabled epilogue vectorization for all tests that failed 

> due to scan-tree-dump failures inside:

>   - gcc.dg/vect

>   - gcc.target/i386

>   - gcc.target/aarch6

>   - gfortran.dg/vect

>

> 2) Added the Bugzilla's reported testcase but xfail the scan for 

> EPILOGUE VECTORIZED for arm*-*-* as that target does not vectorize the 

> epilogue.

>

>

> I have only been able to test this for aarch64, arm and x86_64 (with 

> avx512).  Other targets may also want to disable epilogue 

> vectorization like I did for gcc.target and gcc.dg/vect tests or xfail 

> the gcc.dg/vect/vect-epilogues.c test. I am relying on others to test 

> this for their available targets, thanks in advance!

>

> Is this OK for trunk?

>

>

> Cheers,

> Andre

>

> gcc/ChangeLog:

>

> 2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

>

>         * params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.

>

> gcc/testsuite/ChangeLog:

>

> 2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

>

>         * gcc.dg/vect/vect-epilogues.c: New test.

>         * gcc.dg/vect/fast-math-vect-call-1.c: Disable for epilogue

>         vectorization.

>         * gcc.dg/vect/no-fast-math-vect16.c: Likewise.

>         * gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c: Likewise.

>         * gcc.dg/vect/no-scevccp-vect-iv-3.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-31.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-64.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-66.c: Likewise.

>         * gcc.dg/vect/no-section-anchors-vect-68.c: Likewise.

>         * gcc.dg/vect/no-vfa-vect-dv-2.c: Likewise.

>         * gcc.dg/vect/pr33804.c: Likewise.

>         * gcc.dg/vect/pr53773.c: Likewise.

>         * gcc.dg/vect/pr65947-1.c: Likewise.

>         * gcc.dg/vect/pr65947-13.c: Likewise.

>         * gcc.dg/vect/pr65947-14.c: Likewise.

>         * gcc.dg/vect/pr65947-4.c: Likewise.

>         * gcc.dg/vect/pr80631-1.c: Likewise.

>         * gcc.dg/vect/pr80631-2.c: Likewise.

>         * gcc.dg/vect/slp-23.c: Likewise.

>         * gcc.dg/vect/slp-25.c: Likewise.

>         * gcc.dg/vect/slp-reduc-2.c: Likewise.

>         * gcc.dg/vect/slp-reduc-5.c: Likewise.

>         * gcc.dg/vect/slp-reduc-6.c: Likewise.

>         * gcc.dg/vect/slp-reduc-sad-2.c: Likewise.

>         * gcc.dg/vect/slp-widen-mult-half.c: Likewise.

>         * gcc.dg/vect/trapv-vect-reduc-4.c: Likewise.

>         * gcc.dg/vect/vect-103.c: Likewise.

>         * gcc.dg/vect/vect-109.c: Likewise.

>         * gcc.dg/vect/vect-119.c: Likewise.

>         * gcc.dg/vect/vect-24.c: Likewise.

>         * gcc.dg/vect/vect-26.c: Likewise.

>         * gcc.dg/vect/vect-27.c: Likewise.

>         * gcc.dg/vect/vect-29.c: Likewise.

>         * gcc.dg/vect/vect-42.c: Likewise.

>         * 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-54.c: Likewise.

>         * gcc.dg/vect/vect-56.c: Likewise.

>         * gcc.dg/vect/vect-58.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-89-big-array.c: Likewise.

>         * gcc.dg/vect/vect-89.c: Likewise.

>         * gcc.dg/vect/vect-91.c: Likewise.

>         * gcc.dg/vect/vect-92.c: Likewise.

>         * gcc.dg/vect/vect-96.c: Likewise.

>         * gcc.dg/vect/vect-cond-reduc-3.c: Likewise.

>         * gcc.dg/vect/vect-cond-reduc-4.c: Likewise.

>         * gcc.dg/vect/vect-live-1.c: Likewise.

>         * gcc.dg/vect/vect-live-2.c: Likewise.

>         * gcc.dg/vect/vect-live-3.c: Likewise.

>         * gcc.dg/vect/vect-live-4.c: Likewise.

>         * gcc.dg/vect/vect-live-slp-1.c: Likewise.

>         * gcc.dg/vect/vect-live-slp-2.c: Likewise.

>         * gcc.dg/vect/vect-live-slp-3.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-peel-1-epilogue.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-1-src.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-1.c: Likewise.

>         * gcc.dg/vect/vect-peel-3-epilogue.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-3-src.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-3.c: Likewise.

>         * gcc.dg/vect/vect-peel-4-epilogue.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-4-src.c: Likewise. New test.

>         * gcc.dg/vect/vect-peel-4.c: Likewise.

>         * gcc.dg/vect/vect-reduc-6.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-s16a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-s8a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-u16b.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-u8a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-dot-u8b.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-1a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-1b-big-array.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-1c-big-array.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-2a.c: Likewise.

>         * gcc.dg/vect/vect-reduc-pattern-2b-big-array.c: Likewise.

>         * gcc.dg/vect/vect-reduc-sad.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-const-s16.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-const-u16.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-half-u8.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-half.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-u16.c: Likewise.

>         * gcc.dg/vect/vect-widen-mult-u8-s16-s32.c: Likewise.

>         * gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c: Likewise.

>         * gcc.target/aarch64/sve/reduc_strict_3.c: Likewise.

>         * gcc.target/i386/avx-vzeroupper-19.c: Likewise.

>         * gcc.target/i386/avx2-vect-mask-store-move1.c: Likewise.

>         * gcc.target/i386/avx512f-gather-2.c: Likewise.

>         * gcc.target/i386/avx512f-gather-5.c: Likewise.

>         * gcc.target/i386/l_fma_double_1.c: Likewise.

>         * gcc.target/i386/l_fma_double_2.c: Likewise.

>         * gcc.target/i386/l_fma_double_3.c: Likewise.

>         * gcc.target/i386/l_fma_double_4.c: Likewise.

>         * gcc.target/i386/l_fma_double_5.c: Likewise.

>         * gcc.target/i386/l_fma_double_6.c: Likewise.

>         * gcc.target/i386/l_fma_float_1.c: Likewise.

>         * gcc.target/i386/l_fma_float_2.c: Likewise.

>         * gcc.target/i386/l_fma_float_3.c: Likewise.

>         * gcc.target/i386/l_fma_float_4.c: Likewise.

>         * gcc.target/i386/l_fma_float_5.c: Likewise.

>         * gcc.target/i386/l_fma_float_6.c: Likewise.

>         * gcc.target/i386/mask-pack.c: Likewise.

>         * gcc.target/i386/mask-unpack.c: Likewise.

>         * gfortran.dg/vect/vect-4.f90: Likewise.
Jakub Jelinek Oct. 31, 2019, 4:58 p.m. | #6
On Wed, Oct 30, 2019 at 06:16:43PM +0000, Andre Vieira (lists) wrote:
> 2019-10-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>

> 

>         * params.def (PARAM_VECT_EPILOGUES_NOMASK): Enable by default.


This broke quite a few tests in libgomp, and as they are execution failures,
just trying to work around it in the test is not a good idea.
Admittely, I haven't bisected it, but:
make check RUNTESTFLAGS="--target_board=unix/--param=vect-epilogues-nomask=0 c.exp='loop-1.c simd-*.c scan*.c pr58392.c' c++.exp='loop-1.c simd-*.C' fortran.exp='simd-*.f90 nestedfn*.f90'"
in libgomp on x86_64-linux (with avx512{f,bw,vl,dq} available in hw)
succeeds, while
make check RUNTESTFLAGS="c.exp='loop-1.c simd-*.c scan*.c pr58392.c' c++.exp='loop-1.c simd-*.C' fortran.exp='simd-*.f90 nestedfn*.f90'"
results in:
FAIL: libgomp.c/../libgomp.c-c++-common/loop-1.c execution test
FAIL: libgomp.c/examples-4/simd-3.c execution test
FAIL: libgomp.c/pr58392.c execution test
FAIL: libgomp.c/scan-13.c execution test
FAIL: libgomp.c/scan-17.c execution test
FAIL: libgomp.c/scan-19.c execution test
FAIL: libgomp.c/scan-20.c execution test
FAIL: libgomp.c/simd-10.c execution test
FAIL: libgomp.c/simd-12.c execution test
FAIL: libgomp.c/simd-13.c execution test
FAIL: libgomp.c/simd-6.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/loop-1.c execution test
FAIL: libgomp.c++/simd-8.C execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O1  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O2  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -g  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -Os  execution test
FAIL: libgomp.fortran/nestedfn5.f90   -O1  execution test
FAIL: libgomp.fortran/nestedfn5.f90   -O2  execution test
FAIL: libgomp.fortran/nestedfn5.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: libgomp.fortran/nestedfn5.f90   -O3 -g  execution test
FAIL: libgomp.fortran/nestedfn5.f90   -Os  execution test

On i686-linux, I also see newly
FAIL: gcc.dg/vect/vect-epilogues.c -flto -ffat-lto-objects  scan-tree-dump vect "LOOP EPILOGUE VECTORIZED"
FAIL: gcc.dg/vect/vect-epilogues.c scan-tree-dump vect "LOOP EPILOGUE VECTORIZED"
and in libgomp just
FAIL: libgomp.c/examples-4/simd-3.c execution test
FAIL: libgomp.c/scan-13.c execution test
FAIL: libgomp.c/scan-17.c execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O1  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O2  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -O3 -g  execution test
FAIL: libgomp.fortran/examples-4/simd-3.f90   -Os  execution test

	Jakub

Patch

diff --git a/gcc/params.def b/gcc/params.def
index 13001a7bb2d3a6fe63b3e5a455e9cb42f84669e6..6b4eb146422031bb4938016f470fe289d9a411e8 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -1392,7 +1392,7 @@  DEFPARAM (PARAM_MAX_VRP_SWITCH_ASSERTIONS,
 DEFPARAM (PARAM_VECT_EPILOGUES_NOMASK,
 	  "vect-epilogues-nomask",
 	  "Enable loop epilogue vectorization using smaller vector size.",
-	  0, 0, 1)
+	  1, 0, 1)
 
 DEFPARAM(PARAM_UNROLL_JAM_MIN_PERCENT,
 	 "unroll-jam-min-percent",
diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c b/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c
index 228190ab05dc78f46411c5105f244986b07a1188..d214e8c683af5794214c23276fe46d80b6b50698 100644
--- a/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c
+++ b/gcc/testsuite/gcc.dg/vect/fast-math-vect-call-1.c
@@ -95,4 +95,4 @@  main ()
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "vect" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
index 7a148e41d513ea1d78693fc54a74b761ace81c3b..713581a83214266637e77f1b977d12d2018517fc 100644
--- a/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
+++ b/gcc/testsuite/gcc.dg/vect/no-fast-math-vect16.c
@@ -34,4 +34,4 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
index 1d674504e2cdf03373f9827af4b47f0938f9becf..e77c0eba6ae759f688b6f30630f86e11a25db282 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-noreassoc-slp-reduc-7.c
@@ -37,5 +37,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_min_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail vect_no_int_min_max } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-7.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-7.c
index f56bd2e50af42f20f57791b2e3f0227dac13ee82..5d9a3f297d27d2230874af49331c3d3cd3ca5c39 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-7.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-outer-7.c
@@ -75,5 +75,5 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 1 "vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED." 2 "vect" { target vect_widen_mult_hi_to_si } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c b/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c
index 50b4998bb6c92427019561e0ab78cab77383e5b5..adc1081df9b4593d264ee8564878a6ff1769cdf8 100644
--- a/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c
+++ b/gcc/testsuite/gcc.dg/vect/no-scevccp-vect-iv-3.c
@@ -28,4 +28,4 @@  unsigned int main1 ()
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" { target vect_widen_sum_hi_to_si } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 2 "vect" { target vect_widen_sum_hi_to_si } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
index c3b242157ce782f0b84975c65fcdc4a36eb08fc4..5e8fb73a4dc25941f6f51a69f21417bf1ccb34fc 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c
@@ -93,5 +93,5 @@  int main (void)
 } 
 
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
index 470bbfb5537226e25d87b5bfbe84f281a42d986d..f475738db83108ee73c5eb717af49ef9d426f8c4 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-64.c
@@ -90,5 +90,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
index 805024d8058a9a8ef0abba7672193329049fdd79..8f874ed8372e929e05704ee059de0ecfa350a64f 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-66.c
@@ -78,6 +78,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { {! vect_aligned_arrays} && {vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
index 726c0de652fae1bca81752ef560b0f7e1dcff0c7..18323386823dcc3c38d7fb491d64a22231d838ce 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
@@ -90,5 +90,5 @@  int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target { {! vect_aligned_arrays} && {vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 8 "vect" { target { {! vect_aligned_arrays} && {vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target { {vect_aligned_arrays} && {! vect_sizes_32B_16B} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
index da3506a4cecdce11bf929a98c533026d31fc5f96..7fa7d439109b243243f3331969633a79780885ef 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-1.c
@@ -51,5 +51,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect"  } } */
+/* { dg-final { scan-tree-dump-times "dependence distance negative" 2 "vect"  } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
index 1880d1edb329b707489f85167d6a0063cdabeacd..52442b51c2be01049e386570c7e4ccaac4d724a3 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
@@ -51,4 +51,4 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "dependence distance negative" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
index e5914d970e3596a082e015725ba99369670db4e7..1e7f4553dd6ce4b7f863580c3140f655004efdb0 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
@@ -183,4 +183,4 @@  int main ()
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" {xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "dependence distance negative" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "dependence distance negative" 8 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
index 4513c40b34fdddcb2ff92caa65fa7323d14d6d3b..0a2b03c15578c0cc8cffa446233fb7e0fe34db3a 100644
--- a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-dv-2.c
@@ -73,5 +73,5 @@  int main ()
 
 /* The initialization induction loop (with aligned access) is also vectorized.  */
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 4 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr33804.c b/gcc/testsuite/gcc.dg/vect/pr33804.c
index 86babbe60e7312d65fab371f94273af04f6eaff7..9989addadfa5ced6095719379ff0e46c2a7c2ea0 100644
--- a/gcc/testsuite/gcc.dg/vect/pr33804.c
+++ b/gcc/testsuite/gcc.dg/vect/pr33804.c
@@ -12,4 +12,4 @@  void f(unsigned char *s, unsigned char *d, int n) {
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr53773.c b/gcc/testsuite/gcc.dg/vect/pr53773.c
index 0bcc021767e636aff950eced04e778cb990976d0..96f5b70e37a8ed9a2f101d0a70c11c95ff3d2bd9 100644
--- a/gcc/testsuite/gcc.dg/vect/pr53773.c
+++ b/gcc/testsuite/gcc.dg/vect/pr53773.c
@@ -16,6 +16,6 @@  foo (int integral, int decimal, int power_ten)
 
 /* We can avoid a scalar tail when using fully-masked loops with a fixed
    vector length.  */
-/* { dg-final { scan-tree-dump-times "\\* 10" 2 "optimized" { target { { ! vect_fully_masked } || vect_variable_length } } } } */
+/* { dg-final { scan-tree-dump-times "\\* 10" 0 "optimized" { target { { ! vect_fully_masked } || vect_variable_length } } } } */
 /* { dg-final { scan-tree-dump-times "\\* 10" 0 "optimized" { target { vect_fully_masked && { ! vect_variable_length } } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr60092-2.c b/gcc/testsuite/gcc.dg/vect/pr60092-2.c
index 7b77c20cfb8774eea34108c003ada23977f4dcbc..a86fc7ca995347cbed1f55200552bef85062d4c8 100644
--- a/gcc/testsuite/gcc.dg/vect/pr60092-2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr60092-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 int posix_memalign(void **memptr, __SIZE_TYPE__ alignment, __SIZE_TYPE__ size);
 void bar (int *);
diff --git a/gcc/testsuite/gcc.dg/vect/pr60092.c b/gcc/testsuite/gcc.dg/vect/pr60092.c
index 1d9876d423aabb5ef7ef1bce6adf76ba5cb0befa..ec122ef1e96c08cb641964514e2e1c7a20a633ce 100644
--- a/gcc/testsuite/gcc.dg/vect/pr60092.c
+++ b/gcc/testsuite/gcc.dg/vect/pr60092.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 void bar (int *);
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-1.c b/gcc/testsuite/gcc.dg/vect/pr65947-1.c
index 879819d576ac738a6b18cbc2ebe3f5be8c1c2d29..e3c5b9b8954aed5499696de708dfb20bb2745ebe 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-1.c
@@ -40,6 +40,6 @@  main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { target { ! vect_fold_extract_last } } } } */
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 8 "vect" } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 8 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 8 "vect" { target { ! vect_fold_extract_last } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-13.c b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
index e1d3ff52f5c8b3d2230598e5c9d859bf246d6c0c..73b3611003042864d56f8c3d19a7d247f2db3f6e 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-13.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-13.c
@@ -40,6 +40,6 @@  main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { xfail vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 8 "vect" } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 8 "vect" { xfail vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 8 "vect" { target vect_fold_extract_last } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-14.c b/gcc/testsuite/gcc.dg/vect/pr65947-14.c
index 9f1e4e1eb6a6ffe731a12de08899f8d1230b7d18..2fed3a8b6b0bdc857c88ad095d5e1e92c3abbed1 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-14.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-14.c
@@ -40,6 +40,6 @@  main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { target { ! vect_fold_extract_last } } } } */
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 8 "vect" } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 8 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 8 "vect" { target { ! vect_fold_extract_last } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr65947-4.c b/gcc/testsuite/gcc.dg/vect/pr65947-4.c
index 186e03a63465da695d25db76b17f80862b7768b3..7d8418762b67f19f2e54710f3299260047e3b8d8 100644
--- a/gcc/testsuite/gcc.dg/vect/pr65947-4.c
+++ b/gcc/testsuite/gcc.dg/vect/pr65947-4.c
@@ -40,7 +40,7 @@  main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 4 "vect" { target vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 4 "vect" { target { ! vect_fold_extract_last } } } } */
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 8 "vect" } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 8 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 8 "vect" { target { ! vect_fold_extract_last } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-1.c b/gcc/testsuite/gcc.dg/vect/pr80631-1.c
index f2405198a10b2deef85e8d21cecc695f735142e3..b8ae03e138a95993efff6276f460a2ee808a672f 100644
--- a/gcc/testsuite/gcc.dg/vect/pr80631-1.c
+++ b/gcc/testsuite/gcc.dg/vect/pr80631-1.c
@@ -72,5 +72,5 @@  main ()
 }
 
 /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 5 "vect" { target vect_condition } } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 10 "vect" { target vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 10 "vect" { target { { ! vect_fold_extract_last } && vect_condition } } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 15 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 5 "vect" { target { { ! vect_fold_extract_last } && vect_condition } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr80631-2.c b/gcc/testsuite/gcc.dg/vect/pr80631-2.c
index b334ca2345bdf20ab7ea1864e9c1d372f97e6944..33428a97a20b7b998e10d98dc1124976de0723c3 100644
--- a/gcc/testsuite/gcc.dg/vect/pr80631-2.c
+++ b/gcc/testsuite/gcc.dg/vect/pr80631-2.c
@@ -72,5 +72,5 @@  main ()
 }
 
 /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 5 "vect" { target vect_condition } } } */
-/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 10 "vect" { target vect_condition xfail vect_fold_extract_last } } } */
-/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 10 "vect" { target vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "condition expression based on integer induction." 15 "vect" { target vect_condition xfail vect_fold_extract_last } } } */
+/* { dg-final { scan-tree-dump-times "optimizing condition reduction with FOLD_EXTRACT_LAST" 5 "vect" { target vect_fold_extract_last } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-25.c b/gcc/testsuite/gcc.dg/vect/slp-25.c
index ff7eff202cb64ab5a4e6ff8feb71d7b1e1890bb3..62c8b4d25105ce1786a459cddf79157affb91468 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-25.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-25.c
@@ -56,5 +56,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { xfail { { ! vect_unaligned_possible } || { ! vect_natural_alignment } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c
index 07c96c00eb0e312310a5b3434e103c2962692b77..41e762ee850b18b38bfd9778e8169b75f52ec477 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-2.c
@@ -38,5 +38,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_int_add } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_add } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail vect_no_int_add } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
index fc689e46ba16683b1d384207c148edb9ff938742..50e23f17a308c0080d28f20a390f9e0d48a2280c 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-5.c
@@ -43,5 +43,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail vect_no_int_min_max } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail vect_no_int_min_max } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { xfail vect_no_int_min_max } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c
index 88591c5bdcbab0d066349b74503c3eb0a0a4cc8d..5329c078c8e3a1fc2fc174b2dfe990d830633620 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-6.c
@@ -43,6 +43,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_int_add || { ! { vect_unpack || vect_strided2 } } } } } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 1 "vect" { target { ! vect_no_int_add } } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "different interleaving chains in one node" 2 "vect" { target { ! vect_no_int_add } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c
index 5179fcc104dd45cc9cfb2d187f012f32d30e6b32..33ed241d78fa4cb89050f63a20d72395b92e8aa8 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-reduc-sad-2.c
@@ -2,6 +2,7 @@ 
 /* { dg-require-effective-target vect_usad_char } */
 /* With AVX256 or more we do not pull off the trick eliding the epilogue.  */
 /* { dg-additional-options "-mprefer-avx128" { target { x86_64-*-* i?86-*-* } } } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 typedef unsigned char uint8_t;
 int x264_pixel_sad_8x8( uint8_t *pix1, uint8_t *pix2, int i_stride_pix2 )
diff --git a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
index f5fb63e19f15988b5de4854923169aafa24d99e4..3fc31104ec992434dfa8f02f2de5ed4e65fdb297 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-widen-mult-half.c
@@ -47,6 +47,6 @@  int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
 /* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
-/* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 4 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "pattern recognized" 5 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
index 8a57eb69a91c3f48dce4385ae6e4058d2369383e..5fd1c620998cce208fa41b24157315fbcad22b95 100644
--- a/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
+++ b/gcc/testsuite/gcc.dg/vect/trapv-vect-reduc-4.c
@@ -48,6 +48,6 @@  int main (void)
 
 /* We can't handle the first loop with variable-length vectors and so
    fall back to the fixed-length mininum instead.  */
-/* { dg-final { scan-tree-dump-times "Detected reduction\\." 3 "vect" { xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-times "Detected reduction\\." 6 "vect" { xfail vect_variable_length } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { target { ! vect_no_int_min_max } } } } */
-/* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-103.c b/gcc/testsuite/gcc.dg/vect/vect-103.c
index 4a9e1574eb0cd67f25fc95da6b59ee934ed30bd3..7b288eca64641ec0ac6b9ff2b90e87ea18a60c59 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-103.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-103.c
@@ -56,5 +56,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment" 2 "vect" } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-109.c b/gcc/testsuite/gcc.dg/vect/vect-109.c
index 9a5071058991fb9f855038132fcddd83d6057ef9..c12ae7be65b16f44c68c33dc5dee2412766f04ff 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-109.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-109.c
@@ -75,6 +75,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_element_align } } } */
-/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 2 "vect" { xfail vect_element_align } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 6 "vect" { xfail vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { target vect_element_align xfail { ! vect_unaligned_possible } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-119.c b/gcc/testsuite/gcc.dg/vect/vect-119.c
index aa8c3002bff10ea1d0bc9c0389dfcd8a115a8cf0..5cb7c764a62d102a4ed73dea09f746fdf38c0c43 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-119.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-119.c
@@ -25,4 +25,4 @@  unsigned int foo (const unsigned int x[OUTER][INNER][2])
   return sum;
 }
 
-/* { dg-final { scan-tree-dump-times "Detected interleaving load of size 2" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Detected interleaving load of size 2" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-26.c b/gcc/testsuite/gcc.dg/vect/vect-26.c
index 4f0472b5d0f33dfaac536b2eda9b1fd971ca8f50..b444f1bd2fd8798e85ef43c5bcfe30051c5ff07a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-26.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-26.c
@@ -36,5 +36,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_align_stack_vars } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-27.c b/gcc/testsuite/gcc.dg/vect/vect-27.c
index 590217feee79c958999687239315c9ca4977a1bd..b45f5c777413ec80196a3110131df02cc093470e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-27.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-27.c
@@ -46,5 +46,5 @@  int main (void)
 /* The initialization induction loop (with aligned access) is also vectorized.  */
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-29.c b/gcc/testsuite/gcc.dg/vect/vect-29.c
index 86ec2cc1ddf89af2418d9bdea48b113acfcd646a..02caca832864ee40917e68d1cff5f17a5ec7e9be 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-29.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-29.c
@@ -51,6 +51,6 @@  int main (void)
 
 /* The initialization induction loop (with aligned access) is also vectorized.  */
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" {target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" {target { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-42.c b/gcc/testsuite/gcc.dg/vect/vect-42.c
index a65b4a622764ddb12fa986d0c70128df5804336e..5e63120df037498768b6ad7905446a7c1dc12177 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-42.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-42.c
@@ -64,8 +64,8 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { { ! vector_alignment_reachable } && { ! vect_element_align } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { xfail { vect_no_align || { { !  vector_alignment_reachable } || vect_element_align  } } } } }  */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target vect_element_align xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_no_align || { { ! vector_alignment_reachable } || vect_element_align } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { { ! vector_alignment_reachable } && { ! vect_element_align } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { xfail { vect_no_align || { { !  vector_alignment_reachable } || vect_element_align  } } } } }  */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { target vect_element_align xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || { { ! vector_alignment_reachable } || vect_element_align } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-44.c b/gcc/testsuite/gcc.dg/vect/vect-44.c
index 03ef2c0f6717f33867de1d3a73f011248dcb1a89..f7162475d728aeeb69b8ea3247c6ce7b8565c3ee 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-44.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-44.c
@@ -65,7 +65,7 @@  int main (void)
    two loads to be aligned).  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! vect_unaligned_possible } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && {{! vect_no_align} && {! vect_hw_misalign} } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { {! vector_alignment_reachable} && {{! vect_no_align} && {! vect_hw_misalign} } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-46.c b/gcc/testsuite/gcc.dg/vect/vect-46.c
index 185ac1424f94956fbcd5b26d0f4e6d36fd5f708b..d52f5ecfa37d075e3f5732dbdf508944c78adf52 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-46.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-46.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target vect_float } */
 /* { dg-add-options double_vectors } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-48.c b/gcc/testsuite/gcc.dg/vect/vect-48.c
index bac6ef6b8dd6c457769881f357d97f23bc9a9a9d..80ad80479891406112488fae995d0cab520e0c85 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-48.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-48.c
@@ -55,7 +55,7 @@  int main (void)
    (The store is aligned).  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 4 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-50.c b/gcc/testsuite/gcc.dg/vect/vect-50.c
index c9500ca91e5bb451084335c4eb46bfdbb8360894..61e28e8ab46f6197040bcd59f29c7b4c51697a47 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-50.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-50.c
@@ -61,7 +61,7 @@  int main (void)
    align the store will not force the two loads to be aligned).  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! vect_unaligned_possible } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { xfail { { vect_no_align && { ! vect_hw_misalign } } || {! vector_alignment_reachable} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { {! vector_alignment_reachable} && { {! vect_no_align } && {! vect_hw_misalign } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { {! vector_alignment_reachable} && { {! vect_no_align } && {! vect_hw_misalign } } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-52.c b/gcc/testsuite/gcc.dg/vect/vect-52.c
index 0343d9a24d156cb6b565bde3529be297e705b21e..a61136af182db9a655648a30058034fe0409b9bb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-52.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-52.c
@@ -56,7 +56,7 @@  int main (void)
    (The store is aligned).  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 4 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-54.c b/gcc/testsuite/gcc.dg/vect/vect-54.c
index 58201abe069e8cc244eef6173cedadbbc1728201..3f07dd71fe48cc9a698f771766d3acccc77d1877 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-54.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-54.c
@@ -60,5 +60,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_align_stack_vars } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-56.c b/gcc/testsuite/gcc.dg/vect/vect-56.c
index 8060b05e7812941044990d6062f16036e9cbc4dd..490053bae4c6d13f0dc16ceeb747501f4dcaa59a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-56.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-56.c
@@ -69,6 +69,6 @@  int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_element_align } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { { ! vect_element_align } || vect_element_align_preferred} } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_element_align && { ! vect_element_align_preferred } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { { ! vect_element_align } || vect_element_align_preferred} } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_element_align && { ! vect_element_align_preferred } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-58.c b/gcc/testsuite/gcc.dg/vect/vect-58.c
index 441af51860ea4b60da244d2c26113a977eb85ced..2a3305863a8c009d0a3ebf0600a762c070b5f9c1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-58.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-58.c
@@ -58,5 +58,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-60.c b/gcc/testsuite/gcc.dg/vect/vect-60.c
index 3b7477c96ab4bbec85341b2d2351fb2cadcd795f..59ea679844c059095d665f2c231c8f960f348b1c 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-60.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-60.c
@@ -70,6 +70,6 @@  int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_element_align } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { { ! vect_element_align } || vect_element_align_preferred } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { vect_element_align && { ! vect_element_align_preferred } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { { ! vect_element_align } || vect_element_align_preferred } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { target { vect_element_align && { ! vect_element_align_preferred } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-72.c b/gcc/testsuite/gcc.dg/vect/vect-72.c
index 472d8d57549cf73c2357c81ed1e8ac018e179c01..bbe660e7952992b64381a6a372c36bfe9469278f 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-72.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-72.c
@@ -48,5 +48,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
index 42b2b8d91aacd87128385d41d6a288ab452b37ef..61882fb1c2d20a9555a484503e6a74e83ae077c1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75-big-array.c
@@ -49,6 +49,6 @@  int main (void)
 
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/*  { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/*  { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-75.c b/gcc/testsuite/gcc.dg/vect/vect-75.c
index 2cdd703224284c1f1adf85331ca99f697c277778..9f82d042e9ebbb46524424dcee71c257219f2385 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-75.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-75.c
@@ -49,6 +49,6 @@  int main (void)
 
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c b/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
index 56ee797d10bfed44beb3229da0cde7e52ac58207..c79a5b8460f3074779cce4b557493237ff2c4eb6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77-alignchecks.c
@@ -54,8 +54,8 @@  int main (void)
    both for the load and the store.  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align } } } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 4 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && {! vect_no_align } } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 4 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-77-global.c b/gcc/testsuite/gcc.dg/vect/vect-77-global.c
index f0b73505d68c0bd66ecc5e61baf72a2d12aaae16..b1a895cdde073fcec3c4817c29e2c31255813a43 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-77-global.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-77-global.c
@@ -48,6 +48,6 @@  int main (void)
 /* Requires versioning for aliasing.  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c b/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
index c3ef8a36591a10b3600ad6ca96e2a3180f041779..2c7541154f74acf79d2b45b3f18ccbcd641ee84a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78-alignchecks.c
@@ -55,8 +55,8 @@  int main (void)
    both for the load and the store.  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && { ! vect_no_align } } } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target vect_align_stack_vars xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { ! vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 4 "vect" { target { {! vect_no_align} && { unaligned_stack && vector_alignment_reachable } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 4 "vect" { target { { {! unaligned_stack} && { vect_no_align && { ! vect_hw_misalign } } } || {unaligned_stack && { {! vector_alignment_reachable} && { ! vect_no_align } } } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 4 "vect" { target { { unaligned_stack && { vector_alignment_reachable && vect_no_align } } || {unaligned_stack && { {! vector_alignment_reachable} && vect_no_align } } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-78-global.c b/gcc/testsuite/gcc.dg/vect/vect-78-global.c
index 241e7fa94b599a601c5d3a411388c992b43d770f..4543aba12632bfb8460f6ccf2a80ddb49ceda96a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-78-global.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-78-global.c
@@ -48,6 +48,6 @@  int main (void)
    (The store is aligned).  */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-86.c b/gcc/testsuite/gcc.dg/vect/vect-86.c
index ff1d41df23f1e1eaab7f066726d5217b48fadb57..85340729256ec2f98a239ca5f0180e128a3148e8 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-86.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-86.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options bind_pic_locally } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
index decfbee318ae80936b7bf10ca2efadd3c9e1097f..fa4d59196558a986a4fba04a1db4a7690eb19b31 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-89-big-array.c
@@ -45,5 +45,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_align_stack_vars } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-89.c b/gcc/testsuite/gcc.dg/vect/vect-89.c
index 051698eada2d296afdc388a9e811259e6798a3d3..d140737d3ea05023b3de03d9555099da2cb3d824 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-89.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-89.c
@@ -49,5 +49,5 @@  int main (void)
 } 
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" { xfail { ! vect_align_stack_vars } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { xfail { ! vect_align_stack_vars } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_element_align_preferred || { ! vect_align_stack_vars } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-91.c b/gcc/testsuite/gcc.dg/vect/vect-91.c
index 9430da3290aa0d1822075c1ffb7cab2afd195dda..a45ea42ebcee2cab52dec706d2dcc993b797fb5d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-91.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-91.c
@@ -66,6 +66,6 @@  main3 ()
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { xfail vect_no_int_add } } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 3 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 6 "vect" { target { { vect_aligned_arrays } && {! vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "accesses have the same alignment." 4 "vect" { target { {! vect_aligned_arrays } && {vect_sizes_32B_16B} } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" {target { {! vector_alignment_reachable} && {! vect_hw_misalign} } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-92.c b/gcc/testsuite/gcc.dg/vect/vect-92.c
index b9a1ce23d0206dba28318b9c77c13492b45b5f3e..1d7d86361d61788e9d47b9822815b0ef8f35a23b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-92.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-92.c
@@ -97,5 +97,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 3 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 6 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-96.c b/gcc/testsuite/gcc.dg/vect/vect-96.c
index 0cb935b9f162233a3c3e35b5fbc9e22f177a81f2..091b079f56d37739bd1bd3c8b157d0bd76428e83 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-96.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-96.c
@@ -49,6 +49,6 @@  int main (void)
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && { ! vect_align_stack_vars } } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 1 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { { {! vect_no_align} && vector_alignment_reachable } && vect_align_stack_vars } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { vect_no_align } || { { ! vector_alignment_reachable} || vect_element_align } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning." 2 "vect" { target { { vect_no_align && { ! vect_hw_misalign } } || { {! vector_alignment_reachable} && {! vect_element_align} } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c
index e17c7150a061152e687f9ed7b36c951c318ddf3d..29cb1842a45481248ee3bda758b0fc8a0e1a8db1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check-5.c
@@ -14,6 +14,6 @@  f1 (struct s *a, struct s *b)
     a->x[i + GAP] += b->x[i];
 }
 
-/* { dg-final { scan-tree-dump-times "consider run-time aliasing" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 1 "vect" { xfail vect_variable_length } } } */
-/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "consider run-time aliasing" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "improved number of alias checks from 1 to 0" 2 "vect" { xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-1.c b/gcc/testsuite/gcc.dg/vect/vect-live-1.c
index e170875d7abe537782c1f4a96b01f26fbfe74a45..26d6f7a425f721d6877ff1c55c42dd7502ef1fee 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-2.c b/gcc/testsuite/gcc.dg/vect/vect-live-2.c
index a6daa61829e7ca51ef2d1e8540cd60782cdeea8a..15c7306f03b6147d483a6dfa3e6993463f896173 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-2.c
@@ -55,4 +55,4 @@  main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-3.c b/gcc/testsuite/gcc.dg/vect/vect-live-3.c
index 3ffa5166f45e982088d7e66864c9c8df5d56c4dd..e49a52481cae790b9ff15d498a73859f766287bc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-3.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-4.c b/gcc/testsuite/gcc.dg/vect/vect-live-4.c
index 21cc27320acb5a71c6a37d1439e1dabcf98252d3..f0922ed63fd286eeee4ce5e2363465ac21ba7698 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-4.c
@@ -1,4 +1,5 @@ 
 /* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c b/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c
index aff37c100f046021b7834ef0bfa399744a618dd8..68a3044ef45033d5c2a8066e8f16794fa187f486 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-slp-1.c
@@ -68,5 +68,5 @@  main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 8 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 8 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c b/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c
index 35689665b548cf6ade0c8e8e2fbd490335ce7779..98e1aa5de1c99628dd28690c07110674cfc6561d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-slp-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target vect_int } */
 /* { dg-additional-options "-fno-tree-scev-cprop" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "tree-vect.h"
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c b/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
index 854116fa36efc12bd612385ffe19b177c1fc6813..f21172ada95df4f7922203713bfdfb789be61cfb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-live-slp-3.c
@@ -69,5 +69,5 @@  main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 4 "vect" { xfail vect_variable_length } } } */
-/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 4 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 8 "vect" { xfail vect_variable_length } } } */
+/* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 8 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
index 378a5fe642ac415cd20f45e88f06e8d7b9040c98..5876a91b10ad0ec608e8ed97fa2b1af059b99706 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-1.c
@@ -89,6 +89,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { vect_no_align && { { ! vect_hw_misalign } && vect_sizes_32B_16B } } }} } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 8 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { target { vect_no_align && { { ! vect_hw_misalign } && vect_sizes_32B_16B } } }} } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
index 18bf5e80917ab38a56dfc7fbc0875b9b72683c62..bf4b8eab183a206b4b943dfb82a079af70758d93 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-3.c
@@ -58,6 +58,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 3 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 3 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using versioning" 6 "vect" { target { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 6 "vect" { xfail { ! { vect_unaligned_possible && vect_align_stack_vars } } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
index 43887865bf4db474bb9bb5092af9fd68a53fcdf9..45b5fd1a1d8f459142e1c58967307aef7e4899b9 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-4.c
@@ -93,8 +93,8 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" { target { vect_element_align}  } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { vect_no_align || vect_element_align } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 8 "vect" { target { vect_element_align}  } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 8 "vect" { xfail { vect_no_align || vect_element_align } } } } */
 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { target { ! vect_element_align } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 4 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 8 "vect" { target { vect_element_align } xfail { ! vect_unaligned_possible } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
index b47a93ab326be666ba2037c2dead5703c5f2a229..ea6eb2cff01055e8a3c7faa5362f619cbd6c37e6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-6.c
@@ -1,5 +1,6 @@ 
 /* { dg-require-effective-target vect_int } */
 /* { dg-add-options double_vectors } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include <stdarg.h>
 #include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
index fd841b182e3c81eed43a249fe401c6213814ea36..b25495e93292f1c679c0554883b9b195efaba125 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
@@ -48,5 +48,5 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "step doesn't divide the vector alignment" 1 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "step doesn't divide the vector alignment" 2 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
index d26440d1a64e887aa2cd6ccf1330cb34d244ef12..344ec6d0a18fbfeea51e09f811e71e5242a0174d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
@@ -48,5 +48,5 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "step doesn't divide the vector alignment" 1 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
+/* { dg-final { scan-tree-dump-times "step doesn't divide the vector alignment" 2 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4.c
index 9614b777aded3c9d2f5229d27ce8e5cfbce0c7d2..7a8692fa70d35ad4e117ae540b497a29615ea112 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4.c
@@ -50,5 +50,5 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "zero step in outer loop." 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c
index 658920b38660a056f44712d97fee875aec829074..3c7bc8ef04b3944bf27ed253b473126b4411d67a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c
@@ -23,5 +23,5 @@  foo (){
   }
 }
 
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { target { vect_short_mult && { ! vect_no_align } } } } } */
-/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" { target { vect_short_mult && { ! vect_no_align } } } } } */
+/* { dg-final { scan-tree-dump-times "zero step in outer loop." 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-6.c b/gcc/testsuite/gcc.dg/vect/vect-outer-6.c
index 201ca8424828d6dabe1c6d90dff8396438a71ff4..dae60b71785566f246f282f48f4ea1e645da9948 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-6.c
@@ -60,5 +60,5 @@  int main ()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "zero step in outer loop." 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "zero step in outer loop." 2 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-1.c b/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
index fae99ab0b08ab99953062a54193460baa7a271c0..ed958b5221b00e36b477805e79856049ccdbd7a6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-1.c
@@ -48,5 +48,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } xfail { ! vect_unaligned_possible } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail vect_element_align_preferred } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail vect_element_align_preferred } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-2.c b/gcc/testsuite/gcc.dg/vect/vect-peel-2.c
index b6061c3b8553b67ecdf56367b2f4128d7c0bd342..2d6dfe8c04cd007dabb07c03f982806135b779b0 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-2.c
@@ -49,5 +49,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 7 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { target { { vect_element_align } && { vect_aligned_arrays } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-3.c b/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
index d5c0cf10ce1a9725350d64d56e9e26395968eb25..7ad373985df3de74da43ec935225e131fc3bec04 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-3.c
@@ -61,5 +61,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
-/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 1 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect"  { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
+/* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 2 "vect" { xfail { { ! vect_unaligned_possible } || vect_sizes_32B_16B } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
index 88f9f0ddcbab55b84e619d9fb2086e093be95820..7dae95ab4997cac88b3bc600773d8018c7e2a407 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-peel-4.c
@@ -46,5 +46,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } } */
-/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 1 "vect"  { xfail { ! vect_unaligned_possible } } } } */
+/* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 2 "vect"  { xfail { ! vect_unaligned_possible } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using peeling" 0 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c
index ad148046a8eca15bfdb41335f4f91c219c31b71a..25c49342f5e8dfb86816f29470e9050ad28ca0a0 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-6.c
@@ -49,5 +49,5 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times {using an in-order \(fold-left\) reduction} 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c
index 171451872e56c7d9596c42e829d336b93c5ed796..6b123ef6d08082e2c40990a09acac415620b81eb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16a.c
@@ -49,7 +49,7 @@  main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_sdot_hi } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c
index ac674749b6fe09f3c0adc991c825fb9eacc9eee5..398f80bd2575e823b3fb6e847dc5bef9cfe48094 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s8a.c
@@ -53,8 +53,8 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_sdot_qi } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_mult_qi_to_hi && vect_widen_sum_hi_to_si } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c
index 57e18040cf24b71cf77788716078f6c1f08fa3a0..78a9c01159df42d9b4b0e0d58812249583bc0946 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u16b.c
@@ -44,6 +44,6 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 2 "vect" } } */
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_pack_trunc || vect_udot_hi } } } } */ 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
index d020f643bb88e739601f96d606c47406332a9db5..b3e39844f92a40765fa345474a04384826b2d477 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8a.c
@@ -51,7 +51,7 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_udot_qi } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_mult_qi_to_hi && vect_widen_sum_qi_to_si } } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
index 3155d97b3cd18cfa61dfbdea22ad2b7226192b00..17d0124a4382e129acc6f44379fce47151e89e07 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-u8b.c
@@ -43,7 +43,7 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 2 "vect" } } */
 
 /* When the vectorizer is enhanced to vectorize accumulation into short for 
    targets that support accumulation into int (powerpc, ia64) we'd have:
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c
index b06b234072b84b04182d52f1470f6568c71598dd..bbf5e7270ae3e0429b84716efd39b734d6ccca73 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1a.c
@@ -39,6 +39,6 @@  main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_hi_to_si } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_hi_to_si } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c
index be03c7d011da3422d64f25d6a185c40ea8ab4d8a..cf4e0ea31e6b7420261a2ea069cea3c403708edb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1b-big-array.c
@@ -39,6 +39,6 @@  main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si || vect_unpack } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c
index c30c85ce911b945703ea972955972088214ea2b7..ed14a9223ce90ff5c7880e041cd421b8a5e62098 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-1c-big-array.c
@@ -39,6 +39,6 @@  main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_qi_to_hi } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_qi_to_hi } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c
index a98edd3045ad61da4c501f258f9af7a05ebdb671..ef18cdd7b44c989969d1775f0258f528d6e22009 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2a.c
@@ -39,6 +39,6 @@  main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_sum_hi_to_si } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_widen_sum_hi_to_si } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c
index 570e56a8c9b7c77e509f256d0fd1a371c9e39909..dff36319abc63be5cb1803513253c104190e051d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-2b-big-array.c
@@ -40,6 +40,6 @@  main (void)
   return foo ();
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_sum_pattern: detected" 2 "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_sum_qi_to_si && vect_unpack } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { { ! vect_widen_sum_qi_to_si } && { ! vect_unpack } } } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
index 89f983cad062c4e58b1906530f775672dd5d004d..9447926a3d050f84132ed302f6a5dd0b37c55a9d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-s16.c
@@ -56,6 +56,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times {vect_recog_widen_mult_pattern: detected:[^\n]* 2333} 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times {vect_recog_widen_mult_pattern: detected:[^\n]* 2333} 4 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 /* { dg-final { scan-tree-dump-times {widen_mult pattern recognized:[^\n]* 2333} 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
index e319699cd92103f3fba580825e131517ed203306..06c0d0a0ab45ff035ec18b80f0595da522ae8988 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-const-u16.c
@@ -73,5 +73,5 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 3 "vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times {vect_recog_widen_mult_pattern: detected:[^\n]* 2333} 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
-/* { dg-final { scan-tree-dump-times {widen_mult pattern recognized:[^\n]* = \(int\)} 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times {vect_recog_widen_mult_pattern: detected:[^\n]* 2333} 4 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times {widen_mult pattern recognized:[^\n]* = \(int\)} 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
index ee0538c0635de5272e8a28016b1ffd9e2ff87401..d3eecd2c0b36b86823fec8122bf1e9cec761c820 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half-u8.c
@@ -55,6 +55,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
-/* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 4 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "pattern recognized" 4 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
index 6d74c693316ab462316dd91394ec2800a709d198..3edb91f3944e12980ab1fb210aa644730bbc3c46 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-half.c
@@ -44,6 +44,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_hi_to_si } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
-/* { dg-final { scan-tree-dump-times "pattern recognized" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c
index 942f63d6f3108ed7fd1dc8777d29ac7fd12fa045..1c78638d40e11820c91349a6d184b4558fa15dab 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u16.c
@@ -42,6 +42,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_mult_hi_to_si || vect_unpack } } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
-/* { dg-final { scan-tree-dump-times "pattern recognized" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "pattern recognized" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c
index 98f78d3b37a37b0d96a218c1962a7da8e77e0884..ab6c816bd8f43bec43600145dd3807ad427278e1 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-widen-mult-u8-s16-s32.c
@@ -42,6 +42,6 @@  int main (void)
 }
 
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_mult_hi_to_si || vect_unpack } } } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 /* { dg-final { scan-tree-dump-times "pattern recognized" 1 "vect" { target vect_widen_mult_hi_to_si_pattern } } } */
 
diff --git a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
index 176f183f3cee1836f9d7da495beb781d7e8c0587..a96f2adc66ef5b02de54f37b63951eaf095f8148 100644
--- a/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
+++ b/gcc/testsuite/gcc.dg/vect/wrapv-vect-reduc-dot-s8b.c
@@ -44,8 +44,8 @@  int main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 1 "vect" } } */
-/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_dot_prod_pattern: detected" 2 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 2 "vect" } } */
 
 /* When vectorizer is enhanced to vectorize accumulation into short for targets 
    that support accumulation into int (e.g. ia64) we'd have:
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c b/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c
index a718e9d2ebfabae80b4d00d4733cfe0706778c2d..a718d767810351e03e0d3aa38598e62d712fb164 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/reduc_strict_3.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -fno-inline -msve-vector-bits=256 -fdump-tree-vect-details" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 double mat[100][4];
 double mat2[100][8];
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/spill_2.c b/gcc/testsuite/gcc.target/aarch64/sve/spill_2.c
index fcd481611ec96cbb5a35d51fdc30e980ed3e5efb..69936103fc380f0a37ff88c14b9f221285a6650b 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/spill_2.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/spill_2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=scalable" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/aarch64/sve/spill_6.c b/gcc/testsuite/gcc.target/aarch64/sve/spill_6.c
index ae9c338f5696a9f743696b58f3d8e1dd991de501..75b8fa4d98b460522525d79d721e31c252aa7b74 100644
--- a/gcc/testsuite/gcc.target/aarch64/sve/spill_6.c
+++ b/gcc/testsuite/gcc.target/aarch64/sve/spill_6.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -ftree-vectorize -msve-vector-bits=scalable" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include <stdint.h>
 
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
index ae2f8611ea60297505421f41f0351c77e81b104e..c715ed4f5920d07584e591c9220ff8788891fd3e 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mavx -mtune=generic -dp" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 void feat_s3_cep_dcep (int cepsize_used, float **mfc, float **feat)
 {
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c b/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c
index 2a105601c7107f4411a6466082c11d9286396d9b..da1d1396093a9b676065570f396d004d16c01a68 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vect-mask-store-move1.c
@@ -1,5 +1,6 @@ 
 /* { dg-options "-O3 -mavx2 -fdump-tree-vect-details" } */
 /* { dg-require-effective-target avx2 } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "avx2-check.h"
 #define N 32
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
index a26aa6529e87daaf18986b762d803f61ccc6ae29..4613688e10f82e42b31f29253efb9f60d3f31e46 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */ /* PR59617 */
 /* { dg-options "-O3 -mavx512f -fdump-tree-vect-details -mtune=knl" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "avx512f-gather-1.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
index 2bb9c5c090b3538e5811a6b93bb1459adfb97f86..0413972e395a089274a05984f8e82f2e90d658b7 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -mavx512f -mtune=knl" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 #include "avx512f-gather-4.c"
 
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-simd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-simd-1.c
index 235fb917e17f01a7b8c81386deae5ee3468b4ae8..88aa75f2755f317f7f006f7284c0118ad1e62e44 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-simd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-simd-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-fopenmp-simd -O2 -mavx512f -masm=att" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-final { scan-assembler "vpadd\[^\n\r]*%xmm" } } */
 /* { dg-final { scan-assembler "vpadd\[^\n\r]*%ymm" } } */
 /* { dg-final { scan-assembler "vpadd\[^\n\r]*%zmm" } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
index e5bcdabcf7930c34c34541dbfbec1174059d64ae..f73367fc0ec348befb0370f9725dea894a3dbde5 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
index dbd078abc817851ef3a5800d050a301f9e6d1a16..e507100ae278902da97f2ac6229f3c6c0b107d94 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
index d0844f208e51f7018bdcb107a8ce3bee3e9c99b7..9e7265a84d21beda6bd150b06896a1c1ea702e28 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
index b9498a0ff1323b98e25e8c27343942a2818c053d..318e1bdc5516c41f5b3ef0e26523973f20b10eaa 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
index 0292ba040a318b5752619cd67f94dbf4b63177bf..8535ac6d3ec67caf17eec47559f4422d158c6915 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
index a716006eda89354146ddbbe5f25cad3c89efe05c..2b2ca53c275e188b6e64b483a54f67743345ffac 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
index b386b83e39a7c22e0f5138c9a2e87779c275c75b..33597b1b2ac869e049576bb5edb51591d3d09085 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
index 81193b2d8b12cfcb049d28e6d4aab0bd9ca0fa23..f18be33018099c8752ff30c44c96d951a271cbb4 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
index d86cb9043572a7c22c3dfe38bd62a60a23567da0..07cbb712e68db7192b700835fe51db0b48649001 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
index 68ca8388d70aad146a21267134daaf2768ec29b9..8503615c049a86363af9378567b3d03a672a0cb3 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
index 4db4749c024cd7a412e99a1dfe3132102f2b6294..4bc89d5e7c56e820ca2d72d21028325eb8511100 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
index 0b86e6256bdb50136511f4a3ed77987ce724d482..f59bf1c1751317349918cdee9c31826aaa445c8f 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
@@ -1,5 +1,6 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 
 /* Test that the compiler properly optimizes floating point multiply
    and add instructions into FMA3 instructions.  */
diff --git a/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c b/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
index 3de4dfabeea01c78d1861082f8467784384244d6..ddb098806f9b32e13eb8a6a5905316d8dc6e86cc 100644
--- a/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
+++ b/gcc/testsuite/gcc.target/i386/vect-perm-even-1.c
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-O2 -ftree-vectorize -ffast-math -mavx512bw -save-temps" } */
+/* { dg-additional-options "--param vect-epilogues-nomask=0" } */
 /* { dg-require-effective-target avx512bw } */
 
 #include "avx512bw-check.h"
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-4.f90 b/gcc/testsuite/gfortran.dg/vect/vect-4.f90
index b567cbd8644fc196c922f2b9e9418262cea5be91..b86bf4a5cf27a18a375cf462fc34ce0a43852423 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-4.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-4.f90
@@ -11,4 +11,4 @@  Y = Y + A * X
 END
 
 ! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } 
-! { dg-final { scan-tree-dump-times "accesses have the same alignment." 1 "vect" } }
+! { dg-final { scan-tree-dump-times "accesses have the same alignment." 2 "vect" } }