Reference: https://www.jeremykun.com/2023/08/10/mlir-running-and-testing-a-lowering/
Note: Check Setup the Environment of MLIR for the environment setup.
1. Implementing a Lowering
Create a file “ctlz.mlir”:
| |
Lower the math.ctlz operation to the llvm.ctlz operation with mlir-opt:
| |