[LoopVectorize] Don't crash on zero-sized types in isInductionPHI
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 5 Jun 2015 10:52:40 +0000 (10:52 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 5 Jun 2015 10:52:40 +0000 (10:52 +0000)
commit47dfcb7745766fee1aaa135a212b3e1f39d81e96
tree17d540dc26586b3b1e4710f308cbb72d9d04e40b
parent406e5ea598e8494db0863938c38bc5963ed19b8c
[LoopVectorize] Don't crash on zero-sized types in isInductionPHI

isInductionPHI wants to calculate the stride based on the pointee size.
However, this is not possible when the pointee is zero sized.

This fixes PR23763.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239143 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUtils.cpp
test/Transforms/LoopVectorize/zero-sized-pointee-crash.ll [new file with mode: 0644]