[llvm] [InstCombine] Mark as unknown the branch weights of packed integer selecting shifts (PR #162726)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 9 14:57:12 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))
----------------
boomanaiden154 wrote:
Ah, yep. Looks like `InstCombine` uses the `TargetFolder` which will constant fold selects that are constant.
Thanks for pointing that out.
https://github.com/llvm/llvm-project/pull/162726
More information about the llvm-commits
mailing list