[llvm] [LVI] Generalize mask not equal conditions handling (PR #92946)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 8 13:12:00 PDT 2024
================
@@ -364,6 +364,29 @@ ConstantRange ConstantRange::makeExactNoWrapRegion(Instruction::BinaryOps BinOp,
return makeGuaranteedNoWrapRegion(BinOp, ConstantRange(Other), NoWrapKind);
}
+ConstantRange ConstantRange::makeMaskNotEqualRange(const APInt &Mask,
+ const APInt &C) {
+ assert(!Mask.isZero() && "Mask cannot be zero.");
----------------
nikic wrote:
I feel like this pre-condition should not exist -- we can handle zero mask inside this function.
https://github.com/llvm/llvm-project/pull/92946
More information about the llvm-commits
mailing list