Use range info in split_constant_offset (PR 81635)
This patch implements the original suggestion for fixing PR 81635: use range info in split_constant_offset to see whether a conversion of a wrapping type can be split. The range info problem described in: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01002.html seems to have been fixed. The patch is part 1. There needs to be a follow-on patch to handle: for (unsigned int i = 0; i < n; i += 4) { ...[i + 2]... ...[i + 3]... which the old SCEV test handles, but which the range check doesn't. At the moment we record that the low two bits of "i" are clear, but we still end up with a maximum range of 0xffffffff rather than 0xfffffffc. 2018-01-31 Richard Sandiford <richard.sandiford@linaro.org> gcc/ PR tree-optimization/81635 * tree-data-ref.c (split_constant_offset_1): For types that wrap on overflow, try to use range info to prove that wrapping cannot occur. gcc/testsuite/ PR tree-optimization/81635 * gcc.dg/vect/bb-slp-pr81635-1.c: New test. * gcc.dg/vect/bb-slp-pr81635-2.c: Likewise. From-SVN: r257296
Showing
gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-1.c
0 → 100644
gcc/testsuite/gcc.dg/vect/bb-slp-pr81635-2.c
0 → 100644
Please
register
or
sign in
to comment