• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt -module-summary %s -o %t.o
2; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
3
4; CHECK: <GLOBALVAL_SUMMARY_BLOCK
5; ensure @f is marked readnone
6; CHECK:  <PERMODULE {{.*}} op0=0 {{.*}} op3=1
7; ensure @g is marked readonly
8; CHECK:  <PERMODULE {{.*}} op0=1 {{.*}} op3=2
9; ensure @h is marked norecurse
10; CHECK:  <PERMODULE {{.*}} op0=2 {{.*}} op3=4
11; ensure @i is marked returndoesnotalias
12; CHECK:  <PERMODULE {{.*}} op0=3 {{.*}} op3=8
13
14define void @f() readnone {
15   ret void
16}
17define void @g() readonly {
18   ret void
19}
20define void @h() norecurse {
21   ret void
22}
23
24define noalias i8* @i() {
25   %r = alloca i8
26   ret i8* %r
27}
28