[all-commits] [llvm/llvm-project] 365372: [AArch64] Add more efficient vector bitcast for AA...

Lawrence Benson via All-commits all-commits at lists.llvm.org
Thu Apr 13 08:44:24 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3653722ce6d9bb44a42ffdce4e07080aa1928ddc
      https://github.com/llvm/llvm-project/commit/3653722ce6d9bb44a42ffdce4e07080aa1928ddc
  Author: Lawrence Benson <github at lawben.com>
  Date:   2023-04-13 (Thu, 13 Apr 2023)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    A llvm/test/CodeGen/AArch64/vec-combine-compare-to-bitmask.ll

  Log Message:
  -----------
  [AArch64] Add more efficient vector bitcast for AArch64

Adds a DAG combine checks for vector comparisons followed by a bitcast to a
scalar value. Previously, this resulted in an expand.  Now, this is done with a
constant number of instructions that take one bit per vector value (via an AND
mask) and perfom a horizontal add to get a single value. This is especially
useful for Clang's __builtin_convertvector() to a bool vector.

Issue: https://github.com/llvm/llvm-project/issues/59829

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




More information about the All-commits mailing list