[PATCH] D132892: [LV] Explicily lower uniform load as single load

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 15:11:17 PDT 2022


reames created this revision.
reames added reviewers: fhahn, david-arm.
Herald added subscribers: frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, bollu, simoncook, johnrusso, rbar, asb, hiraditya, mcrosier.
Herald added a project: All.
reames requested review of this revision.
Herald added subscribers: pcwang-thead, vkmr, MaskRay.
Herald added a project: LLVM.

This replaces the "scalarize then clone-as-uniform" lowering for loads of uniform values with a dedicated mode of memory widening for this case.  This avoids needing to relying on instcombine/GVN to clean up after redundant loads.

Note: I plan to do stores too.  This patch includes some of the API plumbing on the store side, but doesn't actually use it yet.  I thought the consistency in the API was worth a bit of temporarily nop code.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D132892

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/lib/Transforms/Vectorize/VPlan.h
  llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
  llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
  llvm/test/Transforms/LoopVectorize/RISCV/uniform-load-store.ll
  llvm/test/Transforms/LoopVectorize/X86/cost-model-assert.ll
  llvm/test/Transforms/LoopVectorize/X86/uniform_mem_op.ll
  llvm/test/Transforms/LoopVectorize/first-order-recurrence-sink-replicate-region.ll
  llvm/test/Transforms/LoopVectorize/induction.ll
  llvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll
  llvm/unittests/Transforms/Vectorize/VPlanTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132892.456471.patch
Type: text/x-patch
Size: 60991 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220829/8cd56908/attachment.bin>


More information about the llvm-commits mailing list