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 2 3 # Exercise cases where fused instructions need to be aligned. 4 5 .text 6 .globl foo 7foo: 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 19 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 31 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 43