10#include "llvm/IR/IntrinsicsSPIRV.h"
17 case Intrinsic::spv_generic_cast_to_ptr_explicit:
28 auto IntrID =
II->getIntrinsicID();
30 case Intrinsic::spv_generic_cast_to_ptr_explicit: {
32 unsigned DstAS =
II->getType()->getPointerAddressSpace();
33 return NewAS == DstAS ? NewV
uint64_t IntrinsicInst * II
static LLVM_ABI ConstantPointerNull * get(PointerType *T)
Static factory methods - Return objects of the specified value.
A wrapper class for inspecting calls to intrinsic functions.
static LLVM_ABI PointerType * get(Type *ElementType, unsigned AddressSpace)
This constructs a pointer to an object of the specified type in a numbered address space.
Value * rewriteIntrinsicWithAddressSpace(IntrinsicInst *II, Value *OldV, Value *NewV) const override
bool collectFlatAddressOperands(SmallVectorImpl< int > &OpIndexes, Intrinsic::ID IID) const override
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
LLVM_ABI unsigned getPointerAddressSpace() const
Get the address space of this pointer or pointer vector type.
LLVM Value Representation.
Type * getType() const
All values are typed, get the type of this value.
LLVM_ABI LLVMContext & getContext() const
All values hold a context through their type.
This is an optimization pass for GlobalISel generic memory operations.