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

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


rampitec marked 2 inline comments as done.
rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:742
     }
+
+    if (EnableLoadStoreVectorizer)
----------------
arsenm wrote:
> This pass is already problematic for compile time and hits quadratic behavior, so I'm not thrilled about running it twice. Why can't we just run it once?
There are 111 regressions in check-llvm-codegen-amdgpu if I just move it. All that I have checked are real.


================
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:
> 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.


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

https://reviews.llvm.org/D77827





More information about the llvm-commits mailing list