[LICM] Make instruction sinking funclet-aware
authorDavid Majnemer <david.majnemer@gmail.com>
Mon, 4 Jan 2016 03:37:39 +0000 (03:37 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Mon, 4 Jan 2016 03:37:39 +0000 (03:37 +0000)
commit82e76d50b1e550cfda3c49ba031205b50f1b283e
treef059a86361e1c5e7ee1806a491f67493b11fdf52
parent2507b00594dc90749c8cb02b74ba261cac25a5db
[LICM] Make instruction sinking funclet-aware

We had two bugs here:
- We might try to sink into a catchswitch, causing verifier failures.
- We will succeed in sinking into a cleanuppad but we didn't update the
  funclet operand bundle.

This fixes PR26000.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256728 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Scalar/LICM.cpp
test/Transforms/LICM/funclet.ll [new file with mode: 0644]
test/Transforms/LICM/sinking.ll