[PATCH] D56201: [LegalizeVectorTypes] Allow single loads and stores for more short vectors

Guillaume Marques via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 2 08:17:20 PST 2019


tauril created this revision.
tauril added reviewers: bogner, tstellar, craig.topper.
Herald added subscribers: tpr, nhaehnle, jvesely.

When lowering a load or store for TypeWidenVector, the type legalizer
would use a single load or store if the associated integer type was legal
or promoted. E.g. it loads a v4i8 as an i32 if i32 is legal/promotable.
(See 7e0334d096f72e2f1296e8fb6a49561e8d2e9621 for reference.)

      

This patch applies that behaviour to vector types. If the vector type
is TypePromoteInteger, the element type is going to be
TypePromoteInteger as well, which will lead to have a single promoting
load rather than N individual promoting loads. For instance, if we have
a v3i1, we would now have a load of v4i1 instead of 3 loads of i1.

I don't have any knowledge with AMDGPU and it seems that this commit
introduces some less performant code with the R600 architecture. I would
appreciate if someone knowledgeable with that architecture could enlighten
me on how bad the changes are.


Repository:
  rL LLVM

https://reviews.llvm.org/D56201

Files:
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
  test/CodeGen/AMDGPU/load-constant-i16.ll
  test/CodeGen/AMDGPU/load-global-i16.ll
  test/CodeGen/AMDGPU/load-local-i16.ll
  test/CodeGen/X86/load-local-i1.ll
  test/CodeGen/X86/widen_arith-3.ll
  test/CodeGen/X86/widen_cast-2.ll
  test/CodeGen/X86/widen_cast-3.ll
  test/CodeGen/X86/widen_load-2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56201.179849.patch
Type: text/x-patch
Size: 16259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190102/5301e188/attachment.bin>


More information about the llvm-commits mailing list