[Mlir-commits] [mlir] [mlir][vector] Add patterns for vector masked load/store (PR #74834)

Hsiangkai Wang llvmlistbot at llvm.org
Wed Dec 13 12:57:31 PST 2023


Hsiangkai wrote:

> > > My only remaining concern remains this: [#74834 (comment)](https://github.com/llvm/llvm-project/pull/74834#issuecomment-1852769343)
> > > Do we really prefer `scf.for` loop over a sequence of `scf.if`? If we rely on some loop unrolling pattern to do that for us, are dynamic extract elements getting simplified to extract over static indices?
> > 
> > 
> > When we emulate masked load/store, we do not know the length of mask, do we? How to generate a sequence of `scf.if` according to the mask length?
> 
> We know it based on the vector type. (Modulo scalable vectors probably, but I don't think the current lowering supports them either.)

After thinking it again, yes, we can do it. I can unroll the loop according to the vector type. I will refine it to a sequence of `scf.if` in this patch. Thank you!

https://github.com/llvm/llvm-project/pull/74834


More information about the Mlir-commits mailing list