https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50856
Andrew Pinski changed:
What|Removed |Added
Component|target |tree-optimization
Assignee|una
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50856
--- Comment #3 from Andrew Pinski ---
The second case will be solved by updating the patch at:
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574892.html
For the review at
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/574948.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50856
--- Comment #4 from Andrew Pinski ---
Here is a full testcase (f3 is caught via fold_cond_expr_with_comparison):
```
int f(int a, int b)
{
int t = a - b;
if (t > 0) return t;
return b - a;
}
int f1(int a, int b)
{
if (a > b) return a - b