[LLVMdev] Ideas for representing vector gather/scatter and masks in LLVM IR

Dan Gohman gohman at apple.com
Tue Aug 12 14:58:06 PDT 2008


On Tue, 2008-08-12 at 14:00 -0700, Devang Patel wrote:
> Dan,
> 
> On Aug 2, 2008, at 2:47 PM, Dan Gohman wrote:
> 
> > Masks would not themselves be maskable. That is, the result of an
> > applymask could not be used (even indirectly) as the second operand
> > of another applymask.
> 
> What is the motivation behind this restriction ?

This is basically preventing the applymask instruction itself from being
masked, which doesn't really make
sense -- "conditionally use this mask using this other mask".

Mask values are just vectors of i1, so the way to compute the
intersection of two mask values is to use an 'and' instruction.

Dan





More information about the llvm-dev mailing list