The following fixes the index guards on the component stripping
loops, I swapped them it seems.
PR tree-optimization/121362
* tree-ssa-sccvn.cc (vn_reference_lookup_3): Swap index
guards on component stripping loops.
try finding a match in one of the outer components and continue
stripping there. This happens when addresses of components get
forwarded into dereferences. */
- if (j > 0)
+ if (i > 0)
{
int temi = i - 1;
extra_off = vr->operands[i].off;
temi--;
}
}
- if (!found && i > 0)
+ if (!found && j > 0)
{
int temj = j - 1;
extra_off = -lhs_ops[j].off;