[all-commits] [llvm/llvm-project] c521a0: [mlir][arith] Add comparison-based integration tests

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Tue Sep 20 08:40:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c521a052f9bf7e418011f98a662be2c434d350ba
      https://github.com/llvm/llvm-project/commit/c521a052f9bf7e418011f98a662be2c434d350ba
  Author: Jakub Kuderski <kubak at google.com>
  Date:   2022-09-20 (Tue, 20 Sep 2022)

  Changed paths:
    A mlir/test/Integration/Dialect/Arithmetic/CPU/test-wide-int-emulation-compare-results-i16.mlir

  Log Message:
  -----------
  [mlir][arith] Add comparison-based integration tests

Introduces a simple framework for runtime tests of the wide integer emulation.

In these tests, we are only interested in checking that both wide and narrow calculation
produce the same results, and do not check for exact results. This allows us to cover
more of the input space, as we do not have to hardcode each of the expected outputs.

Introduce common helper functions to check the results, print a message on mismatch,
and sample the input space.

Implement runtime comparrison tests for `arith.muli` and `arith.shrui`.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D134184




More information about the All-commits mailing list