[Bug tree-optimization/64450] Optimize 0>=p-q to q>=p for char*p,*q;

2023-10-23 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64450 Andrew Pinski changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug tree-optimization/64450] Optimize 0>=p-q to q>=p for char*p,*q;

2023-05-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64450 --- Comment #3 from Andrew Pinski --- (for cmp (tcc_comparison) (simplify (cmp (pointer_diff @0 @1) integer_zero_p) (cmp @0 @1))) Maybe But we might also need handle the match patterns for too: A CMP B ? A - B : -(A - B) A CMP B ? A -

[Bug tree-optimization/64450] Optimize 0>=p-q to q>=p for char*p,*q;

2014-12-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64450 --- Comment #2 from Andrew Pinski --- (In reply to Marc Glisse from comment #1) > See also PR61734, Eric already tried in May. Maybe it is easier to handle now with simplify-and-match.

[Bug tree-optimization/64450] Optimize 0>=p-q to q>=p for char*p,*q;

2014-12-30 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64450 --- Comment #1 from Marc Glisse --- See also PR61734, Eric already tried in May.