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

    <tr>
        <th>Summary</th>
        <td>
            wrong code on valid code at -O2 and -O3 on x86_64-linux-gnu 
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          zhendongsu
      </td>
    </tr>
</table>

<pre>
    It appears to be a regression from 14.0.0.

```
[516] % clangtk -v
clang version 15.0.0 (https://github.com/llvm/llvm-project.git d941d597837d9e1405086f008c9bd6a71e7263c9)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /local/suz-local/opfuzz/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
Found CUDA installation: /usr/local/cuda, version 11.0
[517] % 
[517] % clangtk -Os small.c; ./a.out
[518] % 
[518] % clangtk -O2 small.c
[519] % ./a.out
Floating point exception
[520] % 
[520] % cat small.c
int a, b, c[2][1];
static int *d = &a, **e = &d;
int main() {
  for (; a < 1; a++) {
    int *h = &a, *i = c[1], ***j[2] = {&e};
    **e = c[1] == h;
    for (; b < 4; b++)
      *i = *d ? 1 % *d : 0;
  }
  return 0;
}
```

Compiler Explorer: https://godbolt.org/z/qETfsY7zP

@fhahn 
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1Vk2P2yw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