[PATCH] D159322: LoopVectorize: Set branch_weight for conditional branches
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 12:58:35 PDT 2023
MatzeB marked 2 inline comments as done.
MatzeB added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:3110
+ unsigned TripCount = UF;
+ TripCount *= VF.isScalable() ? VF.getKnownMinValue() : VF.getFixedValue();
+ MDNode *BranchWeights = MDB.createBranchWeights(1, TripCount - 1);
----------------
mtrofin wrote:
> can either of the VF methods return 0?
I don't think vectorizing with a vector width of 0 (or a minimum of 0) can happen.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159322/new/
https://reviews.llvm.org/D159322
More information about the llvm-commits
mailing list