[all-commits] [llvm/llvm-project] fb86b3: [SLP]Change the insertion point for outside-block-...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Sun May 18 13:26:55 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fb86b3d96b73f4e628288b180ef4e038da8b7bc1
      https://github.com/llvm/llvm-project/commit/fb86b3d96b73f4e628288b180ef4e038da8b7bc1
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2025-05-18 (Sun, 18 May 2025)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/crash_bullet3.ll
    M llvm/test/Transforms/SLPVectorizer/X86/matched-bv-schedulable.ll
    A llvm/test/Transforms/SLPVectorizer/X86/node-outside-used-only.ll
    M llvm/test/Transforms/SLPVectorizer/X86/phi-node-with-cycle.ll
    M llvm/test/Transforms/SLPVectorizer/X86/user-node-with-same-last-instr.ll
    M llvm/test/Transforms/SLPVectorizer/revec.ll

  Log Message:
  -----------
  [SLP]Change the insertion point for outside-block-used nodes and prevec phi operand gathers

Need to set the insertion point for (non-schedulable) vector node after
the last instruction in the node to avoid def-use breakage. But it also
causes miscompilation with gather/buildvector operands of the phi nodes,
used in the same phi only in the block.
These nodes supposed to be inserted at the end of the block and after
changing the insertion point for the non-schedulable vec block, it also
may break def-use dependencies. Need to prevector such nodes, to emit
them as early as possible, so the vectorized nodes are inserted before
these nodes.

Fixes #139728

Recommit after revert 60fb92179291e848eb7b04913bdc818d081db296

Reviewers: hiraditya, HanKuanChen, RKSimon

Reviewed By: RKSimon

Pull Request: https://github.com/llvm/llvm-project/pull/139917



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