1 ; RUN: opt -S < %s -function-attrs | FileCheck %s
2 ; RUN: opt -S < %s -passes=function-attrs | FileCheck %s
4 ; CHECK: Function Attrs
5 ; CHECK-SAME: inaccessiblememonly
6 ; CHECK-NEXT: declare void @llvm.sideeffect()
7 declare void @llvm.sideeffect()
9 ; Don't add readnone or similar attributes when an @llvm.sideeffect() intrinsic
12 ; CHECK: Function Attrs
14 ; CHECK: define void @test()
16 call void @llvm.sideeffect()
20 ; CHECK: Function Attrs
22 ; CHECK: define void @loop()
27 call void @llvm.sideeffect()