[PATCH] D77827: [AMDGCN] Run LoadStoreVectorizer before CodeGenPrepare

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 14:57:57 PDT 2020


rampitec marked an inline comment as done.
rampitec added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/vectorize-loads.ll:18
+  %gep_y.cast = bitcast i8 addrspace(4)* %gep_y to i16 addrspace(4)*
+  %id_y = load i16, i16 addrspace(4)* %gep_y.cast, align 2, !invariant.load !0 ; load workgroup size y
+  %add = add nuw nsw i16 %id_y, %id_x
----------------
arsenm wrote:
> rampitec wrote:
> > arsenm wrote:
> > > If the problem is just the widened constant loads, we could maybe handle this directly in the vectorizer. 
> > Looks like vectorizer would need to be much smarter than it is now to do so.
> We could also do the widening later
Split AMDGPUCodeGenPrepare to early and late? It should be possible. If I use -amdgpu-codegenprepare-widen-constant-loads=0 this test is vectorized, so the only known to me problem is widening.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77827/new/

https://reviews.llvm.org/D77827





More information about the llvm-commits mailing list