From: qining Date: Tue, 9 Aug 2016 16:09:53 +0000 (-0400) Subject: Fix minor mistakes in the tests of dead-const-elim X-Git-Tag: upstream/2018.6~1157 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d49928f0cc9bc56a3f46ecf452a069e0512b2af5;p=platform%2Fupstream%2FSPIRV-Tools.git Fix minor mistakes in the tests of dead-const-elim --- diff --git a/test/opt/test_eliminate_dead_const.cpp b/test/opt/test_eliminate_dead_const.cpp index 4658892..91b0d89 100644 --- a/test/opt/test_eliminate_dead_const.cpp +++ b/test/opt/test_eliminate_dead_const.cpp @@ -716,7 +716,7 @@ INSTANTIATE_TEST_CASE_P( "%xor_a_b_vec = OpSpecConstantOp %v2int BitwiseXor %dead_spec_int_a_vec %dead_spec_int_b_vec", // Scalar Comparison - "%less_a_b = OpSpecConstantOp %int SLessThan %dead_spec_int_a %dead_spec_int_b", + "%less_a_b = OpSpecConstantOp %bool SLessThan %dead_spec_int_a %dead_spec_int_b", }, }, @@ -746,8 +746,8 @@ INSTANTIATE_TEST_CASE_P( "%b_x = OpSpecConstantOp %int CompositeExtract %vec_b 0", // Extract vector - "%a_xy = OpSpecConstantOp %v2int VectorShuffle %vec_a %vec_a 1 0", - "%b_xy = OpSpecConstantOp %v2int VectorShuffle %vec_b %vec_b 1 0", + "%a_xy = OpSpecConstantOp %v2int VectorShuffle %vec_a %vec_a 0 1", + "%b_xy = OpSpecConstantOp %v2int VectorShuffle %vec_b %vec_b 0 1", }, }, // Vectors with used swizzles should not be removed. @@ -761,8 +761,8 @@ INSTANTIATE_TEST_CASE_P( "%vec_a = OpSpecConstantComposite %v4int %used_spec_int_a %used_spec_int_a %used_int %used_int", "%vec_b = OpSpecConstantComposite %v4int %used_spec_int_b %used_spec_int_b %used_int %used_int", // Extract vector - "%a_xy = OpSpecConstantOp %v2int VectorShuffle %vec_a %vec_a 1 0", - "%b_xy = OpSpecConstantOp %v2int VectorShuffle %vec_b %vec_b 1 0", + "%a_xy = OpSpecConstantOp %v2int VectorShuffle %vec_a %vec_a 0 1", + "%b_xy = OpSpecConstantOp %v2int VectorShuffle %vec_b %vec_b 0 1", }, /* .main_insts = */ { @@ -809,7 +809,7 @@ INSTANTIATE_TEST_CASE_P( "%used_int_20 = OpSpecConstantOp %int ISub %used_int_0 %used_int_19", "%used_vec_a = OpSpecConstantComposite %v2int %used_int_18 %used_int_19", "%used_vec_b = OpSpecConstantOp %v2int IMul %used_vec_a %used_vec_a", - "%used_int_21 = OpSpecConstantOp %int VectorShuffle %used_vec_b %used_vec_b 0", + "%used_int_21 = OpSpecConstantOp %int CompositeExtract %used_vec_b 0", "%used_array = OpConstantComposite %type_arr_int_4 %used_int_20 %used_int_20 %used_int_21 %used_int_21", }, /* .main_insts = */ @@ -842,7 +842,7 @@ INSTANTIATE_TEST_CASE_P( "%dead_int_20 = OpSpecConstantOp %int ISub %used_int_0 %dead_int_19", "%dead_vec_a = OpSpecConstantComposite %v2int %dead_int_18 %dead_int_19", "%dead_vec_b = OpSpecConstantOp %v2int IMul %dead_vec_a %dead_vec_a", - "%dead_int_21 = OpSpecConstantOp %int VectorShuffle %dead_vec_b %dead_vec_b 0", + "%dead_int_21 = OpSpecConstantOp %int CompositeExtract %dead_vec_b 0", "%dead_array = OpConstantComposite %type_arr_int_4 %dead_int_20 %used_int_20 %dead_int_19 %used_int_19", }, },