diff options
author | Uros Bizjak <ubizjak@gmail.com> | 2021-12-31 14:06:07 +0100 |
---|---|---|
committer | Uros Bizjak <ubizjak@gmail.com> | 2021-12-31 14:06:52 +0100 |
commit | d9da496a82c0ba33098d622efba34f4750c4ccb9 (patch) | |
tree | 3958ea02955c3097d771dc631174c17e34f9e51a /gcc/testsuite/lib | |
parent | 84790a9d4bb828acc8d45f484934d53641ecb6e5 (diff) |
testsuite: XFAIL some Wstringop-overflow tests ...
... for targets that support vectorization of 2-byte char stores
with unaligned address at plain O2.
2021-12-31 Uroš Bizjak <ubizjak@gmail.com>
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_vect_slp_store_usage):
Handle TEST_V2QI_2.
(check_effective_target_vect_slp_v2qi_store_unalign): New procedure.
* c-c++-common/Wstringop-overflow-2.c: XFAIL specific tests for
vect_slp_v2qi_store_unalign targets.
* g++.dg/warn/Wstringop-overflow-3.C: Ditto.
* gcc.dg/Wstringop-overflow-28.c: Ditto.
* gcc.dg/Wstringop-overflow-68.c: Ditto.
* gcc.dg/Wstringop-overflow-75.c: Ditto.
* gcc.dg/Wstringop-overflow-76.c: Ditto.
Diffstat (limited to 'gcc/testsuite/lib')
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 039125c866a..47bf413c262 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -7665,6 +7665,14 @@ proc check_vect_slp_store_usage { pattern macro } { a.a[1] = 4; sink (&a); } + #elif TEST_V2QI_2 + extern char p[2]; + void + foo3_2 () + { + p[0] = 0; + p[1] = 1; + } #elif TEST_V4HI struct Ax { @@ -7763,7 +7771,15 @@ proc check_effective_target_vect_slp_v2qi_store_align { } { set macro "TEST_V2QI" return [check_cached_effective_target vect_slp_v2qi_store_align { expr [check_vect_slp_store_usage $pattern $macro] }] +} +# Return the true if target support vectorization of 2-byte char stores +# with unaligned address at plain O2. +proc check_effective_target_vect_slp_v2qi_store_unalign { } { + set pattern {add new stmt: MEM <vector\(2\) char>} + set macro "TEST_V2QI_2" + return [check_cached_effective_target vect_slp_v2qi_store_unalign { + expr [check_vect_slp_store_usage $pattern $macro ] }] } # Return the true if target support vectorization of 4-byte char stores |