[PATCH] D17270: Support arbitrary addrspace pointers in masked load/store intrinsics

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 11:31:46 PST 2016


reames accepted this revision.
reames added a reviewer: reames.
reames added a comment.
This revision is now accepted and ready to land.

I just noticed that this change has no forward serialization for the intrinsics in old bytecode.  This will be mandatory for the patch to land.  See IR/AutoUpgrade.cpp and the usage of functions such as UpgradeIntrinsicCall in lib/Bitcode/Reader/BitcodeReader.cpp


================
Comment at: docs/LangRef.rst:11352
@@ -11351,3 +11351,3 @@
 
-The first operand is the base pointer for the load. The second operand is the alignment of the source location. It must be a constant integer value. The third operand, mask, is a vector of boolean values with the same number of elements as the return type. The fourth is a pass-through value that is used to fill the masked-off lanes of the result. The return type, underlying type of the base pointer and the type of the '``passthru``' operand are the same vector types.
+The first operand is the base pointer for the load. The base pointer can be in an arbitrary address space. The second operand is the alignment of the source location. It must be a constant integer value. The third operand, mask, is a vector of boolean values with the same number of elements as the return type. The fourth is a pass-through value that is used to fill the masked-off lanes of the result. The return type, underlying type of the base pointer and the type of the '``passthru``' operand are the same vector types.
 
----------------
The additional sentence doesn't add much.  In particular, any LLVM pointer can be of arbitrary address space. 

================
Comment at: include/llvm/IR/IRBuilder.h:515
@@ -514,3 +514,3 @@
   /// \brief Create a call to a masked intrinsic with given Id.
-  /// Masked intrinsic has only one overloaded type - data type.
   CallInst *CreateMaskedIntrinsic(Intrinsic::ID Id, ArrayRef<Value *> Ops,
----------------
reames wrote:
> Would be good to clarify that the data type is implied by the pointer type and not passed explicitly.
doesn't look like this has been addressed - this is a must fix


http://reviews.llvm.org/D17270





More information about the llvm-commits mailing list