[PATCH] D126680: [VPlan] Replace BranchOnCount with BranchOnCond if TC <= UF * VF.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 14:41:37 PDT 2022
fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin, david-arm.
Herald added subscribers: tschuett, psnobl, rogfer01, bollu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added a subscriber: vkmr.
Herald added a project: LLVM.
Try to simplify BranchOnCount to `BranchOnCond true` if TC <= UF * VF.
This is an alternative to D121899 <https://reviews.llvm.org/D121899> which simplifies the VPlan directly
instead of doing so late in code-gen.
The potential benefit of doing this in VPlan is that this may help
cost-modeling in the future. The reason this is done in prepareToExecute
at the moment is that a single plan may be used for multiple VFs/UFs.
There are further simplifications that can be applied as follow ups:
1. Replace inductions with constants
2. Replace vector region with regular block.
Fixes #55354.
Depends on D126679 <https://reviews.llvm.org/D126679>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126680
Files:
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/test/Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll
llvm/test/Transforms/LoopVectorize/X86/constant-fold.ll
llvm/test/Transforms/LoopVectorize/X86/outer_loop_test1_no_explicit_vect_width.ll
llvm/test/Transforms/LoopVectorize/X86/pr34438.ll
llvm/test/Transforms/LoopVectorize/X86/pr42674.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126680.432989.patch
Type: text/x-patch
Size: 7717 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220530/3aa6295e/attachment.bin>
More information about the llvm-commits
mailing list