9190f82d57
LLVM loves take advantage of the fact that vec3s in OpenCL are 16B aligned so it can just read/write them as vec4s. This is questionably legal except that it uses a xyz write-mask when it does it. The result is a LOT of vec4->vec3 casts on loads and stores. This optimization detects this case as well as other bit-cast cases and rewrites them to get rid of the cast. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6871>