aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/FunctionAttrs/readnone.ll
blob: 6e09ae6da76dcfbc7239ec4de1d6701fceab1712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: opt < %s -passes=function-attrs -S | FileCheck %s

; CHECK: define void @bar(ptr nocapture readnone %0)
define void @bar(ptr readonly %0) {
  call void @foo(ptr %0)
    ret void
}

; CHECK: define void @foo(ptr nocapture readnone %0)
define void @foo(ptr readonly %0) {
  call void @bar(ptr %0)
  ret void
}