Adjust testcase for O2 vectorization.
authorliuhongt <hongtao.liu@intel.com>
Thu, 14 Oct 2021 01:31:03 +0000 (09:31 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 20 Oct 2021 02:10:41 +0000 (10:10 +0800)
commit3c8d8c0be95e99dc0cba7f6fad2429243582119f
tree24bbf79106b6f7acb568cb4ded3b1ab330662448
parent19472fc3fc0cabcee5b8a5073e8128d21a1ed6f2
Adjust testcase for O2 vectorization.

As discussed in [1], this patch add xfail/target selector to those
testcases, also make a copy of them so that they can be tested w/o
vectorization.

Newly added xfail/target selectors are used to check the vectorization
capability of continuous byte/double bytes storage, these scenarios
are exactly the part of the testcases that regressed after O2
vectorization.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2021-October/581456.html.

2021-10-19  Hongtao Liu  <hongtao.liu@intel.com>
    Kewen Lin  <linkw@linux.ibm.com>

gcc/ChangeLog

* doc/sourcebuild.texi (Effective-Target Keywords): Document
vect_slp_v2qi_store, vect_slp_v4qi_store, vect_slp_v8qi_store,
vect_slp_v16qi_store, vect_slp_v2hi_store,
vect_slp_v4hi_store, vect_slp_v2si_store, vect_slp_v4si_store.

gcc/testsuite/ChangeLog

PR middle-end/102722
PR middle-end/102697
PR middle-end/102462
PR middle-end/102706
PR middle-end/102744
* c-c++-common/Wstringop-overflow-2.c: Adjust testcase with new
xfail/target selector.
* gcc.dg/Warray-bounds-51.c: Ditto.
* gcc.dg/Warray-parameter-3.c: Ditto.
* gcc.dg/Wstringop-overflow-14.c: Ditto.
* gcc.dg/Wstringop-overflow-21.c: Ditto.
* gcc.dg/Wstringop-overflow-68.c: Ditto.
* gcc.dg/Wstringop-overflow-76.c: Ditto.
* gcc.dg/Warray-bounds-48.c: Ditto.
* gcc.dg/Wzero-length-array-bounds-2.c: Ditto.
* lib/target-supports.exp (check_vect_slp_aligned_store_usage):
New function.
(check_effective_target_vect_slp_v2qi_store): Ditto.
(check_effective_target_vect_slp_v4qi_store): Ditto.
(check_effective_target_vect_slp_v8qi_store): Ditto.
(check_effective_target_vect_slp_v16qi_store): Ditto.
(check_effective_target_vect_slp_v2hi_store): Ditto.
(check_effective_target_vect_slp_v4hi_store): Ditto.
(check_effective_target_vect_slp_v2si_store): Ditto.
(check_effective_target_vect_slp_v4si_store): Ditto.
* c-c++-common/Wstringop-overflow-2-novec.c: New test.
* gcc.dg/Warray-bounds-51-novec.c: New test.
* gcc.dg/Warray-bounds-48-novec.c: New test.
* gcc.dg/Warray-parameter-3-novec.c: New test.
* gcc.dg/Wstringop-overflow-14-novec.c: New test.
* gcc.dg/Wstringop-overflow-21-novec.c: New test.
* gcc.dg/Wstringop-overflow-76-novec.c: New test.
* gcc.dg/Wzero-length-array-bounds-2-novec.c: New test.
19 files changed:
gcc/doc/sourcebuild.texi
gcc/testsuite/c-c++-common/Wstringop-overflow-2-novec.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/Wstringop-overflow-2.c
gcc/testsuite/gcc.dg/Warray-bounds-48-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-48.c
gcc/testsuite/gcc.dg/Warray-bounds-51-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-bounds-51.c
gcc/testsuite/gcc.dg/Warray-parameter-3-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Warray-parameter-3.c
gcc/testsuite/gcc.dg/Wstringop-overflow-14-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wstringop-overflow-14.c
gcc/testsuite/gcc.dg/Wstringop-overflow-21-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wstringop-overflow-21.c
gcc/testsuite/gcc.dg/Wstringop-overflow-68.c
gcc/testsuite/gcc.dg/Wstringop-overflow-76-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wstringop-overflow-76.c
gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2-novec.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/Wzero-length-array-bounds-2.c
gcc/testsuite/lib/target-supports.exp