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.
This commit is contained in:
parent
84790a9d4b
commit
d9da496a82
|
@ -19,7 +19,7 @@ struct Ax ax_;
|
|||
void gax_ (void)
|
||||
{
|
||||
ax_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ struct Ax ax0 = { 0 };
|
|||
void gax0 (void)
|
||||
{
|
||||
ax0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax0.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ struct Ax ax0_ = { 0, { } };
|
|||
void gax0_ (void)
|
||||
{
|
||||
ax0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax0_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,8 @@ struct Ax ax1 = { 1, { 0 } };
|
|||
|
||||
void gax1 (void)
|
||||
{
|
||||
ax1.a[0] = 0;
|
||||
ax1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
ax1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax1.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ struct A0 a0_;
|
|||
void ga0_ (void)
|
||||
{
|
||||
a0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a0_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a0_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ struct A0 a00 = { 0 };
|
|||
void ga00 (void)
|
||||
{
|
||||
a00.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a00.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -122,7 +122,7 @@ struct A0 a00_ = { 0, { } };
|
|||
void ga00_ (void)
|
||||
{
|
||||
a00_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a00_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -166,13 +166,13 @@ struct A1 a1_;
|
|||
|
||||
void ga1_ (void)
|
||||
{
|
||||
a1_.a[0] = 0;
|
||||
a1_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1 a;
|
||||
a.a[0] = 0;
|
||||
a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
sink (&a);
|
||||
}
|
||||
|
@ -183,8 +183,8 @@ struct A1 a1__ = { 0 };
|
|||
|
||||
void ga1__ (void)
|
||||
{
|
||||
a1__.a[0] = 0;
|
||||
a1__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1__.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1__.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1 a = { 1 };
|
||||
|
@ -200,8 +200,8 @@ struct A1 a1_0 = { 0, { } };
|
|||
|
||||
void ga1_0_ (void)
|
||||
{
|
||||
a1_0.a[0] = 0;
|
||||
a1_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1_0.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1 a = { 1, { } };
|
||||
|
@ -217,8 +217,8 @@ struct A1 a1_1 = { 0, { 1 } };
|
|||
|
||||
void ga1_1 (void)
|
||||
{
|
||||
a1_1.a[0] = 0;
|
||||
a1_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1_1.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1 a = { 0, { 1 } }; // { dg-warning "\\\[-Wstringop-overflow" "pr102706" { target { vect_slp_v4qi_store_align } } }
|
||||
|
@ -266,12 +266,12 @@ struct A1i a1i_;
|
|||
void ga1i_ (void)
|
||||
{
|
||||
a1i_.a[0] = 0;
|
||||
a1i_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i_.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1i a;
|
||||
a.a[0] = 1;
|
||||
a.a[1] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a.a[1] = 2; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a.a[2] = 3; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
sink (&a);
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ struct A1i a1i__ = { 0 };
|
|||
void ga1i__ (void)
|
||||
{
|
||||
a1i__.a[0] = 0;
|
||||
a1i__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i__.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i__.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1i a = { 0 };
|
||||
|
@ -299,8 +299,8 @@ struct A1 a1i_0 = { 0, { } };
|
|||
|
||||
void ga1i_0_ (void)
|
||||
{
|
||||
a1i_0.a[0] = 0;
|
||||
a1i_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_0.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_0.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1 a = { 0, { } };
|
||||
|
@ -316,8 +316,8 @@ struct A1 a1i_1 = { 0, { 1 } };
|
|||
|
||||
void ga1i_1 (void)
|
||||
{
|
||||
a1i_1.a[0] = 0;
|
||||
a1i_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_1.a[1] = 1; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_1.a[2] = 2; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
|
||||
struct A1 a = { 0, { 1 } }; // { dg-warning "\\\[-Wstringop-overflow" "pr102462" { target { vect_slp_v4qi_store_align } } }
|
||||
|
|
|
@ -21,7 +21,7 @@ Ax ax_;
|
|||
NOIPA void gax_ ()
|
||||
{
|
||||
ax_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ Ax ax0 = { 0 };
|
|||
NOIPA void gax0 ()
|
||||
{
|
||||
ax0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax0.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -43,7 +43,7 @@ Ax ax0_ = { 0, { } };
|
|||
NOIPA void gax0_ ()
|
||||
{
|
||||
ax0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax0_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -53,8 +53,8 @@ Ax ax1 = { 1, { 0 } };
|
|||
|
||||
NOIPA void gax1 ()
|
||||
{
|
||||
ax1.a[0] = 0;
|
||||
ax1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
ax1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
ax1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
ax1.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ A0 a0_;
|
|||
NOIPA void ga0_ ()
|
||||
{
|
||||
a0_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a0_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a0_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ A0 a00 = { 0 };
|
|||
NOIPA void ga00 ()
|
||||
{
|
||||
a00.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a00.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -124,7 +124,7 @@ A0 a00_ = { 0, { } };
|
|||
NOIPA void ga00_ ()
|
||||
{
|
||||
a00_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a00_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a00_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -168,8 +168,8 @@ A1 a1_;
|
|||
|
||||
NOIPA void ga1_ ()
|
||||
{
|
||||
a1_.a[0] = 0;
|
||||
a1_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1_.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -179,8 +179,8 @@ A1 a1__ = { 0 };
|
|||
|
||||
NOIPA void ga1__ ()
|
||||
{
|
||||
a1__.a[0] = 0;
|
||||
a1__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1__.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1__.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -190,8 +190,8 @@ A1 a1_0 = { 0, { } };
|
|||
|
||||
NOIPA void ga1_0_ ()
|
||||
{
|
||||
a1_0.a[0] = 0;
|
||||
a1_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1_0.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -201,8 +201,8 @@ A1 a1_1 = { 0, { 1 } };
|
|||
|
||||
NOIPA void ga1_1 ()
|
||||
{
|
||||
a1_1.a[0] = 0;
|
||||
a1_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1_1.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ A1i a1i_;
|
|||
NOIPA void ga1i_ ()
|
||||
{
|
||||
a1i_.a[0] = 0;
|
||||
a1i_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i_.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -255,7 +255,7 @@ A1i a1i__ = { 0 };
|
|||
NOIPA void ga1i__ ()
|
||||
{
|
||||
a1i__.a[0] = 0;
|
||||
a1i__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i__.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i__.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -265,8 +265,8 @@ A1 a1i_0 = { 0, { } };
|
|||
|
||||
NOIPA void ga1i_0_ ()
|
||||
{
|
||||
a1i_0.a[0] = 0;
|
||||
a1i_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i_0.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_0.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_0.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
@ -276,8 +276,8 @@ A1 a1i_1 = { 0, { 1 } };
|
|||
|
||||
NOIPA void ga1i_1 ()
|
||||
{
|
||||
a1i_1.a[0] = 0;
|
||||
a1i_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
a1i_1.a[0] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_1.a[1] = 0; // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
a1i_1.a[2] = 0; // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
}
|
||||
|
||||
|
|
|
@ -152,8 +152,8 @@ void ptr_add_2 (int n, int i0, int i1)
|
|||
q += i0;
|
||||
q[0] = 0; // p[0]
|
||||
q += i1;
|
||||
q[0] = 1; // p[1]
|
||||
q[1] = 2; // p[2] // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
q[0] = 1; // p[1] // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
q[1] = 2; // p[2] // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
|
||||
sink (p, q);
|
||||
}
|
||||
|
@ -175,8 +175,8 @@ void ptr_add_3 (int n, int i0, int i1, int i2)
|
|||
q[0] = 1; // p[1]
|
||||
q[1] = 2; // p[2]
|
||||
q += i2;
|
||||
q[0] = 3; // p[3]
|
||||
q[1] = 4; // p[4] // { dg-warning "\\\[-Wstringop-overflow" }
|
||||
q[0] = 3; // p[3] // { dg-warning "\\\[-Wstringop-overflow" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
q[1] = 4; // p[4] // { dg-warning "\\\[-Wstringop-overflow" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
|
||||
sink (p, q);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ void warn_comp_lit_zero (void)
|
|||
|
||||
void warn_comp_lit (void)
|
||||
{
|
||||
*(AC2*)a1 = Ac2; // { dg-warning "writing 2 bytes into a region of size 1" "pr101475" { xfail *-*-* } }
|
||||
*(AC2*)a1 = Ac2; // { dg-warning "writing 2 bytes into a region of size 1" "pr101475" { target { vect_slp_v2qi_store_unalign } } }
|
||||
// After vectorization, below codes are optimized to
|
||||
// MEM <vector(4) char> [(char *)&a2] = { 0, 1, 2, 3 };
|
||||
// MEM <vector(4) char> [(char *)&a3] = { 0, 1, 2, 3 };
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
the offset into it (although the offset might be better included in
|
||||
the warning). */
|
||||
extern char a3[3];
|
||||
extern char a5[5]; // { dg-message "at offset 5 into destination object 'a5' of size 5" "note" }
|
||||
extern char a5[5]; // { dg-message "at offset \[^a-zA-Z\n\r\]*5\[^a-zA-Z0-9\]* into destination object 'a5' of size 5" "note" }
|
||||
|
||||
void min_a3_a5 (int i)
|
||||
{
|
||||
|
@ -20,14 +20,14 @@ void min_a3_a5 (int i)
|
|||
by its own warning independently of -Wstringop-overflow. */
|
||||
char *d = p < q ? p : q;
|
||||
|
||||
d[4] = 0;
|
||||
d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[4] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
d[5] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
// Same as above but with the larger array as the first MIN_EXPR operand.
|
||||
extern char b4[4];
|
||||
extern char b6[6]; // { dg-message "at offset 6 into destination object 'b6' of size 6" "note" }
|
||||
extern char b6[6]; // { dg-message "at offset \[^a-zA-Z\n\r\]*6\[^a-zA-Z0-9\]* into destination object 'b6' of size 6" "note" }
|
||||
|
||||
void min_b6_b4 (int i)
|
||||
{
|
||||
|
@ -35,36 +35,36 @@ void min_b6_b4 (int i)
|
|||
char *q = b4 + i;
|
||||
char *d = p < q ? p : q;
|
||||
|
||||
d[5] = 0;
|
||||
d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[5] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
/* Same as above but with the first MIN_EXPR operand pointing to an unknown
|
||||
object. */
|
||||
extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
|
||||
extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
|
||||
void min_p_c7 (char *p, int i)
|
||||
{
|
||||
char *q = c7 + i;
|
||||
char *d = p < q ? p : q;
|
||||
|
||||
d[6] = 0;
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[6] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
/* Same as above but with the second MIN_EXPR operand pointing to an unknown
|
||||
object. */
|
||||
extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
|
||||
extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
|
||||
void min_d8_p (char *q, int i)
|
||||
{
|
||||
char *p = d8 + i;
|
||||
char *d = p < q ? p : q;
|
||||
|
||||
d[7] = 0;
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[7] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
|
@ -89,7 +89,7 @@ void min_A3_A5 (int i, struct A3_5 *pa3_5)
|
|||
struct B4_B6
|
||||
{
|
||||
char b4[4];
|
||||
char b6[6]; // { dg-message "at offset 6 into destination object 'b6' of size 6" "note" }
|
||||
char b6[6]; // { dg-message "at offset 6 into destination object 'b6' of size 6" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
};
|
||||
|
||||
void min_B6_B4 (int i, struct B4_B6 *pb4_b6)
|
||||
|
@ -99,13 +99,13 @@ void min_B6_B4 (int i, struct B4_B6 *pb4_b6)
|
|||
char *d = p < q ? p : q;
|
||||
|
||||
d[5] = 0;
|
||||
d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[6] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
struct C7
|
||||
{
|
||||
char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
|
||||
char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
};
|
||||
|
||||
void min_p_C7 (char *p, int i, struct C7 *pc7)
|
||||
|
@ -114,13 +114,13 @@ void min_p_C7 (char *p, int i, struct C7 *pc7)
|
|||
char *d = p < q ? p : q;
|
||||
|
||||
d[6] = 0;
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
struct D8
|
||||
{
|
||||
char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
|
||||
char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
};
|
||||
|
||||
void min_D8_p (char *q, int i, struct D8 *pd8)
|
||||
|
@ -129,5 +129,5 @@ void min_D8_p (char *q, int i, struct D8 *pd8)
|
|||
char *d = p < q ? p : q;
|
||||
|
||||
d[7] = 0;
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
|
|
@ -53,29 +53,29 @@ void max_b6_b4 (int i)
|
|||
|
||||
/* Same as above but with the first MAX_EXPR operand pointing to an unknown
|
||||
object. */
|
||||
extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
|
||||
extern char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
|
||||
void max_p_c7 (char *p, int i)
|
||||
{
|
||||
char *q = c7 + i;
|
||||
char *d = MAX (p, q);
|
||||
|
||||
d[6] = 0;
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[6] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
/* Same as above but with the second MIN_EXPR operand pointing to an unknown
|
||||
object. */
|
||||
extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
|
||||
extern char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
|
||||
void max_d8_p (char *q, int i)
|
||||
{
|
||||
char *p = d8 + i;
|
||||
char *d = MAX (p, q);
|
||||
|
||||
d[7] = 0;
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[7] = 0; // { dg-warning "writing 2 bytes into a region of size 1" "" { target { vect_slp_v2qi_store_unalign } } }
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,7 +122,7 @@ void max_B6_B4 (int i, struct B4_B6 *pb4_b6)
|
|||
|
||||
struct C7
|
||||
{
|
||||
char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" }
|
||||
char c7[7]; // { dg-message "at offset 7 into destination object 'c7' of size 7" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
};
|
||||
|
||||
void max_p_C7 (char *p, int i, struct C7 *pc7)
|
||||
|
@ -131,13 +131,13 @@ void max_p_C7 (char *p, int i, struct C7 *pc7)
|
|||
char *d = MAX (p, q);
|
||||
|
||||
d[6] = 0;
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[7] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
||||
|
||||
struct D8
|
||||
{
|
||||
char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" }
|
||||
char d8[8]; // { dg-message "at offset 8 into destination object 'd8' of size 8" "note" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
};
|
||||
|
||||
void max_D8_p (char *q, int i, struct D8 *pd8)
|
||||
|
@ -146,5 +146,5 @@ void max_D8_p (char *q, int i, struct D8 *pd8)
|
|||
char *d = MAX (p, q);
|
||||
|
||||
d[7] = 0;
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" }
|
||||
d[8] = 0; // { dg-warning "writing 1 byte into a region of size 0" "" { xfail { vect_slp_v2qi_store_unalign } } }
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue