diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-03-28 13:03:10 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-03-28 13:03:10 +0000 |
commit | fd4a5497b6a2f9e67187d8ca74659388c52c5427 (patch) | |
tree | 754f1d03778881e278e7e838246fe4b30407569d /lib/Transforms/InstCombine/InstructionCombining.cpp | |
parent | fb4a8344b6f4be1113498e6e69dc182408dc2ec9 (diff) |
Make more use of PHINode::getNumIncomingValues().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine/InstructionCombining.cpp')
-rw-r--r-- | lib/Transforms/InstCombine/InstructionCombining.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index d88162a703..0c0db3de64 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -601,7 +601,7 @@ Instruction *InstCombiner::FoldOpIntoPhi(Instruction &I) { // Okay, we can do the transformation: create the new PHI node. PHINode *NewPN = PHINode::Create(I.getType(), ""); - NewPN->reserveOperandSpace(PN->getNumOperands()/2); + NewPN->reserveOperandSpace(PN->getNumIncomingValues()); InsertNewInstBefore(NewPN, *PN); NewPN->takeName(PN); |