masked_load and masked_store instructions require the alignment to be specified and a power of two. It seems to me that this requirement applies to masked_gather and masked_scatter as well.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/X86/avx2-masked-gather.ll | ||
---|---|---|
54 ↗ | (On Diff #239553) | I think 0 is also good. You can put alignment 0 in load/store. |
llvm/test/CodeGen/X86/avx2-masked-gather.ll | ||
---|---|---|
54 ↗ | (On Diff #239553) | Looking at the source code it seems like masked_gather depends on an aligned_load which should have a non zero alignment? |
Comment Actions
CreateAlignedLoad allows align 0, as far as I see in the code.
We just assume that masked.gather is created from scalar load by vectorizer. Vectorizer just copies alignment from scalar load to masked load/gather and the requirement to alignment should match load alignment.
Comment Actions
I see, then you're write that 0 should be allowed.
I'm trying to tighten the alignment type throughout LLVM so I always try to have the most restrictive type.
I'll change the Patch accordingly.