def LLVMLegalizeForExport : Pass<"llvm-legalize-for-export"> {
let summary = "Legalize LLVM dialect to be convertible to LLVM IR";
let constructor = "::mlir::LLVM::createLegalizeForExportPass()";
+ let dependentDialects = ["LLVM::LLVMDialect"];
}
def LLVMRequestCWrappers
-// RUN: mlir-opt -llvm-legalize-for-export %s | FileCheck %s
+// RUN: mlir-opt -llvm-legalize-for-export --split-input-file %s | FileCheck %s
// Verifies that duplicate successor with different arguments are deduplicated
// by introducing a new block that forwards its arguments to the original
}
llvm.return
}
+
+// -----
+
+// This module won't have any LLVM dialect entities as input.
+// Check that we don't crash when building LLVM entities.
+// CHECK-LABEL:func @func1
+func.func @func1(%arg0: i1, %arg1 : i1) {
+// CHECK: llvm.br
+ cf.cond_br %arg0, ^bb40(%arg0 : i1), ^bb40(%arg1 : i1)
+^bb40(%47: i1):
+ return
+}