tree-optimization/101293 - further enhance LIMs ref canonicalization
This makes sure to handle MEM[p + 4] and MEM[p].j with j at offset 4
as the same ref in store motion. For hashing we need to be
more restrictive in what we handle since there's no poly-int
handlers for inchash. For comparison we can compare poly_offsets directly.
2021-07-02 Richard Biener <rguenther@suse.de>
PR tree-optimization/101293
* tree-ssa-loop-im.c (mem_ref_hasher::equal): Compare MEM_REF bases
with combined offsets.
(gather_mem_refs_stmt): Hash MEM_REFs as if their offset were
combined with the rest of the offset.
* gcc.dg/tree-ssa/ssa-lim-15.c: New testcase.