blob: cd08c75d75b4e47ba772435ef6227d458dce03e6 [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
Chandler Carruth632d2082016-02-13 08:47:51 +000019; CHECK: (i8*) #1
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
Chandler Carruth0fb99812014-08-13 10:49:33 +000024; CHECK: = { noinline optnone }