31 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes2; RUN: opt -S -passes=function-attrs < %s | FileCheck %s3 4@i = global i32 05 6define void @foo() {7; CHECK: Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none, target_mem0: none, target_mem1: none)8; CHECK-LABEL: define {{[^@]+}}@foo9; CHECK-SAME: () #[[ATTR0:[0-9]+]] {10; CHECK-NEXT: store i32 1, ptr @i, align 411; CHECK-NEXT: call void @bar()12; CHECK-NEXT: ret void13;14 store i32 1, ptr @i15 call void @bar()16 ret void17}18 19define void @bar() {20; CHECK: Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none, target_mem0: none, target_mem1: none)21; CHECK-LABEL: define {{[^@]+}}@bar22; CHECK-SAME: () #[[ATTR0]] {23; CHECK-NEXT: [[I:%.*]] = load i32, ptr @i, align 424; CHECK-NEXT: call void @foo()25; CHECK-NEXT: ret void26;27 %i = load i32, ptr @i28 call void @foo()29 ret void30}31