[llvm] [InstCombine] Mark as unknown the branch weights of packed integer selecting shifts (PR #162726)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 14:34:36 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))
----------------
mtrofin wrote:
It may produce a Value, not an Instruction, because of folding.
https://github.com/llvm/llvm-project/pull/162726
More information about the llvm-commits
mailing list