reader/spirv: Clean up disjoint AST nodes
Perform a program clone at the end of parsing to remove any unreachable AST nodes.
Actually fixing the parser to never create these looks like a huge amount of work.
Fixed: tint:749
Change-Id: Ib956634257e0933c9702d6be22f79942f7cf4c51
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/49520
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/reader/spirv/parser.cc b/src/reader/spirv/parser.cc
index d85402e..24000bf 100644
--- a/src/reader/spirv/parser.cc
+++ b/src/reader/spirv/parser.cc
@@ -25,12 +25,22 @@
Program Parse(const std::vector<uint32_t>& input) {
ParserImpl parser(input);
bool parsed = parser.Parse();
- ProgramBuilder builder = std::move(parser.builder());
+
+ ProgramBuilder& builder = parser.builder();
if (!parsed) {
// TODO(bclayton): Migrate spirv::ParserImpl to using diagnostics.
builder.Diagnostics().add_error(parser.error());
+ return Program(std::move(builder));
}
- return Program(std::move(builder));
+
+ // The SPIR-V parser can construct disjoint AST nodes, which is invalid for
+ // the Resolver. Clone the Program to clean these up.
+ builder.SetResolveOnBuild(false);
+ Program program_with_disjoint_ast(std::move(builder));
+
+ ProgramBuilder output;
+ CloneContext(&output, &program_with_disjoint_ast, false).Clone();
+ return Program(std::move(output));
}
} // namespace spirv
diff --git a/test/bug_tint_749.spvasm b/test/bug_tint_749.spvasm
new file mode 100644
index 0000000..531177f
--- /dev/null
+++ b/test/bug_tint_749.spvasm
@@ -0,0 +1,1851 @@
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 1109
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %183 %324
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "swap(i1;i1;"
+ OpName %9 "i"
+ OpName %10 "j"
+ OpName %16 "performPartition(i1;i1;"
+ OpName %14 "l"
+ OpName %15 "h"
+ OpName %18 "quicksort("
+ OpName %20 "temp"
+ OpName %24 "QuicksortObject"
+ OpMemberName %24 0 "numbers"
+ OpName %26 "obj"
+ OpName %40 "pivot"
+ OpName %44 "i"
+ OpName %48 "j"
+ OpName %69 "param"
+ OpName %71 "param"
+ OpName %78 "param"
+ OpName %80 "param"
+ OpName %86 "l"
+ OpName %87 "h"
+ OpName %89 "top"
+ OpName %92 "stack"
+ OpName %116 "p"
+ OpName %117 "param"
+ OpName %119 "param"
+ OpName %152 "i"
+ OpName %180 "uv"
+ OpName %183 "gl_FragCoord"
+ OpName %186 "buf0"
+ OpMemberName %186 0 "resolution"
+ OpName %188 ""
+ OpName %195 "color"
+ OpName %324 "_GLF_color"
+ OpDecorate %183 BuiltIn FragCoord
+ OpMemberDecorate %186 0 Offset 0
+ OpDecorate %186 Block
+ OpDecorate %188 DescriptorSet 0
+ OpDecorate %188 Binding 0
+ OpDecorate %324 Location 0
+ OpDecorate %163 NoContraction
+ OpDecorate %172 NoContraction
+ OpDecorate %207 NoContraction
+ OpDecorate %220 NoContraction
+ OpDecorate %250 NoContraction
+ OpDecorate %258 NoContraction
+ OpDecorate %305 NoContraction
+ OpDecorate %311 NoContraction
+ OpDecorate %57 NoContraction
+ OpDecorate %75 NoContraction
+ OpDecorate %77 NoContraction
+ OpDecorate %113 NoContraction
+ OpDecorate %135 NoContraction
+ OpDecorate %149 NoContraction
+ OpDecorate %172 NoContraction
+ OpDecorate %192 NoContraction
+ OpDecorate %297 NoContraction
+ OpDecorate %47 NoContraction
+ OpDecorate %57 NoContraction
+ OpDecorate %94 NoContraction
+ OpDecorate %109 NoContraction
+ OpDecorate %113 NoContraction
+ OpDecorate %138 NoContraction
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %8 = OpTypeFunction %2 %7 %7
+ %13 = OpTypeFunction %6 %7 %7
+ %21 = OpTypeInt 32 0
+ %22 = OpConstant %21 10
+ %23 = OpTypeArray %6 %22
+ %24 = OpTypeStruct %23
+ %25 = OpTypePointer Private %24
+ %26 = OpVariable %25 Private
+ %27 = OpConstant %6 0
+ %29 = OpTypePointer Private %6
+ %46 = OpConstant %6 1
+ %58 = OpTypeBool
+ %88 = OpConstant %6 9
+ %90 = OpConstant %6 -1
+ %91 = OpTypePointer Function %23
+ %159 = OpConstant %6 10
+ %177 = OpTypeFloat 32
+ %178 = OpTypeVector %177 2
+ %179 = OpTypePointer Function %178
+ %181 = OpTypeVector %177 4
+ %182 = OpTypePointer Input %181
+ %183 = OpVariable %182 Input
+ %186 = OpTypeStruct %178
+ %187 = OpTypePointer Uniform %186
+ %188 = OpVariable %187 Uniform
+ %189 = OpTypePointer Uniform %178
+ %193 = OpTypeVector %177 3
+ %194 = OpTypePointer Function %193
+ %196 = OpConstant %177 1
+ %197 = OpConstant %177 2
+ %198 = OpConstant %177 3
+ %199 = OpConstantComposite %193 %196 %197 %198
+ %203 = OpConstant %21 0
+ %204 = OpTypePointer Function %177
+ %211 = OpConstant %177 0.25
+ %224 = OpConstant %177 0.5
+ %228 = OpConstant %6 2
+ %232 = OpConstant %21 1
+ %239 = OpConstant %177 0.75
+ %243 = OpConstant %6 3
+ %247 = OpConstant %21 2
+ %252 = OpConstant %6 4
+ %265 = OpConstant %6 5
+ %278 = OpConstant %6 6
+ %291 = OpConstant %6 7
+ %299 = OpConstant %6 8
+ %323 = OpTypePointer Output %181
+ %324 = OpVariable %323 Output
+ %605 = OpConstant %21 9
+ %606 = OpConstant %21 4294967295
+ %607 = OpConstant %21 3
+ %608 = OpConstant %21 4
+ %609 = OpConstant %21 5
+ %610 = OpConstant %21 6
+ %611 = OpConstant %21 7
+ %612 = OpConstant %21 8
+ %613 = OpConstantNull %6
+ %614 = OpConstantNull %21
+ %715 = OpConstant %177 0
+ %716 = OpConstantComposite %178 %715 %715
+ %718 = OpConstant %6 0
+ %719 = OpConstantComposite %23 %718 %718 %718 %718 %718 %718 %718 %718 %718 %718
+ %720 = OpConstantComposite %24 %719
+ %724 = OpConstantComposite %193 %715 %715 %715
+ %1106 = OpUndef %178
+ %1107 = OpUndef %6
+ %1108 = OpConstantTrue %58
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %195 = OpVariable %194 Function
+ %152 = OpVariable %7 Function
+ %180 = OpVariable %179 Function
+ %717 = OpLoad %178 %180
+ OpStore %180 %716
+ OpStore %180 %717
+ OpStore %152 %613
+ %721 = OpLoad %24 %26 Volatile
+ OpStore %26 %720
+ OpStore %26 %721
+ OpBranch %153
+ %153 = OpLabel
+ OpSelectionMerge %155 None
+ OpBranchConditional %1108 %157 %155
+ %157 = OpLabel
+ %722 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720 Volatile
+ OpStore %26 %722
+ %431 = OpVectorShuffle %178 %199 %199 0 0
+ %158 = OpLoad %6 %152 Nontemporal
+ %723 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716
+ OpStore %180 %723
+ %160 = OpSLessThan %58 %158 %159
+ %725 = OpLoad %193 %195 Nontemporal
+ OpStore %195 %724
+ OpStore %195 %725
+ %432 = OpVectorShuffle %178 %431 %431 1 1
+ %726 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720
+ OpStore %26 %726
+ OpBranchConditional %160 %155 %155 1123541792 274278206
+ %154 = OpLabel
+ %727 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720
+ OpStore %26 %727 Volatile|Nontemporal
+ %161 = OpLoad %6 %152 Volatile|Nontemporal
+ %728 = OpLoad %178 %180 Nontemporal
+ OpStore %180 %716 Nontemporal
+ OpStore %180 %728 Nontemporal
+ %433 = OpVectorShuffle %178 %199 %1106 3 3
+ %729 = OpLoad %24 %26
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %729 Volatile
+ %162 = OpLoad %6 %152 Volatile
+ %730 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716
+ OpStore %180 %730
+ %434 = OpVectorShuffle %178 %1106 %1106 3 2
+ %731 = OpLoad %193 %195
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %731 Volatile|Nontemporal
+ %163 = OpISub %6 %159 %162
+ %732 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716
+ OpStore %180 %732 Volatile
+ %435 = OpVectorShuffle %178 %1106 %434 0 2
+ %164 = OpAccessChain %29 %26 %27 %161
+ %733 = OpLoad %6 %152 Volatile
+ OpStore %152 %718
+ OpStore %152 %733 Nontemporal
+ %436 = OpVectorShuffle %193 %1106 %199 4 4 2
+ %734 = OpLoad %193 %195
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %734
+ OpStore %164 %163 Nontemporal
+ %735 = OpLoad %6 %152
+ OpStore %152 %718
+ OpStore %152 %735
+ %165 = OpLoad %6 %152
+ %736 = OpLoad %6 %152 Volatile|Nontemporal
+ OpStore %152 %718
+ OpStore %152 %736 Nontemporal
+ %437 = OpVectorShuffle %178 %1106 %199 2 3
+ %737 = OpLoad %6 %164 Volatile|Nontemporal
+ OpStore %164 %718 Volatile
+ OpStore %164 %737 Nontemporal
+ %166 = OpLoad %6 %152 Volatile|Nontemporal
+ %738 = OpLoad %6 %164 Volatile|Nontemporal
+ OpStore %164 %718 Volatile|Nontemporal
+ OpStore %164 %738
+ %438 = OpVectorShuffle %193 %435 %199 4 0 2
+ %739 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718 Nontemporal
+ OpStore %152 %739 Volatile
+ %167 = OpInBoundsAccessChain %29 %26 %27 %166
+ %740 = OpLoad %6 %167
+ OpStore %167 %718 Nontemporal
+ OpStore %167 %740 Nontemporal
+ %168 = OpLoad %6 %167 Nontemporal
+ %741 = OpLoad %6 %167
+ OpStore %167 %718 Nontemporal
+ OpStore %167 %741 Nontemporal
+ %439 = OpVectorShuffle %193 %435 %435 3 1 3
+ %742 = OpLoad %178 %180 Nontemporal
+ OpStore %180 %716
+ OpStore %180 %742 Nontemporal
+ %169 = OpLoad %6 %152
+ %743 = OpLoad %6 %164
+ OpStore %164 %718 Nontemporal
+ OpStore %164 %743
+ %440 = OpVectorShuffle %193 %1106 %435 0 1 3
+ %744 = OpLoad %193 %195
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %744
+ %170 = OpAccessChain %29 %26 %27 %265
+ %745 = OpLoad %193 %195 Nontemporal
+ OpStore %195 %724
+ OpStore %195 %745 Volatile|Nontemporal
+ %171 = OpLoad %6 %170 Volatile|Nontemporal
+ %746 = OpLoad %6 %167 Nontemporal
+ OpStore %167 %718
+ OpStore %167 %299
+ %172 = OpIMul %6 %168 %171
+ %747 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718
+ OpStore %152 %747
+ %441 = OpVectorShuffle %178 %1106 %199 2 2
+ %748 = OpLoad %178 %180
+ OpStore %180 %716
+ OpStore %180 %748
+ %173 = OpAccessChain %29 %26 %27 %165
+ %749 = OpLoad %6 %152 Volatile
+ OpStore %152 %718
+ OpStore %152 %749
+ OpStore %173 %228 Nontemporal
+ %750 = OpLoad %6 %170
+ OpStore %170 %718
+ OpStore %170 %750
+ %442 = OpVectorShuffle %178 %434 %440 3 2
+ %751 = OpLoad %6 %173
+ OpStore %173 %718 Nontemporal
+ OpStore %173 %751
+ %443 = OpVectorShuffle %193 %1106 %437 3 3 3
+ %174 = OpLoad %6 %152 Nontemporal
+ %752 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718
+ OpStore %152 %752
+ %444 = OpVectorShuffle %193 %435 %199 0 1 3
+ %753 = OpLoad %178 %180 Nontemporal
+ OpStore %180 %716 Nontemporal
+ OpStore %180 %753
+ %175 = OpIAdd %6 %174 %232
+ %754 = OpLoad %193 %195 Nontemporal
+ OpStore %195 %724
+ OpStore %195 %754
+ OpStore %152 %175 Volatile|Nontemporal
+ %755 = OpLoad %193 %195 Volatile|Nontemporal
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %755 Volatile
+ %445 = OpVectorShuffle %178 %199 %433 1 1
+ OpBranch %153
+ %155 = OpLabel
+ %756 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %756
+ %446 = OpVectorShuffle %178 %1106 %1106 2 0
+ %757 = OpLoad %6 %152
+ OpStore %152 %718
+ OpStore %152 %757 Volatile|Nontemporal
+ %176 = OpFunctionCall %2 %18
+ %758 = OpLoad %24 %26
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %758 Volatile
+ %184 = OpLoad %181 %183 Nontemporal
+ %759 = OpLoad %178 %180
+ OpStore %180 %716
+ OpStore %180 %759
+ %447 = OpVectorShuffle %178 %1106 %1106 3 1
+ %760 = OpLoad %178 %180 Nontemporal
+ OpStore %180 %716
+ OpStore %180 %760 Nontemporal
+ %185 = OpVectorShuffle %178 %184 %184 0 1
+ %448 = OpVectorShuffle %193 %185 %446 1 3 3
+ %761 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %761
+ %190 = OpAccessChain %189 %188 %27
+ %762 = OpLoad %178 %180
+ OpStore %180 %716
+ OpStore %180 %762 Nontemporal
+ %191 = OpLoad %178 %190
+ %763 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720 Volatile
+ OpStore %26 %763 Volatile|Nontemporal
+ %449 = OpVectorShuffle %193 %184 %199 1 6 3
+ %764 = OpLoad %193 %195
+ OpStore %195 %724 Volatile
+ OpStore %195 %764
+ %192 = OpFDiv %178 %185 %191
+ %765 = OpLoad %24 %26
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %765 Volatile
+ %450 = OpVectorShuffle %178 %185 %447 2 1
+ %766 = OpLoad %193 %195
+ OpStore %195 %724 Volatile|Nontemporal
+ %767 = OpLoad %193 %195 Volatile
+ OpStore %195 %724
+ OpStore %195 %767
+ OpStore %195 %766 Nontemporal
+ OpStore %180 %192
+ OpStore %195 %199 Volatile
+ %768 = OpLoad %193 %195 Nontemporal
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %768 Volatile|Nontemporal
+ %451 = OpVectorShuffle %193 %185 %446 0 1 3
+ %769 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %769 Volatile|Nontemporal
+ %200 = OpInBoundsAccessChain %29 %26 %27 %203
+ %770 = OpLoad %6 %200
+ OpStore %200 %718
+ OpStore %200 %770
+ %201 = OpLoad %6 %200 Nontemporal
+ %202 = OpConvertSToF %177 %201
+ %771 = OpLoad %24 %26
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %771 Nontemporal
+ %205 = OpInBoundsAccessChain %204 %195 %27
+ %772 = OpLoad %6 %200 Volatile|Nontemporal
+ OpStore %200 %718 Nontemporal
+ OpStore %200 %772
+ %206 = OpLoad %177 %205 Volatile|Nontemporal
+ %773 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %773 Nontemporal
+ %452 = OpVectorShuffle %178 %191 %199 4 3
+ %774 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718
+ OpStore %152 %774
+ %207 = OpFAdd %177 %206 %202
+ %775 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %775 Volatile
+ %208 = OpInBoundsAccessChain %204 %195 %203
+ %453 = OpVectorShuffle %193 %451 %450 0 3 4
+ OpStore %208 %207 Nontemporal
+ %776 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716
+ OpStore %180 %776
+ %209 = OpInBoundsAccessChain %204 %180 %27
+ %777 = OpLoad %178 %180
+ OpStore %180 %716 Nontemporal
+ OpStore %180 %777
+ %454 = OpVectorShuffle %178 %184 %184 5 5
+ %210 = OpLoad %177 %209 None
+ %455 = OpVectorShuffle %178 %448 %192 4 3
+ %778 = OpLoad %177 %209 Volatile
+ OpStore %209 %715 Volatile|Nontemporal
+ OpStore %209 %778
+ %212 = OpFOrdGreaterThan %58 %210 %211
+ %779 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %779 Volatile|Nontemporal
+ OpSelectionMerge %214 DontFlatten
+ OpBranchConditional %212 %213 %214 297866848 317602926
+ %213 = OpLabel
+ %780 = OpLoad %6 %152
+ OpStore %152 %718 Volatile|Nontemporal
+ OpStore %152 %780 Volatile
+ %215 = OpInBoundsAccessChain %29 %26 %27 %46
+ %781 = OpLoad %6 %200 Nontemporal
+ OpStore %200 %718
+ OpStore %200 %781
+ %456 = OpVectorShuffle %193 %1106 %448 1 3 3
+ %782 = OpLoad %177 %209
+ OpStore %209 %715
+ OpStore %209 %782 Nontemporal
+ %216 = OpLoad %6 %215
+ %783 = OpLoad %24 %26
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %783 Volatile|Nontemporal
+ %457 = OpVectorShuffle %178 %454 %454 0 2
+ %217 = OpConvertSToF %177 %216
+ %784 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716
+ OpStore %180 %784
+ %218 = OpInBoundsAccessChain %204 %195 %613
+ %785 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %785 Volatile|Nontemporal
+ %458 = OpVectorShuffle %178 %1106 %199 4 1
+ %786 = OpLoad %6 %152 Volatile|Nontemporal
+ OpStore %152 %718
+ OpStore %152 %786
+ %219 = OpLoad %177 %218 Volatile
+ %787 = OpLoad %177 %218 Volatile
+ OpStore %218 %715
+ OpStore %218 %787 Volatile|Nontemporal
+ %220 = OpFAdd %177 %217 %219
+ %788 = OpLoad %193 %195
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %788
+ %221 = OpInBoundsAccessChain %204 %195 %203
+ %789 = OpLoad %193 %195
+ OpStore %195 %724 Volatile
+ OpStore %195 %789 Nontemporal
+ %459 = OpVectorShuffle %193 %454 %447 1 1 3
+ %790 = OpLoad %177 %218
+ OpStore %218 %715 Nontemporal
+ OpStore %218 %790 Volatile|Nontemporal
+ OpStore %221 %220 Nontemporal
+ %791 = OpLoad %6 %200
+ OpStore %200 %718 Volatile|Nontemporal
+ OpStore %200 %791
+ OpBranch %214
+ %214 = OpLabel
+ %792 = OpLoad %177 %209 Volatile|Nontemporal
+ OpStore %209 %715 Nontemporal
+ OpStore %209 %792 Nontemporal
+ %222 = OpAccessChain %204 %180 %27
+ %793 = OpLoad %177 %209
+ OpStore %209 %715
+ OpStore %209 %793
+ %223 = OpLoad %177 %222 Volatile
+ %794 = OpLoad %177 %222
+ OpStore %222 %715
+ OpStore %222 %794
+ %460 = OpVectorShuffle %193 %1106 %453 4 3 3
+ %795 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716 Volatile
+ OpStore %180 %795
+ %225 = OpFOrdGreaterThan %58 %223 %224
+ %796 = OpLoad %177 %222 Volatile|Nontemporal
+ OpStore %222 %715
+ OpStore %222 %796
+ %461 = OpVectorShuffle %178 %1106 %192 1 1
+ %797 = OpLoad %177 %222
+ OpStore %222 %715 Nontemporal
+ OpStore %222 %797 Nontemporal
+ OpSelectionMerge %227 Flatten
+ OpBranchConditional %225 %226 %227 1102835328 1837964260
+ %226 = OpLabel
+ %798 = OpLoad %177 %222 Nontemporal
+ OpStore %222 %715 Volatile
+ OpStore %222 %798 Volatile|Nontemporal
+ %462 = OpVectorShuffle %178 %1106 %446 2 2
+ %799 = OpLoad %177 %205 Volatile
+ OpStore %205 %715 Nontemporal
+ OpStore %205 %799 Nontemporal
+ %229 = OpAccessChain %29 %26 %27 %247
+ %800 = OpLoad %177 %205 Nontemporal
+ OpStore %205 %715 Volatile
+ OpStore %205 %800 Volatile|Nontemporal
+ %463 = OpVectorShuffle %193 %461 %453 2 4 1
+ %801 = OpLoad %177 %208 Nontemporal
+ OpStore %208 %715 Nontemporal
+ OpStore %208 %801 Nontemporal
+ %230 = OpLoad %6 %229
+ %802 = OpLoad %177 %209
+ OpStore %209 %715
+ OpStore %209 %802
+ %231 = OpConvertSToF %177 %230
+ %803 = OpLoad %177 %205
+ OpStore %205 %715 Nontemporal
+ OpStore %205 %803
+ %233 = OpAccessChain %204 %195 %46
+ %804 = OpLoad %6 %229 Nontemporal
+ OpStore %229 %718 Nontemporal
+ OpStore %229 %804
+ %464 = OpVectorShuffle %178 %450 %191 1 2
+ %805 = OpLoad %177 %233
+ OpStore %233 %715 Volatile|Nontemporal
+ OpStore %233 %805
+ %234 = OpLoad %177 %233 Volatile|Nontemporal
+ %806 = OpLoad %6 %229
+ OpStore %229 %718 Volatile|Nontemporal
+ OpStore %229 %806 Nontemporal
+ %465 = OpVectorShuffle %178 %185 %463 2 0
+ %807 = OpLoad %177 %208
+ OpStore %208 %715
+ OpStore %208 %807 Nontemporal
+ %235 = OpFAdd %177 %231 %234
+ %236 = OpInBoundsAccessChain %204 %195 %46
+ %808 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718
+ OpStore %152 %808
+ %466 = OpVectorShuffle %178 %1106 %455 3 1
+ %809 = OpLoad %6 %152
+ OpStore %152 %718 Nontemporal
+ OpStore %152 %809 Nontemporal
+ OpStore %236 %235 Nontemporal
+ %810 = OpLoad %177 %209 Nontemporal
+ OpStore %209 %715
+ OpStore %209 %810 Nontemporal
+ OpBranch %227
+ %227 = OpLabel
+ %237 = OpInBoundsAccessChain %204 %180 %613
+ %811 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718 Nontemporal
+ OpStore %152 %811
+ %467 = OpVectorShuffle %178 %1106 %191 2 2
+ %812 = OpLoad %177 %222
+ OpStore %222 %715 Volatile|Nontemporal
+ OpStore %222 %812
+ %238 = OpLoad %177 %237
+ %813 = OpLoad %193 %195
+ OpStore %195 %724
+ OpStore %195 %813
+ %240 = OpFOrdGreaterThan %58 %238 %239
+ %814 = OpLoad %177 %208 Nontemporal
+ OpStore %208 %715
+ OpStore %208 %814
+ OpSelectionMerge %242 None
+ OpBranchConditional %240 %241 %242 375465870 1211107696
+ %241 = OpLabel
+ %815 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %815
+ %244 = OpAccessChain %29 %26 %27 %243
+ %245 = OpLoad %6 %244
+ %816 = OpLoad %177 %208
+ OpStore %208 %715
+ OpStore %208 %816
+ %246 = OpConvertSToF %177 %245
+ %817 = OpLoad %24 %26
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %817
+ %468 = OpVectorShuffle %193 %191 %467 2 2 2
+ %818 = OpLoad %177 %237
+ OpStore %237 %715
+ OpStore %237 %818
+ %248 = OpAccessChain %204 %195 %228
+ %819 = OpLoad %177 %222
+ OpStore %222 %715
+ OpStore %222 %819
+ %249 = OpLoad %177 %248
+ %820 = OpLoad %193 %195
+ OpStore %195 %724
+ OpStore %195 %820
+ %469 = OpVectorShuffle %193 %467 %191 0 3 1
+ %821 = OpLoad %177 %248 Nontemporal
+ OpStore %248 %715 Nontemporal
+ OpStore %248 %821
+ %250 = OpFAdd %177 %249 %246
+ %822 = OpLoad %6 %200 Nontemporal
+ OpStore %200 %718
+ OpStore %200 %822 Nontemporal
+ %470 = OpVectorShuffle %178 %1106 %184 0 1
+ %251 = OpAccessChain %204 %195 %247
+ %823 = OpLoad %177 %248 Volatile
+ OpStore %248 %715
+ OpStore %248 %823 Volatile|Nontemporal
+ OpStore %251 %250
+ %824 = OpLoad %178 %180 Nontemporal
+ OpStore %180 %716
+ OpStore %180 %824 Nontemporal
+ %471 = OpVectorShuffle %178 %470 %192 1 1
+ OpBranch %242
+ %242 = OpLabel
+ %825 = OpLoad %177 %237
+ OpStore %237 %715
+ OpStore %237 %825
+ %472 = OpVectorShuffle %193 %454 %454 0 3 1
+ %253 = OpInBoundsAccessChain %29 %26 %27 %252
+ %254 = OpLoad %6 %253 Volatile
+ %826 = OpLoad %177 %237
+ OpStore %237 %715
+ OpStore %237 %826
+ %255 = OpConvertSToF %177 %254
+ %827 = OpLoad %193 %195 Volatile|Nontemporal
+ OpStore %195 %724
+ OpStore %195 %827 Nontemporal
+ %473 = OpVectorShuffle %193 %453 %446 4 0 0
+ %828 = OpLoad %6 %253 Volatile|Nontemporal
+ OpStore %253 %718 Volatile
+ OpStore %253 %828
+ %256 = OpAccessChain %204 %195 %46
+ %474 = OpVectorShuffle %178 %184 %191 4 2
+ %829 = OpLoad %177 %209
+ OpStore %209 %715
+ OpStore %209 %829
+ %257 = OpLoad %177 %256 None
+ %258 = OpFAdd %177 %257 %255
+ %830 = OpLoad %177 %256 Volatile
+ OpStore %256 %715 Volatile
+ OpStore %256 %830
+ %475 = OpVectorShuffle %178 %467 %450 0 2
+ %831 = OpLoad %177 %222
+ OpStore %222 %715 Volatile
+ OpStore %222 %831
+ %259 = OpInBoundsAccessChain %204 %195 %46
+ %832 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %832
+ %476 = OpVectorShuffle %178 %460 %451 5 1
+ OpStore %259 %258
+ %477 = OpVectorShuffle %193 %472 %1106 3 0 4
+ %833 = OpLoad %177 %209 Nontemporal
+ OpStore %209 %715
+ OpStore %209 %833
+ %260 = OpInBoundsAccessChain %204 %180 %46
+ %834 = OpLoad %177 %205
+ OpStore %205 %715 Volatile|Nontemporal
+ OpStore %205 %834
+ %478 = OpVectorShuffle %178 %461 %472 2 3
+ %835 = OpLoad %177 %260 Volatile
+ OpStore %260 %715
+ OpStore %260 %835 Volatile
+ %261 = OpLoad %177 %260 Volatile
+ %836 = OpLoad %6 %152 Volatile
+ OpStore %152 %718 Volatile|Nontemporal
+ OpStore %152 %836
+ %479 = OpVectorShuffle %193 %1106 %454 1 3 0
+ %837 = OpLoad %6 %200 Volatile
+ OpStore %200 %718 Volatile
+ OpStore %200 %837
+ %262 = OpFOrdGreaterThan %58 %261 %211
+ %838 = OpLoad %177 %259 Nontemporal
+ OpStore %259 %715
+ OpStore %259 %838
+ %480 = OpVectorShuffle %193 %446 %1106 0 0 3
+ %839 = OpLoad %177 %209 Volatile
+ OpStore %209 %715
+ OpStore %209 %839 Nontemporal
+ OpSelectionMerge %264 Flatten
+ OpBranchConditional %262 %263 %264
+ %263 = OpLabel
+ %266 = OpInBoundsAccessChain %29 %26 %27 %609
+ %481 = OpVectorShuffle %178 %480 %447 3 2
+ %840 = OpLoad %193 %195
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %840 Nontemporal
+ %267 = OpLoad %6 %266 Volatile
+ %841 = OpLoad %177 %205 Volatile
+ OpStore %205 %715 Volatile|Nontemporal
+ OpStore %205 %841
+ %268 = OpConvertSToF %177 %267
+ %842 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718
+ OpStore %152 %842
+ %269 = OpAccessChain %204 %195 %27
+ %843 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718 Nontemporal
+ OpStore %152 %843 Nontemporal
+ %270 = OpLoad %177 %269 Volatile|Nontemporal
+ %844 = OpLoad %177 %237 Volatile|Nontemporal
+ OpStore %237 %715 Nontemporal
+ OpStore %237 %844
+ %482 = OpVectorShuffle %193 %475 %455 2 1 3
+ %845 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %845 Nontemporal
+ %271 = OpFAdd %177 %268 %270
+ %846 = OpLoad %177 %260
+ OpStore %260 %715
+ OpStore %260 %846 Nontemporal
+ %272 = OpInBoundsAccessChain %204 %195 %27
+ %847 = OpLoad %6 %152 Volatile|Nontemporal
+ OpStore %152 %718 Volatile|Nontemporal
+ OpStore %152 %847
+ %483 = OpVectorShuffle %193 %184 %192 3 3 4
+ %848 = OpLoad %177 %209 Nontemporal
+ OpStore %209 %715
+ OpStore %209 %848 Nontemporal
+ OpStore %272 %271 Nontemporal
+ %484 = OpVectorShuffle %193 %450 %454 3 0 3
+ %849 = OpLoad %177 %209 Volatile|Nontemporal
+ OpStore %209 %715
+ OpStore %209 %849 Nontemporal
+ OpBranch %264
+ %264 = OpLabel
+ %850 = OpLoad %177 %205 Volatile|Nontemporal
+ OpStore %205 %715
+ OpStore %205 %850
+ %485 = OpVectorShuffle %193 %450 %467 2 1 0
+ %851 = OpLoad %177 %260
+ OpStore %260 %715
+ OpStore %260 %851
+ %273 = OpAccessChain %204 %180 %46
+ %852 = OpLoad %6 %253 Nontemporal
+ OpStore %253 %718 Nontemporal
+ OpStore %253 %852 Volatile
+ %274 = OpLoad %177 %273 Nontemporal
+ %853 = OpLoad %6 %200
+ OpStore %200 %718 Volatile|Nontemporal
+ OpStore %200 %853 Volatile
+ %275 = OpFOrdGreaterThan %58 %274 %224
+ OpSelectionMerge %277 DontFlatten
+ OpBranchConditional %275 %276 %277 2033075931 984137025
+ %276 = OpLabel
+ %854 = OpLoad %177 %222
+ OpStore %222 %715 Nontemporal
+ OpStore %222 %854 Volatile|Nontemporal
+ %486 = OpVectorShuffle %178 %455 %480 3 1
+ %279 = OpInBoundsAccessChain %29 %26 %27 %610
+ %855 = OpLoad %177 %256
+ OpStore %256 %715 Nontemporal
+ OpStore %256 %855
+ %487 = OpVectorShuffle %178 %449 %480 2 1
+ %856 = OpLoad %177 %273 Nontemporal
+ OpStore %273 %715 Nontemporal
+ OpStore %273 %856
+ %280 = OpLoad %6 %279 Nontemporal
+ %857 = OpLoad %177 %260 Volatile
+ OpStore %260 %715
+ OpStore %260 %857 Nontemporal
+ %281 = OpConvertSToF %177 %280
+ %858 = OpLoad %6 %152 Nontemporal
+ OpStore %152 %718 Nontemporal
+ OpStore %152 %858 Volatile|Nontemporal
+ %282 = OpInBoundsAccessChain %204 %195 %232
+ %859 = OpLoad %6 %253 Nontemporal
+ OpStore %253 %718 Volatile|Nontemporal
+ OpStore %253 %859
+ %488 = OpVectorShuffle %178 %473 %473 2 1
+ %283 = OpLoad %177 %282 Nontemporal
+ %860 = OpLoad %178 %180 Volatile|Nontemporal
+ OpStore %180 %716
+ OpStore %180 %860
+ %284 = OpFAdd %177 %281 %283
+ %861 = OpLoad %177 %208 Nontemporal
+ OpStore %208 %715 Volatile|Nontemporal
+ OpStore %208 %861
+ %489 = OpVectorShuffle %178 %475 %485 1 0
+ %862 = OpLoad %6 %279
+ OpStore %279 %718 Nontemporal
+ OpStore %279 %862 Volatile|Nontemporal
+ %285 = OpAccessChain %204 %195 %46
+ %863 = OpLoad %6 %279
+ OpStore %279 %718
+ OpStore %279 %863
+ %490 = OpVectorShuffle %178 %191 %480 4 4
+ %864 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %864 Nontemporal
+ OpStore %285 %284 Volatile
+ %865 = OpLoad %177 %208
+ OpStore %208 %715
+ OpStore %208 %865
+ %491 = OpVectorShuffle %178 %199 %454 1 3
+ %866 = OpLoad %177 %259
+ OpStore %259 %715 Nontemporal
+ OpStore %259 %866 Volatile
+ OpBranch %277
+ %277 = OpLabel
+ %492 = OpVectorShuffle %178 %455 %446 1 1
+ %867 = OpLoad %177 %205
+ OpStore %205 %715 Nontemporal
+ OpStore %205 %867 Nontemporal
+ %286 = OpInBoundsAccessChain %204 %180 %46
+ %287 = OpLoad %177 %286
+ %868 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720
+ OpStore %26 %868 Volatile
+ %493 = OpVectorShuffle %178 %475 %475 2 3
+ %869 = OpLoad %177 %237
+ OpStore %237 %715
+ OpStore %237 %869 Nontemporal
+ %288 = OpFOrdGreaterThan %58 %287 %239
+ %870 = OpLoad %177 %259 Volatile|Nontemporal
+ OpStore %259 %715 Volatile
+ OpStore %259 %870 Volatile|Nontemporal
+ %494 = OpVectorShuffle %193 %191 %191 0 3 1
+ %871 = OpLoad %6 %253 Volatile|Nontemporal
+ OpStore %253 %718
+ OpStore %253 %871
+ OpSelectionMerge %290 Flatten
+ OpBranchConditional %288 %289 %290 1247273612 1161852769
+ %289 = OpLabel
+ %872 = OpLoad %193 %195 Nontemporal
+ OpStore %195 %724 Volatile|Nontemporal
+ OpStore %195 %872
+ %292 = OpAccessChain %29 %26 %27 %291
+ %873 = OpLoad %177 %208
+ OpStore %208 %715 Volatile
+ OpStore %208 %873 Volatile
+ %495 = OpVectorShuffle %193 %192 %451 1 0 1
+ %874 = OpLoad %193 %195 Nontemporal
+ OpStore %195 %724 Nontemporal
+ OpStore %195 %874 Nontemporal
+ %293 = OpLoad %6 %292 Volatile
+ %875 = OpLoad %177 %222
+ OpStore %222 %715 Nontemporal
+ OpStore %222 %875
+ %496 = OpVectorShuffle %193 %475 %467 0 3 2
+ %876 = OpLoad %177 %259 Nontemporal
+ OpStore %259 %715 Nontemporal
+ OpStore %259 %876
+ %294 = OpConvertSToF %177 %293
+ %497 = OpVectorShuffle %178 %477 %461 0 4
+ %877 = OpLoad %6 %200
+ OpStore %200 %718 Nontemporal
+ OpStore %200 %877
+ %295 = OpAccessChain %204 %195 %247
+ %878 = OpLoad %177 %259 Nontemporal
+ OpStore %259 %715
+ OpStore %259 %878
+ %498 = OpVectorShuffle %193 %478 %497 0 1 0
+ %879 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %879 Volatile
+ %296 = OpLoad %177 %295 Nontemporal
+ %880 = OpLoad %177 %273 Nontemporal
+ OpStore %273 %715
+ OpStore %273 %880 Nontemporal
+ %499 = OpVectorShuffle %178 %184 %455 0 1
+ %881 = OpLoad %177 %209 Volatile
+ OpStore %209 %715
+ OpStore %209 %881
+ %297 = OpFAdd %177 %294 %296
+ %882 = OpLoad %177 %286
+ OpStore %286 %715
+ OpStore %286 %882 Volatile|Nontemporal
+ %298 = OpInBoundsAccessChain %204 %195 %247
+ %883 = OpLoad %177 %273 Volatile
+ OpStore %273 %715
+ OpStore %273 %883
+ %500 = OpVectorShuffle %193 %494 %499 4 4 2
+ %884 = OpLoad %177 %298
+ OpStore %298 %715 Volatile
+ OpStore %298 %884
+ OpStore %298 %297 Nontemporal
+ %885 = OpLoad %177 %256 Volatile|Nontemporal
+ OpStore %256 %715 Nontemporal
+ OpStore %256 %885 Volatile|Nontemporal
+ %501 = OpVectorShuffle %178 %453 %192 0 2
+ %886 = OpLoad %177 %205 Nontemporal
+ OpStore %205 %715
+ OpStore %205 %886
+ OpBranch %290
+ %290 = OpLabel
+ %887 = OpLoad %6 %152
+ OpStore %152 %718 Nontemporal
+ OpStore %152 %887
+ %502 = OpVectorShuffle %178 %192 %451 3 1
+ %888 = OpLoad %178 %180
+ OpStore %180 %716
+ OpStore %180 %888
+ %300 = OpAccessChain %29 %26 %27 %299
+ %301 = OpLoad %6 %300 Volatile
+ %889 = OpLoad %6 %152
+ OpStore %152 %718
+ OpStore %152 %889
+ %503 = OpVectorShuffle %178 %185 %451 0 4
+ %890 = OpLoad %6 %300
+ OpStore %300 %718 Nontemporal
+ OpStore %300 %890 Volatile
+ %302 = OpConvertSToF %177 %301
+ %891 = OpLoad %177 %256 Volatile|Nontemporal
+ OpStore %256 %715
+ OpStore %256 %891
+ %504 = OpVectorShuffle %178 %1106 %453 3 0
+ %892 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %892
+ %303 = OpAccessChain %204 %195 %247
+ %505 = OpVectorShuffle %193 %504 %1106 0 1 0
+ %893 = OpLoad %177 %303
+ OpStore %303 %715
+ OpStore %303 %893
+ %304 = OpLoad %177 %303 None
+ %894 = OpLoad %177 %208 Volatile|Nontemporal
+ OpStore %208 %715 Volatile
+ OpStore %208 %894 Volatile
+ %506 = OpVectorShuffle %178 %493 %492 0 2
+ %895 = OpLoad %6 %253
+ OpStore %253 %718 Nontemporal
+ OpStore %253 %895
+ %305 = OpFAdd %177 %304 %302
+ %896 = OpLoad %177 %286 Nontemporal
+ OpStore %286 %715
+ OpStore %286 %896 Volatile|Nontemporal
+ %507 = OpVectorShuffle %178 %447 %461 2 0
+ %897 = OpLoad %177 %259 Volatile|Nontemporal
+ OpStore %259 %715 Nontemporal
+ OpStore %259 %897 Volatile
+ %306 = OpAccessChain %204 %195 %228
+ OpStore %306 %305
+ %898 = OpLoad %178 %180 Nontemporal
+ OpStore %180 %716 Nontemporal
+ OpStore %180 %898
+ %307 = OpInBoundsAccessChain %204 %180 %27
+ %899 = OpLoad %177 %222
+ OpStore %222 %715
+ OpStore %222 %899 Volatile|Nontemporal
+ %508 = OpVectorShuffle %193 %461 %506 1 0 3
+ %900 = OpLoad %177 %222
+ OpStore %222 %715 Nontemporal
+ OpStore %222 %900 Volatile|Nontemporal
+ %308 = OpLoad %177 %307
+ %901 = OpLoad %177 %259 Nontemporal
+ OpStore %259 %715 Volatile
+ OpStore %259 %901 Nontemporal
+ %309 = OpInBoundsAccessChain %204 %180 %46
+ %509 = OpVectorShuffle %193 %448 %503 4 3 2
+ %902 = OpLoad %177 %260
+ OpStore %260 %715 Nontemporal
+ OpStore %260 %902 Nontemporal
+ %310 = OpLoad %177 %309 Volatile
+ %903 = OpLoad %177 %260 Nontemporal
+ OpStore %260 %715 Nontemporal
+ OpStore %260 %903
+ %311 = OpFSub %177 %308 %310
+ %904 = OpLoad %177 %306 Volatile|Nontemporal
+ OpStore %306 %715 Volatile|Nontemporal
+ OpStore %306 %904 Volatile|Nontemporal
+ %510 = OpVectorShuffle %193 %199 %485 1 4 5
+ %905 = OpLoad %177 %306
+ OpStore %306 %715 Nontemporal
+ OpStore %306 %905 Volatile
+ %312 = OpExtInst %177 %1 FAbs %311
+ %906 = OpLoad %6 %152
+ OpStore %152 %718 Volatile
+ OpStore %152 %906
+ %511 = OpVectorShuffle %178 %485 %1106 2 1
+ %907 = OpLoad %193 %195
+ OpStore %195 %724
+ OpStore %195 %907
+ %313 = OpFOrdLessThan %58 %312 %211
+ %908 = OpLoad %177 %260 Nontemporal
+ OpStore %260 %715
+ OpStore %260 %908 Volatile|Nontemporal
+ %512 = OpVectorShuffle %193 %451 %455 4 4 4
+ %909 = OpLoad %6 %253
+ OpStore %253 %718
+ OpStore %253 %909 Volatile|Nontemporal
+ OpSelectionMerge %315 None
+ OpBranchConditional %313 %314 %315 1522367853 2100084000
+ %314 = OpLabel
+ %910 = OpLoad %177 %209
+ OpStore %209 %715
+ OpStore %209 %910 Volatile
+ %316 = OpAccessChain %29 %26 %27 %605
+ %911 = OpLoad %24 %26
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %911
+ %513 = OpVectorShuffle %193 %448 %505 5 3 0
+ %912 = OpLoad %6 %300
+ OpStore %300 %718 Nontemporal
+ OpStore %300 %912 Volatile
+ %317 = OpLoad %6 %316 Volatile|Nontemporal
+ %318 = OpConvertSToF %177 %317
+ %514 = OpVectorShuffle %193 %474 %450 1 1 1
+ %319 = OpInBoundsAccessChain %204 %195 %27
+ %913 = OpLoad %177 %260
+ OpStore %260 %715
+ OpStore %260 %913
+ %320 = OpLoad %177 %319
+ %914 = OpLoad %177 %286
+ OpStore %286 %715 Volatile|Nontemporal
+ OpStore %286 %914 Nontemporal
+ %515 = OpVectorShuffle %178 %476 %502 2 3
+ %915 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %915 Volatile
+ %321 = OpFAdd %177 %318 %320
+ %916 = OpLoad %193 %195
+ OpStore %195 %724
+ OpStore %195 %916
+ %516 = OpVectorShuffle %178 %451 %452 3 3
+ %917 = OpLoad %178 %180
+ OpStore %180 %716 Volatile|Nontemporal
+ OpStore %180 %917
+ %322 = OpInBoundsAccessChain %204 %195 %27
+ %918 = OpLoad %177 %209
+ OpStore %209 %715 Nontemporal
+ OpStore %209 %918
+ %517 = OpVectorShuffle %193 %1106 %461 0 0 1
+ OpStore %322 %321 Volatile|Nontemporal
+ %919 = OpLoad %177 %322
+ OpStore %322 %715
+ OpStore %322 %919 Volatile|Nontemporal
+ %518 = OpVectorShuffle %193 %480 %508 1 3 0
+ %920 = OpLoad %177 %205
+ OpStore %205 %715
+ OpStore %205 %920 Volatile|Nontemporal
+ OpBranch %315
+ %315 = OpLabel
+ %921 = OpLoad %177 %309 Nontemporal
+ OpStore %309 %715 Volatile
+ OpStore %309 %921 Volatile|Nontemporal
+ %325 = OpLoad %193 %195
+ %922 = OpLoad %177 %237 Volatile
+ OpStore %237 %715
+ OpStore %237 %922
+ %519 = OpVectorShuffle %193 %446 %447 2 0 1
+ %326 = OpExtInst %193 %1 Normalize %325
+ %923 = OpLoad %177 %209
+ OpStore %209 %715
+ OpStore %209 %923
+ %327 = OpCompositeExtract %177 %326 0
+ %924 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %924
+ %328 = OpCompositeExtract %177 %326 1
+ %925 = OpLoad %24 %26
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %925
+ %329 = OpCompositeExtract %177 %326 2
+ %926 = OpLoad %177 %259 Volatile
+ OpStore %259 %715
+ OpStore %259 %926
+ %520 = OpVectorShuffle %178 %519 %506 4 1
+ %927 = OpLoad %177 %259
+ OpStore %259 %715
+ OpStore %259 %927 Volatile|Nontemporal
+ %330 = OpCompositeConstruct %181 %327 %328 %329 %196
+ %928 = OpLoad %177 %309
+ OpStore %309 %715
+ OpStore %309 %928 Volatile
+ %521 = OpVectorShuffle %193 %199 %520 1 1 4
+ %929 = OpLoad %177 %222
+ OpStore %222 %715 Nontemporal
+ OpStore %222 %929
+ OpStore %324 %330
+ %930 = OpLoad %24 %26
+ OpStore %26 %720 Nontemporal
+ OpStore %26 %930 Nontemporal
+ %522 = OpVectorShuffle %193 %493 %330 5 3 0
+ %931 = OpLoad %177 %208 Nontemporal
+ OpStore %208 %715
+ OpStore %208 %931
+ OpReturn
+ OpFunctionEnd
+ %11 = OpFunction %2 DontInline %8
+ %9 = OpFunctionParameter %7
+ %10 = OpFunctionParameter %7
+ %12 = OpLabel
+ %20 = OpVariable %7 Function
+ %932 = OpLoad %6 %20 Volatile|Nontemporal
+ OpStore %20 %718 Volatile|Nontemporal
+ OpStore %20 %932
+ %523 = OpVectorShuffle %193 %199 %199 5 4 5
+ %933 = OpLoad %6 %9 Volatile|Nontemporal
+ OpStore %9 %718
+ OpStore %9 %933
+ %28 = OpLoad %6 %9
+ %934 = OpLoad %6 %10
+ OpStore %10 %718
+ OpStore %10 %934 Volatile|Nontemporal
+ %524 = OpVectorShuffle %193 %523 %523 1 0 4
+ %935 = OpLoad %6 %20
+ OpStore %20 %718
+ OpStore %20 %935 Volatile|Nontemporal
+ %30 = OpAccessChain %29 %26 %27 %28
+ %936 = OpLoad %6 %30 Nontemporal
+ OpStore %30 %718 Nontemporal
+ OpStore %30 %936
+ %31 = OpLoad %6 %30 None
+ %937 = OpLoad %6 %20
+ OpStore %20 %718 Nontemporal
+ OpStore %20 %937 Volatile|Nontemporal
+ OpStore %20 %31
+ %938 = OpLoad %6 %10
+ OpStore %10 %718
+ OpStore %10 %938
+ %525 = OpVectorShuffle %193 %523 %199 2 3 1
+ %939 = OpLoad %6 %9 Nontemporal
+ OpStore %9 %718
+ OpStore %9 %939
+ %32 = OpLoad %6 %9 None
+ %940 = OpLoad %6 %30
+ OpStore %30 %718
+ OpStore %30 %940
+ %33 = OpLoad %6 %10 Volatile
+ %941 = OpLoad %6 %9
+ OpStore %9 %718
+ OpStore %9 %941
+ %526 = OpVectorShuffle %193 %523 %525 3 5 5
+ %942 = OpLoad %6 %30 Nontemporal
+ OpStore %30 %718 Nontemporal
+ OpStore %30 %942 Nontemporal
+ %34 = OpAccessChain %29 %26 %27 %33
+ %35 = OpLoad %6 %34 Volatile|Nontemporal
+ %943 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720
+ OpStore %26 %943
+ %527 = OpVectorShuffle %178 %199 %526 3 3
+ %36 = OpInBoundsAccessChain %29 %26 %27 %32
+ %528 = OpVectorShuffle %193 %527 %524 2 4 2
+ OpStore %36 %35 Nontemporal
+ %944 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720
+ OpStore %26 %944
+ %529 = OpVectorShuffle %193 %526 %199 1 2 0
+ %945 = OpLoad %6 %9
+ OpStore %9 %718
+ OpStore %9 %945 Volatile
+ %37 = OpLoad %6 %10 Volatile
+ %946 = OpLoad %6 %20 Volatile|Nontemporal
+ OpStore %20 %718
+ OpStore %20 %946
+ %530 = OpVectorShuffle %178 %528 %529 5 4
+ %947 = OpLoad %6 %34 Nontemporal
+ OpStore %34 %718
+ OpStore %34 %947 Volatile
+ %38 = OpLoad %6 %20 Volatile|Nontemporal
+ %948 = OpLoad %6 %10
+ OpStore %10 %718
+ OpStore %10 %948
+ %531 = OpVectorShuffle %193 %526 %527 3 1 0
+ %949 = OpLoad %6 %36
+ OpStore %36 %718
+ OpStore %36 %949 Volatile
+ %39 = OpInBoundsAccessChain %29 %26 %27 %37
+ %950 = OpLoad %24 %26
+ OpStore %26 %720 Volatile
+ OpStore %26 %950 Nontemporal
+ %532 = OpVectorShuffle %193 %528 %528 0 4 3
+ %951 = OpLoad %6 %34 Nontemporal
+ OpStore %34 %718 Nontemporal
+ OpStore %34 %951
+ OpStore %39 %38 Volatile|Nontemporal
+ OpReturn
+ OpFunctionEnd
+ %16 = OpFunction %6 DontInline %13
+ %14 = OpFunctionParameter %7
+ %15 = OpFunctionParameter %7
+ %17 = OpLabel
+ %80 = OpVariable %7 Function
+ %44 = OpVariable %7 Function
+ %48 = OpVariable %7 Function
+ %78 = OpVariable %7 Function
+ %71 = OpVariable %7 Function
+ %69 = OpVariable %7 Function
+ %40 = OpVariable %7 Function
+ %952 = OpLoad %6 %15 Volatile|Nontemporal
+ OpStore %15 %718 Nontemporal
+ OpStore %15 %952
+ %41 = OpLoad %6 %15
+ %953 = OpLoad %6 %14
+ OpStore %14 %718
+ OpStore %14 %953
+ %42 = OpAccessChain %29 %26 %27 %41
+ %954 = OpLoad %6 %42
+ OpStore %42 %718 Nontemporal
+ OpStore %42 %954 Volatile
+ %43 = OpLoad %6 %42 Volatile
+ %955 = OpLoad %6 %80
+ OpStore %80 %718
+ OpStore %80 %955
+ %534 = OpVectorShuffle %193 %199 %199 2 0 2
+ %956 = OpLoad %6 %71
+ OpStore %71 %718 Volatile|Nontemporal
+ OpStore %71 %956 Nontemporal
+ OpStore %40 %43 Volatile|Nontemporal
+ %45 = OpLoad %6 %14 Nontemporal
+ %957 = OpLoad %6 %15
+ OpStore %15 %718 Nontemporal
+ OpStore %15 %957
+ %47 = OpISub %6 %45 %232
+ %958 = OpLoad %6 %48 Nontemporal
+ OpStore %48 %718 Nontemporal
+ OpStore %48 %958 Volatile
+ %535 = OpVectorShuffle %193 %534 %534 4 2 4
+ %959 = OpLoad %6 %14 Volatile|Nontemporal
+ OpStore %14 %718 Volatile
+ OpStore %14 %959
+ OpStore %44 %47
+ %49 = OpLoad %6 %14
+ %536 = OpVectorShuffle %193 %534 %535 0 2 3
+ OpStore %48 %159
+ %960 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720
+ OpStore %26 %960
+ OpBranch %50
+ %50 = OpLabel
+ %961 = OpLoad %6 %40
+ OpStore %40 %718 Nontemporal
+ OpStore %40 %961
+ OpLoopMerge %52 %53 None
+ OpBranch %54
+ %54 = OpLabel
+ %962 = OpLoad %6 %71
+ OpStore %71 %718
+ OpStore %71 %962
+ %55 = OpLoad %6 %48
+ %963 = OpLoad %6 %40 Nontemporal
+ OpStore %40 %718 Volatile
+ OpStore %40 %963
+ %537 = OpVectorShuffle %178 %536 %199 4 5
+ %964 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %964 Volatile|Nontemporal
+ %56 = OpLoad %6 %15 Volatile|Nontemporal
+ %965 = OpLoad %6 %15 Nontemporal
+ OpStore %15 %718 Nontemporal
+ OpStore %15 %965
+ %57 = OpISub %6 %56 %232
+ %966 = OpLoad %6 %69 Nontemporal
+ OpStore %69 %718
+ OpStore %69 %966
+ %59 = OpSLessThanEqual %58 %55 %57
+ %967 = OpLoad %6 %48
+ OpStore %48 %718 Volatile
+ OpStore %48 %967 Nontemporal
+ %538 = OpVectorShuffle %193 %537 %534 2 1 4
+ %968 = OpLoad %6 %69 Nontemporal
+ OpStore %69 %718
+ OpStore %69 %968
+ OpBranchConditional %59 %51 %52 314270495 2095440164
+ %51 = OpLabel
+ %60 = OpLoad %6 %48 Volatile
+ %969 = OpLoad %6 %42
+ OpStore %42 %718 Volatile
+ OpStore %42 %969
+ %61 = OpInBoundsAccessChain %29 %26 %27 %60
+ %970 = OpLoad %6 %15
+ OpStore %15 %718 Nontemporal
+ OpStore %15 %970 Volatile|Nontemporal
+ %539 = OpVectorShuffle %193 %535 %537 3 2 3
+ %971 = OpLoad %6 %71
+ OpStore %71 %718 Nontemporal
+ OpStore %71 %971
+ %62 = OpLoad %6 %61
+ %972 = OpLoad %24 %26 Volatile|Nontemporal
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %972 Volatile
+ %63 = OpLoad %6 %40 Volatile
+ %540 = OpVectorShuffle %178 %199 %534 1 5
+ %973 = OpLoad %6 %44
+ OpStore %44 %718
+ OpStore %44 %973
+ %64 = OpSLessThanEqual %58 %62 %63
+ %974 = OpLoad %6 %14
+ OpStore %14 %718 Volatile|Nontemporal
+ OpStore %14 %974
+ %541 = OpVectorShuffle %193 %537 %534 3 2 3
+ %975 = OpLoad %6 %40
+ OpStore %40 %718
+ OpStore %40 %975 Volatile
+ OpSelectionMerge %66 DontFlatten
+ OpBranchConditional %64 %65 %66 430348661 749991856
+ %65 = OpLabel
+ %542 = OpVectorShuffle %193 %541 %541 5 0 3
+ %976 = OpLoad %6 %80
+ OpStore %80 %718 Nontemporal
+ OpStore %80 %976
+ %67 = OpLoad %6 %44
+ %977 = OpLoad %6 %40 Nontemporal
+ OpStore %40 %718 Volatile|Nontemporal
+ OpStore %40 %977 Nontemporal
+ %543 = OpVectorShuffle %178 %539 %541 0 4
+ %978 = OpLoad %6 %44
+ OpStore %44 %718
+ OpStore %44 %978 Volatile|Nontemporal
+ %68 = OpIAdd %6 %67 %232
+ %979 = OpLoad %6 %69 Volatile|Nontemporal
+ OpStore %69 %718
+ OpStore %69 %979 Volatile|Nontemporal
+ OpStore %44 %68 None
+ %980 = OpLoad %6 %14 Volatile
+ OpStore %14 %718
+ OpStore %14 %980
+ %544 = OpVectorShuffle %193 %540 %199 4 3 0
+ %70 = OpLoad %6 %44 Volatile|Nontemporal
+ %545 = OpVectorShuffle %178 %538 %537 4 0
+ %981 = OpLoad %6 %69 Nontemporal
+ OpStore %69 %718
+ OpStore %69 %981
+ OpStore %69 %70 Volatile
+ %982 = OpLoad %6 %69 Volatile|Nontemporal
+ OpStore %69 %718
+ OpStore %69 %982 Nontemporal
+ %546 = OpVectorShuffle %178 %545 %545 0 2
+ %983 = OpLoad %6 %44
+ OpStore %44 %718
+ OpStore %44 %983
+ %72 = OpLoad %6 %48
+ OpStore %71 %72
+ %984 = OpLoad %6 %80
+ OpStore %80 %718 Volatile|Nontemporal
+ OpStore %80 %984 Nontemporal
+ %73 = OpFunctionCall %2 %11 %69 %71
+ %985 = OpLoad %6 %71
+ OpStore %71 %718 Volatile
+ OpStore %71 %985 Volatile
+ OpBranch %66
+ %66 = OpLabel
+ %986 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %986 Volatile
+ OpBranch %53
+ %53 = OpLabel
+ %987 = OpLoad %6 %15
+ OpStore %15 %718 Nontemporal
+ OpStore %15 %987
+ %74 = OpLoad %6 %48
+ %988 = OpLoad %6 %15
+ OpStore %15 %718 Nontemporal
+ OpStore %15 %988 Nontemporal
+ %547 = OpVectorShuffle %193 %539 %541 0 5 5
+ %989 = OpLoad %6 %61
+ OpStore %61 %718 Volatile
+ OpStore %61 %989 Volatile|Nontemporal
+ %75 = OpIAdd %6 %46 %74
+ %990 = OpLoad %6 %69
+ OpStore %69 %718
+ OpStore %69 %990
+ OpStore %48 %75
+ %991 = OpLoad %6 %71
+ OpStore %71 %718 Volatile
+ OpStore %71 %991
+ %548 = OpVectorShuffle %193 %541 %199 1 2 0
+ %992 = OpLoad %6 %61
+ OpStore %61 %718 Volatile
+ OpStore %61 %992
+ OpBranch %50
+ %52 = OpLabel
+ %76 = OpLoad %6 %44 Nontemporal
+ %993 = OpLoad %6 %42 Volatile|Nontemporal
+ OpStore %42 %718 Volatile|Nontemporal
+ OpStore %42 %993
+ %549 = OpVectorShuffle %178 %534 %538 0 1
+ %994 = OpLoad %24 %26
+ OpStore %26 %720
+ OpStore %26 %994
+ %77 = OpIAdd %6 %46 %76
+ %995 = OpLoad %6 %15 Volatile|Nontemporal
+ OpStore %15 %718
+ OpStore %15 %995 Volatile|Nontemporal
+ OpStore %44 %77
+ %996 = OpLoad %6 %71
+ OpStore %71 %718
+ OpStore %71 %996
+ %79 = OpLoad %6 %44 Volatile|Nontemporal
+ %997 = OpLoad %6 %48
+ OpStore %48 %718
+ OpStore %48 %997 Volatile
+ %550 = OpVectorShuffle %178 %534 %537 0 0
+ %998 = OpLoad %6 %71 Nontemporal
+ OpStore %71 %718 Volatile
+ OpStore %71 %998 Nontemporal
+ OpStore %78 %79
+ %551 = OpVectorShuffle %178 %534 %536 1 3
+ %999 = OpLoad %6 %40
+ OpStore %40 %718
+ OpStore %40 %999 Nontemporal
+ %81 = OpLoad %6 %15 Volatile|Nontemporal
+ %552 = OpVectorShuffle %178 %549 %550 2 1
+ %1000 = OpLoad %6 %15
+ OpStore %15 %718 Volatile|Nontemporal
+ OpStore %15 %1000
+ OpStore %80 %81 Nontemporal
+ %1001 = OpLoad %6 %44
+ OpStore %44 %718
+ OpStore %44 %1001
+ %553 = OpVectorShuffle %178 %552 %549 3 0
+ %1002 = OpLoad %6 %15 Volatile|Nontemporal
+ OpStore %15 %718
+ OpStore %15 %1002
+ %82 = OpFunctionCall %2 %11 %78 %80
+ %1003 = OpLoad %6 %14 Nontemporal
+ OpStore %14 %718 Nontemporal
+ OpStore %14 %1003 Nontemporal
+ %554 = OpVectorShuffle %178 %536 %199 2 4
+ %1004 = OpLoad %6 %71 Volatile|Nontemporal
+ OpStore %71 %718 Volatile|Nontemporal
+ OpStore %71 %1004
+ %83 = OpLoad %6 %44 Volatile|Nontemporal
+ %1005 = OpLoad %6 %69 Volatile|Nontemporal
+ OpStore %69 %718
+ OpStore %69 %1005
+ %555 = OpVectorShuffle %178 %552 %534 3 2
+ %1006 = OpLoad %6 %48
+ OpStore %48 %718 Nontemporal
+ OpStore %48 %1006 Nontemporal
+ OpReturnValue %83
+ OpFunctionEnd
+ %18 = OpFunction %2 DontInline %3
+ %19 = OpLabel
+ %117 = OpVariable %7 Function
+ %87 = OpVariable %7 Function
+ %116 = OpVariable %7 Function
+ %86 = OpVariable %7 Function
+ %89 = OpVariable %7 Function
+ %92 = OpVariable %91 Function
+ %119 = OpVariable %7 Function
+ OpStore %86 %27
+ %1007 = OpLoad %6 %119
+ OpStore %119 %718 Volatile
+ OpStore %119 %1007
+ OpStore %87 %88 Volatile
+ %1008 = OpLoad %23 %92
+ OpStore %92 %719 Volatile|Nontemporal
+ OpStore %92 %1008 Nontemporal
+ %556 = OpVectorShuffle %178 %199 %199 4 4
+ %1009 = OpLoad %6 %119
+ OpStore %119 %718 Nontemporal
+ OpStore %119 %1009
+ OpStore %89 %90
+ %1010 = OpLoad %6 %116 Volatile|Nontemporal
+ OpStore %116 %718
+ OpStore %116 %1010
+ %93 = OpLoad %6 %89
+ %557 = OpVectorShuffle %178 %556 %199 2 2
+ %1011 = OpLoad %6 %116 Volatile
+ OpStore %116 %718 Volatile
+ OpStore %116 %1011 Nontemporal
+ %94 = OpIAdd %6 %93 %232
+ %1012 = OpLoad %6 %89 Nontemporal
+ OpStore %89 %718
+ OpStore %89 %1012 Nontemporal
+ %558 = OpVectorShuffle %178 %556 %557 1 3
+ %1013 = OpLoad %6 %117 Nontemporal
+ OpStore %117 %718
+ OpStore %117 %1013 Volatile|Nontemporal
+ OpStore %89 %94 Nontemporal
+ %1014 = OpLoad %6 %87
+ OpStore %87 %718
+ OpStore %87 %1014
+ %559 = OpVectorShuffle %193 %557 %557 3 0 0
+ %1015 = OpLoad %6 %117 Volatile
+ OpStore %117 %718
+ OpStore %117 %1015 Volatile
+ %95 = OpLoad %6 %86
+ %1016 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720
+ OpStore %26 %1016 Nontemporal
+ %560 = OpVectorShuffle %193 %559 %557 1 0 3
+ %96 = OpAccessChain %7 %92 %94
+ %1017 = OpLoad %23 %92 Volatile
+ OpStore %92 %719
+ OpStore %92 %1017 Volatile
+ %561 = OpVectorShuffle %193 %560 %556 4 4 4
+ %1018 = OpLoad %6 %86 Volatile
+ OpStore %86 %718 Volatile|Nontemporal
+ OpStore %86 %1107
+ OpStore %96 %95 Volatile|Nontemporal
+ %1019 = OpLoad %6 %119
+ OpStore %119 %718
+ OpStore %119 %1019 Volatile
+ %97 = OpLoad %6 %89 None
+ %1020 = OpLoad %6 %117
+ OpStore %117 %718 Volatile|Nontemporal
+ OpStore %117 %1020 Nontemporal
+ %562 = OpVectorShuffle %193 %199 %558 2 4 1
+ %1021 = OpLoad %6 %96
+ OpStore %96 %718 Volatile
+ OpStore %96 %1021
+ %98 = OpIAdd %6 %97 %46
+ %1022 = OpLoad %6 %96
+ OpStore %96 %718 Volatile
+ OpStore %96 %1022 Nontemporal
+ %563 = OpVectorShuffle %193 %556 %559 2 4 1
+ OpStore %89 %98 Volatile
+ %1023 = OpLoad %6 %117 Volatile
+ OpStore %117 %718 Nontemporal
+ OpStore %117 %1023 Volatile
+ %99 = OpLoad %6 %87 Nontemporal
+ %1024 = OpLoad %6 %117 Nontemporal
+ OpStore %117 %718 Volatile|Nontemporal
+ OpStore %117 %1024 Nontemporal
+ %564 = OpVectorShuffle %193 %558 %561 0 2 1
+ %1025 = OpLoad %6 %86
+ OpStore %86 %718 Nontemporal
+ OpStore %86 %1025
+ %100 = OpInBoundsAccessChain %7 %92 %98
+ %1026 = OpLoad %6 %119
+ OpStore %119 %718
+ OpStore %119 %1026 Nontemporal
+ %565 = OpVectorShuffle %178 %564 %561 2 2
+ %1027 = OpLoad %6 %116
+ OpStore %116 %718 Nontemporal
+ OpStore %116 %1027
+ OpStore %100 %99
+ OpBranch %101
+ %101 = OpLabel
+ %566 = OpVectorShuffle %193 %563 %565 0 0 0
+ %1028 = OpLoad %6 %87 Volatile|Nontemporal
+ OpStore %87 %718 Nontemporal
+ OpStore %87 %1028
+ OpLoopMerge %103 %104 None
+ OpBranch %105
+ %105 = OpLabel
+ %1029 = OpLoad %23 %92 Nontemporal
+ OpStore %92 %719
+ OpStore %92 %1029 Nontemporal
+ %106 = OpLoad %6 %89
+ %107 = OpSGreaterThanEqual %58 %106 %614
+ %1030 = OpLoad %23 %92
+ OpStore %92 %719
+ OpStore %92 %1030
+ %567 = OpVectorShuffle %178 %564 %558 3 2
+ %1031 = OpLoad %6 %117 Nontemporal
+ OpStore %117 %718
+ OpStore %117 %1031 Volatile|Nontemporal
+ OpBranchConditional %107 %102 %103 1053048943 1930014354
+ %102 = OpLabel
+ %1032 = OpLoad %24 %26 Nontemporal
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %1032
+ %568 = OpVectorShuffle %193 %559 %563 1 0 4
+ %1033 = OpLoad %6 %117
+ OpStore %117 %718 Volatile
+ OpStore %117 %1033 Nontemporal
+ %108 = OpLoad %6 %89 Volatile|Nontemporal
+ %569 = OpVectorShuffle %193 %565 %567 0 3 0
+ %109 = OpISub %6 %108 %232
+ %1034 = OpLoad %6 %87 Volatile|Nontemporal
+ OpStore %87 %718
+ OpStore %87 %1034 Nontemporal
+ %570 = OpVectorShuffle %178 %558 %556 2 2
+ %1035 = OpLoad %6 %116 Volatile|Nontemporal
+ OpStore %116 %718
+ OpStore %116 %1035
+ OpStore %89 %109 Nontemporal
+ %1036 = OpLoad %6 %116
+ OpStore %116 %718
+ OpStore %116 %1036
+ %110 = OpInBoundsAccessChain %7 %92 %108
+ %1037 = OpLoad %6 %96 Nontemporal
+ OpStore %96 %718
+ OpStore %96 %1037 Nontemporal
+ %111 = OpLoad %6 %110 Volatile
+ %1038 = OpLoad %23 %92 Nontemporal
+ OpStore %92 %719 Volatile
+ OpStore %92 %1038 Nontemporal
+ %571 = OpVectorShuffle %193 %559 %564 1 0 4
+ %1039 = OpLoad %6 %86 Nontemporal
+ OpStore %86 %718
+ OpStore %86 %1039 Volatile|Nontemporal
+ OpStore %87 %111 Volatile
+ %1040 = OpLoad %23 %92 Nontemporal
+ OpStore %92 %719
+ OpStore %92 %1040
+ %572 = OpVectorShuffle %178 %562 %561 1 4
+ %1041 = OpLoad %6 %116 Volatile
+ OpStore %116 %718 Nontemporal
+ OpStore %116 %1041 Nontemporal
+ %112 = OpLoad %6 %89 Volatile
+ %1042 = OpLoad %6 %117
+ OpStore %117 %718
+ OpStore %117 %1042
+ %113 = OpISub %6 %112 %46
+ %1043 = OpLoad %6 %100
+ OpStore %100 %718
+ OpStore %100 %1043 Nontemporal
+ %573 = OpVectorShuffle %178 %566 %199 4 5
+ OpStore %89 %113 Nontemporal
+ %1044 = OpLoad %6 %119 Nontemporal
+ OpStore %119 %718 Volatile
+ OpStore %119 %1044 Nontemporal
+ %574 = OpVectorShuffle %193 %570 %565 1 2 1
+ %1045 = OpLoad %6 %87 Volatile|Nontemporal
+ OpStore %87 %718 Volatile|Nontemporal
+ OpStore %87 %1045 Volatile|Nontemporal
+ %114 = OpInBoundsAccessChain %7 %92 %112
+ %575 = OpVectorShuffle %178 %564 %567 1 2
+ %1046 = OpLoad %6 %100
+ OpStore %100 %718 Volatile
+ OpStore %100 %1046
+ %115 = OpLoad %6 %114
+ %1047 = OpLoad %6 %116
+ OpStore %116 %718
+ OpStore %116 %1047 Nontemporal
+ %576 = OpVectorShuffle %193 %573 %565 1 1 2
+ %1048 = OpLoad %6 %119
+ OpStore %119 %718
+ OpStore %119 %1048
+ OpStore %86 %115
+ %1049 = OpLoad %6 %89
+ OpStore %89 %718
+ OpStore %89 %1049
+ %118 = OpLoad %6 %86
+ OpStore %117 %118 Volatile|Nontemporal
+ %1050 = OpLoad %6 %110 Nontemporal
+ OpStore %110 %718
+ OpStore %110 %1050 Volatile|Nontemporal
+ %577 = OpVectorShuffle %178 %569 %569 1 2
+ %120 = OpLoad %6 %87
+ %578 = OpVectorShuffle %178 %199 %558 3 1
+ OpStore %119 %120 Volatile
+ %1051 = OpLoad %6 %100 Volatile|Nontemporal
+ OpStore %100 %718
+ OpStore %100 %1051
+ %121 = OpFunctionCall %6 %16 %117 %119
+ %579 = OpVectorShuffle %178 %568 %567 3 0
+ %1052 = OpLoad %6 %119
+ OpStore %119 %718
+ OpStore %119 %1052
+ OpStore %116 %121
+ %1053 = OpLoad %6 %117
+ OpStore %117 %718
+ OpStore %117 %1053 Volatile|Nontemporal
+ %122 = OpLoad %6 %116
+ %1054 = OpLoad %6 %87
+ OpStore %87 %718
+ OpStore %87 %1054 Volatile|Nontemporal
+ %580 = OpVectorShuffle %178 %560 %568 4 4
+ %1055 = OpLoad %6 %86 Nontemporal
+ OpStore %86 %718
+ OpStore %86 %1055 Nontemporal
+ %123 = OpISub %6 %122 %232
+ %1056 = OpLoad %6 %87 Nontemporal
+ OpStore %87 %718
+ OpStore %87 %1056
+ %124 = OpLoad %6 %86
+ %1057 = OpLoad %6 %110
+ OpStore %110 %718 Volatile|Nontemporal
+ OpStore %110 %1057 Nontemporal
+ %125 = OpSGreaterThan %58 %123 %124
+ %1058 = OpLoad %6 %87
+ OpStore %87 %718
+ OpStore %87 %1058 Volatile|Nontemporal
+ %582 = OpVectorShuffle %178 %573 %567 3 0
+ %1059 = OpLoad %6 %100 Nontemporal
+ OpStore %100 %718
+ OpStore %100 %1059
+ OpSelectionMerge %127 DontFlatten
+ OpBranchConditional %125 %126 %127 1905356235 1372195456
+ %126 = OpLabel
+ %1060 = OpLoad %6 %117
+ OpStore %117 %718
+ OpStore %117 %1060
+ %128 = OpLoad %6 %89 Volatile|Nontemporal
+ %583 = OpVectorShuffle %178 %556 %571 3 1
+ %1061 = OpLoad %6 %100 Volatile|Nontemporal
+ OpStore %100 %718 Volatile|Nontemporal
+ OpStore %100 %1061
+ %129 = OpIAdd %6 %46 %128
+ %1062 = OpLoad %23 %92 Volatile|Nontemporal
+ OpStore %92 %719 Nontemporal
+ OpStore %92 %1062
+ %584 = OpVectorShuffle %178 %562 %569 5 4
+ %585 = OpVectorShuffle %193 %580 %577 1 2 2
+ %130 = OpLoad %6 %86 Nontemporal
+ %1063 = OpLoad %6 %114
+ OpStore %114 %718 Volatile
+ OpStore %114 %1063 Nontemporal
+ %586 = OpVectorShuffle %178 %585 %564 3 0
+ %1064 = OpLoad %6 %119 Volatile|Nontemporal
+ OpStore %119 %718
+ OpStore %119 %1064
+ %131 = OpAccessChain %7 %92 %129
+ %1065 = OpLoad %6 %110
+ OpStore %110 %718
+ OpStore %110 %1065
+ %587 = OpVectorShuffle %193 %563 %566 4 4 0
+ %1066 = OpLoad %6 %119
+ OpStore %119 %718
+ OpStore %119 %1066 Volatile|Nontemporal
+ OpStore %131 %130 Nontemporal
+ %132 = OpLoad %6 %89 Volatile
+ %1067 = OpLoad %6 %100 Volatile|Nontemporal
+ OpStore %100 %718
+ OpStore %100 %1067
+ %588 = OpVectorShuffle %178 %573 %575 3 2
+ %1068 = OpLoad %6 %131 Nontemporal
+ OpStore %131 %718 Volatile|Nontemporal
+ OpStore %131 %1068
+ %133 = OpIAdd %6 %232 %132
+ %1069 = OpLoad %6 %100 Volatile
+ OpStore %100 %718
+ OpStore %100 %1069 Nontemporal
+ %589 = OpVectorShuffle %193 %576 %588 2 4 2
+ %1070 = OpLoad %6 %87 Volatile
+ OpStore %87 %718 Volatile|Nontemporal
+ OpStore %87 %1070 Volatile
+ OpStore %89 %133
+ %1071 = OpLoad %23 %92
+ OpStore %92 %719
+ OpStore %92 %1071 Nontemporal
+ %134 = OpLoad %6 %116 Nontemporal
+ %135 = OpISub %6 %134 %232
+ %590 = OpVectorShuffle %178 %576 %573 0 4
+ %1072 = OpLoad %6 %114
+ OpStore %114 %718
+ OpStore %114 %1072
+ %136 = OpInBoundsAccessChain %7 %92 %133
+ %1073 = OpLoad %6 %114
+ OpStore %114 %718
+ OpStore %114 %1073
+ OpStore %136 %135 Volatile|Nontemporal
+ %1074 = OpLoad %6 %96 Nontemporal
+ OpStore %96 %718 Nontemporal
+ OpStore %96 %1074
+ %591 = OpVectorShuffle %178 %580 %569 4 3
+ %1075 = OpLoad %6 %136
+ OpStore %136 %718
+ OpStore %136 %1075 Volatile|Nontemporal
+ OpBranch %127
+ %127 = OpLabel
+ %1076 = OpLoad %6 %96
+ OpStore %96 %718
+ OpStore %96 %1076 Nontemporal
+ %592 = OpVectorShuffle %178 %199 %570 0 1
+ %1077 = OpLoad %24 %26
+ OpStore %26 %720 Volatile|Nontemporal
+ OpStore %26 %1077
+ %137 = OpLoad %6 %116 Volatile
+ %1078 = OpLoad %6 %114 Volatile|Nontemporal
+ OpStore %114 %718 Nontemporal
+ OpStore %114 %1078
+ %593 = OpVectorShuffle %193 %556 %571 4 0 1
+ %138 = OpIAdd %6 %232 %137
+ %1079 = OpLoad %6 %116 Volatile
+ OpStore %116 %718 Volatile
+ OpStore %116 %1079
+ %594 = OpVectorShuffle %193 %575 %563 4 2 0
+ %1080 = OpLoad %6 %114
+ OpStore %114 %718
+ OpStore %114 %1080 Volatile
+ %139 = OpLoad %6 %87
+ %1081 = OpLoad %6 %89
+ OpStore %89 %718
+ OpStore %89 %1081 Nontemporal
+ %595 = OpVectorShuffle %193 %560 %568 2 3 0
+ %1082 = OpLoad %6 %100
+ OpStore %100 %718
+ OpStore %100 %1082
+ %140 = OpSLessThan %58 %138 %139
+ %1083 = OpLoad %6 %116 Nontemporal
+ OpStore %116 %718
+ OpStore %116 %1083
+ OpSelectionMerge %142 None
+ OpBranchConditional %140 %141 %142 131968689 398001210
+ %141 = OpLabel
+ %1084 = OpLoad %6 %114 Volatile
+ OpStore %114 %718
+ OpStore %114 %1084
+ %596 = OpVectorShuffle %178 %592 %582 1 2
+ %1085 = OpLoad %6 %86 Nontemporal
+ OpStore %86 %718
+ OpStore %86 %1085
+ %143 = OpLoad %6 %89 Volatile|Nontemporal
+ %1086 = OpLoad %6 %114 Nontemporal
+ OpStore %114 %718
+ OpStore %114 %1086 Volatile|Nontemporal
+ %597 = OpVectorShuffle %193 %560 %562 4 1 1
+ %144 = OpIAdd %6 %143 %46
+ %1087 = OpLoad %6 %119 Volatile
+ OpStore %119 %718
+ OpStore %119 %1087 Volatile
+ OpStore %89 %144 Nontemporal
+ %1088 = OpLoad %6 %114
+ OpStore %114 %718
+ OpStore %114 %1088
+ %145 = OpLoad %6 %116 Nontemporal
+ %1089 = OpLoad %6 %119 Nontemporal
+ OpStore %119 %718 Nontemporal
+ OpStore %119 %1089
+ %599 = OpVectorShuffle %193 %568 %560 5 3 0
+ %146 = OpIAdd %6 %232 %145
+ %1090 = OpLoad %6 %116 Nontemporal
+ OpStore %116 %718
+ OpStore %116 %1090 Volatile|Nontemporal
+ %600 = OpVectorShuffle %193 %556 %580 0 2 2
+ %1091 = OpLoad %6 %100 Volatile|Nontemporal
+ OpStore %100 %718 Volatile|Nontemporal
+ OpStore %100 %1091
+ %147 = OpAccessChain %7 %92 %144
+ %1092 = OpLoad %6 %110
+ OpStore %110 %718
+ OpStore %110 %1092 Nontemporal
+ %601 = OpVectorShuffle %178 %563 %578 0 1
+ OpStore %147 %146 Nontemporal
+ %1093 = OpLoad %23 %92
+ OpStore %92 %719
+ OpStore %92 %1093
+ %148 = OpLoad %6 %89
+ %1094 = OpLoad %6 %114 Volatile
+ OpStore %114 %718
+ OpStore %114 %1094
+ %602 = OpVectorShuffle %178 %599 %565 4 1
+ %1095 = OpLoad %23 %92
+ OpStore %92 %719 Volatile|Nontemporal
+ OpStore %92 %1095 Nontemporal
+ %149 = OpIAdd %6 %148 %232
+ %1096 = OpLoad %6 %147
+ OpStore %147 %718
+ OpStore %147 %1096 Nontemporal
+ OpStore %89 %149
+ %1097 = OpLoad %6 %117
+ OpStore %117 %718
+ OpStore %117 %1097
+ %150 = OpLoad %6 %87 Nontemporal
+ %1098 = OpLoad %6 %100 Volatile
+ OpStore %100 %718 Volatile
+ OpStore %100 %1098
+ %151 = OpInBoundsAccessChain %7 %92 %149
+ %1099 = OpLoad %6 %96 Nontemporal
+ OpStore %96 %718
+ OpStore %96 %1099
+ OpStore %151 %150 Volatile
+ %1100 = OpLoad %6 %114 Nontemporal
+ OpStore %114 %718
+ OpStore %114 %1100
+ %603 = OpVectorShuffle %193 %564 %568 4 0 0
+ %1101 = OpLoad %6 %86 Nontemporal
+ OpStore %86 %718 Nontemporal
+ OpStore %86 %1101 Volatile
+ OpBranch %142
+ %142 = OpLabel
+ %1102 = OpLoad %6 %100
+ OpStore %100 %718
+ OpStore %100 %1102
+ OpBranch %104
+ %104 = OpLabel
+ %1103 = OpLoad %6 %86 Volatile|Nontemporal
+ OpStore %86 %718
+ OpStore %86 %1103
+ %604 = OpVectorShuffle %178 %563 %564 2 3
+ %1104 = OpLoad %24 %26 Volatile
+ OpStore %26 %720
+ OpStore %26 %1104
+ OpBranch %101
+ %103 = OpLabel
+ %1105 = OpLoad %6 %87
+ OpStore %87 %718 Volatile
+ OpStore %87 %1105 Nontemporal
+ OpReturn
+ OpFunctionEnd
diff --git a/test/test-all.sh b/test/test-all.sh
index bc0120e..92af86a 100755
--- a/test/test-all.sh
+++ b/test/test-all.sh
@@ -16,6 +16,7 @@
set -e # Fail on any error.
+TEXT_YELLOW="\033[0;33m"
TEXT_GREEN="\033[0;32m"
TEXT_RED="\033[0;31m"
TEXT_DEFAULT="\033[0m"
@@ -33,15 +34,42 @@
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
NUM_PASS=0
+NUM_SKIP=0
NUM_FAIL=0
+SKIPPED=""
+SKIPPED+="msl:bug_tint_749.spvasm" # TINT_UNIMPLEMENTED crbug.com/tint/726: module-scope private and workgroup variables not yet implemented
+SKIPPED+="hlsl:bug_tint_749.spvasm" # Failed to generate: error: pointers not supported in HLSL
+
+# should_skip(TEST_FILE, FORMAT)
+function should_skip() {
+ local TEST="$1-$2"
+ if [[ "$TEST" == "bug_tint_749.spvasm-msl" ]]; then
+ echo 1
+ return
+ fi
+ echo 0
+ return
+}
+
# check(TEST_FILE, FORMAT)
function check() {
- TEST_FILE=$1
- FORMAT=$2
+ local TEST_FILE=$1
+ local FORMAT=$2
+ SKIP=
+
+ if [[ $SKIPPED == *"${FORMAT}:${TEST_FILE}"* ]]; then
+ SKIP=1
+ fi
+
printf "%7s: " "${FORMAT}"
+ if [[ -n "$SKIP" ]]; then
+ echo -e "${TEXT_YELLOW}SKIPPED${TEXT_DEFAULT}"
+ NUM_SKIP=$((${NUM_SKIP}+1))
+ return
+ fi
set +e
- ${TINT} ${TEST_FILE} --format ${FORMAT} -o /dev/null
+ ${TINT} ${SCRIPT_DIR}/${TEST_FILE} --format ${FORMAT} -o /dev/null
if [ $? -eq 0 ]; then
echo -e "${TEXT_GREEN}PASS${TEXT_DEFAULT}"
NUM_PASS=$((${NUM_PASS}+1))
@@ -54,6 +82,7 @@
for TEST_FILE in ${SCRIPT_DIR}/*.spvasm ${SCRIPT_DIR}/*.wgsl
do
+ TEST_FILE=$(realpath --relative-to="$SCRIPT_DIR" "$TEST_FILE")
echo
echo "Testing $TEST_FILE..."
check "${TEST_FILE}" wgsl
@@ -64,11 +93,11 @@
if [ ${NUM_FAIL} -ne 0 ]; then
echo
- echo -e "${TEXT_RED}${NUM_FAIL} tests failed. ${TEXT_DEFAULT}${NUM_PASS} passed${TEXT_DEFAULT}"
+ echo -e "${TEXT_RED}${NUM_FAIL} tests failed. ${TEXT_DEFAULT}${NUM_SKIP} skipped. ${NUM_PASS} passed.${TEXT_DEFAULT}"
echo
exit 1
else
echo
- echo -e "${TEXT_GREEN}All ${NUM_PASS} tests pass${TEXT_DEFAULT}"
+ echo -e "${NUM_SKIP} tests skipped. ${TEXT_GREEN}${NUM_PASS} passed.${TEXT_DEFAULT}"
echo
fi