[llvm] 8cb0ac5 - [SLP] Check invariant that all instructions in bundle are in same block [NFC]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 28 13:18:00 PST 2022


Author: Philip Reames
Date: 2022-02-28T13:17:44-08:00
New Revision: 8cb0ac5825ec4b6c45a17b264fd913ee05f1ef9f

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

LOG: [SLP] Check invariant that all instructions in bundle are in same block [NFC]

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 1eab725ac64e6..c614fd31a3b00 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2517,6 +2517,9 @@ class BoUpSLP {
                  "only bundle is marked scheduled");
         }
       }
+
+      assert(Inst->getParent() == FirstInBundle->Inst->getParent() &&
+             "all bundle members must be in same basic block");
     }
 
     /// Returns true if the dependency information has been calculated.


        


More information about the llvm-commits mailing list