The attribute is translated into LLVM's function attribute 'readnone'. There is no explicit verification regarding conflicting 'readnone' and function attributes from 'passthrough', though, LLVM would assert if they are incompatible during LLVM IR creation. Differential Revision: https://reviews.llvm.org/D131457
18 lines
377 B
LLVM
18 lines
377 B
LLVM
; 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
|
|
}
|