[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 07:01:58 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:
Hmm, how would I use `llvm.assume` for that? If it's just to create a dummy side effect, I think I could follow the pattern of `@side.effect` and declare a `void @side.effect.user(i16)` or something like that. Maybe I misunderstand.
https://github.com/llvm/llvm-project/pull/213080
More information about the llvm-commits
mailing list