[llvm-dev] opt -instcombine interesting behavior

Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 19 09:13:54 PST 2016


Hi Stephan,

On 19 December 2016 at 08:41, Stephan Plöger via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>   %reg = alloca i32, i32 0

This line is allocating 0 bytes rather than allocating an i32 and
setting the memory to 0, so the rest of the function is really dodgy.
I'm not sure exactly why InstCombine decides on 1, but really anything
could have happened.

Cheers.

Tim.


More information about the llvm-dev mailing list