[llvm] [ADT] Add fshl/fshr operations to APSInt (PR #153790)
Chaitanya Koparkar via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 15 08:20:46 PDT 2025
================
@@ -387,6 +393,20 @@ template <> struct DenseMapInfo<APSInt, void> {
}
};
+namespace APSIntOps {
+
+/// Perform a funnel shift left.
+///
+/// fshl(X,Y,Z): (X << (Z % BW)) | (Y >> (BW - (Z % BW)))
+LLVM_ABI APSInt fshl(const APSInt &Hi, const APSInt &Lo, const APSInt &Shift);
+
+/// Perform a funnel shift right.
+///
+/// fshr(X,Y,Z): (X << (BW - (Z % BW))) | (Y >> (Z % BW))
+LLVM_ABI APSInt fshr(const APSInt &Hi, const APSInt &Lo, const APSInt &Shift);
----------------
ckoparkar wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/153790
More information about the llvm-commits
mailing list