[llvm] [RISCV][TII] Add and use new hook to optimize/canonicalize instructions after MachineCopyPropagation (PR #137973)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 30 16:23:29 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) {
----------------
topperc wrote:
I almost made the same comment, but the original caller of the other function uses the return value to know if the instruction is a SHXADD. That caller would be incorrect for SHXADD_UW.
https://github.com/llvm/llvm-project/pull/137973
More information about the llvm-commits
mailing list