[all-commits] [llvm/llvm-project] acd100: [mlir][test] Extend `InferIntRangeInterface` test ...
Felix Schneider via All-commits
all-commits at lists.llvm.org
Tue May 14 11:33:38 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: acd100747fff85e7cfb67caa6c0f1053e820c1ac
https://github.com/llvm/llvm-project/commit/acd100747fff85e7cfb67caa6c0f1053e820c1ac
Author: Felix Schneider <fx.schn at gmail.com>
Date: 2024-05-14 (Tue, 14 May 2024)
Changed paths:
M mlir/test/Dialect/Arith/int-range-interface.mlir
M mlir/test/Dialect/Arith/int-range-opts.mlir
M mlir/test/Dialect/GPU/int-range-interface.mlir
M mlir/test/Interfaces/InferIntRangeInterface/infer-int-range-test-ops.mlir
M mlir/test/lib/Dialect/Test/TestOpDefs.cpp
M mlir/test/lib/Dialect/Test/TestOps.td
Log Message:
-----------
[mlir][test] Extend `InferIntRangeInterface` test Ops to arbitrary ints (#91850)
This PR is in preparation to some extensions to the
`InferIntRangeInterface` around the `nsw` and `nuw` flags supported in
the `arith` dialect and LLVM.
We provide some common inference logic for `index` and `arith` in
`InferIntRangeCommon.h` but our Test Ops are currently fixed to `Index`
Types. As we test the range inference for arith Ops, especially around
the overflow behaviour, it's handy to have native support for the
typical integer types in the test Ops.
This patch
1. Changes the Attributes of `test.with_bounds` ops from `Index` to
`APInt` which matches the internal representation in
`ConstantIntRanges`.
2. Allows the use of `AnyInteger` in addition to `Index` for the
operands and results of the test Ops. This now requires explicit
specification of the type in the IR, where before `Index` was implicit.
3. Requires bounds Attrs to be specified in the precision of the SSA
value, eliminating any implicit truncation or extension. (*Could this
lead to problems?*)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list