[PATCH] D45228: AMDGPU/SI: Handle BitCast of GEP in promoting alloca to vector

Changpeng Fang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 13:50:50 PDT 2018


cfang created this revision.
cfang added a reviewer: arsenm.
Herald added subscribers: t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl.

This patch handles the case that the pointer is a BITCAST of GEP to change the data type. Before this patch, the check stops
at the BITCAST (pointer) and the load/store are not actually handled at all.

We also remove an invalid LIT test because we  haven't handled the case yet, and check always pass with or without the promotion because
the index is an immediate and the load/store could be easily optimized away in other optimizations.


https://reviews.llvm.org/D45228

Files:
  lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  test/CodeGen/AMDGPU/vector-alloca.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45228.140855.patch
Type: text/x-patch
Size: 8130 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180403/c6ef1db5/attachment.bin>


More information about the llvm-commits mailing list