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

David Chisnall via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 11:26:50 PST 2016


theraven added a subscriber: theraven.

================
Comment at: lib/IR/IRBuilder.cpp:216
@@ -215,5 +215,3 @@
   assert(Ptr->getType()->isPointerTy() && "Ptr must be of pointer type");
-  // DataTy is the overloaded type
-  Type *DataTy = cast<PointerType>(Ptr->getType())->getElementType();
-  assert(DataTy->isVectorTy() && "Ptr should point to a vector");
+  PointerType *PtrTy = cast<PointerType>(Ptr->getType());
   if (!PassThru)
----------------
Most IRBuilder things that require a pointee type have been moved to take an explicit type, to ease the typeless pointer work.  It might be a good idea to make that change here, as this change increases the importance of knowing the type (i.e. add an explicit PtrTy parameter and assert [for now] that it is equal to `Ptr->getType()`)..


http://reviews.llvm.org/D17270





More information about the llvm-commits mailing list