[all-commits] [llvm/llvm-project] d337c5: [SLP][NFCI] Address issues seen in downstream Cove...

Tyler Lanphear via All-commits all-commits at lists.llvm.org
Fri May 31 18:34:44 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d337c504ef3652e9ccd75b21bbc79d010ee6c637
      https://github.com/llvm/llvm-project/commit/d337c504ef3652e9ccd75b21bbc79d010ee6c637
  Author: Tyler Lanphear <tylanphear at gmail.com>
  Date:   2024-05-31 (Fri, 31 May 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

  Log Message:
  -----------
  [SLP][NFCI] Address issues seen in downstream Coverity scan. (#93757)

- Prevent null dereference: if the Mask given to
  `ShuffleInstructionBuilder::adjustExtracts()` is empty or all-poison,
  then `VecBase` will be `nullptr` and the call to
  `castToScalarTyElem(VecBase)` will dereference it. Add an assert
  to guard against this.

- Prevent use of uninitialized scalar: in the unlikely event that
  `CandidateVFs` is empty, then `AnyProfitableGraph` will be
  uninitialized in `if` condition following the loop. (This seems like a
  false-positive, but I submitted this change anyways as initializing
  bools costs nothing and is generally good practice)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list