https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100511
--- Comment #5 from Jiangning Liu ---
If we change "c3 = a" to "c3 = x->b", GCC can optimize it without IPA. It seems
VRP is working for this case.
$ cat tt7.c
#include
int a;
typedef struct {
int b;
int count;
} XX;
int g;
__attrib
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100511
--- Comment #4 from Richard Biener ---
I don't see how we can say x->count is loop invariant, the GIMPLE memory model
allows aliasing of 'g' via 'x->count' since the effective type of 'g' can
be a struct XX (and the store via 'g' doesn't change
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100511
--- Comment #3 from Andrew Pinski ---
(In reply to Jiangning Liu from comment #2)
> Then why gcc can't optimize this case either? sizeof (XX) <> sizeof(g) here.
The second case is a VRP issue which really should be filed seperately.
-O3 case i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100511
--- Comment #2 from Jiangning Liu ---
Then why gcc can't optimize this case either? sizeof (XX) <> sizeof(g) here.
#include
int a;
typedef struct {
int b;
int count;
} XX;
int g;
__attribute__((noinline)) void f(XX *x)
{
int c1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100511
Andrew Pinski changed:
What|Removed |Added
Keywords||alias, missed-optimization
Se