From a1ec89fbf1517c70bd12d5e3863280c53302da03 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Sat, 3 May 2008 00:36:30 +0000 Subject: [PATCH] Do not sink getresult. llvm-svn: 50600 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index d7a5f7be5c5a..6b1da0d25656 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -11389,7 +11389,9 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) { } // See if we can trivially sink this instruction to a successor basic block. - if (I->hasOneUse()) { + // FIXME: Remove GetREsultInst test when first class support for aggregates is + // implemented. + if (I->hasOneUse() && !isa(I)) { BasicBlock *BB = I->getParent(); BasicBlock *UserParent = cast(I->use_back())->getParent(); if (UserParent != BB) {