Nonnull elements in OperandBundleCallSites are not all Instructions
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 19 Dec 2015 22:40:28 +0000 (22:40 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sat, 19 Dec 2015 22:40:28 +0000 (22:40 +0000)
commit1d8492ee7dc43304d92ffc91209f68d5b536d415
tree1c4636d76a4882ba33af74b00110fc3996cd6bbf
parent269b8a6713b2bf8feac57f3b34456153b483f3c8
Nonnull elements in OperandBundleCallSites are not all Instructions

`CloneAndPruneIntoFromInst` sometimes RAUW's dead instructions with
`undef` before erasing them (to avoid deleting instructions that still
have uses).  This changes the `WeakVH` in `OperandBundleCallSites` to
hold an `undef`, and we need to guard for this situation in eventuality
in `llvm::InlineFunction`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256110 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Utils/Cloning.h
lib/Transforms/Utils/InlineFunction.cpp
test/Transforms/Inline/deopt-bundles.ll