This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/78899] [7 Regression] Vestorized loop with optmized mask stores motion is completely deleted after r242520.
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Jan 2017 16:02:00 +0000
- Subject: [Bug tree-optimization/78899] [7 Regression] Vestorized loop with optmized mask stores motion is completely deleted after r242520.
- Auto-submitted: auto-generated
- References: <bug-78899-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78899
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Somewhat more simplified:
/* PR c++/71077 */
/* { dg-do compile } */
/* { dg-options "-O3" } */
/* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
void
foo (int *a, int n)
{
int b, c;
for (b = 0; b < n; b++)
for (c = 0; c < 32; c++)
if ((b & 1U) << c)
a[b + c] = 0;
}
Apparently we with the patch manage to vectorize both the outer loop and in the
version with non-vectorizable outer loop the inner loop and something is wrong
with rewriting into loop closed ssa.
I guess best would be to arrange for the outer loops to be vectorized before
the inner one, vectorizing the inner one then is likely not beneficial anyway
(it will be only in the scalar loop).