60 lines · plain
1# This test case is used to reproduce an issue found in the mongod database.2# In function rankRegisters, if there is a BH Reg in the basic block, then the BL Reg3# also cannot be swap.4 5# REQUIRES: system-linux6 7# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown %s -o %t.o8# RUN: link_fdata %s %t.o %t.fdata9# RUN: llvm-strip --strip-unneeded %t.o10# RUN: %clang -no-pie %t.o -o %t.exe -Wl,-q11# RUN: llvm-bolt %t.exe -o %t.out -data=%t.fdata --reg-reassign | FileCheck %s12# RUN: %t.out13 14# CHECK: Reg Reassignment Pass: no changes were made15 .text16 .globl main17 .globl main.cold18 .p2align 4, 0x9019 .type main,@function20 .type main.cold,@function21main.cold:22bb1:23 mov $0x2, %bh24bb2:25 jmp bb526main: # @main27 .cfi_startproc28# %bb.0: # %entry29 pushq %rax30 pushq %r1231 pushq %rbx32 .cfi_def_cfa_offset 1633 mov $0x1, %r1234 shr $0x14, %r1235 add $0x14, %r1236 mov $0x11, %rbx37 mov $0x1, %bh38 mov $0x1, %bl39bb3:40 add $0x1, %r1241bb4:42 jmp bb143bb5:44 cmp $0x201, %rbx45 jne 0x046bb6:47 xorl %eax, %eax48 popq %rcx49 popq %rbx50 popq %r1251 .cfi_def_cfa_offset 852 retq53# FDATA: 1 main.cold #bb2# 1 main 0 0 10054# FDATA: 1 main #bb3# 1 main #bb4# 0 10055# FDATA: 1 main #bb4# 1 main.cold 0 0 10056 57.Lfunc_end0:58 .size main, .Lfunc_end0-main59 .cfi_endproc60