Instead of determining the alignment based on the pointer element type (which is incompatible with opaque pointers), make use of alignment annotations added by the frontend.
In particular, clang will add alignment attributes to OpenCL kernels since D118894.
What's expected to happen if the alignment is not specified explicitly?
It may be worth adding a test case for that.