[llvm] [profcheck] Add unknown branch weight for inlined memchr calls. (PR #160964)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 10:05:44 PDT 2025
================
@@ -1350,6 +1350,11 @@ static bool foldMemChr(CallInst *Call, DomTreeUpdater *DTU,
BB->getTerminator()->eraseFromParent();
SwitchInst *SI = IRB.CreateSwitch(
IRB.CreateTrunc(Call->getArgOperand(1), ByteTy), BBNext, N);
+ Function *F = Call->getFunction();
+ assert(F && "Instruction does not belong to a function!");
----------------
mtrofin wrote:
We can use what @alanzhao1 did [here](https://github.com/llvm/llvm-project/pull/158743/files#diff-1d202885a6953bfe78a07755de6bf6b35d4f4ecbb096fe4c3f5e2524ea70d1f5R188-R195) (once he lands it)
https://github.com/llvm/llvm-project/pull/160964
More information about the llvm-commits
mailing list