[llvm] [SLP][NFCI] Address issues seen in downstream Coverity scan. (PR #93757)
Tyler Lanphear via llvm-commits
llvm-commits at lists.llvm.org
Wed May 29 18:56:01 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;
----------------
tylanphear wrote:
Hm, maybe it makes sense to add an `assert` there? I'm not sure `nullptr` is an expected input for this function, but I'm admittedly not too familiar with the SLP Vectorizer.
https://github.com/llvm/llvm-project/pull/93757
More information about the llvm-commits
mailing list