Skip to content

Commit 0933210

Browse files
davidjwoosys_zuul
authored and
sys_zuul
committed
Allow non-32-bit thread id in group
Change-Id: Ida381c8a64d3f19c612ac334116a686d08f1d2e4
1 parent be8eb11 commit 0933210

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IGC/Compiler/CISACodeGen/ComputeShaderLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void ComputeShaderLowering::shortenThreadID(GenIntrinsicInst& inst, Function& F)
9393
llvm::Value* vSGV = builder.getInt32(usage);
9494
llvm::Function* funcSGV = llvm::GenISAIntrinsic::getDeclaration(module, GenISAIntrinsic::GenISA_DCL_SystemValue, builder.getInt16Ty());
9595
llvm::Value* vSGVCreate = builder.CreateCall(funcSGV, vSGV);
96-
vSGVCreate = builder.CreateZExtOrTrunc(vSGVCreate, builder.getInt32Ty());
96+
vSGVCreate = builder.CreateZExtOrTrunc(vSGVCreate, builder.getIntNTy(inst.getType()->getPrimitiveSizeInBits()));
9797
vSGVCreate = builder.CreateBitCast(vSGVCreate, inst.getType());
9898
inst.replaceAllUsesWith(vSGVCreate);
9999

0 commit comments

Comments
 (0)