Files
clang-p2996/mlir/test/Target/LLVMIR/Import/test.ll
Fabian Mora a2c4b7c8e2 [mlir] Add convertInstruction and getSupportedInstructions to LLVMImportInterface (#86799)
This patch adds the `convertInstruction` and `getSupportedInstructions`
to `LLVMImportInterface`, allowing any non-LLVM dialect to specify how
to import LLVM IR instructions and overriding the default import of LLVM instructions.
2024-04-07 08:46:21 +02:00

12 lines
428 B
LLVM

; RUN: mlir-translate -test-import-llvmir %s | FileCheck %s
; CHECK-LABEL: @custom_load
; CHECK-SAME: %[[PTR:[[:alnum:]]+]]
define double @custom_load(ptr %ptr) {
; CHECK: %[[LOAD:[0-9]+]] = llvm.load %[[PTR]] : !llvm.ptr -> f64
; CHECK: %[[TEST:[0-9]+]] = "test.same_operand_element_type"(%[[LOAD]], %[[LOAD]]) : (f64, f64) -> f64
%1 = load double, ptr %ptr
; CHECK: llvm.return %[[TEST]] : f64
ret double %1
}