[llvm] [RISCV][CostModel] Remove inst cost of cmp inst in cmp-select sequence. (PR #91158)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Sun May 5 20:33:26 PDT 2024
================
@@ -1436,6 +1436,13 @@ InstructionCost RISCVTTIImpl::getCmpSelInstrCost(unsigned Opcode, Type *ValTy,
}
}
+ // The cmp + select instructions will lower to SELECT_CC and lower to
+ // PseudoCCMOVGPR which will generate a conditional branch + mv. The
+ // cost of (cmp + select) will be (0 + select inst cost).
+ if (I && isa<CmpInst>(I) && I->hasOneUser() &&
----------------
ElvisWang123 wrote:
Fixed. Thanks!
https://github.com/llvm/llvm-project/pull/91158
More information about the llvm-commits
mailing list