[all-commits] [llvm/llvm-project] c1bcf5: [SLP]Fix PR61835: Assertion `I->use_empty() && "tr...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Fri Mar 31 14:24:07 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c1bcf5dd0a24316c0451dff233b80527fc967c6b
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2023-03-31 (Fri, 31 Mar 2023)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/X86/external-used-across-reductions.ll

  Log Message:
  [SLP]Fix PR61835: Assertion `I->use_empty() && "trying to erase
instruction with users."' failed.

If the externally used scalar is part of the tree and is replaced by
extractelement instruction, need to add generated extractelement
instruction to the list of the ExternallyUsedValues to avoid deletion
during vectorization.

More information about the All-commits mailing list