[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 20:45:25 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;
----------------
KanRobert wrote:
We can update the value after tuning. No, I need to generate CCMP/CTEST w/o adding tuning flag, that's the use case.
https://github.com/llvm/llvm-project/pull/91747
More information about the llvm-commits
mailing list