Skip to content

Commit 85dd264

Browse files
houjenkoigcbot
authored andcommitted
Skip removing funciton arguments for emulated 64 addr calc
We will refactor how 64 emulated add instructions in vISA later. For now, we have to disable function argument removal due to unsupported patterns.
1 parent 3eec71e commit 85dd264

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

visa/BuildCISAIRImpl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -651,15 +651,15 @@ void CISA_IR_Builder::LinkTimeOptimization(
651651
G4_Declare *replacedRetDcl = nullptr;
652652

653653
for (auto &it : sgInvokeList) {
654-
bool inlining = (options & (1U << Linker_Inline));
655-
bool removeArgRet = (options & (1U << Linker_RemoveArgRet));
656-
bool removeStackArg = (options & (1U << Linker_RemoveStackArg));
657-
bool removeStackFrame = (options & (1U << Linker_RemoveStackFrame));
658654
G4_INST *fcall = *it;
659655
vASSERT(fcall->opcode() == G4_pseudo_fcall);
660-
661656
G4_Kernel *caller = GetCallerKernel(fcall);
662657
G4_Kernel *callee = GetCalleeKernel(fcall);
658+
bool inlining = (options & (1U << Linker_Inline));
659+
bool removeArgRet = (options & (1U << Linker_RemoveArgRet));
660+
bool removeStackArg = (options & (1U << Linker_RemoveStackArg)) && caller->fg.builder->hasInt64Add();
661+
bool removeStackFrame = (options & (1U << Linker_RemoveStackFrame));
662+
663663
G4_INST *calleeLabel = *callee->fg.builder->instList.begin();
664664
vISA_ASSERT(calleeLabel->isLabel() == true, "Entry inst is not a label");
665665

0 commit comments

Comments
 (0)