[all-commits] [llvm/llvm-project] 521383: [AArch64] Extend icmp bitcast to vecreduce fold to...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Mar 30 02:23:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5213834f4ca687f10ac7f6df4a28334ddd85aea5
      https://github.com/llvm/llvm-project/commit/5213834f4ca687f10ac7f6df4a28334ddd85aea5
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-03-30 (Thu, 30 Mar 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/test/CodeGen/AArch64/dag-combine-setcc.ll

  Log Message:
  -----------
  [AArch64] Extend icmp bitcast to vecreduce fold to comparison with -1

D130163 added support for folding
setcc (iN (bitcast (vNi1 X))), 0, (eq|ne) to
setcc (iN (zext (i1 (vecreduce_or (vNi1 X))))), 0, (eq|ne).

There is a conjugate fold for comparison with -1 which uses
vecreduce_and and sext instead.

Proof: https://alive2.llvm.org/ce/z/Zz--xy

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




More information about the All-commits mailing list