Files
clang-p2996/mlir/test/Target/LLVMIR/external-func-dialect-attr.mlir
Sergio Afonso 2ef7e2085f [MLIR] Enable converting dialect attributes on external functions
This patch modifies the MLIR-to-LLVMIR translation pass to enable dialect
attributes attached to external functions being processed by the corresponding
dialect's translation interface via `amendOperation()`.

Differential Revision: https://reviews.llvm.org/D156988
2023-08-09 12:50:47 +01:00

12 lines
424 B
MLIR

// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
// Check that dialect attributes are processed for external functions.
// This might not be an intended use case for `nvvm.minctasm`, but it enables
// testing this feature easily.
module {
llvm.func external @f() attributes { nvvm.minctasm = 10 : i32 }
// CHECK: !nvvm.annotations = !{![[NVVM:[0-9]+]]}
// CHECK: ![[NVVM]] = !{ptr @f, !"minctasm", i32 10}
}