[llvm] [ValueTracking] Compute known bits of and/or recurrences from start and step (PR #226164)
Ömer Sinan Ağacan via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 24 06:47:10 PDT 2026
================
@@ -1899,13 +1899,33 @@ static void computeKnownBitsFromOperator(const Operator *I,
break;
}
+ // For a bitwise recurrence {Start,op,Step}, the step only applies from
+ // the second iteration on, so every fact must also hold for the start
+ // value alone.
+ case Instruction::And:
+ case Instruction::Or: {
----------------
osa1 wrote:
There are two straightforward statements that are shared between the two and then you have to distinguish the two again. I'd just move them to separate cases instead of nested cases of if-elses.
https://github.com/llvm/llvm-project/pull/226164
More information about the llvm-commits
mailing list