[LLVMdev] Fail to unroll loop on simple examples.

Eli Friedman eli.friedman at gmail.com
Thu Jul 1 12:43:49 PDT 2010

On Thu, Jul 1, 2010 at 12:33 PM, Pekka Nikander
<pekka.nikander at nomadiclab.com> wrote:
> [I am a newcomer to llvm, so don't believe me.]
> Hi Claude,
> I added -debug to the command line in an attempt to study your example, and got out this:
> Loop Unroll: F[main] Loop %bb1
>  Loop Size = 4
>  Can't unroll; loop not terminated by a conditional branch.
> The source code for that is on line 116 (or so) in lib/Transforms/Utils/LoopUnroll.cpp
> Based on a quick look at the source code, this looks like a bug in LLVM to me, e.g. perhaps the test is applied on a wrong block?  But more probably I am just missing something.

Missed optimization... the loop unroller needs work to work on more
than extremely simple loops.


More information about the llvm-dev mailing list