Once fre5 resolves conditional of the guard block for the vectorized
loop, cfgcleanup removes the edge that bypasses it, adjusting the
other edge probability, but not the edge's dest's count.  The blocks
get combined, and their counts are merged, but nothing adjusts the
counts of the block that lost an incoming edge.

The incoming counts remain inconsistent from that point on, and get
reported as "Invalid sum of incoming counts" in the tree dump where
vect-121.c checks for the absence of this error.

That was added in response to a fix for a vectorizer profile count
management problem.  This is a different profile count management
problem, so it makes sense to silence this failure marking it as
expected.

Regstrapped on x86_64-linux-gnu, also tested on i686-linux-gnu.
Andrew, from the PR, I get the notion that an immediate fix is not
forthcoming, so I'm proposing this.  Ok to install?

Testsuite maintainers, I forgot to explicitly copy you on another
just-posted patch:
https://gcc.gnu.org/pipermail/gcc-patches/2025-December/703362.html


for  gcc/testsuite/ChangeLog

        * gcc.dg/vect/vect-121.c: XFAIL on ia32.
---
 gcc/testsuite/gcc.dg/vect/vect-121.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/vect/vect-121.c 
b/gcc/testsuite/gcc.dg/vect/vect-121.c
index d820215ca67c0..1b9357d82a281 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-121.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-121.c
@@ -16,4 +16,4 @@ test (int start, int end)
 }
 
 /* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */
-/* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" { xfail ia32 } } 
} */

-- 
Alexandre Oliva, happy hacker            https://blog.lx.oliva.nom.br/
Free Software Activist     FSFLA co-founder     GNU Toolchain Engineer
More tolerance and less prejudice are key for inclusion and diversity.
Excluding neuro-others for not behaving ""normal"" is *not* inclusive!

Reply via email to