1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes
2 ; RUN: opt -S < %s -passes=function-attrs | FileCheck %s
4 declare void @llvm.sideeffect()
6 ; Don't add readnone or similar attributes when an @llvm.sideeffect() intrinsic
10 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(inaccessiblemem: readwrite)
12 ; CHECK-NEXT: call void @llvm.sideeffect()
13 ; CHECK-NEXT: ret void
15 call void @llvm.sideeffect()
20 ; CHECK: Function Attrs: nofree norecurse noreturn nosync nounwind memory(inaccessiblemem: readwrite)
22 ; CHECK-NEXT: br label [[LOOP:%.*]]
24 ; CHECK-NEXT: call void @llvm.sideeffect()
25 ; CHECK-NEXT: br label [[LOOP]]
30 call void @llvm.sideeffect()