aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-11-14 11:37:13 +0100
committerRichard Biener <rguenther@suse.de>2023-11-14 13:44:56 +0100
commit5ea2965b499f9e491e45db19fedbccfccb75076a (patch)
tree099d234a5276bc4530d1bdcdc5fc57aab5818926 /gcc/expr.cc
parentb9fd8399ec027ce42fd35a070ce38de8d69521b2 (diff)
downloadgcc-5ea2965b499f9e491e45db19fedbccfccb75076a.zip
gcc-5ea2965b499f9e491e45db19fedbccfccb75076a.tar.gz
gcc-5ea2965b499f9e491e45db19fedbccfccb75076a.tar.bz2
tree-optimization/112281 - loop distribution and zero dependence distances
We currently distribute for (c = 2; c; c--) for (e = 0; e < 2; e++) { d[c] = b = d[c + 1]; d[c + 1].a = 0; } in a wrong way where the inner loop zero dependence distance should make us preserve stmt execution order. We fail to do so since we only look for a fully zero distance vector rather than looking at the innermost loop distance. This is somewhat similar to PR87022 where we instead looked at the outermost loop distance and changed this to what we do now. The following switches us to look at the innermost loop distance. PR tree-optimization/112281 * tree-loop-distribution.cc (pg_add_dependence_edges): Preserve stmt order when the innermost loop has exact overlap. * gcc.dg/torture/pr112281.c: New testcase.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions