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