blob: c1a91009cd3a0c56979c8c8a192eed53b43b5531 [file] [log] [blame]
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_tests.py
//
// Copyright (c) 2022 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "../diff_test_utils.h"
#include "gtest/gtest.h"
namespace spvtools {
namespace diff {
namespace {
// Test where src and dst have many small functions with small differences.
constexpr char kSrc[] = R"( OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpName %4 "main"
OpName %6 "f1("
OpName %8 "f2("
OpName %10 "f3("
OpName %12 "f4("
OpName %14 "f5("
OpName %17 "BufferOut"
OpMemberName %17 0 "o"
OpName %19 ""
OpName %22 "BufferIn"
OpMemberName %22 0 "i"
OpName %24 ""
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
%46 = OpFunctionCall %2 %8
%47 = OpFunctionCall %2 %10
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
%32 = OpIAdd %16 %30 %31
OpStore %29 %32
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
%35 = OpISub %16 %34 %31
OpStore %33 %35
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
%39 = OpIMul %16 %38 %36
%40 = OpAccessChain %25 %19 %21
OpStore %40 %39
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
%43 = OpUDiv %16 %42 %36
%44 = OpAccessChain %25 %19 %21
OpStore %44 %43
OpReturn
OpFunctionEnd
)";
constexpr char kDst[] = R"( OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpName %4 "main"
OpName %6 "f1("
OpName %8 "f2("
OpName %10 "f3("
OpName %12 "f4("
OpName %14 "f5("
OpName %17 "BufferOut"
OpMemberName %17 0 "o"
OpName %19 ""
OpName %22 "BufferIn"
OpMemberName %22 0 "i"
OpName %24 ""
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
%43 = OpIAdd %16 %42 %36
%44 = OpAccessChain %25 %19 %21
OpStore %44 %43
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
%32 = OpISub %16 %30 %31
OpStore %29 %32
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
%35 = OpIAdd %16 %34 %31
OpStore %33 %35
OpReturn
OpFunctionEnd
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
%46 = OpFunctionCall %2 %8
%47 = OpFunctionCall %2 %10
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
%39 = OpISub %16 %38 %36
%40 = OpAccessChain %25 %19 %21
OpStore %40 %39
OpReturn
OpFunctionEnd
)";
TEST(DiffTest, SmallFunctionsSmallDiffs) {
constexpr char kDiff[] = R"( ; SPIR-V
; Version: 1.6
; Generator: Khronos SPIR-V Tools Assembler; 0
-; Bound: 50
+; Bound: 54
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpName %4 "main"
OpName %6 "f1("
OpName %8 "f2("
OpName %10 "f3("
OpName %12 "f4("
OpName %14 "f5("
OpName %17 "BufferOut"
OpMemberName %17 0 "o"
OpName %19 ""
OpName %22 "BufferIn"
OpMemberName %22 0 "i"
OpName %24 ""
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
%46 = OpFunctionCall %2 %8
%47 = OpFunctionCall %2 %10
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
-%32 = OpIAdd %16 %30 %31
+%50 = OpISub %16 %30 %31
-OpStore %29 %32
+OpStore %29 %50
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
-%35 = OpISub %16 %34 %31
+%51 = OpIAdd %16 %34 %31
-OpStore %33 %35
+OpStore %33 %51
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
-%39 = OpIMul %16 %38 %36
+%52 = OpISub %16 %38 %36
%40 = OpAccessChain %25 %19 %21
-OpStore %40 %39
+OpStore %40 %52
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
-%43 = OpUDiv %16 %42 %36
+%53 = OpIAdd %16 %42 %36
%44 = OpAccessChain %25 %19 %21
-OpStore %44 %43
+OpStore %44 %53
OpReturn
OpFunctionEnd
)";
Options options;
DoStringDiffTest(kSrc, kDst, kDiff, options);
}
TEST(DiffTest, SmallFunctionsSmallDiffsNoDebug) {
constexpr char kSrcNoDebug[] = R"( OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
%46 = OpFunctionCall %2 %8
%47 = OpFunctionCall %2 %10
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
%32 = OpIAdd %16 %30 %31
OpStore %29 %32
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
%35 = OpISub %16 %34 %31
OpStore %33 %35
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
%39 = OpIMul %16 %38 %36
%40 = OpAccessChain %25 %19 %21
OpStore %40 %39
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
%43 = OpUDiv %16 %42 %36
%44 = OpAccessChain %25 %19 %21
OpStore %44 %43
OpReturn
OpFunctionEnd
)";
constexpr char kDstNoDebug[] = R"( OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
%43 = OpIAdd %16 %42 %36
%44 = OpAccessChain %25 %19 %21
OpStore %44 %43
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
%32 = OpISub %16 %30 %31
OpStore %29 %32
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
%35 = OpIAdd %16 %34 %31
OpStore %33 %35
OpReturn
OpFunctionEnd
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
%46 = OpFunctionCall %2 %8
%47 = OpFunctionCall %2 %10
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
%39 = OpISub %16 %38 %36
%40 = OpAccessChain %25 %19 %21
OpStore %40 %39
OpReturn
OpFunctionEnd
)";
constexpr char kDiff[] = R"( ; SPIR-V
; Version: 1.6
; Generator: Khronos SPIR-V Tools Assembler; 0
-; Bound: 50
+; Bound: 52
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
-%46 = OpFunctionCall %2 %8
+%46 = OpFunctionCall %2 %10
-%47 = OpFunctionCall %2 %10
+%47 = OpFunctionCall %2 %8
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
%32 = OpIAdd %16 %30 %31
OpStore %29 %32
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
%35 = OpISub %16 %34 %31
OpStore %33 %35
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
-%39 = OpIMul %16 %38 %36
+%50 = OpISub %16 %38 %36
%40 = OpAccessChain %25 %19 %21
-OpStore %40 %39
+OpStore %40 %50
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
-%43 = OpUDiv %16 %42 %36
+%51 = OpIAdd %16 %42 %36
%44 = OpAccessChain %25 %19 %21
-OpStore %44 %43
+OpStore %44 %51
OpReturn
OpFunctionEnd
)";
Options options;
DoStringDiffTest(kSrcNoDebug, kDstNoDebug, kDiff, options);
}
TEST(DiffTest, SmallFunctionsSmallDiffsDumpIds) {
constexpr char kDiff[] = R"( ; SPIR-V
; Version: 1.6
; Generator: Khronos SPIR-V Tools Assembler; 0
-; Bound: 50
+; Bound: 54
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %4 "main"
OpExecutionMode %4 LocalSize 1 1 1
OpSource ESSL 310
OpName %4 "main"
OpName %6 "f1("
OpName %8 "f2("
OpName %10 "f3("
OpName %12 "f4("
OpName %14 "f5("
OpName %17 "BufferOut"
OpMemberName %17 0 "o"
OpName %19 ""
OpName %22 "BufferIn"
OpMemberName %22 0 "i"
OpName %24 ""
OpMemberDecorate %17 0 Offset 0
OpDecorate %17 BufferBlock
OpDecorate %19 DescriptorSet 0
OpDecorate %19 Binding 1
OpMemberDecorate %22 0 Offset 0
OpDecorate %22 Block
OpDecorate %24 DescriptorSet 0
OpDecorate %24 Binding 0
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%16 = OpTypeInt 32 0
%17 = OpTypeStruct %16
%18 = OpTypePointer Uniform %17
%19 = OpVariable %18 Uniform
%20 = OpTypeInt 32 1
%21 = OpConstant %20 0
%22 = OpTypeStruct %16
%23 = OpTypePointer Uniform %22
%24 = OpVariable %23 Uniform
%25 = OpTypePointer Uniform %16
%31 = OpConstant %20 1
%36 = OpConstant %16 2
%4 = OpFunction %2 None %3
%5 = OpLabel
%45 = OpFunctionCall %2 %6
%46 = OpFunctionCall %2 %8
%47 = OpFunctionCall %2 %10
%48 = OpFunctionCall %2 %12
%49 = OpFunctionCall %2 %14
OpReturn
OpFunctionEnd
%6 = OpFunction %2 None %3
%7 = OpLabel
%26 = OpAccessChain %25 %24 %21
%27 = OpLoad %16 %26
%28 = OpAccessChain %25 %19 %21
OpStore %28 %27
OpReturn
OpFunctionEnd
%8 = OpFunction %2 None %3
%9 = OpLabel
%29 = OpAccessChain %25 %19 %21
%30 = OpLoad %16 %29
-%32 = OpIAdd %16 %30 %31
+%50 = OpISub %16 %30 %31
-OpStore %29 %32
+OpStore %29 %50
OpReturn
OpFunctionEnd
%10 = OpFunction %2 None %3
%11 = OpLabel
%33 = OpAccessChain %25 %19 %21
%34 = OpLoad %16 %33
-%35 = OpISub %16 %34 %31
+%51 = OpIAdd %16 %34 %31
-OpStore %33 %35
+OpStore %33 %51
OpReturn
OpFunctionEnd
%12 = OpFunction %2 None %3
%13 = OpLabel
%37 = OpAccessChain %25 %19 %21
%38 = OpLoad %16 %37
-%39 = OpIMul %16 %38 %36
+%52 = OpISub %16 %38 %36
%40 = OpAccessChain %25 %19 %21
-OpStore %40 %39
+OpStore %40 %52
OpReturn
OpFunctionEnd
%14 = OpFunction %2 None %3
%15 = OpLabel
%41 = OpAccessChain %25 %19 %21
%42 = OpLoad %16 %41
-%43 = OpUDiv %16 %42 %36
+%53 = OpIAdd %16 %42 %36
%44 = OpAccessChain %25 %19 %21
-OpStore %44 %43
+OpStore %44 %53
OpReturn
OpFunctionEnd
Src -> Dst
1 -> 1 [ExtInstImport]
2 -> 2 [TypeVoid]
3 -> 3 [TypeFunction]
4 -> 4 [Function]
5 -> 5 [Label]
6 -> 6 [Function]
7 -> 7 [Label]
8 -> 8 [Function]
9 -> 9 [Label]
10 -> 10 [Function]
11 -> 11 [Label]
12 -> 12 [Function]
13 -> 13 [Label]
14 -> 14 [Function]
15 -> 15 [Label]
16 -> 16 [TypeInt]
17 -> 17 [TypeStruct]
18 -> 18 [TypePointer]
19 -> 19 [Variable]
20 -> 20 [TypeInt]
21 -> 21 [Constant]
22 -> 22 [TypeStruct]
23 -> 23 [TypePointer]
24 -> 24 [Variable]
25 -> 25 [TypePointer]
26 -> 26 [AccessChain]
27 -> 27 [Load]
28 -> 28 [AccessChain]
29 -> 29 [AccessChain]
30 -> 30 [Load]
31 -> 31 [Constant]
32 -> 50 [IAdd]
33 -> 33 [AccessChain]
34 -> 34 [Load]
35 -> 51 [ISub]
36 -> 36 [Constant]
37 -> 37 [AccessChain]
38 -> 38 [Load]
39 -> 52 [IMul]
40 -> 40 [AccessChain]
41 -> 41 [AccessChain]
42 -> 42 [Load]
43 -> 53 [UDiv]
44 -> 44 [AccessChain]
45 -> 45 [FunctionCall]
46 -> 46 [FunctionCall]
47 -> 47 [FunctionCall]
48 -> 48 [FunctionCall]
49 -> 49 [FunctionCall]
)";
Options options;
options.dump_id_map = true;
DoStringDiffTest(kSrc, kDst, kDiff, options);
}
} // namespace
} // namespace diff
} // namespace spvtools