Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / cgprofile-icf.s
blobf9034ee32103a479616f9dac11565067349daf49
1 # REQUIRES: x86
3 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t
5 # RUN: %lld -e A %t -o %t.out --icf=all
6 # RUN: llvm-nm --numeric-sort %t.out | FileCheck %s
7 # RUN: %lld -e A %t -o %t2.out
8 # RUN: llvm-nm --numeric-sort %t2.out | FileCheck %s --check-prefix=NOICF
10 .text
11 .globl D
13 mov $60, %rax
14 retq
16 .globl C
18 mov $60, %rax
19 retq
21 .globl B
23 mov $2, %rax
24 retq
26 .globl A
28 mov $42, %rax
29 retq
31 .cg_profile A, B, 100
32 .cg_profile A, C, 40
33 .cg_profile C, D, 61
35 .subsections_via_symbols
37 # CHECK: [[#%.16x,A:]] T A
38 # CHECK-NEXT: [[#%.16x,A+8]] T C
39 # CHECK-NEXT: [[#%.16x,A+8]] T D
40 # CHECK-NEXT: [[#%.16x,A+16]] T B
42 # NOICF: [[#%.16x,A:]] T A
43 # NOICF-NEXT: [[#%.16x,A+8]] T B
44 # NOICF-NEXT: [[#%.16x,A+16]] T C
45 # NOICF-NEXT: [[#%.16x,A+24]] T D