[llvm] 224e46d - [SLP][DOT][NFCI]Output all scalars for the splats, not only the first one.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 10:57:03 PST 2021


Author: Alexey Bataev
Date: 2021-11-15T10:54:26-08:00
New Revision: 224e46d355bb1e6219706f1be41287fbd9fb737d

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

LOG: [SLP][DOT][NFCI]Output all scalars for the splats, not only the first one.

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 93be0a3f4190..e30dcfd67f0e 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2592,10 +2592,8 @@ template <> struct DOTGraphTraits<BoUpSLP *> : public DefaultDOTGraphTraits {
   std::string getNodeLabel(const TreeEntry *Entry, const BoUpSLP *R) {
     std::string Str;
     raw_string_ostream OS(Str);
-    if (isSplat(Entry->Scalars)) {
-      OS << "<splat> " << *Entry->Scalars[0];
-      return Str;
-    }
+    if (isSplat(Entry->Scalars))
+      OS << "<splat> ";
     for (auto V : Entry->Scalars) {
       OS << *V;
       if (llvm::any_of(R->ExternalUses, [&](const BoUpSLP::ExternalUser &EU) {


        


More information about the llvm-commits mailing list