Skip to content

Commit e4e601f

Browse files
mshelegosys-cmllvm
authored andcommitted
Allow usage of TargetExtType with typed pointers
No tests added. Only for experimental purpose.
1 parent b980474 commit e4e601f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

GenXIntrinsics/lib/GenXIntrinsics/GenXSPIRVReaderAdaptor.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -473,15 +473,12 @@ transformKernelSignature(Function &F, const std::vector<SPIRVArgDesc> &Descs) {
473473
if (isArgConvIntrinsic(Orig)) {
474474
#if VC_INTR_LLVM_VERSION_MAJOR > 15
475475
if (ArgTy->isTargetExtTy()) {
476+
// N.B. Target extension types are fully supported and tested
477+
// only with opaque pointers enabled.
476478
auto &Ctx = Arg.getContext();
477-
#if VC_INTR_LLVM_VERSION_MAJOR == 16
478-
assert(!Ctx.supportsTypedPointers() &&
479-
"Target extension types should be used only with "
480-
"opaque pointers");
481-
#endif
482479
unsigned AddrSpace =
483480
getOpaqueTypeAddressSpace(Descs[Arg.getArgNo()].Ty);
484-
return PointerType::get(Ctx, AddrSpace);
481+
return PointerType::get(Type::getInt8Ty(Ctx), AddrSpace);
485482
}
486483
#endif
487484
return ArgTy;

0 commit comments

Comments
 (0)