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

    <tr>
        <th>Summary</th>
        <td>
            clang: 18: hangs with a short program
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

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

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

<pre>
    Reproducer: https://godbolt.org/z/8K3cs6ood
When compile below program with `-O1 -mllvm -polly`, clang hangs:

```
#define IND(x, y) ((x) + (y)*516)
float **a, **b, **c;
__attribute__((noinline)) void foo(
 int I, int J, int K1, int K2, int L1, int L2) {
  for (int i = 0; i < I; i++) {
    float *v = c[i];

    for (volatile int j = 0; j < J; j++) {
      float *in = a[j];
      float *out = b[j];
      for (int l = L1; l < L2; l++) {
        for (int k = K1; k < K2; k++) {
 float sum = 0;
          int offset = 0;
          for (int m = -2; m <= 2; m++) {
            for (int n = -2; n <= 2; n++, offset++)
 sum += in[IND((k + n), (l + m))] * v[offset];
          }
 out[IND(k, l)] = sum;
        }
      }
    }
 }
}
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VEFvszgQ_TXDxUoF40DgwCEURerXalfayx4rA05wY-wITLrdX7_yQEjSbr4IJW_MvPfGwTwxDOpgpMwhLiAuAzG61vb5p5K9syaobPOV_yVPvW3GWvbAt6x17jQA3wLuAHcH21RWuyfbHwB3_wLu0ldeD4m1DYQlhNu_W2lYbbuT0pJVUttPdurtoRcd-1SuZZCEqz8jtuq0PndsdbJaf0ESAj6zWgtzYK0wB_Ijufk7CedrKpE3cq-MZC9_lIDpP579BZgxwHSqPSx86ZcBt3GUeED0vbbCMcAt4FZ46gSrK6yBF1Pv-7twrlfV6OT7-6RurDJaGUnCGTtb1bC9tf4mUZgyjr14MQ9-XcBrtCC8oLdl7Q1p5s1sy9je9n58f08x4CULgRcEn9kLQcCCrjsaY8vuzkSrIS4UxOWyo5vOyeJstXD-aXmvj6vXB3n9IvjA68ZNGWIKiIuPW7tvbXZ01Fc96LvuWlPfW-T9NY3yhoQfznJHPxL9lehHor8S_fh_9Gm8YeyW3d_rMvpv7H4_SPew5cZ80lmRocfPvpyq30z_TcTciJg7EXMReZ5nWkRnQdoJFp6gDMTF9JoApkd6LQwdXX_YU00L3XSWIS79M2JniItZ-McT8h_YlPOSHd0if_SS-iLDSz_FD_KV-rO8Fgu6gksCBE3Om4xnIpB5lGQbvuZZmgRtjlGzidOsiSrZiDhO15u94FHDeRM24XqdBCrHEHkURnG4xgSTpzStcZNVSSZEWm8ahHUoO6H0k48mn3CBGoZR5kkWZmGgRSX1QLmJSFEFiD5C-9z3r6rxMMA61Gpww1XBKadlPrXzLYtSilQfcVMcCja0tneXjAzGXuffEle5dqyeatsB7rzu_LM69fZD1g5wR2MOgDua9L8AAAD__1EoiQU">