[all-commits] [llvm/llvm-project] bf4dcb: [SLP]Fix PR56251: Do not remove the reordering fro...

Andrew V. Tischenko via All-commits all-commits at lists.llvm.org
Tue Jun 28 13:46:31 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf4dcbd2df009ba71d9032379fe8bc37ba0903ff
      https://github.com/llvm/llvm-project/commit/bf4dcbd2df009ba71d9032379fe8bc37ba0903ff
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2022-06-28 (Tue, 28 Jun 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    A llvm/test/Transforms/SLPVectorizer/X86/reorder-phi-operand.ll

  Log Message:
  -----------
  [SLP]Fix PR56251: Do not remove the reordering from the root node, being used as an operand.

If the root order itself does not require reordering, we can just
remove its reorder mask safely (e.g., if the root node is a vector of
phis). But if this node is used as an operand in the graph, we cannot
delete the reordering, need to keep it. Otherwise the graph nodes are
not synchronized with the operands. It may cause an extra gather
instruction(s) or a compiler crash.
Also, need to be very careful when selecting the gather nodes for
reordering since there might several gather nodes with the same scalars
and we can try to reorder just the same node many times instead of
different nodes.

Differential Revision: https://reviews.llvm.org/D128680




More information about the All-commits mailing list