OSDN Git Service

[vectorizer] Tweak the way we do small loop runtime unrolling in the
authorChandler Carruth <chandlerc@gmail.com>
Fri, 31 Jan 2014 10:51:08 +0000 (10:51 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 31 Jan 2014 10:51:08 +0000 (10:51 +0000)
commit93228f6199694860fd824e765293718561f00136
treed14ce9800910f99f41534aa7408572ede651dfea
parentf0b161d7743934936ada17c06c871bceacd5767f
[vectorizer] Tweak the way we do small loop runtime unrolling in the
loop vectorizer to not do so when runtime pointer checks are needed and
share code with the new (not yet enabled) load/store saturation runtime
unrolling. Also ensure that we only consider the runtime checks when the
loop hasn't already been vectorized. If it has, the runtime check cost
has already been paid.

I've fleshed out a test case to cover the scalar unrolling as well as
the vector unrolling and comment clearly why we are or aren't following
the pattern.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200530 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/X86/unroll-small-loops.ll