[llvm] [RISCV] Add MachineCombiner to fold (sh3add Z, (add X, (slli Y, 6))) -> (sh3add (sh3add Y, Z), X). (PR #87884)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 9 09:35:54 PDT 2024


================
@@ -1918,6 +1999,78 @@ static void combineFPFusedMultiply(MachineInstr &Root, MachineInstr &Prev,
   DelInstrs.push_back(&Root);
 }
 
+// Combine (sh3add Z, (add X, (slli Y, 5))) to (sh3add (sh2add Y, Z), X).
----------------
topperc wrote:

What's wrong with it?

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


More information about the llvm-commits mailing list