diff options
author | Felix Schneider <fx.schn@gmail.com> | 2024-05-14 20:33:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-14 20:33:16 +0200 |
commit | acd100747fff85e7cfb67caa6c0f1053e820c1ac (patch) | |
tree | d45bcae185ddac4d012cd4327f72232348d9ac09 /llvm/lib/Analysis/LoopAccessAnalysis.cpp | |
parent | 19008d32182ebbe421aaa222ee8af5c3e134e550 (diff) | |
download | llvm-acd100747fff85e7cfb67caa6c0f1053e820c1ac.zip llvm-acd100747fff85e7cfb67caa6c0f1053e820c1ac.tar.gz llvm-acd100747fff85e7cfb67caa6c0f1053e820c1ac.tar.bz2 |
[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?*)
Diffstat (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions