Ensure the insTupleType mask entries stay correct (#85870)
authorTanner Gooding <tagoo@outlook.com>
Mon, 8 May 2023 21:53:14 +0000 (14:53 -0700)
committerGitHub <noreply@github.com>
Mon, 8 May 2023 21:53:14 +0000 (14:53 -0700)
* Ensure the insTupleType mask entries stay correct

* Ensure the bitwise result remains uint16_t

src/coreclr/jit/instr.h

index 5c109cb..df86581 100644 (file)
@@ -371,7 +371,7 @@ enum insTupleType : uint16_t
     INS_TT_NONE             = 0x0000,
     INS_TT_FULL             = 0x0001,
     INS_TT_HALF             = 0x0002,
-    INS_TT_IS_BROADCAST     = 0x0003,
+    INS_TT_IS_BROADCAST     = static_cast<uint16_t>(INS_TT_FULL | INS_TT_HALF),
     INS_TT_FULL_MEM         = 0x0010,
     INS_TT_TUPLE1_SCALAR    = 0x0020,
     INS_TT_TUPLE1_FIXED     = 0x0040,
@@ -383,7 +383,7 @@ enum insTupleType : uint16_t
     INS_TT_EIGHTH_MEM       = 0x1000,
     INS_TT_MEM128           = 0x2000,
     INS_TT_MOVDDUP          = 0x4000,
-    INS_TT_IS_NON_BROADCAST = 0x8000,
+    INS_TT_IS_NON_BROADCAST = static_cast<uint16_t>(~INS_TT_IS_BROADCAST),
 };
 #endif