[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 07:49:26 PDT 2025


================
@@ -4462,6 +4462,16 @@ class TargetLowering : public TargetLoweringBase {
     return false;
   }
 
+  /// Return true if it is profitable to hoist a LogicOp where both operands
+  /// have the same extension op. This transformation may not be desirable if
+  /// it disrupts a particularly auspicious target-specific tree (e.g.
+  /// (or disjoint (zext A), (zext B)) -> vwaddu.wv on RISC-V). By default it
----------------
tclin914 wrote:

vwaddu.wv -> vwaddu.vv. Thanks.

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


More information about the llvm-commits mailing list