[llvm] ed54296 - [SLP] Fastpath instructions not in block being scheduled [nfc]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 23 13:51:42 PST 2022


Author: Philip Reames
Date: 2022-02-23T13:51:36-08:00
New Revision: ed54296ea37facd77ac69c30e064df46d7faa883

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

LOG: [SLP] Fastpath instructions not in block being scheduled [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 387d144d89a3..9bba73bcc839 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -2637,6 +2637,9 @@ class BoUpSLP {
     }
 
     ScheduleData *getScheduleData(Instruction *I) {
+      if (BB != I->getParent())
+        // Avoid lookup if can't possibly be in map.
+        return nullptr;
       ScheduleData *SD = ScheduleDataMap[I];
       if (SD && isInSchedulingRegion(SD))
         return SD;


        


More information about the llvm-commits mailing list