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

    <tr>
        <th>Summary</th>
        <td>
            By default, loops are not unrolled.
        </td>
    </tr>

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

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

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

<pre>
    The following code is extracted from the 456.hmmer benchmark. By default, it is not unrolled, but after unrolling it 12 times, we observed a significant performance improvement, with a noticeable reduction in loop control instructions.Should we enable loop unrolling by default in the compiler?



#include <stdio.h>
void function(int *dc,int* array,int M) {

    dc[0] = -987654321;
    #pragma unroll 2
    for (int k = 1; k <= M; k++) {
 dc[k] = dc[k-1] + array[k-1];
    }
}

int main(){
 return 0;
}
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU8mOozwQfhpzKQVBmSUcOGT5c-vTPy9g7CJ42tiRbZLptx-Z0J1uaSRkXNu3IEqEoK-WqGf1kdXnTCxxcr6vqqaumiobnProf00EozPGPbS9gnSKQAegP9ELGUnB6N0McSKo6iaf5pk8DGTlNAv_nsPxAxSNYjGR4Ql0TLPWRVisd8aQStlhiSDGSH7LJh4doUSIeqaQWh4Ebgjk76RAQBKtRy2FjXAjPzo_CysJ9Hzz7k4z2ZXtoeMEItFpSWIwBJ7UIqN2FrQF49wNpLPROwPahuiftZD_P7nFqERKdp1bW1_ihi9TCSd5l26-aUOe8Qsrzqw4_ONErq00iyJg_BSi0i6fGP_vWb07rWBc7KqA4V7bCAwPSjI86WTnAMJ78fEM4Y1hB6w9ficAAFCS1ceC1Wdg_Ay7bt82dcWxZPz4amLIb15cZ7FZAnzVRudho39fMdLoej2l6G2NGB7X55uEJ_P7J_Mz2pVrjMdN-2fqp5r2vLn4uqxnkjALnT4Gw-5F5Cku3kLxBcLac6Z6rjreiYz6ssV9t6_KusmmHrHo6gpVw8exQ1G2xdDwQu1Hzhu1H2WmeyywKouyLjpE3uRdXVHRScSqbLu2GFlV0Cy0yY25z7nz10yHsFBflsh5mxkxkAnr_iBaesBaZYhpnXyfhnbDcg2sKowOMbxgoo6G-p_7kf6zAMLTjx3Js8WbforxFhg_MLwwvFx1nJYhl25meEmY22t38-43ycjwsioJDC-b1HuPfwMAAP__Fq4x1Q">