[mlir][spirv] Add pattern to expand UMulExtended for WebGPU
authorJakub Kuderski <kubak@google.com>
Wed, 4 Jan 2023 18:29:46 +0000 (13:29 -0500)
committerJakub Kuderski <kubak@google.com>
Wed, 4 Jan 2023 18:29:47 +0000 (13:29 -0500)
commitc957fe0f6088485beea3b03cf4b4084c41226328
tree07b00c010be5f5a23578553c8d994e1f12c98782
parent53a858f7fc5325d66443fa5e3ddaa71e2bb08640
[mlir][spirv] Add pattern to expand UMulExtended for WebGPU

This is needed because WGSL does not yet support extended multiplication
ops.

Set up pattern/pass stuff and handle the first op: `UMulExtended`.
`SMulExtended` handling will go to a separate patch.

Issue: https://github.com/llvm/llvm-project/issues/59563

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D140995
mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.td
mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVWebGPUTransforms.h [new file with mode: 0644]
mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
mlir/lib/Dialect/SPIRV/Transforms/SPIRVWebGPUTransforms.cpp [new file with mode: 0644]
mlir/test/Dialect/SPIRV/Transforms/webgpu-prepare.mlir [new file with mode: 0644]