Replace gtHWIntrinsic. with AsHWIntrinsic()-> (dotnet/coreclr#27319)
authorSinan Kaya <41809318+franksinankaya@users.noreply.github.com>
Sun, 20 Oct 2019 23:57:57 +0000 (19:57 -0400)
committerSergey Andreenko <seandree@microsoft.com>
Sun, 20 Oct 2019 23:57:57 +0000 (16:57 -0700)
* find src/jit -type f -exec sed -i -e 's/gtHWIntrinsic\./AsHWIntrinsic()\./g' {} \;

* Format patch

Commit migrated from https://github.com/dotnet/coreclr/commit/0027c9736062a268f2ccc842295b504909c20d48

src/coreclr/src/jit/gentree.cpp
src/coreclr/src/jit/hwintrinsicxarch.cpp

index c64914a..9a52cad 100644 (file)
@@ -2119,10 +2119,10 @@ AGAIN:
 
 #ifdef FEATURE_HW_INTRINSICS
                 case GT_HWIntrinsic:
-                    hash += tree->gtHWIntrinsic.gtHWIntrinsicId;
-                    hash += tree->gtHWIntrinsic.gtSIMDBaseType;
-                    hash += tree->gtHWIntrinsic.gtSIMDSize;
-                    hash += tree->gtHWIntrinsic.gtIndexBaseType;
+                    hash += tree->AsHWIntrinsic()->gtHWIntrinsicId;
+                    hash += tree->AsHWIntrinsic()->gtSIMDBaseType;
+                    hash += tree->AsHWIntrinsic()->gtSIMDSize;
+                    hash += tree->AsHWIntrinsic()->gtIndexBaseType;
                     break;
 #endif // FEATURE_HW_INTRINSICS
 
@@ -11046,10 +11046,10 @@ void Compiler::gtDispTree(GenTree*     tree,
 #ifdef FEATURE_HW_INTRINSICS
         if (tree->gtOper == GT_HWIntrinsic)
         {
-            printf(" %s %s",
-                   tree->gtHWIntrinsic.gtSIMDBaseType == TYP_UNKNOWN ? ""
-                                                                     : varTypeName(tree->gtHWIntrinsic.gtSIMDBaseType),
-                   HWIntrinsicInfo::lookupName(tree->gtHWIntrinsic.gtHWIntrinsicId));
+            printf(" %s %s", tree->AsHWIntrinsic()->gtSIMDBaseType == TYP_UNKNOWN
+                                 ? ""
+                                 : varTypeName(tree->AsHWIntrinsic()->gtSIMDBaseType),
+                   HWIntrinsicInfo::lookupName(tree->AsHWIntrinsic()->gtHWIntrinsicId));
         }
 #endif // FEATURE_HW_INTRINSICS
 
index cdbcfef..1b0df9b 100644 (file)
@@ -1204,7 +1204,7 @@ GenTree* Compiler::impSSE42Intrinsic(NamedIntrinsic        intrinsic,
 
             // TODO - currently we use the BaseType to bring the type of the second argument
             // to the code generator. May encode the overload info in other way.
-            retNode->gtHWIntrinsic.gtSIMDBaseType = JITtype2varType(corType);
+            retNode->AsHWIntrinsic()->gtSIMDBaseType = JITtype2varType(corType);
             break;
 
         default: