Fix list of opcodes allowed for OpSpecConstantOp

Was missing BitcastXor, GenericCastToPtr.
Remove duplicate of SLessThanEqual
This commit is contained in:
David Neto 2016-01-05 18:22:22 -05:00
parent d0de196439
commit 969ce4b323
2 changed files with 8 additions and 2 deletions

View File

@ -109,6 +109,7 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
CASE(UConvert),
CASE(ConvertPtrToU),
CASE(ConvertUToPtr),
CASE(GenericCastToPtr),
CASE(PtrCastToGeneric),
CASE(Bitcast),
CASE(QuantizeToF16),
@ -128,6 +129,7 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
CASE(ShiftLeftLogical),
CASE(BitwiseOr),
CASE(BitwiseAnd),
CASE(BitwiseXor),
CASE(FNegate),
CASE(FAdd),
CASE(FSub),
@ -154,7 +156,6 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
CASE(SGreaterThan),
CASE(ULessThanEqual),
CASE(SLessThanEqual),
CASE(SLessThanEqual),
CASE(UGreaterThanEqual),
CASE(SGreaterThanEqual),
// Memory
@ -163,6 +164,10 @@ const SpecConstantOpcodeEntry kOpSpecConstantOpcodes[] = {
CASE(PtrAccessChain),
CASE(InBoundsPtrAccessChain),
};
// The 58 is determined by counting the opcodes listed in the spec.
static_assert(58 == sizeof(kOpSpecConstantOpcodes)/sizeof(kOpSpecConstantOpcodes[0]),
"OpSpecConstantOp opcode table is incomplete");
#undef CASE
// clang-format on

View File

@ -512,6 +512,7 @@ INSTANTIATE_TEST_CASE_P(
CASE1(UConvert),
CASE1(ConvertPtrToU),
CASE1(ConvertUToPtr),
CASE1(GenericCastToPtr),
CASE1(PtrCastToGeneric),
CASE1(Bitcast),
CASE1(QuantizeToF16),
@ -531,6 +532,7 @@ INSTANTIATE_TEST_CASE_P(
CASE2(ShiftLeftLogical),
CASE2(BitwiseOr),
CASE2(BitwiseAnd),
CASE2(BitwiseXor),
CASE1(FNegate),
CASE2(FAdd),
CASE2(FSub),
@ -554,7 +556,6 @@ INSTANTIATE_TEST_CASE_P(
CASE2(SGreaterThan),
CASE2(ULessThanEqual),
CASE2(SLessThanEqual),
CASE2(SLessThanEqual),
CASE2(UGreaterThanEqual),
CASE2(SGreaterThanEqual),
// Memory