brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 11467f2 Raw
71 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; PR 329175 6@b = common local_unnamed_addr global i32 0, align 47@a = common local_unnamed_addr global i32 0, align 48 9;.10; CHECK: @b = common local_unnamed_addr global i32 0, align 411; CHECK: @a = common local_unnamed_addr global i32 0, align 412;.13define i32 @fn2() local_unnamed_addr {14; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn15; TUNIT-LABEL: define {{[^@]+}}@fn216; TUNIT-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {17; TUNIT-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 418; TUNIT-NEXT:    [[TMP2:%.*]] = sext i32 [[TMP1]] to i6419; TUNIT-NEXT:    [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to ptr20; TUNIT-NEXT:    call fastcc void @fn1(ptr nofree readonly align 4 captures(none) [[TMP3]]) #[[ATTR1:[0-9]+]]21; TUNIT-NEXT:    ret i32 undef22;23; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn24; CGSCC-LABEL: define {{[^@]+}}@fn225; CGSCC-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {26; CGSCC-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 427; CGSCC-NEXT:    [[TMP2:%.*]] = sext i32 [[TMP1]] to i6428; CGSCC-NEXT:    [[TMP3:%.*]] = inttoptr i64 [[TMP2]] to ptr29; CGSCC-NEXT:    call fastcc void @fn1(ptr nofree nonnull readonly align 4 captures(none) [[TMP3]]) #[[ATTR2:[0-9]+]]30; CGSCC-NEXT:    ret i32 undef31;32  %1 = load i32, ptr @b, align 433  %2 = sext i32 %1 to i6434  %3 = inttoptr i64 %2 to ptr35  call fastcc void @fn1(ptr %3)36  ret i32 undef37}38 39define internal fastcc void @fn1(ptr nocapture readonly) unnamed_addr {40; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn41; TUNIT-LABEL: define {{[^@]+}}@fn142; TUNIT-SAME: (ptr nofree nonnull readonly align 4 captures(none) [[TMP0:%.*]]) unnamed_addr #[[ATTR0]] {43; TUNIT-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i64 -144; TUNIT-NEXT:    [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 445; TUNIT-NEXT:    store i32 [[TMP3]], ptr @a, align 446; TUNIT-NEXT:    ret void47;48; CGSCC: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn49; CGSCC-LABEL: define {{[^@]+}}@fn150; CGSCC-SAME: (ptr nofree nonnull readonly align 4 captures(none) [[TMP0:%.*]]) unnamed_addr #[[ATTR1:[0-9]+]] {51; CGSCC-NEXT:    [[TMP2:%.*]] = getelementptr inbounds i32, ptr [[TMP0]], i64 -152; CGSCC-NEXT:    [[TMP3:%.*]] = load i32, ptr [[TMP2]], align 453; CGSCC-NEXT:    store i32 [[TMP3]], ptr @a, align 454; CGSCC-NEXT:    ret void55;56  %2 = getelementptr inbounds i32, ptr %0, i64 -157  %3 = load i32, ptr %2, align 458  store i32 %3, ptr @a, align 459  ret void60}61;.62; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn }63; TUNIT: attributes #[[ATTR1]] = { nofree nosync nounwind willreturn }64;.65; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree nosync nounwind willreturn }66; CGSCC: attributes #[[ATTR1]] = { mustprogress nofree norecurse nosync nounwind willreturn }67; CGSCC: attributes #[[ATTR2]] = { nofree nounwind willreturn }68;.69;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:70; CHECK: {{.*}}71