Skip to content

Commit 78215b6

Browse files
zuban32igcbot
authored andcommitted
Pick UD visa type for function pointers
1 parent 2221065 commit 78215b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXVisaRegAlloc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ TypeDetails::TypeDetails(const DataLayout &DL, Type *Ty, Signedness Signed)
495495
BytesPerElement = 4;
496496
} else if (auto PT = dyn_cast<PointerType>(ElementTy)) {
497497
BytesPerElement = DL.getPointerTypeSize(PT);
498-
if (BytesPerElement == 4)
498+
if (BytesPerElement == 4 || PT->getPointerElementType()->isFunctionTy())
499499
VisaType = ISA_TYPE_UD;
500500
else if (BytesPerElement == 8)
501501
VisaType = ISA_TYPE_UQ;

0 commit comments

Comments
 (0)