Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / X86 / align-branch-fused.s
blob7530967a890c692b663630c4c132b9cfed57b298
1 # RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=fused+jcc %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s
3 # Exercise cases where fused instructions need to be aligned.
5 .text
6 .globl foo
7 foo:
8 .p2align 5
9 .rept 30
10 int3
11 .endr
12 # 'cmp %rax, %rbp' is macro fused with 'jne foo',
13 # so we need to align the pair.
14 # CHECK: 20: cmpq %rax, %rbp
15 # CHECK: 23: jne
16 cmp %rax, %rbp
17 jne foo
18 int3
20 .p2align 5
21 .rept 28
22 int3
23 .endr
24 # 'cmp %rax, %rbp' is fusible but can not fused with `jo foo`,
25 # so we only need to align 'jo foo'.
26 # CHECK: 5c: cmpq %rax, %rbp
27 cmp %rax, %rbp
28 # CHECK: 60: jo
29 jo foo
30 int3
32 .p2align 5
33 .rept 26
34 int3
35 .endr
36 # The second 'cmp %rax, %rbp' is macro fused with 'jne foo'.
37 cmp %rax, %rbp
38 # CHECK: a0: cmpq %rax, %rbp
39 # CHECK: a3: jne
40 cmp %rax, %rbp
41 jne foo
42 int3