brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 9591b56 Raw
65 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; PR55965 6; IPSCCP should propagate the 0 argument, eliminate the switch, and propagate7; the result.8 9; FIXME: Remove obsolete calls/instructions10 11define i32 @main() noreturn nounwind {12; TUNIT: Function Attrs: mustprogress nofree norecurse noreturn nosync nounwind willreturn memory(none)13; TUNIT-LABEL: define {{[^@]+}}@main14; TUNIT-SAME: () #[[ATTR0:[0-9]+]] {15; TUNIT-NEXT:  entry:16; TUNIT-NEXT:    ret i32 12317;18; CGSCC: Function Attrs: mustprogress nofree noreturn nosync nounwind willreturn memory(none)19; CGSCC-LABEL: define {{[^@]+}}@main20; CGSCC-SAME: () #[[ATTR0:[0-9]+]] {21; CGSCC-NEXT:  entry:22; CGSCC-NEXT:    [[CALL2:%.*]] = tail call noundef i32 @wwrite() #[[ATTR2:[0-9]+]]23; CGSCC-NEXT:    ret i32 [[CALL2]]24;25entry:26  %call2 = tail call i32 @wwrite(i64 0) nounwind27  ret i32 %call228}29 30define internal i32 @wwrite(i64 %i) nounwind readnone {31; CGSCC: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)32; CGSCC-LABEL: define {{[^@]+}}@wwrite33; CGSCC-SAME: () #[[ATTR1:[0-9]+]] {34; CGSCC-NEXT:  entry:35; CGSCC-NEXT:    switch i64 0, label [[SW_DEFAULT:%.*]] [36; CGSCC-NEXT:      i64 3, label [[RETURN:%.*]]37; CGSCC-NEXT:      i64 10, label [[RETURN]]38; CGSCC-NEXT:    ]39; CGSCC:       sw.default:40; CGSCC-NEXT:    ret i32 12341; CGSCC:       return:42; CGSCC-NEXT:    unreachable43;44entry:45  switch i64 %i, label %sw.default [46  i64 3, label %return47  i64 10, label %return48  ]49 50sw.default:51  ret i32 12352 53return:54  ret i32 055}56;.57; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree norecurse noreturn nosync nounwind willreturn memory(none) }58;.59; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree noreturn nosync nounwind willreturn memory(none) }60; CGSCC: attributes #[[ATTR1]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }61; CGSCC: attributes #[[ATTR2]] = { nofree nosync nounwind willreturn }62;.63;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:64; CHECK: {{.*}}65