[Mlir-commits] [mlir] [mlir][vector][spirv] Lower vector.maskedload and vector.maskedstore to SPIR-V (PR #74834)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Dec 11 10:42:34 PST 2023
kuhar wrote:
> My goal is to convert all the dialects into spirv dialect in some stage. What is the rational way to lower vector.maskedload to spirv.load?
I'd say that the following would be preferred:
0. `vector.gather` --> `vector.load` + `scf.if` (already there)
1. `vector.transfer_read`/`transfer_write` --> `vector.load`/`store`, `vector.maskedload`/`maskedstore`
2. `vector.maskedload`/`maskedstore` --> `vector.load`/`store` + `scf.if`
3. `vecotr.load`/`vector.store` --> ConvertVectorToSPIRV (already there)
4. `scf.if` --> ConvertSCFToSPIRV (already there)
(or `memref.load`/`store`, I don't think there's much difference?)
Unless there's something that we could do much better by going directly to SPIR-V.
https://github.com/llvm/llvm-project/pull/74834
More information about the Mlir-commits
mailing list