[llvm] [RISCV][NFC] Avoid iteration and division while selecting SHXADD instructions (PR #158851)

Min-Yih Hsu via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 16 11:32:23 PDT 2025


================
@@ -25,6 +25,22 @@
 
 namespace llvm {
 
+template <typename T> int isShifted359(T Value, int &Shift) {
+  if (Value == 0)
+    return 0;
----------------
mshockwave wrote:

nit: is this needed?

https://github.com/llvm/llvm-project/pull/158851


More information about the llvm-commits mailing list