This is for targets that do not support gather-like ops, e.g., SPIR-V.
Gather is expanded into lower-level vector ops with memory accesses
guarded with scf.if.
I also considered generating vector.maskedloads, but decided against
it to keep the memref and tensor codepath closer together. There's a
good chance that if a target doesn't support gather it does not support
masked loads either.
nit: I'm not sure emulation is the right term. This is just a lowering of vector.gather to vector.maskedload as emulation would suggest we have some assumption that this maps to a native hw functionality.
Could we pick a name suggesting lowering instead?