[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)
commitb58f32f7a84e98b51fd87ac9b49dba02b06fa7bc
treeb6b3e7cacdb97e21f8eb1aec699a3ea881131974
parenteb33134ce791de41bc2fd2f11eb3d7732e009ce5
[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.

llvm-svn: 239143
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Transforms/LoopVectorize/zero-sized-pointee-crash.ll [new file with mode: 0644]