[llvm] [RISCV] Add branch+c.mv macrofusion for sifive-p450. (PR #76169)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 11:08:16 PST 2023


================
@@ -6908,7 +6908,8 @@ static SDValue combineSelectToBinOp(SDNode *N, SelectionDAG &DAG,
   MVT VT = N->getSimpleValueType(0);
   SDLoc DL(N);
 
-  if (!Subtarget.hasShortForwardBranchOpt()) {
+  if (!Subtarget.hasShortForwardBranchOpt() &&
----------------
topperc wrote:

The pattern is a subset of ShortForwardBranch so yes. Would need to make ShortForwardBranch imply TuneCMOVBranchOpt in tablegen which I think is doable.

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


More information about the llvm-commits mailing list