This tutorial gives an introduction to the `mlir-opt` tool, focusing on how to run basic passes with and without options, run pass pipelines from the CLI, and point out particularly useful flags. --------- Co-authored-by: Jeremy Kun <j2kun@users.noreply.github.com> Co-authored-by: Mehdi Amini <joker.eph@gmail.com>
11 lines
243 B
MLIR
11 lines
243 B
MLIR
// RUN: mlir-opt --pass-pipeline="builtin.module(convert-to-llvm)" %s | FileCheck %s
|
|
|
|
// CHECK-LABEL: @main
|
|
// CHECK: llvm.intr.ctlz
|
|
module {
|
|
func.func @main(%arg0: i32) -> i32 {
|
|
%0 = math.ctlz %arg0 : i32
|
|
func.return %0 : i32
|
|
}
|
|
}
|