[llvm] [profcheck][CVP] Adding 'unknown' branch weights for `urem` expansion in CVP (PR #180637)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 14 11:45:11 PST 2026
================
@@ -878,6 +880,11 @@ static bool expandUDivOrURem(BinaryOperator *Instr, const ConstantRange &XCR,
auto *Cmp = B.CreateICmp(ICmpInst::ICMP_ULT, FrozenX, FrozenY,
Instr->getName() + ".cmp");
ExpandedOp = B.CreateSelect(Cmp, FrozenX, AdjX);
+ // Test Unlikely Branch Weights.
+ applyProfMetadataIfEnabled(ExpandedOp, [&](Instruction *Inst) {
----------------
boomanaiden154 wrote:
I'm still unsure why we need to wrap `setExplicitlyUnknownBranchWeightsIfProfiled` in `applyProfMetadataIfEnabled`
https://github.com/llvm/llvm-project/pull/180637
More information about the llvm-commits
mailing list