brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2a97feb Raw
60 lines · plain
1## This reproduces issue 26 from our github repo2##  BOLT fails with the following assertion:3##    llvm/tools/llvm-bolt/src/BinaryFunction.cpp:2950: void llvm::bolt::BinaryFunction::postProcessBranches(): Assertion `validateCFG() && "invalid CFG"' failed.4 5# REQUIRES: system-linux6 7# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \8# RUN:   %s -o %t.o9# RUN: %clang %cflags %t.o -o %t.exe -Wl,-q10# RUN: llvm-bolt %t.exe --relocs --print-cfg -o %t.out 2>&1 \11# RUN:    | FileCheck %s12 13# CHECK-NOT: BOLT-WARNING: CFG invalid in XYZ @ .LBB014 15# CHECK: Binary Function "XYZ"16 17# CHECK: .Ltmp{{.*}} (1 instructions, align : 1)18# CHECK-NEXT: Secondary Entry Point: FUNCat{{.*}}19 20  .text21  .globl XYZ22  .type XYZ, %function23  .size XYZ, .Lend1-XYZ24XYZ:25  movl %fs:-0x350, %eax26  cmpl %eax, %edi27  jne .L128 29  cmp %rdx, (%rsi)30  jne .L231 32  movq %rcx, (%rsi)33.L1:34  retq35 36.L2:37  movl $0xffffffff, %eax38  retq39.Lend1:40 41  .globl FUNC42  .type FUNC, %function43  .size FUNC, .Lend - FUNC44FUNC:45  cmpq %rdi, %rsi46  je .L147  retq48.Lend:49 50  .globl main51  .type main, %function52  .size main, .Lend2 - main53main:54  xorq %rax, %rax55  retq56 57# For relocations against .text58  call exit59.Lend2:60