[safestack] Fix assertion failure in stack coloring.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 16 Sep 2016 22:04:10 +0000 (22:04 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Fri, 16 Sep 2016 22:04:10 +0000 (22:04 +0000)
commitaa84f050fcac97a66813fe446296c8f796e755f7
tree748d41963cd33f4c9626148c494b067db72af445
parent318582f9f9ce8c24cf78d229fa2f3c958f2980a2
[safestack] Fix assertion failure in stack coloring.

This is a fix for PR30318.

Clang may generate IR where an alloca is already live when entering a
BB with lifetime.start. In this case, conservatively extend the
alloca lifetime all the way back to the block entry.

llvm-svn: 281784
llvm/lib/CodeGen/SafeStackColoring.cpp
llvm/test/Transforms/SafeStack/coloring2.ll