brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · c050aa8 Raw
79 lines · plain
1## This reproduces a bug in tail duplication when aggressiveCodeToDuplicate2## fails to handle a block with a jump table.3 4# REQUIRES: system-linux5 6# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \7# RUN:   %s -o %t.o8# RUN: link_fdata %s %t.o %t.fdata9# RUN: llvm-strip --strip-unneeded %t.o10# RUN: %clangxx %cflags -no-pie %t.o -o %t.exe -Wl,-q11# RUN: llvm-bolt %t.exe -o %t.out --data %t.fdata --relocs \12# RUN:   --tail-duplication=aggressive \13# RUN:   --print-cfg | FileCheck %s14# CHECK: Jump table {{.*}} for function a at {{.*}} with a total count of 315  .globl main16main:17  .globl a18  .type a, %function19a:20	.cfi_startproc21b:22  jmp	c23  je	b24  movl	%esi, %edi25c:26	movb	0, %cl27d:28  jmp	e29	movq	0, %r1430f:31	je	d32  jmp	f33e:34g:35j:36	movq	%rbp, 037h:38	cmpl	$0x41, 039i:40  jmp	h41  jmp	i42  ja	o43	movl	%edx, 044p:45q:46k:47  jmpq	*JT0(,%rcx,8)48# FDATA: 1 a #k# 1 a #l# 1 349m:50	movl	0, %esi51r:52  jmpq	*JT1(,%rax,8)53	cmpl	1, %eax54  jmp	j55l:56  jmp	m57s:58  movl	6, %ebx59ak:60  jmp	e61	movl	0, %eax62am:63  jmp	p64 	jmp	q65o:66  jmp	g67n:68	xorl	%r12d, %r12d69	.cfi_endproc70.rodata71JT0:72	.quad	r73	.quad	l74	.quad	ak75JT1:76	.quad	s77	.quad	am78	.quad	n79