Files
clang-p2996/mlir/lib/Dialect/Index/IR/InferIntRangeInterfaceImpls.cpp
Felix Schneider 2034f2fc87 [mlir][intrange] Use nsw,nuw flags in inference (#92642)
This patch includes the "no signed wrap" and "no unsigned wrap" flags,
which can be used to annotate some Ops in the `arith` dialect and also
in LLVMIR, in the integer range inference.

The general approach is to use saturating arithmetic operations to infer
bounds which are assumed to not wrap and use overflowing arithmetic
operations in the normal case. If overflow is detected in the normal
case,
special handling makes sure that we don't underestimate the result
range.
2024-05-22 09:02:31 +02:00

11 KiB