[llvm] Reapply "[ValueTracking] Propagate sign information out of loop" (PR #182512)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 08:01:55 PST 2026
================
@@ -5924,6 +5924,43 @@ void computeKnownFPClass(const Value *V, const APInt &DemandedElts,
}
}
+ // Look for the case of a for loop which has a positive
+ // initial value and is incremented by a squared value.
+ // This will propagate sign information out of such loops.
+ if (P->getNumIncomingValues() != 2)
+ break;
+ for (unsigned i = 0; i < 2; i++) {
----------------
antoniofrighetto wrote:
It would be preferable to follow LLVM coding style, thus uppercase `I` here, and `II` for the intrinsic instruction.
https://github.com/llvm/llvm-project/pull/182512
More information about the llvm-commits
mailing list