Skip to content

nir/opt_load_store_vectorize: match amul like imul

Alyssa Rosenzweig requested to merge alyssa/mesa:nir/vectorize-amul into main

for AGX, we preserve amul all the way until fusing address modes in order to be able to fuse effectively. so the load/store vectorizer wouldn't vectorize before fusing.

however, after fusing we get fused intrinsics which are tricky to teach the vectorizer about as their semantics are pretty subtle. so we can't vectorize after, either.

the easiest solution is to teach the vectorize about amul, which can always be replaced by imul for our pattern matches.

this fixes certain cases of vectorization in OpenCL kernels on asahi.

Merge request reports

Loading