[APInt] Add unsigned overloads of shift functions
authorJay Foad <jay.foad@amd.com>
Thu, 25 May 2023 10:56:06 +0000 (11:56 +0100)
committerJay Foad <jay.foad@amd.com>
Thu, 25 May 2023 15:05:32 +0000 (16:05 +0100)
commitbf358e27a4f80a7240627785f049267964ccc2e9
tree0f96eef175d490f43529b9620a2aa397d882c4fd
parent298843cd66334d7af5e53099f95b500e42c42317
[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
llvm/include/llvm/ADT/APInt.h
llvm/lib/Support/APInt.cpp