[llvm] e4b9c07 - [GlobalISel] Fast path exact LLT equality (NFC) (#222550)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 00:53:26 PDT 2026


Author: Cullen Rhodes
Date: 2026-09-11T08:53:21+01:00
New Revision: e4b9c07d30119fa37202233973629e3143c27685

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

LOG: [GlobalISel] Fast path exact LLT equality (NFC) (#222550)

Improves CTMark geomean -0.05% on aarch64-O0-g.

https://llvm-compile-time-tracker.com/compare.php?from=87d9c3c24ff5941ac08799850a6549b561c98a81&to=a5391cd5be815299b2cddcabf62a86369b247f72&stat=instructions:u

Assisted-by: codex

Added: 
    

Modified: 
    llvm/include/llvm/CodeGenTypes/LowLevelType.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGenTypes/LowLevelType.h b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
index d928c7141b737..30734bcf043c9 100644
--- a/llvm/include/llvm/CodeGenTypes/LowLevelType.h
+++ b/llvm/include/llvm/CodeGenTypes/LowLevelType.h
@@ -538,6 +538,9 @@ class LLT {
 #endif
 
   bool operator==(const LLT &RHS) const {
+    if (Info == RHS.Info && RawData == RHS.RawData)
+      return true;
+
     if (isAnyScalar() || RHS.isAnyScalar())
       return isScalar() == RHS.isScalar() &&
              getScalarSizeInBits() == RHS.getScalarSizeInBits();
@@ -546,7 +549,7 @@ class LLT {
       return getElementType() == RHS.getElementType() &&
              getElementCount() == RHS.getElementCount();
 
-    return Info == RHS.Info && RawData == RHS.RawData;
+    return false;
   }
 
   bool operator!=(const LLT &RHS) const { return !(*this == RHS); }


        


More information about the llvm-commits mailing list