[llvm] ValueTracking: simplify udiv/urem recurrences (PR #108973)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 05:37:05 PDT 2024
================
@@ -1543,6 +1543,21 @@ static void computeKnownBitsFromOperator(const Operator *I,
}
break;
}
+
+ // Check for operations with the property that the magnitude of the
+ // result will never exceed that of the start value.
+ case Instruction::UDiv:
+ case Instruction::URem: {
----------------
artagnon wrote:
Doesn't `matchSimpleRecurrence` set `R` to the start value? I've also checked for `RInst` to set the context correctly.
https://github.com/llvm/llvm-project/pull/108973
More information about the llvm-commits
mailing list