[llvm] [SLP][NFCI] Address issues seen in downstream Coverity scan. (PR #93757)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 02:40:32 PDT 2024


================
@@ -11700,8 +11700,7 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis {
       R.eraseInstruction(EI);
     }
     if (NumParts == 1 || UniqueBases.size() == 1) {
-      VecBase = castToScalarTyElem(VecBase);
-      return VecBase;
+      return VecBase ? castToScalarTyElem(VecBase) : nullptr;
----------------
alexey-bataev wrote:

Add an assertion hete

https://github.com/llvm/llvm-project/pull/93757


More information about the llvm-commits mailing list