diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-03-03 01:40:53 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-03-03 01:40:53 +0000 |
| commit | 7abcc387deb58324959ef2bc4a79fcaa6dcfd031 (patch) | |
| tree | 63730165796e02456320c1f38c10fb669b24e6d8 /llvm | |
| parent | 2e92b469c8046370e2d7334539ce9006a41c8bc2 (diff) | |
| download | bcm5719-llvm-7abcc387deb58324959ef2bc4a79fcaa6dcfd031.tar.gz bcm5719-llvm-7abcc387deb58324959ef2bc4a79fcaa6dcfd031.zip | |
Don't emit things like malloc(16*1). Allocation instructions are fixed arity now.
llvm-svn: 12086
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LowerAllocations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Scalar/LowerAllocations.cpp index 23a705b0ec5..53b4c3a4246 100644 --- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp +++ b/llvm/lib/Transforms/Scalar/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); |

