[llvm] 1d5e5f4 - [GISEL][NFC] Fix comment for widenScalarToNextPow2

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 15:09:22 PDT 2024


Author: Michael Maitland
Date: 2024-04-01T15:09:09-07:00
New Revision: 1d5e5f4d3c68e63ced47ee9b17d62fb995aa1e62

URL: https://github.com/llvm/llvm-project/commit/1d5e5f4d3c68e63ced47ee9b17d62fb995aa1e62
DIFF: https://github.com/llvm/llvm-project/commit/1d5e5f4d3c68e63ced47ee9b17d62fb995aa1e62.diff

LOG: [GISEL][NFC] Fix comment for widenScalarToNextPow2

The docstring for this function incorrectly specified when a widening is
not performed. This patch adds the additional specification for what
happens when the type size is a power of two but it is less than MinSize.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h b/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
index 6afaea3f3fc5c6..82e713f30ea31c 100644
--- a/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
+++ b/llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
@@ -879,7 +879,8 @@ class LegalizeRuleSet {
   }
 
   /// Widen the scalar to the next power of two that is at least MinSize.
-  /// No effect if the type is not a scalar or is a power of two.
+  /// No effect if the type is a power of two, except if the type is smaller
+  /// than MinSize, or if the type is a vector type.
   LegalizeRuleSet &widenScalarToNextPow2(unsigned TypeIdx,
                                          unsigned MinSize = 0) {
     using namespace LegalityPredicates;


        


More information about the llvm-commits mailing list