[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:05:30 PST 2023


================
@@ -1387,6 +1387,24 @@ def PseudoCCMOVGPR : Pseudo<(outs GPR:$dst),
                             ReadSFBALU, ReadSFBALU]>;
 }
 
+// This should always expand to a branch+c.mv so the size is 6 or 4 if the
+// branch is compressible.
+let Predicates = [CanUseCMOVBranchOpt, NoShortForwardBranchOpt],
+    Constraints = "$dst = $falsev", isCommutable = 1, Size = 6 in {
----------------
topperc wrote:

It's intentional. isSelect enables the ALU op folding code which we don't want.

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


More information about the llvm-commits mailing list