* [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c @ 2023-03-25 8:35 Alexandre Oliva 2023-03-27 7:03 ` Kewen.Lin 0 siblings, 1 reply; 6+ messages in thread From: Alexandre Oliva @ 2023-03-25 8:35 UTC (permalink / raw) To: gcc-patches Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool, Kewen Lin The first loop in main gets stores "vectorized" on powerpc into full-word stores, even without any vector instruction support, so the test's expectation of no loop vectorization is not met. Regstrapped on ppc64-linux-gnu. Also tested with ppc64-vxworks7r2 (gcc-12). Ok to install? for gcc/testsuite/ChangeLog * gcc.dg/tree-ssa/gen-vect-11c.c: xfail the test for no vectorization on powerpc*-*-*. --- gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c index 22ff44cf66da9..116f6af233887 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c @@ -39,4 +39,4 @@ int main () } -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail amdgcn*-*-* } } } */ +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail amdgcn*-*-* powerpc*-*-* } } } */ -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c 2023-03-25 8:35 [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c Alexandre Oliva @ 2023-03-27 7:03 ` Kewen.Lin 2023-04-06 5:20 ` Alexandre Oliva 0 siblings, 1 reply; 6+ messages in thread From: Kewen.Lin @ 2023-03-27 7:03 UTC (permalink / raw) To: Alexandre Oliva Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool, Kewen Lin, gcc-patches Hi Alexandre, on 2023/3/25 16:35, Alexandre Oliva wrote: > > The first loop in main gets stores "vectorized" on powerpc into > full-word stores, even without any vector instruction support, so the > test's expectation of no loop vectorization is not met. > I think this test issue has been gone since r13-5771-gdc87e1391c55c6. Could you have a double check? BR, Kewen > Regstrapped on ppc64-linux-gnu. Also tested with ppc64-vxworks7r2 > (gcc-12). Ok to install? > > > for gcc/testsuite/ChangeLog > > * gcc.dg/tree-ssa/gen-vect-11c.c: xfail the test for no > vectorization on powerpc*-*-*. > --- > gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c > index 22ff44cf66da9..116f6af233887 100644 > --- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c > +++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c > @@ -39,4 +39,4 @@ int main () > } > > > -/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail amdgcn*-*-* } } } */ > +/* { dg-final { scan-tree-dump-times "vectorized 0 loops" 1 "vect" { xfail amdgcn*-*-* powerpc*-*-* } } } */ > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c 2023-03-27 7:03 ` Kewen.Lin @ 2023-04-06 5:20 ` Alexandre Oliva 2023-04-06 6:48 ` Kewen.Lin 0 siblings, 1 reply; 6+ messages in thread From: Alexandre Oliva @ 2023-04-06 5:20 UTC (permalink / raw) To: Kewen.Lin Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool, Kewen Lin, gcc-patches Hello, Kewen, On Mar 27, 2023, "Kewen.Lin" <linkw@linux.ibm.com> wrote: > on 2023/3/25 16:35, Alexandre Oliva wrote: >> The first loop in main gets stores "vectorized" on powerpc into >> full-word stores, even without any vector instruction support, so the >> test's expectation of no loop vectorization is not met. > I think this test issue has been gone since r13-5771-gdc87e1391c55c6. That patch has been backported to gcc-12 as r12-9258-g21e7145aaf582c. > Could you have a double check? I confirm I observe the problem with gcc-12 targeting ppc64-vx7r2, containing the backported patch, and that the loop is vectorized, failing the test. It's unfortunately not viable for me to test GCC trunk with vxworks, so my testing with it is limited to earlier GCC versions, that we (AdaCore) have already ported or are in the process of porting. I make up for that by testing trunk with other target variants, to the best of my abilities, to avoid regressions, but sometimes I just can't tell whether my baseline for regression testing doesn't contain a failure because there's another fix, or because it just doesn't fail on that target variant. In this case, the comments in the patch you mentioned don't seem to match the situation at hand: the SImode stores vectorized into V2SImode (DImode) seem profitable and are *not* split by vector lowering. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c 2023-04-06 5:20 ` Alexandre Oliva @ 2023-04-06 6:48 ` Kewen.Lin 2023-04-07 4:37 ` Alexandre Oliva 0 siblings, 1 reply; 6+ messages in thread From: Kewen.Lin @ 2023-04-06 6:48 UTC (permalink / raw) To: Alexandre Oliva Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool, Kewen Lin, gcc-patches Hi Alexandre, on 2023/4/6 13:20, Alexandre Oliva wrote: > Hello, Kewen, > > On Mar 27, 2023, "Kewen.Lin" <linkw@linux.ibm.com> wrote: > >> on 2023/3/25 16:35, Alexandre Oliva wrote: > >>> The first loop in main gets stores "vectorized" on powerpc into >>> full-word stores, even without any vector instruction support, so the >>> test's expectation of no loop vectorization is not met. > >> I think this test issue has been gone since r13-5771-gdc87e1391c55c6. > > That patch has been backported to gcc-12 as r12-9258-g21e7145aaf582c. > >> Could you have a double check? > > I confirm I observe the problem with gcc-12 targeting ppc64-vx7r2, > containing the backported patch, and that the loop is vectorized, > failing the test. Thanks for confirming! Sorry that I didn't have a vxworks env to reproduce this locally, but I guessed that vxworks env doesn't have its specific configurations on vectorization?, so I tried to reproduce this on a env with powerpc64-linux-gnu, with the latest gcc-12 branch (r12-9388), I still saw it passed with vect dumping: gen-vect-11c.c:26:17: note: ==> examining statement: _3 = _1 + _2; gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ib[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ic[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int not using word mode for +- and less than four vector elements gen-vect-11c.c:28:21: missed: not vectorized: relevant stmt not supported: _3 = _1 + _2; gen-vect-11c.c:26:17: missed: bad operation or unsupported loop bound. gen-vect-11c.c:26:17: note: ***** Analysis failed with vector mode DI gen-vect-11c.c:26:17: missed: couldn't vectorize loop gen-vect-11c.c:18:5: note: vectorized 0 loops in function. By reverting r12-9258-g21e7145aaf582c, I saw it failed with dumping: gen-vect-11c.c:26:17: note: ==> examining statement: _3 = _1 + _2; gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ib[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int gen-vect-11c.c:26:17: note: vect_is_simple_use: operand ic[i_24], type of def: internal gen-vect-11c.c:26:17: note: vect_is_simple_use: vectype vector(2) int ... gen-vect-11c.c:26:17: note: ***** Analysis succeeded with vector mode DI gen-vect-11c.c:26:17: note: ***** Choosing vector mode DI gen-vect-11c.c:26:17: optimized: loop vectorized using 8 byte vectors > > > It's unfortunately not viable for me to test GCC trunk with vxworks, so > my testing with it is limited to earlier GCC versions, that we (AdaCore) > have already ported or are in the process of porting. I make up for > that by testing trunk with other target variants, to the best of my > abilities, to avoid regressions, but sometimes I just can't tell whether > my baseline for regression testing doesn't contain a failure because > there's another fix, or because it just doesn't fail on that target > variant. > > > In this case, the comments in the patch you mentioned don't seem to > match the situation at hand: the SImode stores vectorized into V2SImode > (DImode) seem profitable and are *not* split by vector lowering. > Yeah, but the case also have "+" (PLUS), it results in a unvectorized decision as the above dumping, I'm not quite sure what's the difference between our ENVs and something caused that you didn't see the above analysis failure on your side, do you mind to have a further check? BR, Kewen ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c 2023-04-06 6:48 ` Kewen.Lin @ 2023-04-07 4:37 ` Alexandre Oliva 2023-04-07 9:57 ` Kewen.Lin 0 siblings, 1 reply; 6+ messages in thread From: Alexandre Oliva @ 2023-04-07 4:37 UTC (permalink / raw) To: Kewen.Lin Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool, Kewen Lin, gcc-patches On Apr 6, 2023, "Kewen.Lin" <linkw@linux.ibm.com> wrote: > on 2023/4/6 13:20, Alexandre Oliva wrote: >> I confirm I observe the problem with gcc-12 targeting ppc64-vx7r2, >> containing the backported patch, and that the loop is vectorized, >> failing the test. I take that back. My notes indicate I looked into this failure on March 15th. The patch you referenced was dated Feb 10, so I assumed it was already in when I looked into it: my confirmation amounted to checking what I had observed according to my notes, and when. But now that you asked me to investigate it again, I used a far more recent tree, and I failed to duplicate it. Digging further, I found out the patch, despite its commit date, was only merged into gcc-12 on March 16th. What I was missing to get the intended effects of the fix was just a fresher tree athat actually contained the fix. I suppose this means we don't need the testsuite tweak, after all. Patch withdrawn. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org> ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c 2023-04-07 4:37 ` Alexandre Oliva @ 2023-04-07 9:57 ` Kewen.Lin 0 siblings, 0 replies; 6+ messages in thread From: Kewen.Lin @ 2023-04-07 9:57 UTC (permalink / raw) To: Alexandre Oliva Cc: Rainer Orth, Mike Stump, David Edelsohn, Segher Boessenkool, Kewen Lin, gcc-patches Hi Alexandre, on 2023/4/7 12:37, Alexandre Oliva wrote: > On Apr 6, 2023, "Kewen.Lin" <linkw@linux.ibm.com> wrote: > >> on 2023/4/6 13:20, Alexandre Oliva wrote: >>> I confirm I observe the problem with gcc-12 targeting ppc64-vx7r2, >>> containing the backported patch, and that the loop is vectorized, >>> failing the test. > > I take that back. My notes indicate I looked into this failure on March > 15th. The patch you referenced was dated Feb 10, so I assumed it was > already in when I looked into it: my confirmation amounted to checking > what I had observed according to my notes, and when. > > But now that you asked me to investigate it again, I used a far more > recent tree, and I failed to duplicate it. Digging further, I found out > the patch, despite its commit date, was only merged into gcc-12 on March > 16th. What I was missing to get the intended effects of the fix was > just a fresher tree athat actually contained the fix. aha, good to know it's not due to some differences between our ENVs or some other mysteries. :) Thanks for checking. > > I suppose this means we don't need the testsuite tweak, after all. Yeah. :) BR, Kewen > Patch withdrawn. > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-07 9:58 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-03-25 8:35 [PATCH] [testsuite] [ppc] expect vectorization in gen-vect-11c.c Alexandre Oliva 2023-03-27 7:03 ` Kewen.Lin 2023-04-06 5:20 ` Alexandre Oliva 2023-04-06 6:48 ` Kewen.Lin 2023-04-07 4:37 ` Alexandre Oliva 2023-04-07 9:57 ` Kewen.Lin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).