[llvm] [HashRecognize] Prevent values other than `ComputedValue` from exiting loop (PR #213080)
Sean Clarke via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 08:12:51 PDT 2026
================
@@ -578,12 +578,7 @@ std::variant<PolynomialInfo, StringRef> HashRecognize::recognizeCRC() const {
: LHS->getType()->getIntegerBitWidth()))
return "Loop iterations exceed bitwidth of data";
- // Make sure that the computed value is used in the exit block: this should be
- // true even if it is only really used in an outer loop's exit block, since
- // the loop is in LCSSA form.
auto *ComputedValue = cast<SelectInst>(ConditionalRecurrence.Step);
- if (Exit->phis().empty())
----------------
xarkenz wrote:
I'm not sure "`Found stray incoming values in loop exit block`" is a fitting error message for it, unless you would suggest reporting a different message. I would think the containsUnreachable check is sufficient for catching side effects since we don't permit that even if `ComputedValue` is used in the exit block.
https://github.com/llvm/llvm-project/pull/213080
More information about the llvm-commits
mailing list