LoopInfo fails

Hi Jochen,

I just compiled this to llvm-ir. In the IR as well as in the C code there are two entries into the loop. One entering the loop over the normal loop header and the other entering the loop using the l: mark.

Natural loops are defined to only have one header, the basic block that dominates all basic blocks in the loop. This is the way how LoopInfo is implemented, as it is stated at the top of include/llvm/LoopInfo.h. So it is conceptional that the loop is not detected.

One way to change this is to create a pass, that transforms loops to natural loops. This is possible, but generally involves code duplication.

Tobias