aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/module.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-08-22 13:02:39 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-08-22 13:02:39 +0000
commit3a4da26602da1bd30c4ff2793fed480f180248c1 (patch)
treefc168da2cf5421fba469e6139e74375a1579bf2d /gcc/fortran/module.c
parent203942b8af64926d787b4a545184866f9572978d (diff)
downloadgcc-3a4da26602da1bd30c4ff2793fed480f180248c1.zip
gcc-3a4da26602da1bd30c4ff2793fed480f180248c1.tar.gz
gcc-3a4da26602da1bd30c4ff2793fed480f180248c1.tar.bz2
[1/2] Fix bogus double reduction (PR 86725)
This patch is the first part of the fix for PR 86725. We would treat x_1 in: outer1: x_1 = PHI <x_4(outer2), ...>; ... inner: x_2 = ...x_1...; ... x_3 = ...; ... outer2: x_4 = PHI <x_3(inner)>; ... as a double reduction without checking what kind of statement x_2 is. In practice it has to be a phi, since for other x_2, x_1 would simply be a loop invariant that gets used for every inner loop iteration. The idea with doing this patch first is that, by checking x_2 really is a phi, we can hand off the validation of the rest of the reduction to the phi analysis in the inner loop. The test case is a variant of the one in the PR. 2018-08-22 Richard Sandiford <richard.sandiford@arm.com> gcc/ PR tree-optimization/86725 * tree-vect-loop.c (vect_is_simple_reduction): When treating an outer loop phi as a double reduction, make sure that the single user of the phi result is an inner loop phi. gcc/testsuite/ PR tree-optimization/86725 * gcc.dg/vect/no-scevccp-pr86725-1.c: New test. From-SVN: r263773
Diffstat (limited to 'gcc/fortran/module.c')
0 files changed, 0 insertions, 0 deletions