Allow X86 Hardware intrinsics for non-Legacy 32-bit x86
authorBrian Sullivan <briansul@microsoft.com>
Wed, 4 Oct 2017 17:15:26 +0000 (10:15 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Wed, 4 Oct 2017 17:15:26 +0000 (10:15 -0700)
Unit tests exisist for this functionality on x86 CoreCLR

[tfs-changeset: 1677287]

src/jit/importer.cpp

index f8c9ba5..7331007 100644 (file)
@@ -3762,9 +3762,7 @@ GenTreePtr Compiler::impIntrinsic(GenTreePtr            newobjThis,
     {
         assert(retNode == nullptr);
         const NamedIntrinsic ni = lookupNamedIntrinsic(method);
-#ifdef _TARGET_AMD64_
-        // impX86HWIntrinsic :: Only supported for 64-bit
-        //
+#if defined(_TARGET_XARCH_) && !defined(LEGACY_BACKEND)
         if (ni > NI_HW_INTRINSIC_START && ni < NI_HW_INTRINSIC_END)
         {
             retNode = impX86HWIntrinsic(ni, method, sig);
@@ -3992,16 +3990,13 @@ NamedIntrinsic Compiler::lookupNamedIntrinsic(CORINFO_METHOD_HANDLE method)
         }
     }
 
-#ifdef _TARGET_AMD64_
-    // lookupHWIntrinsicISA :: Only supported for 64-bit
-    //
+#if defined(_TARGET_XARCH_) && !defined(LEGACY_BACKEND)
     if ((namespaceName != nullptr) && strcmp(namespaceName, "System.Runtime.Intrinsics.X86") == 0)
     {
         InstructionSet isa = lookupHWIntrinsicISA(className);
         result             = lookupHWIntrinsic(methodName, isa);
     }
 #endif
-
     return result;
 }