Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / bolt / test / AArch64 / jmp-after-ret.s
blob8c6a842cd437a4800e44a4b9cdf667a25e557a8e
1 ## This test checks that the unreachable unconditional branch is removed
2 ## if it is located after return instruction.
4 # REQUIRES: system-linux
6 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
7 # RUN: %s -o %t.o
8 # RUN: %clang %cflags %t.o -o %t.exe -Wl,-q
9 # RUN: llvm-bolt %t.exe -o %t.bolt | FileCheck %s
11 # CHECK: UCE removed 1 blocks
13 .text
14 .align 4
15 .global main
16 .type main, %function
17 main:
18 b.eq 1f
19 ret
20 b main
22 mov x1, #1
23 ret
24 .size main, .-main