[PATCH] D44045: [AMDGPU] Adjusted alignment-check for local address space;

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 15:22:23 PST 2018


rampitec added inline comments.


================
Comment at: lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp:667
+
+  SDValue Offset = N->getBasePtr();
+  KnownBits Known;
----------------
It is not immediately clear to me if the base pointer is always an LDS allocated symbol. I guess it can also be a  GEP, right?

Let's consider the situation:

sym is a 64-dword aligned LDS allocation.
gep1 = &sym[1] -> it is only 4 bytes aligned.
gep2 = &gep1[8] -> it is still 4 bytes aligned.

I suppose for the gep2 your logic will incorrectly report 8 byte alignment.


https://reviews.llvm.org/D44045





More information about the llvm-commits mailing list