[llvm] [ValueTracking] Support GEPs in matchSimpleRecurrence. (PR #123518)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 1 12:26:06 PDT 2025
================
@@ -1660,6 +1661,11 @@ static void computeKnownBitsFromOperator(const Operator *I,
// We need to take the minimum number of known bits
KnownBits Known3(BitWidth);
+ if (BitWidth != getBitWidth(L->getType(), Q.DL)) {
----------------
fhahn wrote:
Yep, but unfortunately computeKnowNbits has some assertions that the bitwdith of the operation matches the bassed in KnowBits.
We could operate on a suitable KnownBits object for the getelementptr, and extend as needed as follow-up, if there are any cases this would help.
https://github.com/llvm/llvm-project/pull/123518
More information about the llvm-commits
mailing list