================
@@ -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},
----------------
mtrofin wrote:
> I don't think we need to worry as much here. The bounds end up getting set by
> the matrix size, which has to be specified as an immediate value to the
> intrinsics according to LangRef. We should never end up with a zero step as
> that value is decided by the pass.
assert then with the justification in the assertion message.
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