[LLVMdev] Adding masked vector load and store intrinsics

Pete Cooper
2014-10-24T20:40:10Z

> On Oct 24, 2014, at 11:38 AM, Nadav Rotem <nrotem at apple.com>
wrote:
>
> I agree with the approach of adding target-independent masked memory
intrinsics. One reason is that I would like to keep the vectorizers target
independent (and use the target transform info to query the backends). I oppose
adding new first-level instructions because we would need to teach all of the
existing optimizations about the new instructions, and considering the limited
usefulness of masked operations it is not worth the effort.
I agree with this.  They should be target independent.

However, what types should be supported here?  I haven’t looked in detail, but
from memory I believe AVX-512 masks 32-bit values, and not bytes.  Are we going
to have an intrinsic which can handle any vector type, or just <n x
32-bit> vectors, even at first?

Also, given that the types of the vectors matter, it seems like we’re going to
need TTI anyway whenever we want to generate one of these, or else we’ll end up
generating an illegal version which has to be scalarised in the backend.

Thanks,
Pete

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20141024/5e1e3b7c/attachment.html>