[PATCH] D21622: RFC: AMDGPU/R600: Add implicitarg.ptr intrinsic
Jan Vesely via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 14:07:42 PDT 2016
jvesely added a comment.
Hi,
this is still an RFC patch, because although it works (passes global_offset piglit with suitably adapted libclc).
It fails with dynamic offsets:
kernel void local_id(volatile global int *out, int j) {
__attribute__((address_space(7))) uint * ptr =
__builtin_r600_implicitarg_ptr();
out[0] = ptr[j];
}
only works if j == 0 (otherwise returns 0 or garbage). Note that changing the last line to
out[0] = ptr[j+1]
works OK.
The generated assembly looks OK:
ALU 1, @8, KC0[CB0:0-32], KC1[]
TEX 0 @6
ALU 1, @10, KC0[CB0:0-32], KC1[]
MEM_RAT_CACHELESS STORE_RAW T0.X, T1.X, 1
CF_END
PAD
Fetch clause starting at 6:
VTX_READ_32 T0.X, T0.X, 44
ALU clause starting at 8:
LSHL * T0.X, KC0[2].Z, literal.x,
2(2.802597e-45), 0(0.000000e+00)
ALU clause starting at 10:
LSHR * T1.X, KC0[2].Y, literal.x,
2(2.802597e-45), 0(0.000000e+00)
is there any interaction between constant and vertex buffer that needs to be handled? (i didn't find anything in the specs) or errata referring to this situation?
Repository:
rL LLVM
http://reviews.llvm.org/D21622
More information about the llvm-commits
mailing list