[llvm] [RISCV][TII] Add and use new hook to optimize/canonicalize instructions after MachineCopyPropagation (PR #137973)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 15:11:56 PDT 2025
================
@@ -2344,6 +2344,21 @@ static unsigned getSHXADDShiftAmount(unsigned Opc) {
}
}
+// Returns the shift amount from a SHXADD.UW instruction. Returns 0 if the
+// instruction is not a SHXADD.UW.
+static unsigned getSHXADDUWShiftAmount(unsigned Opc) {
----------------
preames wrote:
I'd probably just merge this with the previous routine. Reading the using code, I didn't even spot the difference in the name because I'd assumed it to be one routine.
https://github.com/llvm/llvm-project/pull/137973
More information about the llvm-commits
mailing list