xref: /aosp_15_r20/external/skia/tests/sksl/intrinsics/Tanh.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 %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "inputVal"
9               OpMemberName %_UniformBuffer 1 "expected"
10               OpMemberName %_UniformBuffer 2 "colorGreen"
11               OpMemberName %_UniformBuffer 3 "colorRed"
12               OpName %_entrypoint_v "_entrypoint_v"
13               OpName %main "main"
14               OpDecorate %sk_FragColor RelaxedPrecision
15               OpDecorate %sk_FragColor Location 0
16               OpDecorate %sk_FragColor Index 0
17               OpMemberDecorate %_UniformBuffer 0 Offset 0
18               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
19               OpMemberDecorate %_UniformBuffer 1 Offset 16
20               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
21               OpMemberDecorate %_UniformBuffer 2 Offset 32
22               OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
23               OpMemberDecorate %_UniformBuffer 3 Offset 48
24               OpMemberDecorate %_UniformBuffer 3 RelaxedPrecision
25               OpDecorate %_UniformBuffer Block
26               OpDecorate %7 Binding 0
27               OpDecorate %7 DescriptorSet 0
28               OpDecorate %25 RelaxedPrecision
29               OpDecorate %30 RelaxedPrecision
30               OpDecorate %31 RelaxedPrecision
31               OpDecorate %34 RelaxedPrecision
32               OpDecorate %35 RelaxedPrecision
33               OpDecorate %39 RelaxedPrecision
34               OpDecorate %41 RelaxedPrecision
35               OpDecorate %42 RelaxedPrecision
36               OpDecorate %44 RelaxedPrecision
37               OpDecorate %45 RelaxedPrecision
38               OpDecorate %52 RelaxedPrecision
39               OpDecorate %54 RelaxedPrecision
40               OpDecorate %55 RelaxedPrecision
41               OpDecorate %58 RelaxedPrecision
42               OpDecorate %59 RelaxedPrecision
43               OpDecorate %66 RelaxedPrecision
44               OpDecorate %68 RelaxedPrecision
45               OpDecorate %70 RelaxedPrecision
46               OpDecorate %78 RelaxedPrecision
47               OpDecorate %79 RelaxedPrecision
48               OpDecorate %85 RelaxedPrecision
49               OpDecorate %86 RelaxedPrecision
50               OpDecorate %94 RelaxedPrecision
51               OpDecorate %95 RelaxedPrecision
52               OpDecorate %103 RelaxedPrecision
53               OpDecorate %114 RelaxedPrecision
54               OpDecorate %117 RelaxedPrecision
55               OpDecorate %118 RelaxedPrecision
56      %float = OpTypeFloat 32
57    %v4float = OpTypeVector %float 4
58%_ptr_Output_v4float = OpTypePointer Output %v4float
59%sk_FragColor = OpVariable %_ptr_Output_v4float Output
60%_UniformBuffer = OpTypeStruct %v4float %v4float %v4float %v4float
61%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
62          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
63       %void = OpTypeVoid
64         %12 = OpTypeFunction %void
65    %float_0 = OpConstant %float 0
66    %v2float = OpTypeVector %float 2
67         %16 = OpConstantComposite %v2float %float_0 %float_0
68%_ptr_Function_v2float = OpTypePointer Function %v2float
69         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
70       %bool = OpTypeBool
71      %false = OpConstantFalse %bool
72%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
73        %int = OpTypeInt 32 1
74      %int_0 = OpConstant %int 0
75      %int_1 = OpConstant %int 1
76     %v2bool = OpTypeVector %bool 2
77    %v3float = OpTypeVector %float 3
78     %v3bool = OpTypeVector %bool 3
79     %v4bool = OpTypeVector %bool 4
80         %92 = OpConstantComposite %v3float %float_0 %float_0 %float_0
81        %101 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
82%_ptr_Function_v4float = OpTypePointer Function %v4float
83      %int_2 = OpConstant %int 2
84      %int_3 = OpConstant %int 3
85%_entrypoint_v = OpFunction %void None %12
86         %13 = OpLabel
87         %17 = OpVariable %_ptr_Function_v2float Function
88               OpStore %17 %16
89         %19 = OpFunctionCall %v4float %main %17
90               OpStore %sk_FragColor %19
91               OpReturn
92               OpFunctionEnd
93       %main = OpFunction %v4float None %20
94         %21 = OpFunctionParameter %_ptr_Function_v2float
95         %22 = OpLabel
96        %107 = OpVariable %_ptr_Function_v4float Function
97         %26 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
98         %30 = OpLoad %v4float %26
99         %31 = OpCompositeExtract %float %30 0
100         %25 = OpExtInst %float %1 Tanh %31
101         %32 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
102         %34 = OpLoad %v4float %32
103         %35 = OpCompositeExtract %float %34 0
104         %36 = OpFOrdEqual %bool %25 %35
105               OpSelectionMerge %38 None
106               OpBranchConditional %36 %37 %38
107         %37 = OpLabel
108         %40 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
109         %41 = OpLoad %v4float %40
110         %42 = OpVectorShuffle %v2float %41 %41 0 1
111         %39 = OpExtInst %v2float %1 Tanh %42
112         %43 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
113         %44 = OpLoad %v4float %43
114         %45 = OpVectorShuffle %v2float %44 %44 0 1
115         %46 = OpFOrdEqual %v2bool %39 %45
116         %48 = OpAll %bool %46
117               OpBranch %38
118         %38 = OpLabel
119         %49 = OpPhi %bool %false %22 %48 %37
120               OpSelectionMerge %51 None
121               OpBranchConditional %49 %50 %51
122         %50 = OpLabel
123         %53 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
124         %54 = OpLoad %v4float %53
125         %55 = OpVectorShuffle %v3float %54 %54 0 1 2
126         %52 = OpExtInst %v3float %1 Tanh %55
127         %57 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
128         %58 = OpLoad %v4float %57
129         %59 = OpVectorShuffle %v3float %58 %58 0 1 2
130         %60 = OpFOrdEqual %v3bool %52 %59
131         %62 = OpAll %bool %60
132               OpBranch %51
133         %51 = OpLabel
134         %63 = OpPhi %bool %false %38 %62 %50
135               OpSelectionMerge %65 None
136               OpBranchConditional %63 %64 %65
137         %64 = OpLabel
138         %67 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
139         %68 = OpLoad %v4float %67
140         %66 = OpExtInst %v4float %1 Tanh %68
141         %69 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
142         %70 = OpLoad %v4float %69
143         %71 = OpFOrdEqual %v4bool %66 %70
144         %73 = OpAll %bool %71
145               OpBranch %65
146         %65 = OpLabel
147         %74 = OpPhi %bool %false %51 %73 %64
148               OpSelectionMerge %76 None
149               OpBranchConditional %74 %75 %76
150         %75 = OpLabel
151         %77 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
152         %78 = OpLoad %v4float %77
153         %79 = OpCompositeExtract %float %78 0
154         %80 = OpFOrdEqual %bool %float_0 %79
155               OpBranch %76
156         %76 = OpLabel
157         %81 = OpPhi %bool %false %65 %80 %75
158               OpSelectionMerge %83 None
159               OpBranchConditional %81 %82 %83
160         %82 = OpLabel
161         %84 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
162         %85 = OpLoad %v4float %84
163         %86 = OpVectorShuffle %v2float %85 %85 0 1
164         %87 = OpFOrdEqual %v2bool %16 %86
165         %88 = OpAll %bool %87
166               OpBranch %83
167         %83 = OpLabel
168         %89 = OpPhi %bool %false %76 %88 %82
169               OpSelectionMerge %91 None
170               OpBranchConditional %89 %90 %91
171         %90 = OpLabel
172         %93 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
173         %94 = OpLoad %v4float %93
174         %95 = OpVectorShuffle %v3float %94 %94 0 1 2
175         %96 = OpFOrdEqual %v3bool %92 %95
176         %97 = OpAll %bool %96
177               OpBranch %91
178         %91 = OpLabel
179         %98 = OpPhi %bool %false %83 %97 %90
180               OpSelectionMerge %100 None
181               OpBranchConditional %98 %99 %100
182         %99 = OpLabel
183        %102 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
184        %103 = OpLoad %v4float %102
185        %104 = OpFOrdEqual %v4bool %101 %103
186        %105 = OpAll %bool %104
187               OpBranch %100
188        %100 = OpLabel
189        %106 = OpPhi %bool %false %91 %105 %99
190               OpSelectionMerge %111 None
191               OpBranchConditional %106 %109 %110
192        %109 = OpLabel
193        %112 = OpAccessChain %_ptr_Uniform_v4float %7 %int_2
194        %114 = OpLoad %v4float %112
195               OpStore %107 %114
196               OpBranch %111
197        %110 = OpLabel
198        %115 = OpAccessChain %_ptr_Uniform_v4float %7 %int_3
199        %117 = OpLoad %v4float %115
200               OpStore %107 %117
201               OpBranch %111
202        %111 = OpLabel
203        %118 = OpLoad %v4float %107
204               OpReturnValue %118
205               OpFunctionEnd
206