Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / cgprofile-orderfile.s
blobeb3a30b27e1bd8903ca240bb3e7e5e73e17779cc
1 # REQUIRES: x86
3 # RUN: rm -rf %t; split-file %s %t
4 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
6 # RUN: %lld -e A %t/test.o -order_file %t/order_file -o %t/test
7 # RUN: llvm-nm --numeric-sort %t/test | FileCheck %s
8 # RUN: %lld -e A %t/test.o -o %t/test
9 # RUN: llvm-nm --numeric-sort %t/test | FileCheck %s --check-prefix NO-ORDER
12 #--- order_file
16 #--- test.s
18 .text
19 .globl D
21 retq
23 .globl C
25 retq
27 .globl B
29 retq
31 .globl A
33 retq
35 .cg_profile A, B, 100
36 .cg_profile A, C, 40
37 .cg_profile C, D, 61
39 .subsections_via_symbols
41 # CHECK: T B
42 # CHECK-NEXT: T A
43 # CHECK-NEXT: T C
44 # CHECK-NEXT: T D
46 # NO-ORDER: T A
47 # NO-ORDER-NEXT: T B
48 # NO-ORDER-NEXT: T C
49 # NO-ORDER-NEXT: T D