[llvm] [X86][CodeGen] Support lowering for CCMP/CTEST (PR #91747)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Thu May 23 08:50:18 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:
It can be part of test command line. My understanding is that you suggested removing `BaseCost += 6` here and **only** putting the flag in the test.
I'd like the user to generate the CCMP/CTEST with front-end flag `-mapx-features=nf` for the cases in the test, w/o the tuning flags `x86-*cost`.
https://github.com/llvm/llvm-project/pull/91747
More information about the llvm-commits
mailing list