After unrolling a loop with llvm.loop.unroll.count metadata (unroll factor
authorMark Heffernan <meheff@google.com>
Thu, 24 Jul 2014 22:36:40 +0000 (22:36 +0000)
committerMark Heffernan <meheff@google.com>
Thu, 24 Jul 2014 22:36:40 +0000 (22:36 +0000)
commitd10aa6f8b2b0ea0464c9ee066d8b69e582f171dd
treee27672f9016df0f29bf5ab633bd8c62eff4082db
parent86854be8b18155a7e06dae07fd21d60a02aee793
After unrolling a loop with llvm.loop.unroll.count metadata (unroll factor
hint) the loop unroller replaces the llvm.loop.unroll.count metadata with
llvm.loop.unroll.disable metadata to prevent any subsequent unrolling
passes from unrolling more than the hint indicates.  This patch fixes
an issue where loop unrolling could be disabled for other loops as well which
share the same llvm.loop metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213900 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/LoopUnrollPass.cpp
test/Transforms/LoopUnroll/unroll-pragmas-disabled.ll