aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorTamar Christina <tamar.christina@arm.com>2024-01-10 14:31:02 +0000
committerTamar Christina <tamar.christina@arm.com>2024-01-10 14:31:57 +0000
commit91fd5c94965b4077490c6bfcc9aa4b0e4146b38a (patch)
tree6b0b956fe0cfb4a301857c894796476cd0fb3ad5 /gcc/c
parentcac9d2d2346bf06b29b34e12cf0a005c37eacdc9 (diff)
downloadgcc-91fd5c94965b4077490c6bfcc9aa4b0e4146b38a.zip
gcc-91fd5c94965b4077490c6bfcc9aa4b0e4146b38a.tar.gz
gcc-91fd5c94965b4077490c6bfcc9aa4b0e4146b38a.tar.bz2
middle-end: correctly identify the edge taken when condition is true. [PR113287]
The vectorizer needs to know during early break vectorization whether the edge that will be taken if the condition is true stays or leaves the loop. This is because the code assumes that if you take the true branch you exit the loop. If you don't exit the loop it has to generate a different condition. Basically it uses this information to decide whether it's generating a "any element" or an "all element" check. Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu and no issues with --enable-lto --with-build-config=bootstrap-O3 --enable-checking=release,yes,rtl,extra. gcc/ChangeLog: PR tree-optimization/113287 * tree-vect-stmts.cc (vectorizable_early_exit): Check the flags on edge instead of using BRANCH_EDGE to determine true edge. gcc/testsuite/ChangeLog: PR tree-optimization/113287 * gcc.dg/vect/vect-early-break_100-pr113287.c: New test. * gcc.dg/vect/vect-early-break_99-pr113287.c: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions