I was reading amd media extensions in the opencl programming guide, and in secction A8 (page A5) I see that amd_bitalign returns an UINTn, but the definition says
(uint) (((((long)src0) << 32) | (long)src1 >> (src2& 31))
so, arguments are promoted to long (64 bits) and one of them rotated left by 32, so I guess that there is a typo and the final result is ulong. Could someone from AMD confirm that?
The same situation happens for amd_bytealign