Fix table-driven framework for one-type-arg generic intrinsics
authorFei Peng <fei.peng@intel.com>
Wed, 31 Jan 2018 23:26:33 +0000 (15:26 -0800)
committerFei Peng <fei.peng@intel.com>
Wed, 31 Jan 2018 23:26:33 +0000 (15:26 -0800)
src/jit/hwintrinsicxarch.cpp
src/jit/namedintrinsiclist.h

index 09e3c72..f55cd52 100644 (file)
@@ -501,7 +501,7 @@ GenTree* Compiler::impX86HWIntrinsic(NamedIntrinsic        intrinsic,
         }
     }
 
-    if ((flags & HW_Flag_Generic) != 0)
+    if ((flags & (HW_Flag_OneTypeGeneric | HW_Flag_TwoTypeGeneric)) != 0)
     {
         assert(baseType != TYP_UNKNOWN);
         // When the type argument is not a numeric type (and we are not being forced to expand), we need to
index 772f403..4e27535 100644 (file)
@@ -46,10 +46,10 @@ enum HWIntrinsicFlag : unsigned int
 
     // Generic
     // - must throw NotSupportException if the type argument is not numeric type
-    HW_Flag_Generic = 0x4,
+    HW_Flag_OneTypeGeneric = 0x4,
     // Two-type Generic
     // - the intrinsic has two type parameters
-    HW_Flag_TwoTypeGeneric = 0xC,
+    HW_Flag_TwoTypeGeneric = 0x8,
 
     // NoCodeGen
     // - should be transformed in the compiler front-end, cannot reach CodeGen