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

    <tr>
        <th>Summary</th>
        <td>
            [SVE]different tail block processing policies
        </td>
    </tr>

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

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

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

<pre>
    Some of my recent studies have found that llvm supports three different tail block processing strategies: folding tail block, scalar epilogue, and forcing tail block to VF=x vectorization.

![image](https://github.com/llvm/llvm-project/assets/12108571/6daad6ba-9f8a-4ee2-b486-e48fc18d3993)
![image](https://github.com/llvm/llvm-project/assets/12108571/cc7fa145-9369-4c59-ac55-f1a9fb02434c)

For SVE, I found that the default handling policy for clang is scalar epilogue, but I found that gcc12 does default to folding tails.

I used the simulator to measure some data and found that most of the scenarios are folding tail blocks. Why does clang not fold tail blocks by default?


It makes me wonder, can someone help me?

Thank you very much.



</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy0lEGPpTYMxz9NuFg8hUB4cOCw21ekPW-1PZvEQDqB0DjM9vXTVzDTnX3tSFUPewlSsJ2_7Z-NzG5aiTqhPwp9y3BPc4gdRWeefs-GYO_d57AQhBGWO0QytCbgtFtHDDM-E4xhXy2kGRN4_7wA79sWYmJIcyQC68aR4uGV0HkYfDBPsMVgiNmtE3CKmGhyxKL8AGPw9rh9sxXqJ2CDHiPQ5nyYdjqucLUwhmgejSEF-NKL8vYHPJNJIbo_MbmwXoS8Cfnh9VSF0B_dghMJfROqmVPajteF6oXqJ5fmfbiYsAjVHxm9fvItht_IJKF6ZKbEQvWFKmSjr4VQfW0RbT1g3o4N5hWRyoeqqXOqmtEUjS3bthSq_ZESjLmOWFQ6b8u6zSuj2xyN1vlYYDsOUlVlZd4knGcfInz-8vNR0U_fdzLNBJZG3H2CGVfrjzpvwTtzP8oOxuM6geP3WjPs6THYZEyhwAbibzFTeGg1PzToE-xM9tTAbtk9phAPj4WQ90jAB5AWE75S8O2hJXA6SD09Da0YXWDASO9wxRf4db6_qHrJZg3ptPveCIb735pF2T9Q9CI1wYJPxLAQfA2rpXhUwOB6igwrwUx-g4X-4f3LjOsT3MMOzxTvsOxmvvw7ema70rZlixl1Rd00uqprLbO501VRXceivrZj2Qx1cdVX3RZalgrpWlcmc52SqpRXqWVTVYW8mKGRtW3bopLSWj2KStKCzl8Ori4hTplj3qmry7qRmceBPJ87QamVvsL5Uyh1rIjYnSwO-8Sikt5x4rcoySV_LpODKn37r-k_kXLE2R5997-H4FR1DMGp-q8AAAD__85MjHo">