[llvm] 6be7756 - [SLP][NFC] Add debug logs for entry.

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 09:05:26 PST 2022


Author: eopXD
Date: 2022-01-24T09:05:21-08:00
New Revision: 6be77561f82d781cd957c316a7f53660510683a3

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

LOG: [SLP][NFC] Add debug logs for entry.

Tell the users they are specifying something without vector register.

Reviewed By: ABataev

Differential Revision: https://reviews.llvm.org/D117980

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index 8bfd3aa525d55..99c265fc5101a 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -8079,8 +8079,11 @@ bool SLPVectorizerPass::runImpl(Function &F, ScalarEvolution *SE_,
 
   // If the target claims to have no vector registers don't attempt
   // vectorization.
-  if (!TTI->getNumberOfRegisters(TTI->getRegisterClassForType(true)))
+  if (!TTI->getNumberOfRegisters(TTI->getRegisterClassForType(true))) {
+    LLVM_DEBUG(
+        dbgs() << "SLP: Didn't find any vector registers for target, abort.\n");
     return false;
+  }
 
   // Don't vectorize when the attribute NoImplicitFloat is used.
   if (F.hasFnAttribute(Attribute::NoImplicitFloat))


        


More information about the llvm-commits mailing list