[llvm] [AggressiveInstCombine] Fix terminology in a few comments (NFC) (PR #222327)

Ömer Sinan Ağacan via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 9 06:03:45 PDT 2026


https://github.com/osa1 created https://github.com/llvm/llvm-project/pull/222327

Fix the comments (and a debug print) that say "dominated by trunc" rather than "post-dominated".

Also fixes a Doxygen syntax (use \p instead of /p) and fix capitalization in the middle of a sentence.

>From 557322fe78c4cecdb8aec6a40ce6dfd9bd4508e2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=96mer=20Sinan=20A=C4=9Facan?= <omer at osa1.net>
Date: Wed, 9 Sep 2026 14:00:43 +0100
Subject: [PATCH] [AggressiveInstCombine] Fix terminology in a few comments
 (NFC)

Fix the comments (and a debug print) that say "dominated by trunc"
rather than "post-dominated".

Also fixes a Doxygen syntax (use \p instead of /p) and fix
capitalization in the middle of a sentence.
---
 .../AggressiveInstCombineInternal.h                    | 10 +++++-----
 .../AggressiveInstCombine/TruncInstCombine.cpp         |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
index 0b8a9fa48e342..f56c30f5f3af8 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
+++ b/llvm/lib/Transforms/AggressiveInstCombine/AggressiveInstCombineInternal.h
@@ -21,7 +21,7 @@
 #include "llvm/Support/KnownBits.h"
 
 //===----------------------------------------------------------------------===//
-// TruncInstCombine - looks for expression graphs dominated by trunc
+// TruncInstCombine - looks for expression graphs post-dominated by trunc
 // instructions and for each eligible graph, it will create a reduced bit-width
 // expression and replace the old expression with this new one and remove the
 // old one. Eligible expression graph is such that:
@@ -85,8 +85,8 @@ class TruncInstCombine {
   bool run(Function &F);
 
 private:
-  /// Build expression graph dominated by the /p CurrentTruncInst and append it
-  /// to the InstInfoMap container.
+  /// Build expression graph post-dominated by the \p CurrentTruncInst and
+  /// append it to the InstInfoMap container.
   ///
   /// \return true only if succeed to generate an eligible sub expression graph.
   bool buildTruncExpressionGraph();
@@ -98,8 +98,8 @@ class TruncInstCombine {
   /// truncate's operand can be shrunk to.
   unsigned getMinBitWidth();
 
-  /// Build an expression graph dominated by the current processed TruncInst and
-  /// Check if it is eligible to be reduced to a smaller type.
+  /// Build an expression graph post-dominated by the current processed
+  /// TruncInst and check if it is eligible to be reduced to a smaller type.
   ///
   /// \return the scalar version of the new type to be used for the reduced
   ///         expression graph, or nullptr if the expression graph is not
diff --git a/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp b/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
index 4b29e33c2e7f7..2d50a376bf2e9 100644
--- a/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
+++ b/llvm/lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp
@@ -555,7 +555,7 @@ bool TruncInstCombine::run(Function &F) {
     if (Type *NewDstSclTy = getBestTruncatedType()) {
       LLVM_DEBUG(
           dbgs() << "ICE: TruncInstCombine reducing type of expression graph "
-                    "dominated by: "
+                    "post-dominated by: "
                  << CurrentTruncInst << '\n');
       ReduceExpressionGraph(NewDstSclTy);
       ++NumExprsReduced;



More information about the llvm-commits mailing list