[llvm] [ConstraintElim] Generalize IV logic to chain of exiting blocks. (PR #108031)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 08:04:38 PDT 2024
================
@@ -931,6 +932,8 @@ void State::addInfoForInductions(BasicBlock &BB) {
else
return;
+ assert(InLoopSucc != L->getHeader() &&
+ "Cannot inject condition back to loop header");
if (!L->contains(InLoopSucc) || !L->isLoopExiting(&BB) || InLoopSucc == &BB)
----------------
dtcxzyw wrote:
`!L->isLoopExiting(&BB)` always evaluates to false after this patch. You can replace it with an assertion here.
https://github.com/llvm/llvm-project/pull/108031
More information about the llvm-commits
mailing list