diff options
Diffstat (limited to 'lib/Transforms/Utils/LowerAllocations.cpp')
-rw-r--r-- | lib/Transforms/Utils/LowerAllocations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/LowerAllocations.cpp b/lib/Transforms/Utils/LowerAllocations.cpp index 23a705b0ec..53b4c3a424 100644 --- a/lib/Transforms/Utils/LowerAllocations.cpp +++ b/lib/Transforms/Utils/LowerAllocations.cpp @@ -101,7 +101,7 @@ bool LowerAllocations::runOnBasicBlock(BasicBlock &BB) { Value *MallocArg = ConstantUInt::get(Type::UIntTy, Size); if (MI->getNumOperands() && Size == 1) { MallocArg = MI->getOperand(0); // Operand * 1 = Operand - } else if (MI->getNumOperands()) { + } else if (MI->isArrayAllocation()) { // Multiply it by the array size if necessary... MallocArg = BinaryOperator::create(Instruction::Mul, MI->getOperand(0), MallocArg, "", I); |