I noticed that gcc.dg/tree-ssa/loop-19.c was failing on both
powerpc-linux-gnu and powerpc64-linux-gnu:
FAIL: gcc.dg/tree-ssa/loop-19.c scan-tree-dump-times MEM.(base: &|symbol: )a, 2
FAIL: gcc.dg/tree-ssa/loop-19.c scan-tree-dump-times MEM.(base: &|symbol: )c, 2

The reason why they are failing is because we produce:
MEM[base: (double *) &c, index: ivtmp.34] = MEM[base: (double *) &a,
index: ivtmp.34];
Which does not match the regex as there is a cast there.
Now the real question comes down to, is the following valid gimple
that IV-OPTS produces:
MEM[base: (double *) &a, index: ivtmp.34_12];

base is now a non gimple invariant but instead is a full expression.
If we decide to do any other optimizations with MEM_REF, we might run
into more of these issues?

So what are the constraints on MEM_REF's base argument, is it a simple
expression (SSA_name or invariant) or can it be a complex expression?

Thanks,
Andrew Pinski

Reply via email to