This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Valid gimple for MEM_REF
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: gcc <gcc at gcc dot gnu dot org>, "Zdenek Dvorak" <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Date: Sat, 3 Mar 2007 13:36:54 -0800
- Subject: Valid gimple for MEM_REF
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