[llvm] [HashRecognize] Track visited in ValueEvolution (PR #147812)
Piotr Fusik via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 14 01:59:17 PDT 2025
================
@@ -634,6 +649,19 @@ HashRecognize::recognizeCRC() const {
return VE.getError();
KnownBits ResultBits = VE.KnownPhis.at(ConditionalRecurrence.Phi);
+ // There must be exactly four unvisited instructions, corresponding to the
+ // IndVar PHI:
+ // IndVar
+ // Latch->getTerminator()
+ // L.getLatchCmpInst(),
+ // IndVar->getIncomingValueForBlock(Latch))
----------------
pfusik wrote:
Can we instead insert these into visited instead of having a magic "4" in the code and this listing in a comment?
https://github.com/llvm/llvm-project/pull/147812
More information about the llvm-commits
mailing list