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

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 09:33:07 PST 2016


apilipenko added inline comments.

================
Comment at: docs/LangRef.rst:11336
@@ -11335,3 +11335,3 @@
 
-      declare <16 x float>  @llvm.masked.load.v16f32 (<16 x float>* <ptr>, i32 <alignment>, <16 x i1> <mask>, <16 x float> <passthru>)
-      declare <2 x double>  @llvm.masked.load.v2f64  (<2 x double>* <ptr>, i32 <alignment>, <2 x i1>  <mask>, <2 x double> <passthru>)
+      declare <16 x float>  @llvm.masked.load.v16f32.p0v16f32 (<16 x float>* <ptr>, i32 <alignment>, <16 x i1> <mask>, <16 x float> <passthru>)
+      declare <2 x double>  @llvm.masked.load.v2f64.p0v2f64  (<2 x double>* <ptr>, i32 <alignment>, <2 x i1>  <mask>, <2 x double> <passthru>)
----------------
reames wrote:
> Hm, looking at this mangling, the later bit implies the former.  Is there a way to rewrite the definition such that the vector type is inferred from the pointer type?
> 
> (The code is correct, just slightly verbose.)
It seems like in the current scheme we can't have a type dependant on an overloaded type before the overloaded type itself (that's what will happen in the current signature).

Also, once we move to opaque pointer types we will need two overloaded types again.  

================
Comment at: lib/IR/IRBuilder.cpp:218
@@ -217,3 +217,1 @@
-  Type *DataTy = cast<PointerType>(Ptr->getType())->getElementType();
-  assert(DataTy->isVectorTy() && "Ptr should point to a vector");
   if (!PassThru)
----------------
reames wrote:
> You should keep this assert.
This assert is sank down to CreateMaskedIntrinsic.


http://reviews.llvm.org/D17270





More information about the llvm-commits mailing list