<div dir="ltr">Hi, <div><br></div><div>I found LLVM cannot unroll the loop in the example below, while gcc can. Before I dig more about this issue, is this behavior as designed? </div><div><br></div><div><div>bool bar(int i);</div>
<div><br></div><div>void foo(int *a, int x, int y) {</div><div> for (int i = 0; i < 4; ++i) {</div><div> if (bar(i)) {</div><div> break;</div><div> }</div><div> a[i] = i;</div><div> }</div><div>}</div></div>
<div><br></div><div>Btw, if s/break/continue, LLVM is able to unroll it.</div><div><br></div><div>Thanks,</div><div>Jingyue</div><div><br></div></div>