[PATCH] Provide target callback to check if vector to scalar load/store widening is beneficial

Stanislav Mekhanoshin stanislav.mekhanoshin at amd.com
Thu May 22 00:01:38 PDT 2014


Hi arsenm,

LegalizeVectorTypes.cpp tries to widen loads and stores if possible, so that a load or store of v2i32 would become an operation with a single i64 for example. That is not beneficial in all cases. For example for a GPU supporting 3-element vector operations that will be more efficient to issue a single load of three 32 bit values than two distinct loads of 64 and 32 bit size.

The patch is to provide backend a way to tell if such transformation is desirable. The callback takes original operation width, a widened width and a MemSDNode to check if that is a store or load and its address space.

http://reviews.llvm.org/D3865

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3865.9679.patch
Type: text/x-patch
Size: 4754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140522/3cb99251/attachment.bin>


More information about the llvm-commits mailing list