[all-commits] [llvm/llvm-project] 81ce3a: [SLP] avoid leaking poison in reduction of safe bo...

RotateRight via All-commits all-commits at lists.llvm.org
Thu Jul 15 14:34:30 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81ce3aa30cc275bd7f2b51acf391ab69609ca211
      https://github.com/llvm/llvm-project/commit/81ce3aa30cc275bd7f2b51acf391ab69609ca211
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-07-15 (Thu, 15 Jul 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-logical.ll
    M llvm/test/Transforms/SLPVectorizer/X86/reduction-logical.ll

  Log Message:
  -----------
  [SLP] avoid leaking poison in reduction of safe boolean logic ops

This bug was introduced with D105730 / 25ee55c0baff .

If we are not converting all of the operations of a reduction
into a vector op, we need to preserve the existing select form
of the remaining ops. Otherwise, we are potentially leaking
poison where it did not in the original code.

Alive2 agrees that the version that freezes some inputs
and then falls back to scalar is correct:
https://alive2.llvm.org/ce/z/erF4K2




More information about the All-commits mailing list