[LLVMdev] Indexed Load and Store Intrinsics - proposal

Demikhovsky, Elena elena.demikhovsky at intel.com
Thu Dec 18 13:52:17 PST 2014


Hi David, 


>What about the case of a gather/scatter where the BaseAddr is zero and the indices are pointers?  Must we do a ptrtoint?  llvm.org is down at the moment but I don't think we currently have a vector ptrtoint.
[Demikhovsky, Elena] From the site:
The ‘ptrtoint‘ instruction converts the pointer or a vector of pointers value to the integer (or vector of integers) type ty2.

>> Scale: a compile time constant 1, 2, 4 or 8.

>This seems a bit too Intel-focused.  Why not allow arbitrary scales?  Or alternatively, eliminate the Scale and do a vector multiply on VectorOfIndices.  It should be simple enough to write matching TableGen patterns.  We do it now for the x86 memop stuff.
[Demikhovsky, Elena] As I wrote to Nadav, may be two intrinsics will be more general. I'm just looking at usage model. If the index is a pointer, scale = 1, base = 0. If it is an index inside array, scale covers all basic types from char to double.
Do you think that 2 intrinsics will be less-Intel-focused?
(1) non-zero base and vector of indices (index is relative to base) and implicit scale based on element type.
(2) without base, without scale, just vector of pointers

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.




More information about the llvm-dev mailing list