[LoongArch64] Fix the compiling error for LA. (#69711)
authorQiao Pengcheng <qiaopengcheng@loongson.cn>
Tue, 24 May 2022 15:05:40 +0000 (23:05 +0800)
committerGitHub <noreply@github.com>
Tue, 24 May 2022 15:05:40 +0000 (17:05 +0200)
src/coreclr/jit/codegenloongarch64.cpp
src/coreclr/jit/lower.cpp
src/coreclr/jit/lsraloongarch64.cpp

index 678346f..e05cd20 100644 (file)
@@ -5774,12 +5774,6 @@ void CodeGen::genPutArgStk(GenTreePutArgStk* treeNode)
     // we are storing arg slot number in GT_PUTARG_STK node in lowering phase.
     unsigned argOffsetOut = treeNode->getArgOffset();
 
-#ifdef DEBUG
-    CallArg* callArg = treeNode->gtCall->gtArgs.FindByNode(treeNode);
-    assert(callArg != nullptr);
-    DEBUG_ARG_SLOTS_ASSERT(argOffsetOut == (callArg->AbiInfo.SlotNum * TARGET_POINTER_SIZE));
-#endif // DEBUG
-
     // Whether to setup stk arg in incoming or out-going arg area?
     // Fast tail calls implemented as epilog+jmp = stk arg is setup in incoming arg area.
     // All other calls - stk arg is setup in out-going arg area.
index b0e0fe8..ac9c938 100644 (file)
@@ -7250,7 +7250,7 @@ void Lowering::TransformUnusedIndirection(GenTreeIndir* ind, Compiler* comp, Bas
 
     ind->ChangeType(comp->gtTypeForNullCheck(ind));
 
-#ifdef TARGET_ARM64
+#if defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64)
     bool useNullCheck = true;
 #elif TARGET_ARM
     bool           useNullCheck          = false;
index e040ada..2498292 100644 (file)
@@ -921,7 +921,7 @@ int LinearScan::BuildCall(GenTreeCall* call)
         GenTree* argNode = arg.GetEarlyNode();
 
         // Skip arguments that have been moved to the Late Arg list
-        if ((argNode->gtFlags & GTF_LATE_ARG) == 0)
+        if (arg.GetLateNode() == nullptr)
         {
 #if FEATURE_ARG_SPLIT
             // PUTARG_SPLIT nodes must be in the gtCallLateArgs list, since they