From f944c9a19ed5438ea20f20205dfb073d0f00bd9e 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50600 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/InstructionCombining.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index d7a5f7be5c5..6b1da0d2565 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/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) { -- 2.34.1