1*11791ae7SSayhaan Siddiqui## Check that profile data for the fall-through jump is not ignored when there is 2*11791ae7SSayhaan Siddiqui## a conditional jump followed by a no-op. 32e0ad6ffSAmir Ayupov 42e0ad6ffSAmir AyupovRUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \ 52e0ad6ffSAmir AyupovRUN: %S/Inputs/ft_to_noop.s -o %t.o 6b8a63455SRafael AulerRUN: link_fdata %S/Inputs/ft_to_noop.s %t.o %t.fdata --nmtool llvm-nm 72e0ad6ffSAmir AyupovRUN: llvm-strip --strip-unneeded %t.o 887a57aadSVladislav KhmelevskyRUN: %clang %cflags %t.o -o %t.exe -Wl,-q 9d648aa1bSMaksim PanchenkoRUN: llvm-bolt %t.exe -o %t --data %t.fdata \ 10d648aa1bSMaksim PanchenkoRUN: --print-cfg --sequential-disassembly 2>&1 | FileCheck %s 112e0ad6ffSAmir Ayupov 122e0ad6ffSAmir AyupovCHECK: Binary Function "foo" after building cfg 132e0ad6ffSAmir AyupovCHECK: Exec Count : 20 142e0ad6ffSAmir AyupovCHECK: Profile Acc : 100.0% 152e0ad6ffSAmir Ayupov 16*11791ae7SSayhaan Siddiqui## This block is terminated with a conditional jump to .Ltmp0 followed by a 17*11791ae7SSayhaan Siddiqui## no-op. The profile data contains a count for the fall-through (3) which 18*11791ae7SSayhaan Siddiqui## is different from what would be inferred (2). However the destination 19*11791ae7SSayhaan Siddiqui## offset of this fall-through jump in the profile data points to the no-op 20*11791ae7SSayhaan Siddiqui## following the jump and not the start of the fall-through block .LFT0. 212e0ad6ffSAmir AyupovCHECK: Entry Point 222e0ad6ffSAmir AyupovCHECK-NEXT: Exec Count : 20 232e0ad6ffSAmir AyupovCHECK: Successors: .Ltmp[[#BB1:]] (mispreds: 0, count: 18), .LFT[[#BB2:]] (mispreds: 0, count: 3) 242e0ad6ffSAmir Ayupov 252e0ad6ffSAmir AyupovCHECK: .LFT[[#BB2]] 262e0ad6ffSAmir AyupovCHECK-NEXT: Exec Count : 3 272e0ad6ffSAmir AyupovCHECK: Successors: .Ltmp[[#]] (mispreds: 0, count: 0) 282e0ad6ffSAmir Ayupov 292e0ad6ffSAmir AyupovCHECK: .Ltmp[[#BB1]] 302e0ad6ffSAmir AyupovCHECK-NEXT: Exec Count : 18 31