[PATCH] D41715: AMDGPU: Process amdgpu.uniform on loads

Marek Olšák via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 10 13:56:55 PST 2018


mareko added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp:155
+             Ptr->getType()->getPointerElementType(), Ptr,
+             ArrayRef<Value*>(Idx), Twine(""), &I);
+    I.replaceUsesOfWith(Ptr, GEP);
----------------
arsenm wrote:
> You don't need the explicit Twine, you could also preserve the original name
How to do it without Twine and how to preserve the original name? Thanks.


================
Comment at: test/CodeGen/AMDGPU/amdgpu.uniform.ll:5
+; RUN: llc -march=amdgcn -mcpu=gfx900  -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=VIGFX9 %s
+
+; GCN-LABEL: {{^}}uniform_load:
----------------
arsenm wrote:
> This test should run the IR pass and check that
Do you mean running the AnnotateUniformValues pass instead of llc? It looks like the llc test does the job too.


https://reviews.llvm.org/D41715





More information about the llvm-commits mailing list