blob: 441ff4da65ecc991f04db46ef148b02ba36c9ce7 [file] [log] [blame]
Chandler Carruth0fb99812014-08-13 10:49:33 +00001; RUN: opt < %s -functionattrs -S | FileCheck %s
2
3@x = global i32 0
4
5define void @test_opt(i8* %p) {
6; CHECK-LABEL: @test_opt
7; CHECK: (i8* nocapture readnone %p) #0 {
8 ret void
9}
10
11define void @test_optnone(i8* %p) noinline optnone {
12; CHECK-LABEL: @test_optnone
13; CHECK: (i8* %p) #1 {
14 ret void
15}
16
17declare i8 @strlen(i8*) noinline optnone
18; CHECK-LABEL: @strlen
James Molloy7e9bdd52015-11-12 10:55:20 +000019; CHECK: (i8*) #2
Chandler Carruth0fb99812014-08-13 10:49:33 +000020
21; CHECK-LABEL: attributes #0
James Molloy7e9bdd52015-11-12 10:55:20 +000022; CHECK: = { norecurse readnone }
Chandler Carruth0fb99812014-08-13 10:49:33 +000023; CHECK-LABEL: attributes #1
James Molloy7e9bdd52015-11-12 10:55:20 +000024; CHECK: = { noinline norecurse optnone }
25; CHECK-LABEL: attributes #2
Chandler Carruth0fb99812014-08-13 10:49:33 +000026; CHECK: = { noinline optnone }