xref: /llvm-project/llvm/test/Analysis/Lint/noalias-readnone.ll (revision c0682840877a21960f4c21a97b5f497d4ccc82d5)
1; RUN: opt < %s -passes=lint -disable-output 2>&1 | FileCheck --allow-empty %s
2
3declare void @foo1(ptr noalias, ptr readnone)
4
5define void @test1(ptr %a) {
6entry:
7  call void @foo1(ptr %a, ptr %a)
8  ret void
9}
10
11; Lint should not complain about passing %a to both arguments even if one is
12; noalias, since the second argument is readnone.
13; CHECK-NOT: Unusual: noalias argument aliases another argument
14; CHECK-NOT: call void @foo1(ptr %a, ptr %a)
15