brintos

brintos / llvm-project-archived public Read only

0
0
Text · 848 B · c94dc07 Raw
36 lines · plain
1; Inlining should not clone label annotations.2; Currently we block all duplication for simplicity.3 4; RUN: opt < %s -S -passes=inline | FileCheck %s5 6@the_global = global i32 07 8declare void @llvm.codeview.annotation(metadata)9 10define void @inlinee() {11entry:12  store i32 42, ptr @the_global13  call void @llvm.codeview.annotation(metadata !0)14  ret void15}16 17define void @caller() {18entry:19  call void @inlinee()20  ret void21}22 23!0 = !{!"annotation"}24 25; CHECK-LABEL: define void @inlinee()26; CHECK: store i32 42, ptr @the_global27; CHECK: call void @llvm.codeview.annotation(metadata !0)28; CHECK: ret void29 30; CHECK-LABEL: define void @caller()31;       MSVC can inline this. If we ever do, check for the store but make sure32;       there is no annotation.33; CHECK: call void @inlinee()34; CHECK-NOT: call void @llvm.codeview.annotation35; CHECK: ret void36