2 ## basic-block-sections tests.
3 ## This simple test checks if redundant direct jumps are converted to
4 ## implicit fallthrus when PC32 reloc is present. The jcc's must be converted
5 ## to their inverted opcode, for instance jne to je and jmp must be deleted.
7 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
8 # RUN: llvm-objdump -dr %t.o| FileCheck %s --check-prefix=RELOC
9 # RUN: ld.lld --optimize-bb-jumps %t.o -o %t.out
10 # RUN: llvm-objdump -d %t.out| FileCheck %s
13 # RELOC-NEXT: R_X86_64_PC32
16 # CHECK-NEXT: nopl (%rax)
17 # CHECK-NEXT: jne 0x{{[[:xdigit:]]+}} <r.BB.foo>
21 .section .text,"ax",@progbits
26 # Encode a jmp r.BB.foo insn using a PC32 reloc
28 .long r.BB.foo - . - 4
31 # CHECK-NEXT: nopl (%rax)
33 .section .text,"ax",@progbits,unique,3