gcc/libgomp/testsuite/libgomp.c++
Jakub Jelinek fab2f61dc1 vectorizer: Fix up -fsimd-cost-model= handling
>	* testsuite/libgomp.c++/scan-10.C: Add option -fvect-cost-model=cheap.

I don't think this is the right thing to do.
This just means that at some point between 2013 when -fsimd-cost-model has
been introduced and now -fsimd-cost-model= option at least partially stopped
working properly.
As documented, -fsimd-cost-model= overrides the -fvect-cost-model= setting
for OpenMP simd loops (loop->force_vectorize is true) if specified differently
from default.
In tree-vectorizer.h we have:
static inline bool
unlimited_cost_model (loop_p loop)
{
  if (loop != NULL && loop->force_vectorize
      && flag_simd_cost_model != VECT_COST_MODEL_DEFAULT)
    return flag_simd_cost_model == VECT_COST_MODEL_UNLIMITED;
  return (flag_vect_cost_model == VECT_COST_MODEL_UNLIMITED);
}
and use it in various places, but we also just use flag_vect_cost_model
in lots of places (and in one spot use flag_simd_cost_model, not sure if
we are sure it is a force_vectorize loop or what).

So, IMHO we should change the above inline function to
loop_cost_model and let it return the cost model and then just
reimplement unlimited_cost_model as
return loop_cost_model (loop) == VECT_COST_MODEL_UNLIMITED;
and then adjust the direct uses of the flag and revert these changes.

2021-10-12  Jakub Jelinek  <jakub@redhat.com>

gcc/
	* tree-vectorizer.h (loop_cost_model): New function.
	(unlimited_cost_model): Use it.
	* tree-vect-loop.c (vect_analyze_loop_costing): Use loop_cost_model
	call instead of flag_vect_cost_model.
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
	(vect_prune_runtime_alias_test_list): Likewise.  Also use it instead
	of flag_simd_cost_model.
gcc/testsuite/
	* gcc.dg/gomp/simd-2.c: Remove option -fvect-cost-model=cheap.
	* gcc.dg/gomp/simd-3.c: Likewise.
libgomp/
	* testsuite/libgomp.c/scan-11.c: Remove option -fvect-cost-model=cheap.
	* testsuite/libgomp.c/scan-12.c: Likewise.
	* testsuite/libgomp.c/scan-13.c: Likewise.
	* testsuite/libgomp.c/scan-14.c: Likewise.
	* testsuite/libgomp.c/scan-15.c: Likewise.
	* testsuite/libgomp.c/scan-16.c: Likewise.
	* testsuite/libgomp.c/scan-17.c: Likewise.
	* testsuite/libgomp.c/scan-18.c: Likewise.
	* testsuite/libgomp.c/scan-19.c: Likewise.
	* testsuite/libgomp.c/scan-20.c: Likewise.
	* testsuite/libgomp.c/scan-21.c: Likewise.
	* testsuite/libgomp.c/scan-22.c: Likewise.
	* testsuite/libgomp.c++/scan-9.C: Likewise.
	* testsuite/libgomp.c++/scan-10.C: Likewise.
	* testsuite/libgomp.c++/scan-11.C: Likewise.
	* testsuite/libgomp.c++/scan-12.C: Likewise.
	* testsuite/libgomp.c++/scan-13.C: Likewise.
	* testsuite/libgomp.c++/scan-14.C: Likewise.
	* testsuite/libgomp.c++/scan-15.C: Likewise.
	* testsuite/libgomp.c++/scan-16.C: Likewise.
2021-10-12 09:28:10 +02:00
..
examples-4
affinity-1.C openmp: Mark deprecated symbols in OpenMP 5.0 2020-11-05 10:32:56 -08:00
allocate-1.C openmp: Add support for non-VLA {,first}private allocate on omp task 2020-11-14 01:46:16 +01:00
atomic-1.C
atomic-2.C
atomic-3.C
atomic-4.C
atomic-5.C
atomic-6.C
atomic-7.C
atomic-8.C
atomic-9.C
atomic-10.C
atomic-11.C
atomic-12.C
atomic-13.C
atomic-14.C
atomic-15.C
atomic-16.C openmp: Add support for OpenMP 5.1 atomics for C++ 2021-09-17 11:28:31 +02:00
atomic-17.C openmp: Add support for OpenMP 5.1 atomics for C++ 2021-09-17 11:28:31 +02:00
c++.exp
cancel-for-1.C
cancel-for-2.C
cancel-parallel-1.C
cancel-parallel-2.C
cancel-parallel-3.C
cancel-sections-1.C
cancel-taskgroup-3.C
cancel-test.h
collapse-1.C
collapse-2.C
copyin-1.C
copyin-2.C
ctor-1.C
ctor-2.C
ctor-3.C
ctor-4.C
ctor-5.C
ctor-6.C
ctor-7.C
ctor-8.C
ctor-9.C
ctor-10.C
ctor-11.C
ctor-12.C
ctor-13.C
declare_target-1.C
default-1.C openmp: Allow private or firstprivate arguments to default clause even for C/C++ 2021-09-18 09:47:25 +02:00
depend-1.C
depend-iterator-1.C
depobj-1.C
doacross-1.C
for-1.C
for-2.C
for-3.C
for-4.C
for-5.C
for-6.C
for-7.C
for-8.C
for-15.C
for-16.C
for-21.C
for-22.C
for-23.C
for-24.C
for-25.C
for-26.C
for-27.C
lastprivate-conditional-1.C
lastprivate-conditional-2.C
linear-1.C
loop-1.C
loop-2.C
loop-3.C
loop-4.C
loop-5.C
loop-6.C
loop-7.C
loop-8.C
loop-9.C
loop-10.C
loop-11.C
loop-12.C
loop-13.C
loop-14.C
loop-15.C
master-1.C
member-1.C
member-2.C
member-3.C
member-4.C
member-5.C
member-6.C
member-7.C
nested-1.C
parallel-1.C
pr24455-1.C
pr24455.C
pr26691.C
pr26943.C
pr27337.C
pr30703.C
pr34513.C
pr35185.C
pr38650.C
pr39573.C
pr43893.C
pr48869.C
pr49043.C
pr56217.C
pr58706.C
pr63248.C
pr66702-1.C
pr66702-2.C
pr69393.C
pr69555-1.C
pr69555-2.C
pr70376.C
pr81130.C
pr81314.C
pr82835.C
pr86291.C
pr86539.C
pr86542.C
pr88988.C
pr93931.C
pr96390.C OpenMP: Handle cpp_implicit_alias in declare-target discovery (PR96390) 2020-09-28 18:08:05 +02:00
reduction-1.C
reduction-2.C
reduction-3.C
reduction-4.C
reduction-5.C
reduction-6.C
reduction-7.C
reduction-8.C
reduction-9.C
reduction-10.C
reduction-11.C
reduction-12.C
reference-1.C
scan-1.C
scan-2.C
scan-3.C
scan-4.C
scan-5.C
scan-6.C
scan-7.C
scan-8.C
scan-9.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-10.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-11.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-12.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-13.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-14.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-15.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
scan-16.C vectorizer: Fix up -fsimd-cost-model= handling 2021-10-12 09:28:10 +02:00
sections-1.C
shared-1.C
shared-2.C
simd14.C
simd-1.C
simd-2.C
simd-3.C
simd-4.C
simd-5.C
simd-6.C
simd-7.C
simd-8.C
simd-9.C
single-1.C
single-2.C
single-3.C
target-2-aux.cc
target-2.C
target-6.C
target-7.C
target-8.C
target-9.C
target-10.C
target-11.C
target-12.C
target-13.C
target-14.C
target-15.C
target-16.C
target-17.C
target-18.C
target-19.C
target-20.C
target-21.C
target-22.C
target-in-reduction-1.C openmp: in_reduction clause support on target construct 2021-06-24 11:35:08 +02:00
target-in-reduction-2.C openmp: in_reduction clause support on target construct 2021-06-24 11:35:08 +02:00
task-1.C
task-2.C
task-3.C
task-4.C
task-5.C
task-6.C
task-7.C
task-8.C
task-reduction-1.C
task-reduction-2.C
task-reduction-3.C
task-reduction-4.C
task-reduction-5.C
task-reduction-6.C
task-reduction-7.C
task-reduction-8.C
task-reduction-9.C
task-reduction-10.C
task-reduction-11.C
task-reduction-12.C
task-reduction-13.C
task-reduction-14.C
task-reduction-15.C
task-reduction-16.C
task-reduction-17.C
task-reduction-18.C
task-reduction-19.C
taskloop-5.C
taskloop-6.C
taskloop-7.C
taskloop-8.C
taskloop-9.C
taskloop-reduction-1.C
taskloop-reduction-2.C
taskloop-reduction-3.C
taskloop-reduction-4.C
tls-init1.C
udr-1.C
udr-2.C
udr-3.C c++: local-scope OMP UDR reductions have no template head 2020-09-16 12:16:11 -07:00
udr-4.C
udr-5.C
udr-6.C
udr-7.C
udr-8.C
udr-11.C
udr-12.C
udr-13.C
udr-14.C
udr-15.C
udr-16.C
udr-17.C
udr-18.C
udr-19.C
udr-20.C
udr-21.C