@@ -98,6 +98,9 @@ static cl::opt<bool> DisableNoMaskWA(
98
98
" vc-cg-disable-no-mask-wa" , cl::init(false ), cl::Hidden,
99
99
cl::desc(" do not apply noMask WA (fusedEU)" ));
100
100
101
+ static cl::opt<bool > OptStrictI64Check (
102
+ " genx-cisa-builder-noi64-check" , cl::init(false ), cl::Hidden,
103
+ cl::desc(" strict check to ensure we produce no 64-bit operations" ));
101
104
102
105
STATISTIC (NumVisaInsts, " Number of VISA instructions" );
103
106
STATISTIC (NumAsmInsts, " Number of Gen asm instructions" );
@@ -1252,6 +1255,13 @@ void GenXKernelBuilder::buildInputs(Function *F, bool NeedRetIP) {
1252
1255
if (!PatchImpArgOff) {
1253
1256
Offset = TheKernelMetadata.getArgOffset (Idx);
1254
1257
}
1258
+ else {
1259
+ if ((Kind >> 3 ) == 3 ) {
1260
+ Offset = GrfByteSize;
1261
+ } else {
1262
+ Offset = (TheKernelMetadata.getArgOffset (Idx) + GrfByteSize);
1263
+ }
1264
+ }
1255
1265
// Argument size in bytes.
1256
1266
const unsigned NumBytes = getInputSizeInBytes (
1257
1267
DL, TheKernelMetadata.getArgCategory (Idx), Arg->getType ());
@@ -5850,6 +5860,9 @@ void GenXKernelBuilder::beginFunction(Function *Func) {
5850
5860
CISA_CALL (Kernel->GetPredefinedVar (R0, PREDEFINED_R0));
5851
5861
CISA_CALL (Kernel->CreateVISASrcOperand (OpSrc, R0, MODIFIER_NONE, 0 , 1 , 0 ,
5852
5862
0 , 5 ));
5863
+ if (OptStrictI64Check)
5864
+ report_fatal_error (" CisaBuilder should not produce 64-bit instructions"
5865
+ " add64" , false );
5853
5866
CISA_CALL (Kernel->AppendVISADataMovementInst (
5854
5867
ISA_MOV, nullptr , false , (NoMask ? vISA_EMASK_M1_NM : vISA_EMASK_M1),
5855
5868
EXEC_SIZE_1, SpOpDst, OpSrc));
0 commit comments