[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 07:34:36 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:
There's other opcodes in there that don't check the type though. Probably safer to check here in case we add more opcodes and forget to check it's a vector.
https://github.com/llvm/llvm-project/pull/136677
More information about the llvm-commits
mailing list