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

via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 08:36:19 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:

While I imagine with APX the value should be higher, can you just put the necessary tuning value in the test command line?

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


More information about the llvm-commits mailing list