================
@@ -42,7 +44,10 @@ BasicBlock *TileInfo::CreateLoop(BasicBlock *Preheader,
BasicBlock *Exit,
B.SetInsertPoint(Latch);
Value *Inc = B.CreateAdd(IV, Step, Name + ".step");
Value *Cond = B.CreateICmpNE(Inc, Bound, Name + ".cond");
- BranchInst::Create(Header, Exit, Cond, Latch);
+ auto *BR = BranchInst::Create(Header, Exit, Cond, Latch);
+ MDBuilder MDB(Preheader->getContext());
+ setFittedBranchWeights(*BR, {Bound->getZExtValue() / Step->getZExtValue(),
1},
----------------
boomanaiden154 wrote:
Good point. Added.
https://github.com/llvm/llvm-project/pull/181292
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits