[llvm] [DAGCombiner][RISCV] Add target hook to decide hoisting LogicOp with extension (PR #136677)
Jim Lin via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 06:51:58 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))
----------------
tclin914 wrote:
Done. Thanks.
https://github.com/llvm/llvm-project/pull/136677
More information about the llvm-commits
mailing list