[all-commits] [llvm/llvm-project] 3b786f: [AArch64] Add intrinsic to count trailing zero ele...

Kerry McLaughlin via All-commits all-commits at lists.llvm.org
Tue Oct 31 03:48:35 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b786f2c7608964b4481b9fcd24ab29c7c42243d
      https://github.com/llvm/llvm-project/commit/3b786f2c7608964b4481b9fcd24ab29c7c42243d
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2023-10-31 (Tue, 31 Oct 2023)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/CodeGen/TargetLowering.h
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/lib/Target/AArch64/AArch64SVEInstrInfo.td
    A llvm/test/CodeGen/AArch64/intrinsic-cttz-elts-sve.ll
    A llvm/test/CodeGen/AArch64/intrinsic-cttz-elts.ll
    A llvm/test/CodeGen/RISCV/intrinsic-cttz-elts-vscale.ll
    A llvm/test/CodeGen/RISCV/intrinsic-cttz-elts.ll
    A llvm/test/CodeGen/X86/intrinsic-cttz-elts.ll

  Log Message:
  -----------
  [AArch64] Add intrinsic to count trailing zero elements

This patch introduces an experimental intrinsic for counting the
trailing zero elements in a vector. The intrinsic has generic expansion
in SelectionDAGBuilder, and for AArch64 there is a pattern which matches
to brkb & cntp instructions where SVE is enabled.

The intrinsic has a second operand, is_zero_poison, similar to the
existing cttz intrinsic.

These changes have been split out from D158291.




More information about the All-commits mailing list