blob: 7694bfe13aa519ea746bcfa9d92c021fa960439f [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 Molloy9a32da72015-11-12 09:05:43 +000019; CHECK: (i8*) #1
Chandler Carruth0fb99812014-08-13 10:49:33 +000020
21; CHECK-LABEL: attributes #0
James Molloy9a32da72015-11-12 09:05:43 +000022; CHECK: = { readnone }
Chandler Carruth0fb99812014-08-13 10:49:33 +000023; CHECK-LABEL: attributes #1
Chandler Carruth0fb99812014-08-13 10:49:33 +000024; CHECK: = { noinline optnone }