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

    <tr>
        <th>Summary</th>
        <td>
            [SLP] The pragma attribute assume_safety needs to be propagated to improve alias analysis.
        </td>
    </tr>

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

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

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

<pre>
    
* test: https://gcc.godbolt.org/z/nKKze798M
```
#define INTEL_P3M_ALIGNED_MAXORDER 8

int foo (int idx, int idy, int idz, float *rho0,
         float *rho1,
         float *rho2,
 FFT_SCALAR **rho_lookup) {
  #pragma clang loop vectorize(assume_safety)
  for (int k = 0; k < INTEL_P3M_ALIGNED_MAXORDER; k++) {
    rho0[k] = rho_lookup[idx][k];
    rho1[k] = rho_lookup[idy][k];
    rho2[k] = rho_lookup[idz][k];
  }
  
 return 0;
}
```

Now, the trip count is very small, so the clang completely unroll the loop and the pragma info is discarded, so it doesn't do SLP.
if we change the trip count to a large number, such as 800, then clang will do SVE, and it assume there is no alias issue because the above **#pragma clang loop vectorize(assume_safety)**.
 so we may also make use of above **#pragma clang loop vectorize(assume_safety)** in SLP.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVF1vqzgQ_TXOy-hGxIQADzyQpqyubtqt2mq1b5HBA_HW2Mg2ySa_fmVDtrfVbqWVNkJ4wsw5no-jYdaKTiEWJNmSZLdgoztqU5xa3raLWvNLQaIdiUpCS3BoHYlLODo3WBKXhFaEVl3TLDvNay3dUpuO0OpKaKV-_LhimmcPM3wTzc_MFnNshUL4_vh6vz88xQ-Hcv_9l8f73eGh_P3X5939M2RzbHgL5aDVGgjNvCn4n4TewWRe3s2rN1upmQNCS3PUEaF3EwPcfj-7V1-76bu7ql4PL3flvnz2vsl9kFq_jQOhOZB0e-MhNB4M63oGjWSqA6n1ACdsnDbiioRmzNqxx4NlLboLofkN2Gpzq-8NSLyDiMTbYN590acQQ-g2PB8SAQgNSLZvJNkFwp9yTra-h8ludpP4I2z1Bezy7zD6Bez6jzCS7v42p9OgG40Kxc8KuIV8VlF4P-qzH7o7IjgjBmj06KVg4YTmArZnUnq_1SFkGkmj-0GiQ3mBURktZfCFQTHFw595hEK12pNxYRtmOPKZSzjgGq0iNPUWvOyflrNSWzgjNEemOvycldPAQDLTIaixr9EEtrE5ArOQRdFciJrTPAspA_lv997jUxMOJvn4OIM-NaWBScEsCGtHhBobNtrpalbrE856_e-yDLC5Kl_zGaFnF2DSaujZG4K_Rrf_xy0gVGjhghcxz-OcLbBYbbIsz5MkzRbHYpNm67ThGecx52nerGrWbjhfZ8kmrte8XoiCRjSO0lW0iulmlS03LG9WLFlFDbbJhqdkHWHPhFxKeer9plqEfhWbOE3zhWQ1Shu2IKUKz1MzCaV-KZrCY77VY2fJOpLCOvvO4oSTYX2-7J-88l_fxcOcM6IeHcKHqkEhcuvFUPtQPbCOOeT-g-gH45s5DZQpJi9W2OViNLL4tHaFO471stE9oZVPZj6-DUb_gY0jtAolWEKrUOJfAQAA__-dDs4K">