33 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes2; RUN: opt -S < %s -passes=function-attrs | FileCheck %s3 4declare void @llvm.sideeffect()5 6; Don't add readnone or similar attributes when an @llvm.sideeffect() intrinsic7; is present.8 9define void @test() {10; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(inaccessiblemem: readwrite)11; CHECK-LABEL: @test(12; CHECK-NEXT: call void @llvm.sideeffect()13; CHECK-NEXT: ret void14;15 call void @llvm.sideeffect()16 ret void17}18 19define void @loop() {20; CHECK: Function Attrs: nofree norecurse noreturn nosync nounwind memory(inaccessiblemem: readwrite)21; CHECK-LABEL: @loop(22; CHECK-NEXT: br label [[LOOP:%.*]]23; CHECK: loop:24; CHECK-NEXT: call void @llvm.sideeffect()25; CHECK-NEXT: br label [[LOOP]]26;27 br label %loop28 29loop:30 call void @llvm.sideeffect()31 br label %loop32}33