AMDGPU: Fix enqueue block lowering for opaque pointers
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 23 Dec 2022 20:39:55 +0000 (15:39 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sat, 7 Jan 2023 02:15:39 +0000 (21:15 -0500)
commit0416883dc1f5d6b9bfa2c543f590f40e23868403
tree04a02dc1b27739bfcbf0d4a8e50617a3a438417d
parent4ce5400a3fdf595c25aeaa467472efa62a83a232
AMDGPU: Fix enqueue block lowering for opaque pointers

This was looking for a specific constant cast of the function, when
the type doesn't matter. Doesn't bother trying to handle typed
pointers, it will just assert.

Things probably don't work completely correctly if the block kernel
address is captured somewhere else, but that wouldn't work before
either. The uses should really be loads out of the handle, and the
handle initializer should contain the kernel address.
llvm/lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp
llvm/test/CodeGen/AMDGPU/enqueue-kernel.ll