[LoopBoundSplit] Check the start value of split cond AddRec
authorJingu Kang <jingu.kang@arm.com>
Tue, 7 Sep 2021 09:19:41 +0000 (10:19 +0100)
committerJingu Kang <jingu.kang@arm.com>
Mon, 13 Sep 2021 09:32:35 +0000 (10:32 +0100)
commit2a26d47a2d8295f4555f615feb86d599ae2c3af7
tree11802bfd0081b5f4c9f94f4d3499e0375b8323d4
parent477b9bc9f76893b857a52403f86cdffb4cc05bfe
[LoopBoundSplit] Check the start value of split cond AddRec

After transformation, we assume the split condition of the pre-loop is always
true. In order to guarantee it, we need to check the start value of the split
cond AddRec satisfies the split condition.

Differential Revision: https://reviews.llvm.org/D109354
llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp
llvm/test/Transforms/LoopBoundSplit/bug51766.ll
llvm/test/Transforms/LoopBoundSplit/loop-bound-split.ll