[llvm] [profcheck] Add unknown branch weight for inlined memchr calls. (PR #160964)
Jin Huang via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 29 16:56:47 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!");
----------------
jinhuang1102 wrote:
Done
https://github.com/llvm/llvm-project/pull/160964
More information about the llvm-commits
mailing list