[mlir][arith][NFC] Simplify narrowing patterns with a wrapper type
authorJakub Kuderski <kubak@google.com>
Mon, 1 May 2023 17:31:30 +0000 (13:31 -0400)
committerJakub Kuderski <kubak@google.com>
Mon, 1 May 2023 17:31:31 +0000 (13:31 -0400)
commit49df068836bfbb538771395d8bb293548afd414e
treeb8f0e4c5310f5f4df8697eae64003fc3730a373a
parentf762798599171efca03964f4371cc8104d2392f9
[mlir][arith][NFC] Simplify narrowing patterns with a wrapper type

Add a new wraper type that represents either of `ExtSIOp` or `ExtUIOp`.
This is to simplify the code by using a single type, so that we do not
have to use templates or branching to handle both extension kinds.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D149485
mlir/lib/Dialect/Arith/Transforms/IntNarrowing.cpp