@global = external global double, align 8
-;
-; Linkage on functions.
-;
-
-; CHECK: llvm.func internal @func_internal
-define internal void @func_internal() {
- ret void
-}
-
; CHECK: llvm.func @fe(i32) -> f32
declare float @fe(i32)
-; CHECK: llvm.func internal spir_funccc @spir_func_internal()
-define internal spir_func void @spir_func_internal() {
- ret void
-}
-
; FIXME: function attributes.
; CHECK-LABEL: llvm.func internal @f1(%arg0: i64) -> i32 attributes {dso_local} {
; CHECK-DBG: llvm.func internal @f1(%arg0: i64 loc(unknown)) -> i32 attributes {dso_local} {
+++ /dev/null
-; RUN: mlir-translate -import-llvm %s | FileCheck %s
-
-; CHECK: llvm.func @foo(%arg0: !llvm.ptr {llvm.byval = i64}, %arg1: !llvm.ptr {llvm.byref = i64}, %arg2: !llvm.ptr {llvm.sret = i64}, %arg3: !llvm.ptr {llvm.inalloca = i64})
-define void @foo(ptr byval(i64) %arg0, ptr byref(i64) %arg1, ptr sret(i64) %arg2, ptr inalloca(i64) %arg3) {
- ret void
-}
--- /dev/null
+; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s
+
+; CHECK: llvm.func internal @func_internal
+define internal void @func_internal() {
+ ret void
+}
+
+; CHECK: llvm.func internal spir_funccc @spir_func_internal()
+define internal spir_func void @spir_func_internal() {
+ ret void
+}
+
+; // -----
+
+; CHECK-LABEL: @func_readnone
+; CHECK-SAME: attributes {llvm.readnone}
+; CHECK: llvm.return
+define void @func_readnone() readnone {
+ ret void
+}
+
+; CHECK-LABEL: @func_readnone_indirect
+; CHECK-SAME: attributes {llvm.readnone}
+declare void @func_readnone_indirect() #0
+attributes #0 = { readnone }
+
+; // -----
+
+; CHECK-LABEL: @func_arg_attrs
+; CHECK-SAME: !llvm.ptr {llvm.byval = i64}
+; CHECK-SAME: !llvm.ptr {llvm.byref = i64}
+; CHECK-SAME: !llvm.ptr {llvm.sret = i64}
+; CHECK-SAME: !llvm.ptr {llvm.inalloca = i64}
+define void @func_arg_attrs(
+ ptr byval(i64) %arg0,
+ ptr byref(i64) %arg1,
+ ptr sret(i64) %arg2,
+ ptr inalloca(i64) %arg3) {
+ ret void
+}
+++ /dev/null
-; RUN: mlir-translate -import-llvm -split-input-file %s | FileCheck %s
-
-// -----
-
-; CHECK: llvm.func @readnone_attr() attributes {llvm.readnone}
-declare void @readnone_attr() #0
-attributes #0 = { readnone }
-
-// -----
-
-; CHECK: llvm.func @readnone_attr() attributes {llvm.readnone} {
-; CHECK: llvm.return
-; CHECK: }
-define void @readnone_attr() readnone {
-entry:
- ret void
-}