[llvm] [DAGCombiner][RISCV] Add target hook to decide hoisting LogicOp with extension (PR #136677)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 03:23:28 PDT 2025


================
@@ -19893,6 +19893,14 @@ bool RISCVTargetLowering::isDesirableToCommuteWithShift(
   return true;
 }
 
+bool RISCVTargetLowering::isDesirableToHoistLogicOpWithExt(
+    const SDNode *LogicOp, unsigned ExtOp) const {
+  if (NodeExtensionHelper::isSupportedRoot(LogicOp, Subtarget) &&
----------------
lukel97 wrote:

Do we need to check that LogicOp is a vector

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


More information about the llvm-commits mailing list