diff --git a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index f9aaa236666..5d151ed70a0 100644 --- a/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp @@ -50,6 +50,11 @@ bool UnifyFunctionExitNodes::runOnFunction(Function &F) { // Loop over all of the blocks in a function, tracking all of the blocks that // return. // + + // PHINode can not handle aggregates returned by multiple value ret + // instructions. TODO: Handle each return value independently. + if (isa(F.getReturnType())) + return false; std::vector ReturningBlocks; std::vector UnwindingBlocks; std::vector UnreachableBlocks;