[Bug c/109393] Very trivial address calculation does not fold

2025-06-18 Thread haochen.jiang at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #15 from Haochen Jiang --- After some "quick" trial, I would like to say it might not be that easy for backend to handle this if the (x-t) are widely used afterwards in the code, where t could be any integer offset, since compiler mi

[Bug c/109393] Very trivial address calculation does not fold

2025-06-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 Sam James changed: What|Removed |Added Target Milestone|--- |15.0

[Bug c/109393] Very trivial address calculation does not fold

2025-06-16 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #1

[Bug c/109393] Very trivial address calculation does not fold

2025-06-16 Thread haochen.jiang at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #13 from Haochen Jiang --- One thing forget to mention, we definitely could handle this at the backend, but my question is if this optimization has more pros than cons.

[Bug c/109393] Very trivial address calculation does not fold

2025-06-16 Thread haochen.jiang at intel dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 Haochen Jiang changed: What|Removed |Added CC||haochen.jiang at intel dot com --- Comm

[Bug c/109393] Very trivial address calculation does not fold

2024-09-25 Thread cmuellner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 Christoph Müllner changed: What|Removed |Added CC||cmuellner at gcc dot gnu.org

[Bug c/109393] Very trivial address calculation does not fold

2024-09-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #10 from GCC Commits --- The master branch has been updated by Philipp Tomsich : https://gcc.gnu.org/g:08b8341f209be7c7e301853bdbbcad4f8e1695f5 commit r15-3862-g08b8341f209be7c7e301853bdbbcad4f8e1695f5 Author: Konstantinos Elefther

[Bug c/109393] Very trivial address calculation does not fold

2023-09-08 Thread manolis.tsamis at vrull dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #9 from Manolis Tsamis --- Created attachment 55856 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55856&action=edit Address calculation pattern v1

[Bug c/109393] Very trivial address calculation does not fold

2023-09-04 Thread philipp.tomsich at vrull dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #8 from philipp.tomsich at vrull dot eu --- On Mon, 4 Sept 2023 at 13:38, manolis.tsamis at vrull dot eu < gcc-bugzi...@gcc.gnu.org> wrote: > My current match.pd pattern to do that is below; any feedback or > improvements > are welco

[Bug c/109393] Very trivial address calculation does not fold

2023-09-04 Thread manolis.tsamis at vrull dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #7 from Manolis Tsamis --- After some attempts to improve on this, my current solution is: 1) Do not change pointer_int_sum in c-common (otherwise codegen regressions are observed) 2) Introduce a pattern that folds (unsigned type

[Bug c/109393] Very trivial address calculation does not fold

2023-05-11 Thread manolis.tsamis at vrull dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #6 from manolis.tsamis at vrull dot eu --- (In reply to Richard Biener from comment #5) > (In reply to manolis.tsamis from comment #4) > > Given the original transform it should be valid to propagate the constant > > addition through

[Bug c/109393] Very trivial address calculation does not fold

2023-05-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #5 from Richard Biener --- (In reply to manolis.tsamis from comment #4) > Given the original transform it should be valid to propagate the constant > addition through the cast? Yes. Note doing so loses information, we know i + 1 do

[Bug c/109393] Very trivial address calculation does not fold

2023-05-10 Thread manolis.tsamis at vrull dot eu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 --- Comment #4 from manolis.tsamis at vrull dot eu --- (In reply to Richard Biener from comment #3) > It's probably a mismatch of GENERIC/GIMPLE folding. In this case it's > pointer_int_sum prematurely distributing the multiplication: > > /* Re

[Bug c/109393] Very trivial address calculation does not fold

2023-04-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109393 Richard Biener changed: What|Removed |Added Component|tree-optimization |c Status|UNCONFIRMED