Skip to content

Commit e516aa1

Browse files
author
Devang Patel
committed
Skip functions that return multiple values.
llvm-svn: 47924
1 parent d5804b3 commit e516aa1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ bool UnifyFunctionExitNodes::runOnFunction(Function &F) {
5050
// Loop over all of the blocks in a function, tracking all of the blocks that
5151
// return.
5252
//
53+
54+
// PHINode can not handle aggregates returned by multiple value ret
55+
// instructions. TODO: Handle each return value independently.
56+
if (isa<StructType>(F.getReturnType()))
57+
return false;
5358
std::vector<BasicBlock*> ReturningBlocks;
5459
std::vector<BasicBlock*> UnwindingBlocks;
5560
std::vector<BasicBlock*> UnreachableBlocks;

0 commit comments

Comments
 (0)