[llvm] 4d3e8dc - Fix llvm-test-suite failure introduced by D82550/D83122

Sanne Wouda via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 08:14:36 PDT 2020


Author: Sanne Wouda
Date: 2020-07-13T16:14:22+01:00
New Revision: 4d3e8dc215d1ca99354f3c33cce87795d2b5098a

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

LOG: Fix llvm-test-suite failure introduced by D82550/D83122

Apparently, isIndirectCall does not imply that getCalledFunction will be non-null

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/VectorUtils.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/VectorUtils.h b/llvm/include/llvm/Analysis/VectorUtils.h
index ce8327ae43a8..b1d7850442fb 100644
--- a/llvm/include/llvm/Analysis/VectorUtils.h
+++ b/llvm/include/llvm/Analysis/VectorUtils.h
@@ -224,7 +224,7 @@ class VFDatabase {
   /// a vector Function ABI.
   static void getVFABIMappings(const CallInst &CI,
                                SmallVectorImpl<VFInfo> &Mappings) {
-    if (CI.isIndirectCall())
+    if (!CI.getCalledFunction())
       return;
 
     const StringRef ScalarName = CI.getCalledFunction()->getName();


        


More information about the llvm-commits mailing list