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

    <tr>
        <th>Summary</th>
        <td>
            Wrong code at -O2/3 on x86_64-gnu_linux (a recent regression)
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          shao-hua-li
      </td>
    </tr>
</table>

<pre>
    clang at -O2/3 produced the wrong code.

Bisected to 408dce82016463dcb5026b2ddfc62174970a88e9, which was committed by @alexey-bataev 

Compiler explorer: https://godbolt.org/z/KMqdYYaxT

```console
% cat reduced.c
int printf(const char *, ...);
int a = 20, b, d, g;
short c = -7655;
char e = 122;
unsigned f;
int h() {
  if (!a)
    a = 1;
  return a;
}
void i(char j) {
  d = 0;
  for (; d <= 4; d++) {
    f = 0;
    for (; h() + c + 2 - -7633 + f <= 0; f++) {
 g = 1;
      for (; g <= 7; g++) {
        char *l = &e;
 b &= j;
        j = *l &= 181;
        if ((char)(j + 1 - 49) + j)
 break;
      }
    }
  }
}
void m() {
  int k = 0 < 4073709551613;
  i(k);
}
int main() {
  m();
 printf("%d\n", g);
}
%
% clang -O0 reduced.c && ./a.out
1
% clang -O2 reduced.c && ./a.out
8
%
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVEtv6ygU_jV4c2QLH4wfCy-aVtmMRncz0uiurjAQm9QxGYzbdH79CJI4adrRjSwC5_F95wFHzLPpJ61bwjeEvyRi8YN17TwImw6LSEeTdFZ9tHIUUw_CQ_oDCW4ZHJ1Vi9QK_KDh3dmpB2mVzgh9IfTpvG7MrKUPNhYKWiupa6R5WZRMyY5TLDtUaidLzKuiqaioa90QfIb3wcgB3sUM0h4OxgeI7gNIQcWoT_oj7YQX-g3uuZ7t4WhG7UCfjqN12hH2BIP3x5mwJ4Jbgtveqs6O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