Home | History | Annotate | Download | only in FunctionAttrs
      1 ; RUN: opt < %s -functionattrs -S | FileCheck %s
      2 
      3 @x = global i32 0
      4 
      5 define void @test_opt(i8* %p) {
      6 ; CHECK-LABEL: @test_opt
      7 ; CHECK: (i8* nocapture readnone %p) #0 {
      8   ret void
      9 }
     10 
     11 define void @test_optnone(i8* %p) noinline optnone {
     12 ; CHECK-LABEL: @test_optnone
     13 ; CHECK: (i8* %p) #1 {
     14   ret void
     15 }
     16 
     17 declare i8 @strlen(i8*) noinline optnone
     18 ; CHECK-LABEL: @strlen
     19 ; CHECK: (i8*) #2
     20 
     21 ; CHECK-LABEL: attributes #0
     22 ; CHECK: = { norecurse readnone }
     23 ; CHECK-LABEL: attributes #1
     24 ; CHECK: = { noinline norecurse optnone }
     25 ; CHECK-LABEL: attributes #2
     26 ; CHECK: = { noinline optnone }
     27