Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / X86 / align-branch-variant-symbol.s
blob53afdf58bff39e01593747ded6c1fe566b1eba28
1 # RUN: llvm-mc -filetype=obj -triple x86_64 --x86-align-branch-boundary=32 --x86-align-branch=call+indirect %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=64BIT,CHECK
3 # RUN: llvm-mc -filetype=obj -triple i386 --x86-align-branch-boundary=32 --x86-align-branch=call+indirect %s | llvm-objdump -d --no-show-raw-insn - | FileCheck %s --check-prefixes=32BIT,CHECK
5 # Exercise cases where the instruction to be aligned has a variant symbol
6 # operand, and we can't add before it since linker may rewrite it.
8 .text
9 .global foo
11 foo:
12 .p2align 5
13 .rept 30
14 int3
15 .endr
16 # CHECK: 1d: int3
17 # 64BIT: 1e: callq
18 # 32BIT: 1e: calll
19 # CHECK: 23: int3
20 call ___tls_get_addr@PLT
21 int3
23 .p2align 5
24 .rept 30
25 int3
26 .endr
27 # CHECK: 5d: int3
28 # 64BIT: 5e: callq *(%ecx)
29 # 64BIT: 65: int3
30 # 32BIT: 5e: calll *(%ecx)
31 # 32BIT: 64: int3
32 call *___tls_get_addr@GOT(%ecx)
33 int3
35 .p2align 5
36 .rept 30
37 int3
38 .endr
39 # CHECK: 9d: int3
40 # 64BIT: 9e: callq *(%eax)
41 # 64BIT: a1: int3
42 # 32BIT: 9e: calll *(%eax)
43 # 32BIT: a0: int3
44 call *foo@tlscall(%eax)
45 int3
47 .p2align 5
48 .rept 30
49 int3
50 .endr
51 # CHECK: dd: int3
52 # 64BIT: de: jmpq *(%eax)
53 # 64BIT: e1: int3
54 # 32BIT: de: jmpl *(%eax)
55 # 32BIT: e0: int3
56 jmp *foo@tlscall(%eax)
57 int3