Skip to content

Commit 0485f44

Browse files
authored
[CIR][TBAA|CUDA|HIP] Fix device-side TBAA handling for CUDA; restrict NYI to surface/texture types (#2009)
1 parent e392b11 commit 0485f44

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4341,7 +4341,15 @@ TBAAAccessInfo CIRGenModule::getTBAAAccessInfo(QualType accessType) {
43414341
return TBAAAccessInfo();
43424342
}
43434343
if (getLangOpts().CUDAIsDevice) {
4344-
llvm_unreachable("NYI");
4344+
if (getLangOpts().CUDAIsDevice) {
4345+
// As CUDA builtin surface/texture types are replaced, skip generating
4346+
// TBAA access info.
4347+
if (accessType->isCUDADeviceBuiltinSurfaceType()) {
4348+
llvm_unreachable("NYI");
4349+
} else if (accessType->isCUDADeviceBuiltinTextureType()) {
4350+
llvm_unreachable("NYI");
4351+
}
4352+
}
43454353
}
43464354
return tbaa->getAccessInfo(accessType);
43474355
}

0 commit comments

Comments
 (0)