[LoopVectorize] Detect loops in the innermost loop before creating InnerLoopVectorizer
authorTim Shen <timshen91@gmail.com>
Fri, 12 Aug 2016 22:47:13 +0000 (22:47 +0000)
committerTim Shen <timshen91@gmail.com>
Fri, 12 Aug 2016 22:47:13 +0000 (22:47 +0000)
commitc9c0d2dcb5ff88916290deb5d413435ac1ac3bc6
tree73cc6ea0ef9c424da5e165c2eef2255e4abe58d8
parent69b06505488bde2bd2b531494daa1c06c4e804ec
[LoopVectorize] Detect loops in the innermost loop before creating InnerLoopVectorizer

InnerLoopVectorizer shouldn't handle a loop with cycles inside the loop
body, even if that cycle isn't a natural loop.

Fixes PR28541.

Differential Revision: https://reviews.llvm.org/D22952

llvm-svn: 278573
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/pr28541.ll [new file with mode: 0644]