[all-commits] [llvm/llvm-project] bf358e: [APInt] Add unsigned overloads of shift functions

Jay Foad via All-commits all-commits at lists.llvm.org
Thu May 25 08:05:49 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bf358e27a4f80a7240627785f049267964ccc2e9
      https://github.com/llvm/llvm-project/commit/bf358e27a4f80a7240627785f049267964ccc2e9
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2023-05-25 (Thu, 25 May 2023)

  Changed paths:
    M llvm/include/llvm/ADT/APInt.h
    M llvm/lib/Support/APInt.cpp

  Log Message:
  -----------
  [APInt] Add unsigned overloads of shift functions

Add overloads of sshl_ov, ushl_ov, sshl_sat and ushl_sat that take the
shift amount as unsigned instead of APInt. This matches what we do for
the normal shift operators and can help to avoid creating temporary
APInts in some cases.

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


  Commit: 2b1678cd06e6e5a770f5511abaf72a511236087e
      https://github.com/llvm/llvm-project/commit/2b1678cd06e6e5a770f5511abaf72a511236087e
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2023-05-25 (Thu, 25 May 2023)

  Changed paths:
    M llvm/lib/Support/KnownBits.cpp

  Log Message:
  -----------
  [KnownBits] Simplify shl. NFCI.

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


Compare: https://github.com/llvm/llvm-project/compare/298843cd6633...2b1678cd06e6


More information about the All-commits mailing list