[Mlir-commits] [mlir] [mlir][arith] Add more canonicalization and integration tests coverage (PR #92272)
Mehdi Amini
llvmlistbot at llvm.org
Thu Aug 29 07:24:45 PDT 2024
joker-eph wrote:
Since you're reasoning in term of "spec", we indeed think in terms of what the spec for floordivsi should be, and then we reason in terms of what the spec of the target of the lowering is. For example for expand ops it is the spec of the other arith op present here. Any kind of reasoning should be able to be done there: if we lower to LLVM we reason in term of the spec of the abstract LLVM machine and check that we program the right sequence of instruction as expected.
> In this case, I think it is clearer to test the implemented algorithm, so we can check against the spec directly, e.g. by executing it,
You're not testing the implementation or the spec, just a particular behavior against a single input. This is providing less coverage than an IR check from this point of view.
More importantly, this is also a question of coupling of the system and overall maintenance / cost question, and ultimately some testing philosophy (for which LLVM is historically fairly clear on the preference to IR lit-testing: you won't find any execution unit testing in LLVM like this outside of MLIR).
https://github.com/llvm/llvm-project/pull/92272
More information about the Mlir-commits
mailing list