[WinEH] Update WinEHFuncInfo if StackColoring merges allocas
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 8 Jan 2016 08:03:55 +0000 (08:03 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 8 Jan 2016 08:03:55 +0000 (08:03 +0000)
commit204e31b7ab282f5ed546f37b08403413ca03e3c5
tree93cfbeb3890cbee98ee4b5dafd77239de7c20473
parent7203e500c0f3335e3ef1f72321689793ebd890f9
[WinEH] Update WinEHFuncInfo if StackColoring merges allocas

Windows EH keeping track of which frame index corresponds to a catchpad
in order to inform the runtime where the catch parameter should be
initialized.  LLVM's optimizations are able to prove that the memory
used by the catch parameter can be reused with another memory
optimization, changing it's frame index.

We need to keep WinEHFuncInfo up to date with respect to this or we will
miscompile/assert.

This fixes PR26069.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257158 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/StackColoring.cpp
lib/CodeGen/WinEHPrepare.cpp
test/CodeGen/X86/catchpad-lifetime.ll [new file with mode: 0644]