Skip to content
Snippets Groups Projects
Commit c1b55141 authored by Richard Biener's avatar Richard Biener
Browse files

tree-optimization/111019 - invariant motion and aliasing

The following fixes a bad choice in representing things to the alias
oracle by LIM which while correct in pieces is inconsistent with itself.
When canonicalizing a ref to a bare deref instead of leaving the base
object and the extracted offset the same and just substituting an
alternate ref the following replaces the base and the offset as well,
avoiding the confusion that otherwise will arise in
aliasing_matching_component_refs_p.

	PR tree-optimization/111019
	* tree-ssa-loop-im.cc (gather_mem_refs_stmt): When canonicalizing
	also scrap base and offset in case the ref is indirect.

	* g++.dg/torture/pr111019.C: New testcase.

(cherry picked from commit 745ec213)
parent 5ca9aea6
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment