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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 9 14:58:00 PDT 2020


arsenm 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
----------------
rampitec wrote:
> 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.
We don't really need to do the load widening in the IR. We should be able to do in the DAG/gMIR level


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

https://reviews.llvm.org/D77827





More information about the llvm-commits mailing list