51 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC4 5@_ZL6test1g = internal global i32 42, align 46 7;.8; CHECK: @_ZL6test1g = internal global i32 42, align 49;.10define void @_Z7test1f1v() nounwind {11; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)12; CHECK-LABEL: define {{[^@]+}}@_Z7test1f1v13; CHECK-SAME: () #[[ATTR0:[0-9]+]] {14; CHECK-NEXT: entry:15; CHECK-NEXT: br label [[IF_END:%.*]]16; CHECK: if.then:17; CHECK-NEXT: unreachable18; CHECK: if.end:19; CHECK-NEXT: ret void20;21entry:22 %tmp = load i32, ptr @_ZL6test1g, align 423 %cmp = icmp eq i32 %tmp, 024 br i1 %cmp, label %if.then, label %if.end25 26if.then: ; preds = %entry27 store i32 0, ptr @_ZL6test1g, align 428 br label %if.end29 30if.end: ; preds = %if.then, %entry31 ret void32}33 34define i32 @_Z7test1f2v() nounwind {35; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)36; CHECK-LABEL: define {{[^@]+}}@_Z7test1f2v37; CHECK-SAME: () #[[ATTR0]] {38; CHECK-NEXT: entry:39; CHECK-NEXT: ret i32 4240;41entry:42 %tmp = load i32, ptr @_ZL6test1g, align 443 ret i32 %tmp44}45;.46; CHECK: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }47;.48;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:49; CGSCC: {{.*}}50; TUNIT: {{.*}}51