Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.516 -> 1.517 --- Log message: Fix a bug from r1.391 of this file, where we checked the size instead of the alignment when promoting allocations. This implements InstCombine/cast.ll:test32 --- Diffs of the changes: (+2 -2) InstructionCombining.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.516 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.517 --- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.516 Thu Sep 28 18:35:21 2006 +++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Oct 1 14:40:58 2006 @@ -5053,8 +5053,8 @@ const Type *CastElTy = PTy->getElementType(); if (!AllocElTy->isSized() || !CastElTy->isSized()) return 0; - unsigned AllocElTyAlign = TD->getTypeSize(AllocElTy); - unsigned CastElTyAlign = TD->getTypeSize(CastElTy); + unsigned AllocElTyAlign = TD->getTypeAlignment(AllocElTy); + unsigned CastElTyAlign = TD->getTypeAlignment(CastElTy); if (CastElTyAlign < AllocElTyAlign) return 0; // If the allocation has multiple uses, only promote it if we are strictly _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits