aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-05-03 00:36:30 +0000
committerDevang Patel <dpatel@apple.com>2008-05-03 00:36:30 +0000
commitf944c9a19ed5438ea20f20205dfb073d0f00bd9e (patch)
treea89e31859768b79345c741974f671a58558ba7c4
parent201ebe3899dc699ae081b557a6bffc53a4dda147 (diff)
Do not sink getresult.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50600 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index d7a5f7be5c..6b1da0d256 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<GetResultInst>(I)) {
BasicBlock *BB = I->getParent();
BasicBlock *UserParent = cast<Instruction>(I->use_back())->getParent();
if (UserParent != BB) {