46 lines · plain
1# REQUIRES: x862# Test the compatibility of ICF and cgprofile.3 4# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-win32 %s -o %t5# RUN: echo "A B 100" > %t.call_graph6# RUN: echo "A C 40" >> %t.call_graph7# RUN: echo "C D 61" >> %t.call_graph8# RUN: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab /opt:icf9# RUN: llvm-nm --numeric-sort %t2 | FileCheck %s10# RUN: lld-link /subsystem:console /entry:A %t /call-graph-ordering-file:%t.call_graph /out:%t2 /debug:symtab11# RUN: llvm-nm --numeric-sort %t2 | FileCheck %s --check-prefix=NOICF12 13 .section .text,"x",one_only,D14 .globl D15D:16 mov $60, %rax17 retq18 19 .section .text,"x",one_only,C20 .globl C21C:22 mov $60, %rax23 retq24 25 .section .text,"x",one_only,B26 .globl B27B:28 mov $2, %rax29 retq30 31 .section .text,"x",one_only,A32 .globl A33A:34 mov $42, %rax35 retq36 37# CHECK: 140001000 T A38# CHECK: 140001008 T C39# CHECK: 140001008 T D40# CHECK: 140001010 T B41 42# NOICF: 140001000 T A43# NOICF: 140001008 T B44# NOICF: 140001010 T C45# NOICF: 140001018 T D46