[all-commits] [llvm/llvm-project] b0a0df: [SLP]Fix vectorization of the alternate cmp instru...

Andrew V. Tischenko via All-commits all-commits at lists.llvm.org
Fri Feb 18 04:28:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0a0df980927ca54a7840a1b0c9766e98c05039b
      https://github.com/llvm/llvm-project/commit/b0a0df980927ca54a7840a1b0c9766e98c05039b
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2022-02-18 (Fri, 18 Feb 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/alternate-cmp-swapped-pred.ll
    M llvm/test/Transforms/SLPVectorizer/X86/cmp-as-alternate-ops.ll
    M llvm/test/Transforms/SLPVectorizer/X86/reduction-logical.ll

  Log Message:
  -----------
  [SLP]Fix vectorization of the alternate cmp instruction with swapped predicates.

If the alternate cmp instruction is a swapped predicate of the main cmp
instruction, need to generate alternate instruction, not the one with
the swapped predicate. Also, the lane with the alternate opcode should
be selected only, if the corresponding operands are not compatible.

Correctness confirmed:
https://alive2.llvm.org/ce/z/94BG66

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




More information about the All-commits mailing list