brintos

brintos / llvm-project-archived public Read only

0
0
Text · 803 B · 2bc486f Raw
37 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=argpromotion,inline -S %s | FileCheck %s3 4; argpromo removes @b's parameter (removing @c's reference to @a without updating the ref edge in the call graph), then the inliner inlines @a into @d and attempts to remove @a.5 6define internal void @a() alwaysinline {7  call void @e(ptr @c)8  ret void9}10 11define internal void @b(ptr) noinline {12; CHECK-LABEL: @b(13; CHECK-NEXT:    ret void14;15  ret void16}17 18define internal void @c() noinline {19; CHECK-LABEL: @c(20; CHECK-NEXT:    call void @b()21; CHECK-NEXT:    ret void22;23  call void @b(ptr @a)24  ret void25}26 27define void @d() {28; CHECK-LABEL: @d(29; CHECK-NEXT:    call void @e(ptr @c)30; CHECK-NEXT:    ret void31;32  call void @a()33  ret void34}35 36declare void @e(ptr);37