From e516aa1127f17f565f86c367eeda4cfead2e24cf Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Wed, 5 Mar 2008 00:36:59 +0000 Subject: [PATCH] Skip functions that return multiple values. llvm-svn: 47924 --- llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp b/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp index f9aaa2366661..5d151ed70a0a 100644 --- a/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp +++ b/llvm/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;