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:
7635ea4
)
Fix bug with zero sized casts
author
Chris Lattner
<sabre@nondot.org>
Mon, 3 Nov 2003 01:29:41 +0000
(
01:29
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 3 Nov 2003 01:29:41 +0000
(
01:29
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9667
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index bbdfda3f76bae2648546d11b3917730ab8c974c7..534ba5946e208e87fdf3909bd78d8c2210edfd06 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-1552,7
+1552,7
@@
Instruction *InstCombiner::visitCastInst(CastInst &CI) {
unsigned CastElTySize = TD->getTypeSize(CastElTy);
// If the allocation is for an even multiple of the cast type size
- if (
AllocElTySize % CastElTySize == 0
) {
+ if (
CastElTySize && (AllocElTySize % CastElTySize == 0)
) {
Value *Amt = ConstantUInt::get(Type::UIntTy,
AllocElTySize/CastElTySize);
std::string Name = AI->getName(); AI->setName("");