mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 23:18:58 +00:00
Fix bug with zero sized casts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7635ea4230
commit
8ee9204309
@ -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("");
|
||||
|
Loading…
Reference in New Issue
Block a user