xref: /aosp_15_r20/external/skia/tests/sksl/shared/UnusedVariables.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_entrypoint_v "_entrypoint_v"
8               OpName %userfunc_ff "userfunc_ff"
9               OpName %main "main"
10               OpName %b "b"
11               OpName %c "c"
12               OpName %x "x"
13               OpName %d "d"
14               OpDecorate %sk_FragColor RelaxedPrecision
15               OpDecorate %sk_FragColor Location 0
16               OpDecorate %sk_FragColor Index 0
17               OpDecorate %62 RelaxedPrecision
18               OpDecorate %64 RelaxedPrecision
19               OpDecorate %67 RelaxedPrecision
20               OpDecorate %70 RelaxedPrecision
21               OpDecorate %71 RelaxedPrecision
22      %float = OpTypeFloat 32
23    %v4float = OpTypeVector %float 4
24%_ptr_Output_v4float = OpTypePointer Output %v4float
25%sk_FragColor = OpVariable %_ptr_Output_v4float Output
26       %void = OpTypeVoid
27         %10 = OpTypeFunction %void
28    %float_0 = OpConstant %float 0
29    %v2float = OpTypeVector %float 2
30         %14 = OpConstantComposite %v2float %float_0 %float_0
31%_ptr_Function_v2float = OpTypePointer Function %v2float
32%_ptr_Function_float = OpTypePointer Function %float
33         %19 = OpTypeFunction %float %_ptr_Function_float
34    %float_1 = OpConstant %float 1
35         %25 = OpTypeFunction %v4float %_ptr_Function_v2float
36    %float_2 = OpConstant %float 2
37    %float_3 = OpConstant %float 3
38   %float_77 = OpConstant %float 77
39        %int = OpTypeInt 32 1
40%_ptr_Function_int = OpTypePointer Function %int
41      %int_0 = OpConstant %int 0
42      %int_1 = OpConstant %int 1
43       %bool = OpTypeBool
44       %true = OpConstantTrue %bool
45    %float_5 = OpConstant %float 5
46    %float_4 = OpConstant %float 4
47%_entrypoint_v = OpFunction %void None %10
48         %11 = OpLabel
49         %15 = OpVariable %_ptr_Function_v2float Function
50               OpStore %15 %14
51         %17 = OpFunctionCall %v4float %main %15
52               OpStore %sk_FragColor %17
53               OpReturn
54               OpFunctionEnd
55%userfunc_ff = OpFunction %float None %19
56         %20 = OpFunctionParameter %_ptr_Function_float
57         %21 = OpLabel
58         %22 = OpLoad %float %20
59         %24 = OpFAdd %float %22 %float_1
60               OpReturnValue %24
61               OpFunctionEnd
62       %main = OpFunction %v4float None %25
63         %26 = OpFunctionParameter %_ptr_Function_v2float
64         %27 = OpLabel
65          %b = OpVariable %_ptr_Function_float Function
66          %c = OpVariable %_ptr_Function_float Function
67         %37 = OpVariable %_ptr_Function_float Function
68         %40 = OpVariable %_ptr_Function_float Function
69          %x = OpVariable %_ptr_Function_int Function
70          %d = OpVariable %_ptr_Function_float Function
71               OpStore %b %float_2
72               OpStore %c %float_3
73               OpStore %b %float_2
74         %33 = OpFAdd %float %float_3 %float_77
75               OpStore %b %33
76         %35 = OpFAdd %float %float_3 %float_77
77         %34 = OpExtInst %float %1 Sin %35
78               OpStore %b %34
79         %36 = OpFAdd %float %float_3 %float_77
80               OpStore %37 %36
81         %38 = OpFunctionCall %float %userfunc_ff %37
82         %39 = OpFAdd %float %float_3 %float_77
83               OpStore %40 %39
84         %41 = OpFunctionCall %float %userfunc_ff %40
85               OpStore %b %41
86         %42 = OpExtInst %float %1 Cos %float_3
87               OpStore %b %42
88               OpStore %b %42
89               OpStore %x %int_0
90               OpBranch %47
91         %47 = OpLabel
92               OpLoopMerge %51 %50 None
93               OpBranch %48
94         %48 = OpLabel
95         %52 = OpLoad %int %x
96         %54 = OpSLessThan %bool %52 %int_1
97               OpBranchConditional %54 %49 %51
98         %49 = OpLabel
99               OpBranch %50
100         %50 = OpLabel
101         %56 = OpLoad %int %x
102         %57 = OpIAdd %int %56 %int_1
103               OpStore %x %57
104               OpBranch %47
105         %51 = OpLabel
106         %59 = OpLoad %float %c
107               OpStore %d %59
108               OpStore %b %float_3
109         %60 = OpFAdd %float %59 %float_1
110               OpStore %d %60
111         %61 = OpFOrdEqual %bool %float_3 %float_2
112         %62 = OpSelect %float %61 %float_1 %float_0
113         %64 = OpSelect %float %true %float_1 %float_0
114         %66 = OpFOrdEqual %bool %60 %float_5
115         %67 = OpSelect %float %66 %float_1 %float_0
116         %69 = OpFOrdEqual %bool %60 %float_4
117         %70 = OpSelect %float %69 %float_1 %float_0
118         %71 = OpCompositeConstruct %v4float %62 %64 %67 %70
119               OpReturnValue %71
120               OpFunctionEnd
121