Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / RISCV / mapping-syms.s
blobe8fdeb0c7572dea6c7b0d2b7293121b40237c511
1 /// FIXME llvm-mc is used instead of clang because we need a recent change in
2 /// the RISC-V MC layer (D153260). Once that one is released, we can switch to
3 /// clang. (Note that the pre-merge check buildbots use the system's clang).
4 // RUN: llvm-mc -triple riscv64 -mattr=+c -filetype obj -o %t.o %s
5 // RUN: ld.lld -o %t %t.o
6 // RUN: llvm-bolt --print-cfg --print-only=_start -o %t.bolt %t 2>&1 | FileCheck %s
7 // RUN: llvm-objdump -d %t.bolt | FileCheck --check-prefix=CHECK-OBJDUMP %s
9 // CHECK-NOT: BOLT-WARNING
11 /// Check that .word is not disassembled by BOLT
12 // CHECK: 00000000: nop
13 // CHECK: 00000002: ret
15 /// Check .word is still present in output
16 // CHECK-OBJDUMP: <_start>:
17 // CHECK-OBJDUMP-NEXT: nop
18 // CHECK-OBJDUMP-NEXT: unimp
19 // CHECK-OBJDUMP-NEXT: unimp
20 // CHECK-OBJDUMP-NEXT: ret
21 .text
22 .globl _start
23 .p2align 1
24 _start:
25 nop
26 .word 0x0
27 ret