tree-optimization/98137 - enhance split_constant_offset range handling
authorRichard Biener <rguenther@suse.de>
Fri, 4 Dec 2020 10:13:48 +0000 (11:13 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 7 Dec 2020 07:15:15 +0000 (08:15 +0100)
commit7b4ea2827d2003c8ffc76cd478f8974360cbd78f
tree31ea9a8ce51a8fef5e4214c627c118778a5a1546
parent0e49145550fe1284dc56e8e02ba1720c4f737a74
tree-optimization/98137 - enhance split_constant_offset range handling

split_constant_offset currently gives up looking at ranges when
dealing with possibly wrapping operations for looking through
conversions when the downstream analysis does not yield a SSA name.
That's overly conservative and we have a nice helper that can
deal with arbitrary expresssions.  Use that.  This helps data
reference group analysis so the testcase is fully SLP vectorized,
making use of the whole-function "BB" vectorization capabilities
we now have.

2020-12-04  Richard Biener  <rguenther@suse.de>

PR tree-optimization/98137
* tree-data-ref.c (split_constant_offset_1): Use
determine_value_range instead of get_range_info to handle
arbitrary expressions.

* gcc.dg/vect/bb-slp-pr98137.c: New testcase.
gcc/testsuite/gcc.dg/vect/bb-slp-pr98137.c [new file with mode: 0644]
gcc/tree-data-ref.c