[LLVMdev] Alloca Requirements

Eli Friedman eli.friedman at gmail.com
Mon Oct 12 20:12:27 PDT 2009


On Mon, Oct 12, 2009 at 1:07 PM, David Greene <dag at cray.com> wrote:
> Are there any implicit assumptions about where alloca instructions
> can appear.

Static allocas should appear as a continuous chunk in the entry block,
otherwise other passes might make bad assumptions.

> The interesting thing about this testcase is that the extra instcombine makes
> the test pass.  If I omit it, the test fails.  The only differences in the
> asm are stack offsets, which leads me to believe that in the failing test
> codegen is not accounting for all allocas properly.

If running a testcase through -instcombine -instcombine gives a result
that isn't identical to -instcombine, that's a bug.  Please file it if
you have a reduced testcase.

-Eli




More information about the llvm-dev mailing list