[Bug tree-optimization/116821] phiprop could be improved to handle PHI<&a, ssa_name>

2024-09-24 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116821 --- Comment #4 from Andrew Pinski --- So looking into why this does not work but PR 57380 does. The testcase in PR 57380 again has an ADDR_EXPR which just happens to be a pointer plus (with a multiply). _1 = &b.data[i_5]; _2 = &a.data[i_5]

[Bug tree-optimization/116821] phiprop could be improved to handle PHI<&a, ssa_name>

2024-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116821 --- Comment #3 from Andrew Pinski --- Note I will get to this tomorrow as the other 2 issues are easier and don't need a little more thought about what is "cheaply".

[Bug tree-optimization/116821] phiprop could be improved to handle PHI<&a, ssa_name>

2024-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116821 --- Comment #2 from Andrew Pinski --- We do handle: ``` struct f { int i; }; int g(int i, int c, struct f *ff) { int *t; if (c) t = &i; else t = &ff->i; return *t; } ``` (from PR 21463), just because we have an ADDR_EXPR there.

[Bug tree-optimization/116821] phiprop could be improved to handle PHI<&a, ssa_name>

2024-09-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116821 Andrew Pinski changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org