1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-attributes
2 ; RUN: opt < %s -passes=function-attrs -S | FileCheck %s
6 declare i32 @e() readnone
9 ; CHECK: Function Attrs: nofree nosync memory(none)
11 ; CHECK-NEXT: [[TMP:%.*]] = call i32 @e()
12 ; CHECK-NEXT: ret i32 [[TMP]]
18 define i32 @g() readonly {
19 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
21 ; CHECK-NEXT: ret i32 0
26 define i32 @h() readnone {
27 ; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
29 ; CHECK-NEXT: [[TMP:%.*]] = load i32, ptr @x, align 4
30 ; CHECK-NEXT: ret i32 [[TMP]]
32 %tmp = load i32, ptr @x