[llvm] [DAGCombiner][RISCV] Add target hook to decide hoisting LogicOp with extension (PR #136677)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 03:18:25 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) &&
+ (ExtOp == ISD::ZERO_EXTEND || ExtOp == ISD::SIGN_EXTEND))
----------------
wangpc-pp wrote:
Move this condition forward?
https://github.com/llvm/llvm-project/pull/136677
More information about the llvm-commits
mailing list