1 // RUN: mlir-opt %s -split-input-file -convert-gpu-to-rocdl='use-bare-ptr-memref-call-conv=0' | FileCheck %s --check-prefixes=CHECK,ROCDL
2 // RUN: mlir-opt %s -split-input-file -convert-gpu-to-nvvm='use-bare-ptr-memref-call-conv=0' | FileCheck %s --check-prefixes=CHECK,NVVM
5 gpu.func @test_func_readonly(%arg0 : memref<f32> {llvm.readonly} ) {
10 // CHECK-LABEL: llvm.func @test_func_readonly
11 // ROCDL-SAME: !llvm.ptr {llvm.readonly}
12 // NVVM-SAME: !llvm.ptr {llvm.readonly}
18 gpu.func @test_func_writeonly(%arg0 : memref<f32> {llvm.writeonly} ) {
23 // CHECK-LABEL: llvm.func @test_func_writeonly
24 // ROCDL-SAME: !llvm.ptr {llvm.writeonly}
25 // NVVM-SAME: !llvm.ptr {llvm.writeonly}
30 gpu.func @test_func_readonly_ptr(%arg0 : !llvm.ptr {llvm.readonly} ) {
35 // CHECK-LABEL: llvm.func @test_func_readonly_ptr
36 // ROCDL-SAME: !llvm.ptr {llvm.readonly}
37 // NVVM-SAME: !llvm.ptr {llvm.readonly}
42 gpu.func @test_func_nonnull(%arg0 : memref<f32> {llvm.nonnull} ) {
47 // CHECK-LABEL: llvm.func @test_func_nonnull
48 // ROCDL-SAME: !llvm.ptr {llvm.nonnull}
49 // NVVM-SAME: !llvm.ptr {llvm.nonnull}
55 gpu.func @test_func_dereferenceable(%arg0 : memref<f32> {llvm.dereferenceable = 4 : i64} ) {
60 // CHECK-LABEL: llvm.func @test_func_dereferenceable
61 // ROCDL-SAME: !llvm.ptr {llvm.dereferenceable = 4 : i64}
62 // NVVM-SAME: !llvm.ptr {llvm.dereferenceable = 4 : i64}
68 gpu.func @test_func_dereferenceable_or_null(%arg0 : memref<f32> {llvm.dereferenceable_or_null = 4 : i64} ) {
73 // CHECK-LABEL: llvm.func @test_func_dereferenceable_or_null
74 // ROCDL-SAME: !llvm.ptr {llvm.dereferenceable_or_null = 4 : i64}
75 // NVVM-SAME: !llvm.ptr {llvm.dereferenceable_or_null = 4 : i64}
80 gpu.func @test_func_noundef(%arg0 : memref<f32> {llvm.noundef} ) {
85 // CHECK-LABEL: llvm.func @test_func_noundef
86 // ROCDL-SAME: !llvm.ptr {llvm.noundef}
87 // ROCDL-SAME: i64 {llvm.noundef}
88 // NVVM-SAME: !llvm.ptr {llvm.noundef}
89 // NVVM-SAME: i64 {llvm.noundef}