The masked intrinsics support all integer and floating point data types. I added the pointer type to this list.
Added tests for CodeGen and for Loop Vectorizer.
Updated the Language Reference.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Hi Elena,
A few comments inline.
../docs/LangRef.rst | ||
---|---|---|
11266 ↗ | (On Diff #38661) | Can we make this one sentence? "The loaded data is a vector of any integer, floating point, or pointer data type", perhaps? |
11311 ↗ | (On Diff #38661) | Same as above. |
../lib/IR/Function.cpp | ||
495 ↗ | (On Diff #38661) | Perhaps it's worth handling all vectors here, instead of checking for PointerType? |
Updated according to Michael's comments.
../lib/IR/Function.cpp | ||
---|---|---|
495 ↗ | (On Diff #38661) | Yes, getEVTString() works only for simple types. I changed the patch and invoked the recursion for all vectors. In this case the mangled string will be composed for vector of functions, vector of structures, vector of vectors .. |
../docs/LangRef.rst | ||
---|---|---|
11316 ↗ | (On Diff #39810) | mangled ".v16f32" suffix mismatch with "<16 x i32> <value>" and "<16 x i32>* <ptr>". |
11367 ↗ | (On Diff #39810) | "<8 x float*[*]> <ptrs>" |
11415 ↗ | (On Diff #39810) | "an arbitrary memory address[es]". |
11420 ↗ | (On Diff #39810) | mangled ".v16f32" suffix mismatch with "<16 x i32> <value>" and "<16 x i32*> <ptrs>". |
../test/Transforms/LoopVectorize/X86/masked_load_store.ll | ||
506 ↗ | (On Diff #39810) | "in[i] != 0" may look better than "in[i] > 0", as it is a pointer. |
578 ↗ | (On Diff #39810) | same here. |
LGTM, except that I think it may be a good idea to apply Ayal's suggestion to the test (in[i] > 0 => in[i] != 0).