https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126251
Bug ID: 126251
Summary: [15/16/17 Regression] FAIL:
gcc.dg/tree-ssa/predcom-8.c scan-tree-dump-not pcom
"Invalid sum"
Product: gcc
Version: 15.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: azoff at gcc dot gnu.org
Target Milestone: ---
Starting in r15-6807-g68326d5d1a593d, gcc.dg/tree-ssa/predcom-8.c fails
"Invalid sum" test for Cortex-A7 with -mfloat-abi=hard.
Testing tree-ssa/predcom-8.c
doing compile
Executing on host: /build/r15-6807-g68326d5d1a593d/bin/arm-none-eabi-gcc
/build/gcc_src/gcc/testsuite/gcc.dg/tree-ssa/predcom-8.c -mthumb
-march=armv7ve+neon -mtune=cortex-a7 -mfloat-abi=hard
-mfpu=auto -fdiagnostics-plain-output -O3 -fdump-tree-pcom-details-blocks
-S -o predcom-8.s (timeout = 800)
spawn -ignore SIGHUP /build/r15-6807-g68326d5d1a593d/bin/arm-none-eabi-gcc
/build/gcc_src/gcc/testsuite/gcc.dg/tree-ssa/predcom-8.c -mthumb
-march=armv7ve+neon -mtune=cortex-a7 -mfloat-abi=hard
-mfpu=auto -fdiagnostics-plain-output -O3 -fdump-tree-pcom-details-blocks -S
-o predcom-8.s
pid is 1976013 -1976013
pid is -1
output is status 0
PASS: gcc.dg/tree-ssa/predcom-8.c (test for excess errors)
PASS: gcc.dg/tree-ssa/predcom-8.c scan-tree-dump pcom "Executing predictive
commoning without unrolling"
FAIL: gcc.dg/tree-ssa/predcom-8.c scan-tree-dump-not pcom "Invalid sum"
For all other arm-none-eabi targets that I test, the test pass'es.
I've confirmed that the issue is present in both r15-11320-g7909a9f85f30b6 and
r17-2366-gcfc5aa4ed975c4.
$ /build/r15-6807-g68326d5d1a593d/bin/arm-none-eabi-gcc
/build/gcc_src/gcc/testsuite/gcc.dg/tree-ssa/predcom-8.c -mthumb
-march=armv7ve+neon -mtune=cortex-a7 -mfloat-abi=hard
-mfpu=auto -fdiagnostics-plain-output -O3 -fdump-tree-all-details-blocks -S -o
predcom-8.s && grep "Invalid sum" predcom-8.*
predcom-8.c.188t.vect:;; Invalid sum of incoming counts 267993001 (estimated
locally, freq 2.3331), should be 234459439 (estimated locally, freq 2.0412)
predcom-8.c.188t.vect:;; Invalid sum of incoming counts 31724316 (estimated
locally, freq 0.2762), should be 78153146 (estimated locally, freq 0.6804)
predcom-8.c.188t.vect:;; Invalid sum of incoming counts 37162368 (estimated
locally, freq 0.3235), should be 67298542 (estimated locally, freq 0.5859)
...
The above suggest that the problem is within the vect-pass. Should we simply
add -fno-tree-vectorize to avoid the vectorization in this test? Adding
-fno-tree-vectorize appears to allow the "Invalid sum" check to pass.