I am afraid this is not that simple. It is legal to call alloca manually inside an if-statement and then use it until the function exit. /me pondering... (And will be OOO most of this week, don't expect prompt replies until next Mon) http://reviews.llvm.org/D6055