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

    <tr>
        <th>Summary</th>
        <td>
            OpenMP stand-alone loop transforms do not set original loop variables as expected
        </td>
    </tr>

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

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

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

<pre>
    
```
extern "C" int printf(const char *, ...);
int main() {
  unsigned i, j;
#pragma omp interchange
  for (i = 0; i < 8; i++)
    for (j = 0; j < 16; j++)
      ;
    ;
  printf("final: i=%d j=%d\n", i, j);
#pragma omp tile sizes(4,4)
  for (i = 0; i < 8; i++)
    for (j = 0; j < 16; j++)
      ;
    ;
  printf("final: i=%d j=%d\n", i, j);
  return 0;
}
```
When compiled with -fopenmp result is:
final: i=7 j=15
final: i=7 j=15

Instead of:
final: i=8 j=16
final: i=8 j=16

https://godbolt.org/z/dx1nn1asv
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzUk8uOqzgQhp-m2JQSQXFfsMhFkWYxmtnN2uACnDE2sk2mp5_-CJJOX9RSr49kmTKuz_X_BRbeq8EwN5AfIT9HYgmjdc2k_mWnOk7qoo5aK_9vID5DfIAifoxtyS-BnUEgOgERKhNwdsqEHqjqrPEBu1E4BDoAnXC_3wPVkB7v8Jo9CWWAKqAaoXy8R1zMJkqiWrHrkwBKZyeGSaCd5rUau24UZuA3sLdrsUohpGeMIT3iGp6w2kKg4zbqt_QncH0HrhuQFFv8DYH4lPNl8XQORL0yQkN6QAXpGSiXq4stgPxkgGg19nD3oSWfDQalGb16ZQ9UZUCn7IOS390qouOwOLNJebgvz9_-Zf-MbLCz06w0S_xPhRF3vZ3ZTDM69osOqDykh3v2Jz3lJibJf9y6z38YH1hItP33x1V3pvhx6z6PIcybMLoAXQYrW6vD3roB6PIKdJEviTGJ8LdINqms01pE3CQlZWWcFXkVjU1R16XIpRR5nAlK6q6Ks4pbyRRz38UiUg3FlMUVFRSnZVruuea0pKwueu7rtE0gi3kSSu-1vk1r7Uh5v3CTxEWSJpEWLWu_3X6iTgszQHq493b9dPk5cs1K7tpl8JDFWvng388KKmhu_prZ_Pk3-iCM3AltDaO2dsbghPG9dZNHadHYgJ4DWqeGtXP3nJtwSrSaPQqP_DJzF1hGi9PNl-6pMC7tvrMT0GWt_3jsZmev3AWgy2bMA10e3m4N_QoAAP__-6pXNA">