[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 23 08:30:38 PDT 2024


================
@@ -3405,6 +3405,9 @@ X86TargetLowering::getJumpConditionMergingParams(Instruction::BinaryOps Opc,
                                                  const Value *Rhs) const {
   using namespace llvm::PatternMatch;
   int BaseCost = BrMergingBaseCostThresh.getValue();
+  // With CCMP, branches can be merged in a more efficient way.
+  if (BaseCost >=0 && Subtarget.hasCCMP())
+    BaseCost += 6;
----------------
goldsteinn wrote:

hmm? This flag is just to keep basic-blocks together. Why can't it be part of test commandline? (i.e the `RUN` line).

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


More information about the llvm-commits mailing list