Skip to content

Commit 5ae1792

Browse files
itetyush-inteligcbot
authored andcommitted
Report for wrong input for exec size
1 parent 0887b4d commit 5ae1792

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXCisaBuilder.cpp

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3576,14 +3576,15 @@ void GenXKernelBuilder::buildIntrinsic(CallInst *CI, unsigned IntrinID,
35763576
DS_Error};
35773577
getContext().diagnose(Err);
35783578
}
3579-
unsigned Byte = Const->getSExtValue() & 15;
3580-
*Mask = (VISA_EMask_Ctrl)(Byte >> 4);
3581-
unsigned Res = Byte & 0xF;
3579+
unsigned Res = Const->getSExtValue();
3580+
*Mask = VISA_EMask_Ctrl::vISA_EMASK_M1;
35823581
if (Res > 5) {
3583-
DiagnosticInfoCisaBuild Err{
3584-
CI, "illegal common ISA execsize (should be 1, 2, 4, 8, 16, 32)",
3585-
DS_Error};
3582+
DiagnosticInfoCisaBuild Err{CI,
3583+
"illegal common ISA execsize "
3584+
"(expected log2 from 1, 2, 4, 8, 16 or 32)",
3585+
DS_Error};
35863586
getContext().diagnose(Err);
3587+
report_fatal_error("wrong execsize");
35873588
}
35883589
return (VISA_Exec_Size)Res;
35893590
};

0 commit comments

Comments
 (0)