[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0 --- Comment #5 from Andrew Pinski --- Note this was mostly fixed for GCC 11 but had missed the :c on the cmp and that was fully fixed in GCC 14, see PR 111346 for that. What that means is sometimes we would not optimize always to 0/1 and keep around the comparison.
[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708 Jeffrey A. Law changed: What|Removed |Added CC||law at redhat dot com Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #4 from Jeffrey A. Law --- Should be fixed with Eugene's patch on the trunk
[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708 --- Comment #3 from CVS Commits --- The master branch has been updated by Jeff Law : https://gcc.gnu.org/g:abef36919f741c8e4f7380b2c2ffbc6ad97c2b6b commit r11-5631-gabef36919f741c8e4f7380b2c2ffbc6ad97c2b6b Author: Eugene Rozenfeld Date: Tue Dec 1 16:26:59 2020 -0700 Optimize max/min pattern with comparison gcc/ PR tree-optimization/96708 * match.pd: New pattern for comparing X with MAX (X, Y) or MIN (X, y). gcc/testsuite * gcc.dg/pr96708-negative.c: New test. * gcc.dg/pr96708-positive.c: New test.
[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708 Richard Biener changed: What|Removed |Added Keywords||easyhack Last reconfirmed||2020-08-25 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW --- Comment #2 from Richard Biener --- Confirmed. _4 = MAX_EXPR ; _7 = a_2(D) <= _4; return _7;
[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement
[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708 --- Comment #1 from Gabriel Ravier --- PS: This especially affects, for example, C++ code that uses std::max, which fails to optimize properly compared to, for example, a `max` macro.