<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/70939>70939</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Example of an optimization failure for a function that implies `abs`
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          k-arrows
      </td>
    </tr>
</table>

<pre>
    Consider the following two functions.
https://godbolt.org/z/sn7qahaa9
```c
#define MAX(a, b) ((a) > (b) ? (a) : (b)) 

int foo(int a)
{
    if(a < 0)
 a = MAX (-a, 0);
    else
      a = MAX (a, 0);
    return a;
}

int bar(int a)
{
    return MAX((a < 0 ? -a : a), 0);
}
```

Here, `foo` should be the same as `bar`.

Alive2:
https://alive2.llvm.org/ce/z/a_4kdi

FYI (original GCC bugzilla issue)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112324
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U02P4ygQ_TX4UoqFwR_xwYd00t7dw953Ty2wyzbTxGQAd2b6148gzsdErZGihKriVT1eXgnn1DgjNqR4IcUhEYufjG3eN8Jac3aJNP3PZm9mp3q04CeEwWhtzmoewZ8NDMvceWVmlxJ6IHQ3eX9yhO8IawlrR9NLo31q7EhY-0lY6-bqu5iEqC_XSUkvn26NGe9xUDPCv7v_CNsKwvYgCauBsO0lroHw1xBe0ryFe353zcfw0jF-q9nDYAxh23AKt9dq9XI5AACoIXQCwvdAbzcgJA6BTui9iYRilT8gUTu8R_A75muIRb_YGcQtSarDM2Mp7J8Zr00uWt3JR1U2IgoSkc8E7rOu-j-O_hstBggpadCspOAms-geJEYHOHFEEC7UA8OSpo_onVYfyIIFvjCEiMVU64_jaooOV2eIt_y9V4-d2v__CfoZq0Y1Cw1_7fcgl_FTaS1AObfgTZUn23VdOs7LOuEKCe6bzPlNLmPajYrwVvWEH7KMcZYnfcP7mtciwSYr6-02rxivkqnJmJAFdkOXD3nRD7wueor50JUFpwMWVaIaRhnPMpplOaU8TzmvizrHkg0oM1nlJKd4FErfXp1E7k1Fa14nWkjULq4fYzOerw9jYRttEzAbuYyO5FQr5929i1deY_P6QxxPGsEMIGYwJ6-O6lOElYRBKL3YsLEWxG1TwU_CgzqetML4HwrpSEmTxermSUblp0WmnTkS1oax68_mZM037DxhbSTrCGvjY34FAAD__3ZrNqc">