Support a funclet operand bundle in LowerInvoke
authorHeejin Ahn <aheejin@gmail.com>
Wed, 9 May 2018 00:53:50 +0000 (00:53 +0000)
committerHeejin Ahn <aheejin@gmail.com>
Wed, 9 May 2018 00:53:50 +0000 (00:53 +0000)
commitbf7716952a3aee11be187e57887c32e1399d9f17
tree96084a3d1b313b276a8b6dac6122a7c34850f145
parentfb663789d3c862353d6077e71df4efd1bcb9477b
Support a funclet operand bundle in LowerInvoke

Summary:
The current LowerInvoke pass cannot handle invoke instructions with a
funclet bundle operand. The order of operands for an invoke instruction
is {call arguments, callee, funclet operand (if any), normal dest,
unwind dest}. The current code assumes there is no funclet operand and
incorrectly includes a funclet operand into call arguments.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D46242

llvm-svn: 331832
llvm/lib/Transforms/Utils/LowerInvoke.cpp
llvm/test/Transforms/Util/lowerinvoke-funclet.ll [new file with mode: 0644]