[LLVMdev] Adding masked vector load and store intrinsics

dag at cray.com dag at cray.com
Fri Oct 24 09:52:40 PDT 2014


Hal Finkel <hfinkel at anl.gov> writes:

> I'm fully aware of this issue. This needs to be weighed against the
> cost of updating all other optimizations that operate on loads to also
> understand this intrinsic.

In my experience, LLVM's behavior of treating unknwon intrinsics
conservatively works just fine.

> If this were really a question of safety, I'd agree. And if we were
> talking about gather loads, I'd agree. For a regular vector loads, I
> don't see this as a safety issue.

It absolutely is a safety issue.  Not only could loop control flow cause
some vector elements to be skipped that would otherwise trap if loaded,
there are some vector optimizations that assume masking behavior will
handle overindexing and other such problems.

Masking is an extremely powerful concept and the sooner LLVM understands
it, the better.

                           -David



More information about the llvm-dev mailing list