[all-commits] [llvm/llvm-project] e2f756: [mlir][arith] Add narrowing patterns for `addi` an...

Jakub Kuderski via All-commits all-commits at lists.llvm.org
Tue May 2 07:12:03 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2f7563d7c30c3aca3ac8b937a4967accb59c209
  Author: Jakub Kuderski <kubak at google.com>
  Date:   2023-05-02 (Tue, 02 May 2023)

  Changed paths:
    M mlir/lib/Dialect/Arith/Transforms/IntNarrowing.cpp
    M mlir/test/Dialect/Arith/int-narrowing.mlir

  Log Message:
  [mlir][arith] Add narrowing patterns for `addi` and `muli`

These two ops are handled in a very similar way -- the only difference
in the number result bits produced.

I checked these transformation with Alive2:
1.  addi + sext: https://alive2.llvm.org/ce/z/3NSs9T
2.  addi + zext: https://alive2.llvm.org/ce/z/t7XHOT
3.  muli + sext: https://alive2.llvm.org/ce/z/-7sfW9
4.  muli + zext: https://alive2.llvm.org/ce/z/h4yntF

Reviewed By: antiagainst

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

More information about the All-commits mailing list