xref: /llvm-project/llvm/test/Transforms/Attributor/IPConstantProp/deadarg.ll (revision cd3a4c31bc9694d160de54c6a4daa53e152cb463)
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --check-attributes --check-globals
2; RUN: opt -aa-pipeline=basic-aa -passes=attributor -attributor-manifest-internal  -attributor-annotate-decl-cs  -S < %s | FileCheck %s --check-prefixes=CHECK,TUNIT
3; RUN: opt -aa-pipeline=basic-aa -passes=attributor-cgscc -attributor-manifest-internal  -attributor-annotate-decl-cs -S < %s | FileCheck %s --check-prefixes=CHECK,CGSCC
4define internal void @foo(i32 %X) {
5; CGSCC-LABEL: define {{[^@]+}}@foo
6; CGSCC-SAME: (i32 [[X:%.*]]) {
7; CGSCC-NEXT:    call void @foo(i32 [[X]])
8; CGSCC-NEXT:    ret void
9;
10  call void @foo( i32 %X )
11  ret void
12}
13
14define void @bar() {
15; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
16; CHECK-LABEL: define {{[^@]+}}@bar
17; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
18; CHECK-NEXT:    ret void
19;
20  ret void
21}
22;.
23; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
24;.
25; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
26;.
27;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
28; TUNIT: {{.*}}
29