[llvm-branch-commits] [llvm] [InstCombine] Mark as unknown the branch weights of packed integer selecting shifts (PR #162726)
Mircea Trofin via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Oct 9 20:41:13 PDT 2025
================
@@ -108,6 +109,11 @@ static Value *simplifyShiftSelectingPackedElement(Instruction *I,
IC.Builder.CreateICmpEQ(ShrAmt, Constant::getNullValue(ShrAmt->getType()),
ShrAmt->getName() + ".z");
Value *Select = IC.Builder.CreateSelect(ShrAmtZ, Lower, Upper);
+ // There is no existing !prof metadata we can derive the !prof metadata for
+ // this select.
+ if (auto *SI = dyn_cast<SelectInst>(Select))
+ setExplicitlyUnknownBranchWeightsIfProfiled(
+ *SI, *SI->getParent()->getParent(), DEBUG_TYPE);
----------------
mtrofin wrote:
yup - just had to make it public (plus the change before in the stack)
https://github.com/llvm/llvm-project/pull/162726
More information about the llvm-branch-commits
mailing list