As per the OpenCL spec 1.2:
6.2.5 Pointer Casting
Pointers to old and new types may be cast back and forth to each other. Casting a pointer to a
new type represents an unchecked assertion that the address is correctly aligned. The developer
will also need to know the endianness of the OpenCL device and the endianness of the data to
determine how the scalar and vector data elements are stored in memory.
As int8* needs to be 8*4 = 32 bytes aligned, 2nd statement will create an alignment issue.
Instead of type casting, its safe to use
vload[n]to read vectors from scalar pointer.