optnone.ll 498 B

123456789101112131415161718192021222324
  1. ; RUN: opt < %s -functionattrs -S | FileCheck %s
  2. @x = global i32 0
  3. define void @test_opt(i8* %p) {
  4. ; CHECK-LABEL: @test_opt
  5. ; CHECK: (i8* nocapture readnone %p) #0 {
  6. ret void
  7. }
  8. define void @test_optnone(i8* %p) noinline optnone {
  9. ; CHECK-LABEL: @test_optnone
  10. ; CHECK: (i8* %p) #1 {
  11. ret void
  12. }
  13. declare i8 @strlen(i8*) noinline optnone
  14. ; CHECK-LABEL: @strlen
  15. ; CHECK: (i8*) #1
  16. ; CHECK-LABEL: attributes #0
  17. ; CHECK: = { readnone }
  18. ; CHECK-LABEL: attributes #1
  19. ; CHECK: = { noinline optnone }