[llvm-branch-commits] [BOLT][BAT] Fix translate for branches added by BOLT (PR #90811)

Maksim Panchenko via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri May 3 15:06:10 PDT 2024


================
@@ -492,6 +486,10 @@ uint64_t BoltAddressTranslation::translate(uint64_t FuncAddress,
 
   const uint32_t Val = KeyVal->second >> 1; // dropping BRANCHENTRY bit
   if (IsBranchSrc) {
+    // Branch entry is found in BAT
+    if (KeyVal->first == Offset && KeyVal->second & BRANCHENTRY)
----------------
maksfb wrote:

What would be the case where we need to check for the second condition (`KeyVal->second & BRANCHENTRY`)? Can we drop it?

https://github.com/llvm/llvm-project/pull/90811


More information about the llvm-branch-commits mailing list