<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hello,</div><div><br></div><div>I am trying to use scalar evolution pass using following command;</div><div><br></div><div>opt -analyze -mem2reg -indvars -loop-simplify -scalar-evolution < vec.bc</div><div>when vec.bc is generated using newer version of LLVM i.e LLVM 6 and 7 i get following message in the end;</div><div>Determining loop execution counts for: @main<br>Loop %8: Unpredictable backedge-taken count. <br>Loop %8: Unpredictable max backedge-taken count. <br>Loop %8: Unpredictable predicated backedge-taken count. <br></div><div>which means it is unable to compute iteration count.</div><div><br></div><div>However, when .bc file is generated using LLVM 4.0 i am getting following;</div><div><br></div><div>Determining loop execution counts for: @main<br>Loop %4: backedge-taken count is 512<br>Loop %4: max backedge-taken count is 512<br>Loop %4: Predicated backedge-taken count is 512<br> Predicates:<br><br>Loop %4: Trip multiple is 513</div><div><br></div><div>means correct computation of loop count...</div><div>Why is that happening with newer version of LLVM?</div><div><br></div><div>Please help.<br></div></div></div></div></div>