[llvm] [RISCV] Set riscv-fpimm-cost threshold to 3 by default (PR #159352)

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 24 07:35:44 PDT 2025


================
@@ -79,7 +79,7 @@ static cl::opt<int>
     FPImmCost(DEBUG_TYPE "-fpimm-cost", cl::Hidden,
               cl::desc("Give the maximum number of instructions that we will "
                        "use for creating a floating-point immediate value"),
-              cl::init(2));
+              cl::init(3));
----------------
asb wrote:

We'd need to account for Zfinx/Zdinx as well which doesn't need the conversion. I see this as a good suggestion for what a more "principled" constant to use might be, which might be worth exploring as a followup.

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


More information about the llvm-commits mailing list