find src/jit -type f -exec sed -i -e 's/gtLngCon\./AsLngCon()\./g' {} \; (dotnet...
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>
Thu, 17 Oct 2019 01:33:39 +0000 (18:33 -0700)
committerBruce Forstall <brucefo@microsoft.com>
Thu, 17 Oct 2019 01:33:39 +0000 (18:33 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/1776e777741ec31fca550207426f6cfdc33512b9

src/coreclr/src/jit/assertionprop.cpp
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/instr.cpp

index 42d2389..219f891 100644 (file)
@@ -1105,7 +1105,7 @@ AssertionIndex Compiler::optCreateAssertion(GenTree*         op1,
                     }
                     else if (op2->gtOper == GT_CNS_LNG)
                     {
-                        assertion.op2.lconVal = op2->gtLngCon.gtLconVal;
+                        assertion.op2.lconVal = op2->AsLngCon()->gtLconVal;
                     }
                     else
                     {
@@ -1405,7 +1405,7 @@ bool Compiler::optIsTreeKnownIntValue(bool vnBased, GenTree* tree, ssize_t* pCon
         // overlapping gtIconVal.
         else if (tree->OperGet() == GT_CNS_LNG)
         {
-            *pConstant = tree->gtLngCon.gtLconVal;
+            *pConstant = tree->AsLngCon()->gtLconVal;
             *pFlags    = tree->GetIconHandleFlag();
             return true;
         }
index 713b82e..1511117 100644 (file)
@@ -1338,7 +1338,7 @@ inline void GenTree::SetOper(genTreeOps oper, ValueNumberUpdate vnUpdate)
     {
         // When casting from LONG to INT, we need to force cast of the value,
         // if the host architecture represents INT and LONG with the same data size.
-        gtLngCon.gtLconVal = (INT64)(INT32)gtLngCon.gtLconVal;
+        AsLngCon()->gtLconVal = (INT64)(INT32)AsLngCon()->gtLconVal;
     }
 #endif // defined(_HOST_64BIT_) && !defined(_TARGET_64BIT_)
 
index 276a611..e6e0508 100644 (file)
@@ -1292,7 +1292,7 @@ AGAIN:
 #if 0
             // TODO-CQ: Enable this in the future
         case GT_CNS_LNG:
-            if  (op1->gtLngCon.gtLconVal == op2->gtLngCon.gtLconVal)
+            if  (op1->AsLngCon()->gtLconVal == op2->AsLngCon()->gtLconVal)
                 return true;
             break;
 
@@ -1979,7 +1979,7 @@ AGAIN:
                 add = tree->gtIntCon.gtIconVal;
                 break;
             case GT_CNS_LNG:
-                bits = (UINT64)tree->gtLngCon.gtLconVal;
+                bits = (UINT64)tree->AsLngCon()->gtLconVal;
 #ifdef _HOST_64BIT_
                 add = bits;
 #else // 32-bit host
@@ -6933,7 +6933,7 @@ GenTree* Compiler::gtClone(GenTree* tree, bool complexOK)
             break;
 
         case GT_CNS_LNG:
-            copy = gtNewLconNode(tree->gtLngCon.gtLconVal);
+            copy = gtNewLconNode(tree->AsLngCon()->gtLconVal);
             break;
 
         case GT_LCL_VAR:
@@ -7097,7 +7097,7 @@ GenTree* Compiler::gtCloneExpr(
                 goto DONE;
 
             case GT_CNS_LNG:
-                copy = gtNewLconNode(tree->gtLngCon.gtLconVal);
+                copy = gtNewLconNode(tree->AsLngCon()->gtLconVal);
                 goto DONE;
 
             case GT_CNS_DBL:
@@ -8076,7 +8076,7 @@ bool Compiler::gtCompareTree(GenTree* op1, GenTree* op2)
                 break;
 
             case GT_CNS_LNG:
-                if (op1->gtLngCon.gtLconVal == op2->gtLngCon.gtLconVal)
+                if (op1->AsLngCon()->gtLconVal == op2->AsLngCon()->gtLconVal)
                 {
                     return true;
                 }
@@ -10458,7 +10458,7 @@ void Compiler::gtDispConst(GenTree* tree)
             break;
 
         case GT_CNS_LNG:
-            printf(" 0x%016I64x", tree->gtLngCon.gtLconVal);
+            printf(" 0x%016I64x", tree->AsLngCon()->gtLconVal);
             break;
 
         case GT_CNS_DBL:
index 8996ac3..8f7fcfb 100644 (file)
@@ -923,12 +923,12 @@ AGAIN:
             emitAttr       size;
             if (offs == 0)
             {
-                constVal = (target_ssize_t)(tree->gtLngCon.gtLconVal);
+                constVal = (target_ssize_t)(tree->AsLngCon()->gtLconVal);
                 size     = EA_PTRSIZE;
             }
             else
             {
-                constVal = (target_ssize_t)(tree->gtLngCon.gtLconVal >> 32);
+                constVal = (target_ssize_t)(tree->AsLngCon()->gtLconVal >> 32);
                 size     = EA_4BYTE;
             }