[PATCH] D149903: [VPlan] Replace IR based truncateToMinimalBitwidths with VPlan version.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 14:07:16 PDT 2023


fhahn created this revision.
fhahn added reviewers: Ayal, gilr, rengolin.
Herald added subscribers: StephenFan, tschuett, psnobl, rogfer01, bollu, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added subscribers: pcwang-thead, vkmr.
Herald added a project: LLVM.

This patch replaces the IR based truncateToMinimalBitwidths with a VPlan
version. This has 2 benefits:

1. the VPlan-based version is simpler; we don't need to implement special codegen for each supported instruction type like the IR based one.
2. Removes a dependency on the cost-model after VPlan execution and
3. Removes a use of getVPValue that uses underlying values after VPlan execution (See removed FIXME).

Depends on D149081 <https://reviews.llvm.org/D149081>.

Depends on D149079 <https://reviews.llvm.org/D149079>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D149903

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
  llvm/lib/Transforms/Vectorize/VPlanTransforms.h
  llvm/test/Transforms/LoopVectorize/AArch64/deterministic-type-shrinkage.ll
  llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149903.519651.patch
Type: text/x-patch
Size: 14074 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230504/dd3beeb7/attachment.bin>


More information about the llvm-commits mailing list