diff options
author | Richard Biener <rguenther@suse.de> | 2019-01-02 12:19:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2019-01-02 12:19:10 +0000 |
commit | 4c3643a559980f84e5749f470c35badadc1c570e (patch) | |
tree | 8b2302c253e464ba73529be61b5ca0d09953b3b5 /gcc/tree-ssa-loop-im.c | |
parent | 3ff59baa1c1ba8203a1b105f81b89829735d4890 (diff) | |
download | gcc-4c3643a559980f84e5749f470c35badadc1c570e.zip gcc-4c3643a559980f84e5749f470c35badadc1c570e.tar.gz gcc-4c3643a559980f84e5749f470c35badadc1c570e.tar.bz2 |
re PR tree-optimization/88621 (wrong code at -O1 and above on x86_64-linux-gnu in 64-bit mode (not in 32-bit mode))
2019-01-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/88621
* tree-ssa-loop-im.c (gather_mem_refs_stmt): Fix pastos, avoid
bitfields when canoncalizing.
* gcc.dg/torture/pr88621.c: New testcase.
From-SVN: r267510
Diffstat (limited to 'gcc/tree-ssa-loop-im.c')
-rw-r--r-- | gcc/tree-ssa-loop-im.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-ssa-loop-im.c b/gcc/tree-ssa-loop-im.c index 58da79d..0919931 100644 --- a/gcc/tree-ssa-loop-im.c +++ b/gcc/tree-ssa-loop-im.c @@ -1468,9 +1468,10 @@ gather_mem_refs_stmt (struct loop *loop, gimple *stmt) tree mem_base; if (aor.max_size_known_p () && aor.offset.is_constant (&offset) - && aor.offset.is_constant (&size) - && aor.offset.is_constant (&max_size) + && aor.size.is_constant (&size) + && aor.max_size.is_constant (&max_size) && size == max_size + && (size % BITS_PER_UNIT) == 0 && (mem_base = get_addr_base_and_unit_offset (aor.ref, &mem_off))) { hash = iterative_hash_expr (ao_ref_base (&aor), 0); |