150
|
1 ; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
|
|
2
|
|
3 @x = global i32 0
|
|
4
|
236
|
5 define void @test_opt(ptr %p) {
|
150
|
6 ; CHECK-LABEL: @test_opt
|
236
|
7 ; CHECK: (ptr nocapture readnone %p) #0 {
|
150
|
8 ret void
|
|
9 }
|
|
10
|
236
|
11 define void @test_optnone(ptr %p) noinline optnone {
|
150
|
12 ; CHECK-LABEL: @test_optnone
|
236
|
13 ; CHECK: (ptr %p) #1 {
|
150
|
14 ret void
|
|
15 }
|
|
16
|
236
|
17 declare i8 @strlen(ptr) noinline optnone
|
150
|
18 ; CHECK-LABEL: @strlen
|
236
|
19 ; CHECK: (ptr) #1
|
150
|
20
|
|
21 ; CHECK-LABEL: attributes #0
|
252
|
22 ; CHECK: = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
|
150
|
23 ; CHECK-LABEL: attributes #1
|
|
24 ; CHECK: = { noinline optnone }
|