[all-commits] [llvm/llvm-project] c165b0: [TargetLowering] Teach DemandedBits about VSCALE

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Wed Dec 14 07:52:16 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c165b0553a96394b9bbf3984782703cdae99821d
      https://github.com/llvm/llvm-project/commit/c165b0553a96394b9bbf3984782703cdae99821d
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2022-12-14 (Wed, 14 Dec 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
    M llvm/test/CodeGen/AArch64/vscale-and-sve-cnt-demandedbits.ll

  Log Message:
  -----------
  [TargetLowering] Teach DemandedBits about VSCALE

This allows DemandedBits to see the result of VSCALE will be at most
VScaleMax * some compile-time constant. This relies on the vscale_range()
attribute being present on the function, with a max set. (This is done by
default when clang is targeting AArch64+SVE).

Using this various redundant operations (zexts, sexts, ands, ors, etc)
can be eliminated.

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




More information about the All-commits mailing list