[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 2 00:55:02 PST 2003


Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.133 -> 1.134

---
Log message:

Fix bug in previous checkin


---
Diffs of the changes:  (+1 -1)

Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.133 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.134
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.133	Sat Nov  1 23:57:39 2003
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Sun Nov  2 00:54:48 2003
@@ -1543,7 +1543,7 @@
   // size, rewrite the allocation instruction to allocate the "right" type.
   //
   if (AllocationInst *AI = dyn_cast<AllocationInst>(Src))
-    if (AI->hasOneUse())
+    if (AI->hasOneUse() && !AI->isArrayAllocation())
       if (const PointerType *PTy = dyn_cast<PointerType>(CI.getType())) {
         // Get the type really allocated and the type casted to...
         const Type *AllocElTy = AI->getAllocatedType();





More information about the llvm-commits mailing list