[AMDGPU] Vectorize alloca thru bitcast
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Tue, 5 May 2020 23:17:53 +0000 (16:17 -0700)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 8 May 2020 22:11:38 +0000 (15:11 -0700)
commitdb7dea2b6f7f71bcb85962bba875b63232af2d64
tree2535d196113248c6055eff0e0dc1bba3420d214c
parent23cbea9a04e023d5b79dfee5964fae769340c993
[AMDGPU] Vectorize alloca thru bitcast

This is mostly useful if alloca element type is not integer
and then casted to an integer for load or store. We now can
vectorize an [i32] alloca but cannot do so for [float].

There also a separate patch needed to properly lower 64 bit
types after they vectorized. At the moment these are lowered
via scratch anyway.

Differential Revision: https://reviews.llvm.org/D79641
llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
llvm/test/CodeGen/AMDGPU/vector-alloca-bitcast.ll [new file with mode: 0644]