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) {