[llvm] [BOLT][NFC] Fix comment (PR #73983)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 12:41:23 PST 2023


https://github.com/maksfb created https://github.com/llvm/llvm-project/pull/73983

Fix off-by-one error in comment.

>From cf865247b77f7849ccb4a343c5cf7d3a002e21b1 Mon Sep 17 00:00:00 2001
From: Maksim Panchenko <maks at fb.com>
Date: Thu, 30 Nov 2023 12:39:31 -0800
Subject: [PATCH] [BOLT][NFC] Fix comment

Fix off-by-one error in comment.
---
 bolt/lib/Core/BinaryFunction.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index 76bac2f62441924..be033cf07668801 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -3352,9 +3352,9 @@ void BinaryFunction::fixBranches() {
         // We are going to generate two branches. Check if their targets are in
         // the same fragment as this block. If only one target is in the same
         // fragment, make it the destination of the conditional branch. There
-        // is a chance it will be a short branch which takes 5 bytes fewer than
+        // is a chance it will be a short branch which takes 4 bytes fewer than
         // a long conditional branch. For unconditional branch, the difference
-        // is 4 bytes.
+        // is 3 bytes.
         if (BB->getFragmentNum() != TSuccessor->getFragmentNum() &&
             BB->getFragmentNum() == FSuccessor->getFragmentNum())
           swapSuccessors();



More information about the llvm-commits mailing list