projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7252939
)
Don't emit things like malloc(16*1). Allocation instructions are fixed arity now.
author
Chris Lattner
<sabre@nondot.org>
Wed, 3 Mar 2004 01:40:53 +0000
(
01:40
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 3 Mar 2004 01:40:53 +0000
(
01:40
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12086
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Utils/LowerAllocations.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Utils/LowerAllocations.cpp
b/lib/Transforms/Utils/LowerAllocations.cpp
index 23a705b0ec526a129ee99a1f5b2850929221ae28..53b4c3a4246bff7fac38992040a4257bac6635d5 100644
(file)
--- 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);