[Mlir-commits] [mlir] [mlir][intrange] Use `nsw`, `nuw` flags in inference (PR #92642)
Ivan Butygin
llvmlistbot at llvm.org
Sat May 18 08:08:00 PDT 2024
================
@@ -44,19 +44,32 @@ void BoolConstantOp::inferResultRanges(ArrayRef<ConstantIntRanges> argRanges,
// we take the 64-bit result).
//===----------------------------------------------------------------------===//
+// Some arithmetic inference functions allow specifying special overflow / wrap
+// behavior. We do not require this for the IndexOps and use this helper to call
+// the inference function without any `OverflowFlags`.
+std::function<ConstantIntRanges(ArrayRef<ConstantIntRanges>)>
+inferWithoutOverflowFlags(InferRangeWithOvfFlagsFn inferWithOvfFn) {
----------------
Hardcode84 wrote:
static
https://github.com/llvm/llvm-project/pull/92642
More information about the Mlir-commits
mailing list