diff options
author | Richard Biener <rguenther@suse.de> | 2023-06-21 11:38:19 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-06-21 13:38:09 +0200 |
commit | 5d88932657de239a941ad84ef0996a906ecd8fe9 (patch) | |
tree | 1fd55b69e0b5bdde6883917dc603ef611e6d27fb /gcc/tree-ssa-loop-ivopts.cc | |
parent | fb0447b1f6b7373f57cb3a3d17a46803cfd9909d (diff) | |
download | gcc-5d88932657de239a941ad84ef0996a906ecd8fe9.zip gcc-5d88932657de239a941ad84ef0996a906ecd8fe9.tar.gz gcc-5d88932657de239a941ad84ef0996a906ecd8fe9.tar.bz2 |
Less strip_offset in IVOPTs
This avoids a strip_offset use in record_group_use where we know
it operates on addresses.
* tree-ssa-loop-ivopts.cc (record_group_use): Use
split_constant_offset.
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.cc')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.cc b/gcc/tree-ssa-loop-ivopts.cc index 82531f9..957a300 100644 --- a/gcc/tree-ssa-loop-ivopts.cc +++ b/gcc/tree-ssa-loop-ivopts.cc @@ -1175,9 +1175,6 @@ contain_complex_addr_expr (tree expr) return res; } -static tree -strip_offset (tree expr, poly_uint64_pod *offset); - /* Allocates an induction variable with given initial value BASE and step STEP for loop LOOP. NO_OVERFLOW implies the iv doesn't overflow. */ @@ -1609,7 +1606,10 @@ record_group_use (struct ivopts_data *data, tree *use_p, { unsigned int i; - addr_base = strip_offset (iv->base, &addr_offset); + gcc_assert (POINTER_TYPE_P (TREE_TYPE (iv->base))); + tree addr_toffset; + split_constant_offset (iv->base, &addr_base, &addr_toffset); + addr_offset = int_cst_value (addr_toffset); for (i = 0; i < data->vgroups.length (); i++) { struct iv_use *use; |