[llvm] e282118 - [X86][TTI] Update the return value of X86TTIImpl::getNumberOfRegisters for EGPR

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 22:45:44 PDT 2024


Author: Shengchen Kan
Date: 2024-06-05T13:45:01+08:00
New Revision: e282118f4715c7d4a08eec3a6bc71784e8b05242

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

LOG: [X86][TTI] Update the return value of X86TTIImpl::getNumberOfRegisters for EGPR

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86TargetTransformInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 3b18e39d784b2..0a23bf2516763 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -169,6 +169,8 @@ unsigned X86TTIImpl::getNumberOfRegisters(unsigned ClassID) const {
   if (ST->is64Bit()) {
     if (Vector && ST->hasAVX512())
       return 32;
+    if (!Vector && ST->hasEGPR())
+      return 32;
     return 16;
   }
   return 8;


        


More information about the llvm-commits mailing list