[LoopUtils, LV] Fix PR26734
authorMatthew Simpson <mssimpso@codeaurora.org>
Thu, 3 Mar 2016 16:12:01 +0000 (16:12 +0000)
committerMatthew Simpson <mssimpso@codeaurora.org>
Thu, 3 Mar 2016 16:12:01 +0000 (16:12 +0000)
commitb840a6d6f40bc487865f32a87a7e092326029e2c
tree2200333fa632325b200616d515522e98d9e81e2c
parentd6cb4ec2a23f2f659f2e88407799db58ef4efe35
[LoopUtils, LV] Fix PR26734

The vectorization of first-order recurrences (r261346) caused PR26734. When
detecting these recurrences, we need to ensure that the previous value is
actually defined inside the loop. This patch includes the fix and test case.

llvm-svn: 262624
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/test/Transforms/LoopVectorize/AArch64/first-order-recurrence.ll