This commit adds a batch of GraphicsFuzz coverage tests.
Components: Vulkan
New Tests:
dEQP-VK.graphicsfuzz.cov-bitwise-or-uniform-zero-tenth-bit-loop-limit-find-lsb
dEQP-VK.graphicsfuzz.cov-copy-array-elements-except-first-nested-loop-replace-identical-values
dEQP-VK.graphicsfuzz.cov-decrement-vector-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
dEQP-VK.graphicsfuzz.cov-global-loop-count-array-struct-field-set-int-array-element
dEQP-VK.graphicsfuzz.cov-increment-one-array-element-check-index-from-fragcoord
dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
dEQP-VK.graphicsfuzz.cov-loop-construct-vec4-from-vec4-clamp-same-min-max
dEQP-VK.graphicsfuzz.cov-loop-copy-previous-array-element-first-undefined
dEQP-VK.graphicsfuzz.cov-loop-decrease-vector-components-assign-multiple-times
dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-nested-loops-never-change-array-element-one
dEQP-VK.graphicsfuzz.cov-nested-loops-switch-add-zero-matrix-elements
Change-Id: Icbab932af39ff6070b622e5d71c360a890382e89
dEQP-VK.graphicsfuzz.cov-bitfieldreverse-loop-limit-underflow
dEQP-VK.graphicsfuzz.cov-bitwise-and-variable-and-its-negation
dEQP-VK.graphicsfuzz.cov-bitwise-inverse-uniform-condition
+dEQP-VK.graphicsfuzz.cov-bitwise-or-uniform-zero-tenth-bit-loop-limit-find-lsb
dEQP-VK.graphicsfuzz.cov-bitwise-shift-right-always-select-one
dEQP-VK.graphicsfuzz.cov-bitwise-shift-right-full-bits-no-effect-clamp
dEQP-VK.graphicsfuzz.cov-cast-float-to-int-and-back
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-conditions-empty-blocks-index-array-one-divided-by-findlsb
dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop
+dEQP-VK.graphicsfuzz.cov-copy-array-elements-except-first-nested-loop-replace-identical-values
dEQP-VK.graphicsfuzz.cov-copy-output-color-swizzle-array-indexing
dEQP-VK.graphicsfuzz.cov-cosh-clamped-to-one
dEQP-VK.graphicsfuzz.cov-cumulate-loops-unreachable
+dEQP-VK.graphicsfuzz.cov-decrement-vector-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
dEQP-VK.graphicsfuzz.cov-descending-loop-index-temporary-array
dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
+dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once
dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard
dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
+dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
dEQP-VK.graphicsfuzz.cov-function-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops
dEQP-VK.graphicsfuzz.cov-global-loop-bound-true-logical-or
+dEQP-VK.graphicsfuzz.cov-global-loop-count-array-struct-field-set-int-array-element
dEQP-VK.graphicsfuzz.cov-global-loop-counter-accumulate-integer-condition-large-array-elements
dEQP-VK.graphicsfuzz.cov-global-loop-counter-exhaust-calling-function-twice
dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix
dEQP-VK.graphicsfuzz.cov-increment-global-counter-loop-function
dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array
dEQP-VK.graphicsfuzz.cov-increment-multiple-integers
+dEQP-VK.graphicsfuzz.cov-increment-one-array-element-check-index-from-fragcoord
dEQP-VK.graphicsfuzz.cov-increment-vector-array-matrix-element
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy
dEQP-VK.graphicsfuzz.cov-increment-vector-function-call-conditional
dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign
dEQP-VK.graphicsfuzz.cov-loop-array-index-decrement-never-negative
+dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element
dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-increment-integer-fallback-global-counter
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
dEQP-VK.graphicsfuzz.cov-loop-decrease-integer-never-break
+dEQP-VK.graphicsfuzz.cov-loop-construct-vec4-from-vec4-clamp-same-min-max
+dEQP-VK.graphicsfuzz.cov-loop-copy-previous-array-element-first-undefined
+dEQP-VK.graphicsfuzz.cov-loop-decrease-vector-components-assign-multiple-times
dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-exit-conditions-sampler-struct-integer-variable
dEQP-VK.graphicsfuzz.cov-loop-divide-uninitialized-vector-min-unused
dEQP-VK.graphicsfuzz.cov-loop-global-counter-break-set-ivec-elements
dEQP-VK.graphicsfuzz.cov-loop-increase-iterator-condition-uniform-copy-array-elements
dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
+dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
dEQP-VK.graphicsfuzz.cov-loop-increment-integer-findmsb-minus-uniform
dEQP-VK.graphicsfuzz.cov-loop-increment-integer-set-output-color-break
dEQP-VK.graphicsfuzz.cov-loop-increment-matrix-element-break-after-first-iteration
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-loop-iterator-plus-one-variable-outside-index-array
+dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
dEQP-VK.graphicsfuzz.cov-loop-limiter-uniform-bitwise-and-one-always-break
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterators-compare-same-array-elements
dEQP-VK.graphicsfuzz.cov-nested-loops-increase-integer-dot-product
dEQP-VK.graphicsfuzz.cov-nested-loops-inner-loop-min-copy-array-elements
+dEQP-VK.graphicsfuzz.cov-nested-loops-never-change-array-element-one
dEQP-VK.graphicsfuzz.cov-nested-loops-redundant-condition
dEQP-VK.graphicsfuzz.cov-nested-loops-return-inside-while-never-executed
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-nested-loops-switch-case-fallthrough-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loops-temporary-copy-output-color-index-matrix
dEQP-VK.graphicsfuzz.cov-nested-loops-while-min-iterator-condition-always-false
+dEQP-VK.graphicsfuzz.cov-nested-loops-switch-add-zero-matrix-elements
dEQP-VK.graphicsfuzz.cov-nested-structs-function-set-inner-struct-field-return
dEQP-VK.graphicsfuzz.cov-nir-array-access
dEQP-VK.graphicsfuzz.cov-nir-opt-large-constants-for-clamp-vector-access
dEQP-VK.graphicsfuzz.cov-bitfieldreverse-loop-limit-underflow
dEQP-VK.graphicsfuzz.cov-bitwise-and-variable-and-its-negation
dEQP-VK.graphicsfuzz.cov-bitwise-inverse-uniform-condition
+dEQP-VK.graphicsfuzz.cov-bitwise-or-uniform-zero-tenth-bit-loop-limit-find-lsb
dEQP-VK.graphicsfuzz.cov-bitwise-shift-right-always-select-one
dEQP-VK.graphicsfuzz.cov-bitwise-shift-right-full-bits-no-effect-clamp
dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops
dEQP-VK.graphicsfuzz.cov-constants-combine-add-sub
dEQP-VK.graphicsfuzz.cov-constants-mix-uniform
dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop
+dEQP-VK.graphicsfuzz.cov-copy-array-elements-except-first-nested-loop-replace-identical-values
dEQP-VK.graphicsfuzz.cov-copy-output-color-swizzle-array-indexing
dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-func-argument
dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-no-stores
dEQP-VK.graphicsfuzz.cov-dag-combiner-same-cond-nested
dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg
dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge
+dEQP-VK.graphicsfuzz.cov-decrement-vector-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
dEQP-VK.graphicsfuzz.cov-descending-loop-index-temporary-array
dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
+dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once
dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard
dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
+dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
dEQP-VK.graphicsfuzz.cov-function-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops
dEQP-VK.graphicsfuzz.cov-global-loop-bound-true-logical-or
+dEQP-VK.graphicsfuzz.cov-global-loop-count-array-struct-field-set-int-array-element
dEQP-VK.graphicsfuzz.cov-global-loop-counter-accumulate-integer-condition-large-array-elements
dEQP-VK.graphicsfuzz.cov-global-loop-counter-exhaust-calling-function-twice
dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix
dEQP-VK.graphicsfuzz.cov-increment-inside-clamp
dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array
dEQP-VK.graphicsfuzz.cov-increment-multiple-integers
+dEQP-VK.graphicsfuzz.cov-increment-one-array-element-check-index-from-fragcoord
dEQP-VK.graphicsfuzz.cov-increment-vector-array-matrix-element
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy
dEQP-VK.graphicsfuzz.cov-increment-vector-function-call-conditional
dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign
dEQP-VK.graphicsfuzz.cov-loop-array-index-decrement-never-negative
+dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element
dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-increment-integer-fallback-global-counter
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
dEQP-VK.graphicsfuzz.cov-loop-decrease-integer-never-break
+dEQP-VK.graphicsfuzz.cov-loop-construct-vec4-from-vec4-clamp-same-min-max
+dEQP-VK.graphicsfuzz.cov-loop-copy-previous-array-element-first-undefined
+dEQP-VK.graphicsfuzz.cov-loop-decrease-vector-components-assign-multiple-times
dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-exit-conditions-sampler-struct-integer-variable
dEQP-VK.graphicsfuzz.cov-loop-divide-uninitialized-vector-min-unused
dEQP-VK.graphicsfuzz.cov-loop-global-counter-break-set-ivec-elements
dEQP-VK.graphicsfuzz.cov-loop-increase-iterator-condition-uniform-copy-array-elements
dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
+dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
dEQP-VK.graphicsfuzz.cov-loop-increment-integer-findmsb-minus-uniform
dEQP-VK.graphicsfuzz.cov-loop-increment-integer-set-output-color-break
dEQP-VK.graphicsfuzz.cov-loop-increment-matrix-element-break-after-first-iteration
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-loop-iterator-plus-one-variable-outside-index-array
+dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
dEQP-VK.graphicsfuzz.cov-loop-limiter-uniform-bitwise-and-one-always-break
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterators-compare-same-array-elements
dEQP-VK.graphicsfuzz.cov-nested-loops-increase-integer-dot-product
dEQP-VK.graphicsfuzz.cov-nested-loops-inner-loop-min-copy-array-elements
+dEQP-VK.graphicsfuzz.cov-nested-loops-never-change-array-element-one
dEQP-VK.graphicsfuzz.cov-nested-loops-redundant-condition
dEQP-VK.graphicsfuzz.cov-nested-loops-return-inside-while-never-executed
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-nested-loops-switch-case-fallthrough-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loops-temporary-copy-output-color-index-matrix
dEQP-VK.graphicsfuzz.cov-nested-loops-while-min-iterator-condition-always-false
+dEQP-VK.graphicsfuzz.cov-nested-loops-switch-add-zero-matrix-elements
dEQP-VK.graphicsfuzz.cov-nested-structs-function-set-inner-struct-field-return
dEQP-VK.graphicsfuzz.cov-nir-array-access
dEQP-VK.graphicsfuzz.cov-nir-opt-large-constants-for-clamp-vector-access
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_9 _GLF_uniform_int_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 9]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int msb10 = _int_0 | 1024;
+# int a = _int_0;
+#
+# // Iterated nine times.
+# for(int i = _int_1; i < findLSB(msb10); i++)
+# {
+# a++;
+# }
+#
+# // Always true.
+# if(a == _int_9)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 71
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %52
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "msb10"
+ OpName %12 "buf0"
+ OpMemberName %12 0 "_GLF_uniform_int_values"
+ OpName %14 ""
+ OpName %22 "a"
+ OpName %25 "i"
+ OpName %52 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 0
+ OpDecorate %52 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 3
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpConstant %6 0
+ %16 = OpConstant %6 1
+ %17 = OpTypePointer Uniform %6
+ %20 = OpConstant %6 1024
+ %36 = OpTypeBool
+ %43 = OpConstant %6 2
+ %49 = OpTypeFloat 32
+ %50 = OpTypeVector %49 4
+ %51 = OpTypePointer Output %50
+ %52 = OpVariable %51 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %22 = OpVariable %7 Function
+ %25 = OpVariable %7 Function
+ %18 = OpAccessChain %17 %14 %15 %16
+ %19 = OpLoad %6 %18
+ %21 = OpBitwiseOr %6 %19 %20
+ OpStore %8 %21
+ %23 = OpAccessChain %17 %14 %15 %16
+ %24 = OpLoad %6 %23
+ OpStore %22 %24
+ %26 = OpAccessChain %17 %14 %15 %15
+ %27 = OpLoad %6 %26
+ OpStore %25 %27
+ OpBranch %28
+ %28 = OpLabel
+ OpLoopMerge %30 %31 None
+ OpBranch %32
+ %32 = OpLabel
+ %33 = OpLoad %6 %25
+ %34 = OpLoad %6 %8
+ %35 = OpExtInst %6 %1 FindILsb %34
+ %37 = OpSLessThan %36 %33 %35
+ OpBranchConditional %37 %29 %30
+ %29 = OpLabel
+ %38 = OpLoad %6 %22
+ %39 = OpIAdd %6 %38 %16
+ OpStore %22 %39
+ OpBranch %31
+ %31 = OpLabel
+ %40 = OpLoad %6 %25
+ %41 = OpIAdd %6 %40 %16
+ OpStore %25 %41
+ OpBranch %28
+ %30 = OpLabel
+ %42 = OpLoad %6 %22
+ %44 = OpAccessChain %17 %14 %15 %43
+ %45 = OpLoad %6 %44
+ %46 = OpIEqual %36 %42 %45
+ OpSelectionMerge %48 None
+ OpBranchConditional %46 %47 %66
+ %47 = OpLabel
+ %53 = OpAccessChain %17 %14 %15 %15
+ %54 = OpLoad %6 %53
+ %55 = OpConvertSToF %49 %54
+ %56 = OpAccessChain %17 %14 %15 %16
+ %57 = OpLoad %6 %56
+ %58 = OpConvertSToF %49 %57
+ %59 = OpAccessChain %17 %14 %15 %16
+ %60 = OpLoad %6 %59
+ %61 = OpConvertSToF %49 %60
+ %62 = OpAccessChain %17 %14 %15 %15
+ %63 = OpLoad %6 %62
+ %64 = OpConvertSToF %49 %63
+ %65 = OpCompositeConstruct %50 %55 %58 %61 %64
+ OpStore %52 %65
+ OpBranch %48
+ %66 = OpLabel
+ %67 = OpAccessChain %17 %14 %15 %16
+ %68 = OpLoad %6 %67
+ %69 = OpConvertSToF %49 %68
+ %70 = OpCompositeConstruct %50 %69 %69 %69 %69
+ OpStore %52 %70
+ OpBranch %48
+ %48 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 9
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_10 _GLF_uniform_int_values[2]
+# #define _int_2 _GLF_uniform_int_values[3]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 10, 2]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# const int _GLF_global_loop_bound = 15;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# int arr0[10] = int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0), arr1[10] = int[10](1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+#
+# void main()
+# {
+# // Sets arr[1..9] to zero.
+# for(int j = _int_1; j < _int_10; j++)
+# {
+# _GLF_global_loop_count++;
+# arr1[j] = arr0[j];
+# }
+#
+# // Iterates once.
+# for(int i0 = _int_1; _GLF_global_loop_count < _GLF_global_loop_bound; i0 *= _int_2)
+# {
+# _GLF_global_loop_count++;
+# // Iterates four times.
+# for(int i1 = 1; i1 < 10 && _GLF_global_loop_count < _GLF_global_loop_bound; i1 += i0)
+# {
+# _GLF_global_loop_count ++;
+# // Iterates once.
+# for(int i2 = i1; i2 <= 1 && _GLF_global_loop_count < _GLF_global_loop_bound; i2++)
+# {
+# _GLF_global_loop_count++;
+# // i2 can only be one, and both arr0[1] and arr1[1] are already zero.
+# arr0[i2] = arr1[i2];
+# }
+# }
+# }
+#
+# // Always true.
+# if(arr0[_int_0] == _int_0 && arr1[_int_0] == _int_1 && arr0[_int_1] == _int_0 && arr1[_int_1] == _int_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 166
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %147
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "_GLF_global_loop_count"
+ OpName %14 "arr0"
+ OpName %16 "arr1"
+ OpName %20 "j"
+ OpName %23 "buf0"
+ OpMemberName %23 0 "_GLF_uniform_int_values"
+ OpName %25 ""
+ OpName %49 "i0"
+ OpName %62 "i1"
+ OpName %76 "i2"
+ OpName %147 "_GLF_color"
+ OpDecorate %22 ArrayStride 16
+ OpMemberDecorate %23 0 Offset 0
+ OpDecorate %23 Block
+ OpDecorate %25 DescriptorSet 0
+ OpDecorate %25 Binding 0
+ OpDecorate %147 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %10 = OpTypeInt 32 0
+ %11 = OpConstant %10 10
+ %12 = OpTypeArray %6 %11
+ %13 = OpTypePointer Private %12
+ %14 = OpVariable %13 Private
+ %15 = OpConstantComposite %12 %9 %9 %9 %9 %9 %9 %9 %9 %9 %9
+ %16 = OpVariable %13 Private
+ %17 = OpConstant %6 1
+ %18 = OpConstantComposite %12 %17 %17 %17 %17 %17 %17 %17 %17 %17 %17
+ %19 = OpTypePointer Function %6
+ %21 = OpConstant %10 4
+ %22 = OpTypeArray %6 %21
+ %23 = OpTypeStruct %22
+ %24 = OpTypePointer Uniform %23
+ %25 = OpVariable %24 Uniform
+ %26 = OpTypePointer Uniform %6
+ %35 = OpConstant %6 2
+ %38 = OpTypeBool
+ %58 = OpConstant %6 15
+ %69 = OpConstant %6 10
+ %100 = OpConstant %6 3
+ %144 = OpTypeFloat 32
+ %145 = OpTypeVector %144 4
+ %146 = OpTypePointer Output %145
+ %147 = OpVariable %146 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %20 = OpVariable %19 Function
+ %49 = OpVariable %19 Function
+ %62 = OpVariable %19 Function
+ %76 = OpVariable %19 Function
+ OpStore %8 %9
+ OpStore %14 %15
+ OpStore %16 %18
+ %27 = OpAccessChain %26 %25 %9 %9
+ %28 = OpLoad %6 %27
+ OpStore %20 %28
+ OpBranch %29
+ %29 = OpLabel
+ OpLoopMerge %31 %32 None
+ OpBranch %33
+ %33 = OpLabel
+ %34 = OpLoad %6 %20
+ %36 = OpAccessChain %26 %25 %9 %35
+ %37 = OpLoad %6 %36
+ %39 = OpSLessThan %38 %34 %37
+ OpBranchConditional %39 %30 %31
+ %30 = OpLabel
+ %40 = OpLoad %6 %8
+ %41 = OpIAdd %6 %40 %17
+ OpStore %8 %41
+ %42 = OpLoad %6 %20
+ %43 = OpLoad %6 %20
+ %44 = OpAccessChain %7 %14 %43
+ %45 = OpLoad %6 %44
+ %46 = OpAccessChain %7 %16 %42
+ OpStore %46 %45
+ OpBranch %32
+ %32 = OpLabel
+ %47 = OpLoad %6 %20
+ %48 = OpIAdd %6 %47 %17
+ OpStore %20 %48
+ OpBranch %29
+ %31 = OpLabel
+ %50 = OpAccessChain %26 %25 %9 %9
+ %51 = OpLoad %6 %50
+ OpStore %49 %51
+ OpBranch %52
+ %52 = OpLabel
+ OpLoopMerge %54 %55 None
+ OpBranch %56
+ %56 = OpLabel
+ %57 = OpLoad %6 %8
+ %59 = OpSLessThan %38 %57 %58
+ OpBranchConditional %59 %53 %54
+ %53 = OpLabel
+ %60 = OpLoad %6 %8
+ %61 = OpIAdd %6 %60 %17
+ OpStore %8 %61
+ OpStore %62 %17
+ OpBranch %63
+ %63 = OpLabel
+ OpLoopMerge %65 %66 None
+ OpBranch %67
+ %67 = OpLabel
+ %68 = OpLoad %6 %62
+ %70 = OpSLessThan %38 %68 %69
+ %71 = OpLoad %6 %8
+ %72 = OpSLessThan %38 %71 %58
+ %73 = OpLogicalAnd %38 %70 %72
+ OpBranchConditional %73 %64 %65
+ %64 = OpLabel
+ %74 = OpLoad %6 %8
+ %75 = OpIAdd %6 %74 %17
+ OpStore %8 %75
+ %77 = OpLoad %6 %62
+ OpStore %76 %77
+ OpBranch %78
+ %78 = OpLabel
+ OpLoopMerge %80 %81 None
+ OpBranch %82
+ %82 = OpLabel
+ %83 = OpLoad %6 %76
+ %84 = OpSLessThanEqual %38 %83 %17
+ %85 = OpLoad %6 %8
+ %86 = OpSLessThan %38 %85 %58
+ %87 = OpLogicalAnd %38 %84 %86
+ OpBranchConditional %87 %79 %80
+ %79 = OpLabel
+ %88 = OpLoad %6 %8
+ %89 = OpIAdd %6 %88 %17
+ OpStore %8 %89
+ %90 = OpLoad %6 %76
+ %91 = OpLoad %6 %76
+ %92 = OpAccessChain %7 %16 %91
+ %93 = OpLoad %6 %92
+ %94 = OpAccessChain %7 %14 %90
+ OpStore %94 %93
+ OpBranch %81
+ %81 = OpLabel
+ %95 = OpLoad %6 %76
+ %96 = OpIAdd %6 %95 %17
+ OpStore %76 %96
+ OpBranch %78
+ %80 = OpLabel
+ OpBranch %66
+ %66 = OpLabel
+ %97 = OpLoad %6 %49
+ %98 = OpLoad %6 %62
+ %99 = OpIAdd %6 %98 %97
+ OpStore %62 %99
+ OpBranch %63
+ %65 = OpLabel
+ OpBranch %55
+ %55 = OpLabel
+ %101 = OpAccessChain %26 %25 %9 %100
+ %102 = OpLoad %6 %101
+ %103 = OpLoad %6 %49
+ %104 = OpIMul %6 %103 %102
+ OpStore %49 %104
+ OpBranch %52
+ %54 = OpLabel
+ %105 = OpAccessChain %26 %25 %9 %17
+ %106 = OpLoad %6 %105
+ %107 = OpAccessChain %7 %14 %106
+ %108 = OpLoad %6 %107
+ %109 = OpAccessChain %26 %25 %9 %17
+ %110 = OpLoad %6 %109
+ %111 = OpIEqual %38 %108 %110
+ OpSelectionMerge %113 None
+ OpBranchConditional %111 %112 %113
+ %112 = OpLabel
+ %114 = OpAccessChain %26 %25 %9 %17
+ %115 = OpLoad %6 %114
+ %116 = OpAccessChain %7 %16 %115
+ %117 = OpLoad %6 %116
+ %118 = OpAccessChain %26 %25 %9 %9
+ %119 = OpLoad %6 %118
+ %120 = OpIEqual %38 %117 %119
+ OpBranch %113
+ %113 = OpLabel
+ %121 = OpPhi %38 %111 %54 %120 %112
+ OpSelectionMerge %123 None
+ OpBranchConditional %121 %122 %123
+ %122 = OpLabel
+ %124 = OpAccessChain %26 %25 %9 %9
+ %125 = OpLoad %6 %124
+ %126 = OpAccessChain %7 %14 %125
+ %127 = OpLoad %6 %126
+ %128 = OpAccessChain %26 %25 %9 %17
+ %129 = OpLoad %6 %128
+ %130 = OpIEqual %38 %127 %129
+ OpBranch %123
+ %123 = OpLabel
+ %131 = OpPhi %38 %121 %113 %130 %122
+ OpSelectionMerge %133 None
+ OpBranchConditional %131 %132 %133
+ %132 = OpLabel
+ %134 = OpAccessChain %26 %25 %9 %9
+ %135 = OpLoad %6 %134
+ %136 = OpAccessChain %7 %16 %135
+ %137 = OpLoad %6 %136
+ %138 = OpAccessChain %26 %25 %9 %17
+ %139 = OpLoad %6 %138
+ %140 = OpIEqual %38 %137 %139
+ OpBranch %133
+ %133 = OpLabel
+ %141 = OpPhi %38 %131 %123 %140 %132
+ OpSelectionMerge %143 None
+ OpBranchConditional %141 %142 %161
+ %142 = OpLabel
+ %148 = OpAccessChain %26 %25 %9 %9
+ %149 = OpLoad %6 %148
+ %150 = OpConvertSToF %144 %149
+ %151 = OpAccessChain %26 %25 %9 %17
+ %152 = OpLoad %6 %151
+ %153 = OpConvertSToF %144 %152
+ %154 = OpAccessChain %26 %25 %9 %17
+ %155 = OpLoad %6 %154
+ %156 = OpConvertSToF %144 %155
+ %157 = OpAccessChain %26 %25 %9 %9
+ %158 = OpLoad %6 %157
+ %159 = OpConvertSToF %144 %158
+ %160 = OpCompositeConstruct %145 %150 %153 %156 %159
+ OpStore %147 %160
+ OpBranch %143
+ %161 = OpLabel
+ %162 = OpAccessChain %26 %25 %9 %17
+ %163 = OpLoad %6 %162
+ %164 = OpConvertSToF %144 %163
+ %165 = OpCompositeConstruct %145 %164 %164 %164 %164
+ OpStore %147 %165
+ OpBranch %143
+ %143 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 10 2
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _GLF_MAKE_IN_BOUNDS_INT(IDX, SZ) clamp(IDX, 0, SZ - 1)
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_0_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [1.0, 0.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int a = 4;
+# vec4 v = vec4(1.0);
+#
+# // Iterates i = 4..1. Decreases v.w by two (because of the clamp) and v.y and v.z by one.
+# for(int i = a; i > 0; i--)
+# {
+# for(int j = a; j > 0; j--)
+# {
+# // Indices used: 3, 3, 2, 1.
+# v[_GLF_MAKE_IN_BOUNDS_INT(i, 4)] -= _float_1_0;
+#
+# // Always false.
+# if(gl_FragCoord.x < _float_0_0)
+# {
+# continue;
+# }
+#
+# a += 1;
+# break;
+# }
+# }
+#
+# // Always true.
+# if(v == vec4(1, 0, 0, -1))
+# {
+# _GLF_color = vec4(1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 104
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %54 %83
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "a"
+ OpName %13 "v"
+ OpName %16 "i"
+ OpName %27 "j"
+ OpName %42 "buf0"
+ OpMemberName %42 0 "_GLF_uniform_float_values"
+ OpName %44 ""
+ OpName %54 "gl_FragCoord"
+ OpName %83 "_GLF_color"
+ OpName %85 "buf1"
+ OpMemberName %85 0 "_GLF_uniform_int_values"
+ OpName %87 ""
+ OpDecorate %41 ArrayStride 16
+ OpMemberDecorate %42 0 Offset 0
+ OpDecorate %42 Block
+ OpDecorate %44 DescriptorSet 0
+ OpDecorate %44 Binding 0
+ OpDecorate %54 BuiltIn FragCoord
+ OpDecorate %83 Location 0
+ OpDecorate %84 ArrayStride 16
+ OpMemberDecorate %85 0 Offset 0
+ OpDecorate %85 Block
+ OpDecorate %87 DescriptorSet 0
+ OpDecorate %87 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %9 = OpConstant %6 4
+ %10 = OpTypeFloat 32
+ %11 = OpTypeVector %10 4
+ %12 = OpTypePointer Function %11
+ %14 = OpConstant %10 1
+ %15 = OpConstantComposite %11 %14 %14 %14 %14
+ %24 = OpConstant %6 0
+ %25 = OpTypeBool
+ %37 = OpConstant %6 3
+ %39 = OpTypeInt 32 0
+ %40 = OpConstant %39 2
+ %41 = OpTypeArray %10 %40
+ %42 = OpTypeStruct %41
+ %43 = OpTypePointer Uniform %42
+ %44 = OpVariable %43 Uniform
+ %45 = OpTypePointer Uniform %10
+ %48 = OpTypePointer Function %10
+ %53 = OpTypePointer Input %11
+ %54 = OpVariable %53 Input
+ %55 = OpConstant %39 0
+ %56 = OpTypePointer Input %10
+ %59 = OpConstant %6 1
+ %74 = OpConstant %10 0
+ %75 = OpConstant %10 -1
+ %76 = OpConstantComposite %11 %14 %74 %74 %75
+ %77 = OpTypeVector %25 4
+ %82 = OpTypePointer Output %11
+ %83 = OpVariable %82 Output
+ %84 = OpTypeArray %6 %40
+ %85 = OpTypeStruct %84
+ %86 = OpTypePointer Uniform %85
+ %87 = OpVariable %86 Uniform
+ %88 = OpTypePointer Uniform %6
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %13 = OpVariable %12 Function
+ %16 = OpVariable %7 Function
+ %27 = OpVariable %7 Function
+ OpStore %8 %9
+ OpStore %13 %15
+ %17 = OpLoad %6 %8
+ OpStore %16 %17
+ OpBranch %18
+ %18 = OpLabel
+ OpLoopMerge %20 %21 None
+ OpBranch %22
+ %22 = OpLabel
+ %23 = OpLoad %6 %16
+ %26 = OpSGreaterThan %25 %23 %24
+ OpBranchConditional %26 %19 %20
+ %19 = OpLabel
+ %28 = OpLoad %6 %8
+ OpStore %27 %28
+ OpBranch %29
+ %29 = OpLabel
+ OpLoopMerge %31 %32 None
+ OpBranch %33
+ %33 = OpLabel
+ %34 = OpLoad %6 %27
+ %35 = OpSGreaterThan %25 %34 %24
+ OpBranchConditional %35 %30 %31
+ %30 = OpLabel
+ %36 = OpLoad %6 %16
+ %38 = OpExtInst %6 %1 SClamp %36 %24 %37
+ %46 = OpAccessChain %45 %44 %24 %24
+ %47 = OpLoad %10 %46
+ %49 = OpAccessChain %48 %13 %38
+ %50 = OpLoad %10 %49
+ %51 = OpFSub %10 %50 %47
+ %52 = OpAccessChain %48 %13 %38
+ OpStore %52 %51
+ %57 = OpAccessChain %56 %54 %55
+ %58 = OpLoad %10 %57
+ %60 = OpAccessChain %45 %44 %24 %59
+ %61 = OpLoad %10 %60
+ %62 = OpFOrdLessThan %25 %58 %61
+ OpSelectionMerge %64 None
+ OpBranchConditional %62 %63 %64
+ %63 = OpLabel
+ OpBranch %32
+ %64 = OpLabel
+ %66 = OpLoad %6 %8
+ %67 = OpIAdd %6 %66 %59
+ OpStore %8 %67
+ OpBranch %31
+ %32 = OpLabel
+ %69 = OpLoad %6 %27
+ %70 = OpISub %6 %69 %59
+ OpStore %27 %70
+ OpBranch %29
+ %31 = OpLabel
+ OpBranch %21
+ %21 = OpLabel
+ %71 = OpLoad %6 %16
+ %72 = OpISub %6 %71 %59
+ OpStore %16 %72
+ OpBranch %18
+ %20 = OpLabel
+ %73 = OpLoad %11 %13
+ %78 = OpFOrdEqual %77 %73 %76
+ %79 = OpAll %25 %78
+ OpSelectionMerge %81 None
+ OpBranchConditional %79 %80 %99
+ %80 = OpLabel
+ %89 = OpAccessChain %88 %87 %24 %24
+ %90 = OpLoad %6 %89
+ %91 = OpConvertSToF %10 %90
+ %92 = OpAccessChain %88 %87 %24 %24
+ %93 = OpLoad %6 %92
+ %94 = OpConvertSToF %10 %93
+ %95 = OpAccessChain %88 %87 %24 %59
+ %96 = OpLoad %6 %95
+ %97 = OpConvertSToF %10 %96
+ %98 = OpCompositeConstruct %11 %14 %91 %94 %97
+ OpStore %83 %98
+ OpBranch %81
+ %99 = OpLabel
+ %100 = OpAccessChain %88 %87 %24 %24
+ %101 = OpLoad %6 %100
+ %102 = OpConvertSToF %10 %101
+ %103 = OpCompositeConstruct %11 %102 %102 %102 %102
+ OpStore %83 %103
+ OpBranch %81
+ %81 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of _GLF_uniform_float_values: 1.0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# int func(float x)
+# {
+# for(int i = 1; i < 800 && _GLF_global_loop_count < _GLF_global_loop_bound; i++)
+# {
+# _GLF_global_loop_count++;
+#
+# if(float(i) >= x)
+# {
+# return _int_1;
+# }
+# }
+#
+# return 0;
+# }
+#
+# void main()
+# {
+# // func returns one.
+# int a = func(_float_1_0);
+# // func returns zero because global loop count has been reached.
+# a += func(35.61);
+#
+# // Always true.
+# if(a == 1)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 95
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %76
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "func(f1;"
+ OpName %10 "x"
+ OpName %14 "_GLF_global_loop_count"
+ OpName %17 "i"
+ OpName %43 "buf0"
+ OpMemberName %43 0 "_GLF_uniform_int_values"
+ OpName %45 ""
+ OpName %54 "a"
+ OpName %57 "buf1"
+ OpMemberName %57 0 "_GLF_uniform_float_values"
+ OpName %59 ""
+ OpName %60 "param"
+ OpName %66 "param"
+ OpName %76 "_GLF_color"
+ OpDecorate %42 ArrayStride 16
+ OpMemberDecorate %43 0 Offset 0
+ OpDecorate %43 Block
+ OpDecorate %45 DescriptorSet 0
+ OpDecorate %45 Binding 0
+ OpDecorate %56 ArrayStride 16
+ OpMemberDecorate %57 0 Offset 0
+ OpDecorate %57 Block
+ OpDecorate %59 DescriptorSet 0
+ OpDecorate %59 Binding 1
+ OpDecorate %76 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %8 = OpTypeInt 32 1
+ %9 = OpTypeFunction %8 %7
+ %13 = OpTypePointer Private %8
+ %14 = OpVariable %13 Private
+ %15 = OpConstant %8 0
+ %16 = OpTypePointer Function %8
+ %18 = OpConstant %8 1
+ %25 = OpConstant %8 800
+ %26 = OpTypeBool
+ %29 = OpConstant %8 10
+ %40 = OpTypeInt 32 0
+ %41 = OpConstant %40 2
+ %42 = OpTypeArray %8 %41
+ %43 = OpTypeStruct %42
+ %44 = OpTypePointer Uniform %43
+ %45 = OpVariable %44 Uniform
+ %46 = OpTypePointer Uniform %8
+ %55 = OpConstant %40 1
+ %56 = OpTypeArray %6 %55
+ %57 = OpTypeStruct %56
+ %58 = OpTypePointer Uniform %57
+ %59 = OpVariable %58 Uniform
+ %61 = OpTypePointer Uniform %6
+ %65 = OpConstant %6 35.6100006
+ %74 = OpTypeVector %6 4
+ %75 = OpTypePointer Output %74
+ %76 = OpVariable %75 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %54 = OpVariable %16 Function
+ %60 = OpVariable %7 Function
+ %66 = OpVariable %7 Function
+ OpStore %14 %15
+ %62 = OpAccessChain %61 %59 %15 %15
+ %63 = OpLoad %6 %62
+ OpStore %60 %63
+ %64 = OpFunctionCall %8 %11 %60
+ OpStore %54 %64
+ OpStore %66 %65
+ %67 = OpFunctionCall %8 %11 %66
+ %68 = OpLoad %8 %54
+ %69 = OpIAdd %8 %68 %67
+ OpStore %54 %69
+ %70 = OpLoad %8 %54
+ %71 = OpIEqual %26 %70 %18
+ OpSelectionMerge %73 None
+ OpBranchConditional %71 %72 %90
+ %72 = OpLabel
+ %77 = OpAccessChain %46 %45 %15 %15
+ %78 = OpLoad %8 %77
+ %79 = OpConvertSToF %6 %78
+ %80 = OpAccessChain %46 %45 %15 %18
+ %81 = OpLoad %8 %80
+ %82 = OpConvertSToF %6 %81
+ %83 = OpAccessChain %46 %45 %15 %18
+ %84 = OpLoad %8 %83
+ %85 = OpConvertSToF %6 %84
+ %86 = OpAccessChain %46 %45 %15 %15
+ %87 = OpLoad %8 %86
+ %88 = OpConvertSToF %6 %87
+ %89 = OpCompositeConstruct %74 %79 %82 %85 %88
+ OpStore %76 %89
+ OpBranch %73
+ %90 = OpLabel
+ %91 = OpAccessChain %46 %45 %15 %18
+ %92 = OpLoad %8 %91
+ %93 = OpConvertSToF %6 %92
+ %94 = OpCompositeConstruct %74 %93 %93 %93 %93
+ OpStore %76 %94
+ OpBranch %73
+ %73 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %11 = OpFunction %8 None %9
+ %10 = OpFunctionParameter %7
+ %12 = OpLabel
+ %17 = OpVariable %16 Function
+ OpStore %17 %18
+ OpBranch %19
+ %19 = OpLabel
+ OpLoopMerge %21 %22 None
+ OpBranch %23
+ %23 = OpLabel
+ %24 = OpLoad %8 %17
+ %27 = OpSLessThan %26 %24 %25
+ %28 = OpLoad %8 %14
+ %30 = OpSLessThan %26 %28 %29
+ %31 = OpLogicalAnd %26 %27 %30
+ OpBranchConditional %31 %20 %21
+ %20 = OpLabel
+ %32 = OpLoad %8 %14
+ %33 = OpIAdd %8 %32 %18
+ OpStore %14 %33
+ %34 = OpLoad %8 %17
+ %35 = OpConvertSToF %6 %34
+ %36 = OpLoad %6 %10
+ %37 = OpFOrdGreaterThanEqual %26 %35 %36
+ OpSelectionMerge %39 None
+ OpBranchConditional %37 %38 %39
+ %38 = OpLabel
+ %47 = OpAccessChain %46 %45 %15 %15
+ %48 = OpLoad %8 %47
+ OpReturnValue %48
+ %39 = OpLabel
+ OpBranch %22
+ %22 = OpLabel
+ %50 = OpLoad %8 %17
+ %51 = OpIAdd %8 %50 %18
+ OpStore %17 %51
+ OpBranch %19
+ %21 = OpLabel
+ OpReturnValue %15
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_10 _GLF_uniform_int_values[2]
+# #define _int_5 _GLF_uniform_int_values[3]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 10, 5]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# // Contents of injectionSwitch: [0.0, 1.0]
+# layout(push_constant) uniform buf_push {
+# highp vec2 injectionSwitch;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S
+# {
+# int data;
+# };
+#
+# S arr[10] = S[10](S(1), S(1), S(1), S(1), S(1), S(1), S(1), S(1), S(1), S(1));
+#
+# void func(inout S s)
+# {
+# // Always false.
+# if(injectionSwitch.x > injectionSwitch.y)
+# {
+# return;
+# }
+#
+# // Always false.
+# if(gl_FragCoord.y < 0.0)
+# {
+# return;
+# }
+#
+# s.data = 0;
+# }
+#
+# void main()
+# {
+# func(arr[_int_1]);
+# bool b = false;
+#
+# // Always false.
+# if(injectionSwitch.x > injectionSwitch.y)
+# {
+# b = true;
+# }
+#
+# // Always true.
+# if(!b)
+# {
+# int idx = 0;
+#
+# for(int i = 0; i < _int_5; i++)
+# {
+# arr[idx].data = _int_1;
+# func(arr[i]);
+# }
+# }
+#
+# // The first five elements had data set to zero, but also the first element was set back to one in iterations i = 1..4.
+# int ref[10] = int[10](_int_1, _int_0, _int_0, _int_0, _int_0, _int_1, _int_1, _int_1, _int_1, _int_1);
+#
+# // Check the results and set an output color to black if the check fails.
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# for(int i = _int_0; i < _int_10; i++)
+# {
+# if(arr[i].data != ref[i])
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 175
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %41 %133
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %7 "S"
+ OpMemberName %7 0 "data"
+ OpName %11 "func(struct-S-i11;"
+ OpName %10 "s"
+ OpName %17 "arr"
+ OpName %23 "buf_push"
+ OpMemberName %23 0 "injectionSwitch"
+ OpName %25 ""
+ OpName %41 "gl_FragCoord"
+ OpName %54 "buf0"
+ OpMemberName %54 0 "_GLF_uniform_int_values"
+ OpName %56 ""
+ OpName %60 "param"
+ OpName %68 "b"
+ OpName %82 "idx"
+ OpName %83 "i"
+ OpName %100 "param"
+ OpName %110 "ref"
+ OpName %133 "_GLF_color"
+ OpName %147 "i"
+ OpMemberDecorate %23 0 Offset 0
+ OpDecorate %23 Block
+ OpDecorate %41 BuiltIn FragCoord
+ OpDecorate %53 ArrayStride 16
+ OpMemberDecorate %54 0 Offset 0
+ OpDecorate %54 Block
+ OpDecorate %56 DescriptorSet 0
+ OpDecorate %56 Binding 0
+ OpDecorate %133 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeStruct %6
+ %8 = OpTypePointer Function %7
+ %9 = OpTypeFunction %2 %8
+ %13 = OpTypeInt 32 0
+ %14 = OpConstant %13 10
+ %15 = OpTypeArray %7 %14
+ %16 = OpTypePointer Private %15
+ %17 = OpVariable %16 Private
+ %18 = OpConstant %6 1
+ %19 = OpConstantComposite %7 %18
+ %20 = OpConstantComposite %15 %19 %19 %19 %19 %19 %19 %19 %19 %19 %19
+ %21 = OpTypeFloat 32
+ %22 = OpTypeVector %21 2
+ %23 = OpTypeStruct %22
+ %24 = OpTypePointer PushConstant %23
+ %25 = OpVariable %24 PushConstant
+ %26 = OpConstant %6 0
+ %27 = OpConstant %13 0
+ %28 = OpTypePointer PushConstant %21
+ %31 = OpConstant %13 1
+ %34 = OpTypeBool
+ %39 = OpTypeVector %21 4
+ %40 = OpTypePointer Input %39
+ %41 = OpVariable %40 Input
+ %42 = OpTypePointer Input %21
+ %45 = OpConstant %21 0
+ %50 = OpTypePointer Function %6
+ %52 = OpConstant %13 4
+ %53 = OpTypeArray %6 %52
+ %54 = OpTypeStruct %53
+ %55 = OpTypePointer Uniform %54
+ %56 = OpVariable %55 Uniform
+ %57 = OpTypePointer Uniform %6
+ %61 = OpTypePointer Private %7
+ %67 = OpTypePointer Function %34
+ %69 = OpConstantFalse %34
+ %77 = OpConstantTrue %34
+ %90 = OpConstant %6 3
+ %97 = OpTypePointer Private %6
+ %108 = OpTypeArray %6 %14
+ %109 = OpTypePointer Function %108
+ %132 = OpTypePointer Output %39
+ %133 = OpVariable %132 Output
+ %156 = OpConstant %6 2
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %60 = OpVariable %8 Function
+ %68 = OpVariable %67 Function
+ %82 = OpVariable %50 Function
+ %83 = OpVariable %50 Function
+ %100 = OpVariable %8 Function
+ %110 = OpVariable %109 Function
+ %147 = OpVariable %50 Function
+ OpStore %17 %20
+ %58 = OpAccessChain %57 %56 %26 %26
+ %59 = OpLoad %6 %58
+ %62 = OpAccessChain %61 %17 %59
+ %63 = OpLoad %7 %62
+ OpStore %60 %63
+ %64 = OpFunctionCall %2 %11 %60
+ %65 = OpLoad %7 %60
+ %66 = OpAccessChain %61 %17 %59
+ OpStore %66 %65
+ OpStore %68 %69
+ %70 = OpAccessChain %28 %25 %26 %27
+ %71 = OpLoad %21 %70
+ %72 = OpAccessChain %28 %25 %26 %31
+ %73 = OpLoad %21 %72
+ %74 = OpFOrdGreaterThan %34 %71 %73
+ OpSelectionMerge %76 None
+ OpBranchConditional %74 %75 %76
+ %75 = OpLabel
+ OpStore %68 %77
+ OpBranch %76
+ %76 = OpLabel
+ %78 = OpLoad %34 %68
+ %79 = OpLogicalNot %34 %78
+ OpSelectionMerge %81 None
+ OpBranchConditional %79 %80 %81
+ %80 = OpLabel
+ OpStore %82 %26
+ OpStore %83 %26
+ OpBranch %84
+ %84 = OpLabel
+ OpLoopMerge %86 %87 None
+ OpBranch %88
+ %88 = OpLabel
+ %89 = OpLoad %6 %83
+ %91 = OpAccessChain %57 %56 %26 %90
+ %92 = OpLoad %6 %91
+ %93 = OpSLessThan %34 %89 %92
+ OpBranchConditional %93 %85 %86
+ %85 = OpLabel
+ %94 = OpLoad %6 %82
+ %95 = OpAccessChain %57 %56 %26 %26
+ %96 = OpLoad %6 %95
+ %98 = OpAccessChain %97 %17 %94 %26
+ OpStore %98 %96
+ %99 = OpLoad %6 %83
+ %101 = OpAccessChain %61 %17 %99
+ %102 = OpLoad %7 %101
+ OpStore %100 %102
+ %103 = OpFunctionCall %2 %11 %100
+ %104 = OpLoad %7 %100
+ %105 = OpAccessChain %61 %17 %99
+ OpStore %105 %104
+ OpBranch %87
+ %87 = OpLabel
+ %106 = OpLoad %6 %83
+ %107 = OpIAdd %6 %106 %18
+ OpStore %83 %107
+ OpBranch %84
+ %86 = OpLabel
+ OpBranch %81
+ %81 = OpLabel
+ %111 = OpAccessChain %57 %56 %26 %26
+ %112 = OpLoad %6 %111
+ %113 = OpAccessChain %57 %56 %26 %18
+ %114 = OpLoad %6 %113
+ %115 = OpAccessChain %57 %56 %26 %18
+ %116 = OpLoad %6 %115
+ %117 = OpAccessChain %57 %56 %26 %18
+ %118 = OpLoad %6 %117
+ %119 = OpAccessChain %57 %56 %26 %18
+ %120 = OpLoad %6 %119
+ %121 = OpAccessChain %57 %56 %26 %26
+ %122 = OpLoad %6 %121
+ %123 = OpAccessChain %57 %56 %26 %26
+ %124 = OpLoad %6 %123
+ %125 = OpAccessChain %57 %56 %26 %26
+ %126 = OpLoad %6 %125
+ %127 = OpAccessChain %57 %56 %26 %26
+ %128 = OpLoad %6 %127
+ %129 = OpAccessChain %57 %56 %26 %26
+ %130 = OpLoad %6 %129
+ %131 = OpCompositeConstruct %108 %112 %114 %116 %118 %120 %122 %124 %126 %128 %130
+ OpStore %110 %131
+ %134 = OpAccessChain %57 %56 %26 %26
+ %135 = OpLoad %6 %134
+ %136 = OpConvertSToF %21 %135
+ %137 = OpAccessChain %57 %56 %26 %18
+ %138 = OpLoad %6 %137
+ %139 = OpConvertSToF %21 %138
+ %140 = OpAccessChain %57 %56 %26 %18
+ %141 = OpLoad %6 %140
+ %142 = OpConvertSToF %21 %141
+ %143 = OpAccessChain %57 %56 %26 %26
+ %144 = OpLoad %6 %143
+ %145 = OpConvertSToF %21 %144
+ %146 = OpCompositeConstruct %39 %136 %139 %142 %145
+ OpStore %133 %146
+ %148 = OpAccessChain %57 %56 %26 %18
+ %149 = OpLoad %6 %148
+ OpStore %147 %149
+ OpBranch %150
+ %150 = OpLabel
+ OpLoopMerge %152 %153 None
+ OpBranch %154
+ %154 = OpLabel
+ %155 = OpLoad %6 %147
+ %157 = OpAccessChain %57 %56 %26 %156
+ %158 = OpLoad %6 %157
+ %159 = OpSLessThan %34 %155 %158
+ OpBranchConditional %159 %151 %152
+ %151 = OpLabel
+ %160 = OpLoad %6 %147
+ %161 = OpAccessChain %97 %17 %160 %26
+ %162 = OpLoad %6 %161
+ %163 = OpLoad %6 %147
+ %164 = OpAccessChain %50 %110 %163
+ %165 = OpLoad %6 %164
+ %166 = OpINotEqual %34 %162 %165
+ OpSelectionMerge %168 None
+ OpBranchConditional %166 %167 %168
+ %167 = OpLabel
+ %169 = OpAccessChain %57 %56 %26 %18
+ %170 = OpLoad %6 %169
+ %171 = OpConvertSToF %21 %170
+ %172 = OpCompositeConstruct %39 %171 %171 %171 %171
+ OpStore %133 %172
+ OpBranch %168
+ %168 = OpLabel
+ OpBranch %153
+ %153 = OpLabel
+ %173 = OpLoad %6 %147
+ %174 = OpIAdd %6 %173 %18
+ OpStore %147 %174
+ OpBranch %150
+ %152 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %11 = OpFunction %2 None %9
+ %10 = OpFunctionParameter %8
+ %12 = OpLabel
+ %29 = OpAccessChain %28 %25 %26 %27
+ %30 = OpLoad %21 %29
+ %32 = OpAccessChain %28 %25 %26 %31
+ %33 = OpLoad %21 %32
+ %35 = OpFOrdGreaterThan %34 %30 %33
+ OpSelectionMerge %37 None
+ OpBranchConditional %35 %36 %37
+ %36 = OpLabel
+ OpReturn
+ %37 = OpLabel
+ %43 = OpAccessChain %42 %41 %31
+ %44 = OpLoad %21 %43
+ %46 = OpFOrdLessThan %34 %44 %45
+ OpSelectionMerge %48 None
+ OpBranchConditional %46 %47 %48
+ %47 = OpLabel
+ OpReturn
+ %48 = OpLabel
+ %51 = OpAccessChain %50 %10 %26
+ OpStore %51 %26
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# injectionSwitch
+BUFFER variant_injectionSwitch DATA_TYPE vec2<float> STD140 DATA
+ 0.0 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 10 5
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_injectionSwitch AS push_constant
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_2 _GLF_uniform_int_values[2]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 2]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# const int _GLF_global_loop_bound = 5;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S
+# {
+# int data[10];
+# };
+#
+# void main()
+# {
+# S obj = S(int[10](_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1));
+# int arr[10] = int[10](_int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0);
+#
+# obj.data[_int_1] = _int_0;
+# int a = _int_1;
+#
+# // Iterated once.
+# while(_GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# _GLF_global_loop_count++;
+#
+# // b = 0.
+# int b = arr[_int_1];
+#
+# // Iterated four times.
+# do
+# {
+# _GLF_global_loop_count++;
+#
+# // Always true.
+# if(gl_FragCoord.y > _float_0_0)
+# {
+# b++;
+# }
+# }
+# while((gl_FragCoord.x > _float_0_0) && (_GLF_global_loop_count < _GLF_global_loop_bound));
+#
+# int c = _int_1;
+#
+# // Always true.
+# if(obj.data[b] <= _int_1)
+# {
+# c++;
+# }
+#
+# // arr[2] = 2.
+# arr[++a] = c;
+# }
+#
+# // Always true.
+# if(arr[_int_2] == _int_2)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 175
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %102 %156
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "_GLF_global_loop_count"
+ OpName %13 "S"
+ OpMemberName %13 0 "data"
+ OpName %15 "obj"
+ OpName %18 "buf1"
+ OpMemberName %18 0 "_GLF_uniform_int_values"
+ OpName %20 ""
+ OpName %45 "arr"
+ OpName %74 "a"
+ OpName %88 "b"
+ OpName %102 "gl_FragCoord"
+ OpName %108 "buf0"
+ OpMemberName %108 0 "_GLF_uniform_float_values"
+ OpName %110 ""
+ OpName %128 "c"
+ OpName %156 "_GLF_color"
+ OpDecorate %17 ArrayStride 16
+ OpMemberDecorate %18 0 Offset 0
+ OpDecorate %18 Block
+ OpDecorate %20 DescriptorSet 0
+ OpDecorate %20 Binding 1
+ OpDecorate %102 BuiltIn FragCoord
+ OpDecorate %107 ArrayStride 16
+ OpMemberDecorate %108 0 Offset 0
+ OpDecorate %108 Block
+ OpDecorate %110 DescriptorSet 0
+ OpDecorate %110 Binding 0
+ OpDecorate %156 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %10 = OpTypeInt 32 0
+ %11 = OpConstant %10 10
+ %12 = OpTypeArray %6 %11
+ %13 = OpTypeStruct %12
+ %14 = OpTypePointer Function %13
+ %16 = OpConstant %10 3
+ %17 = OpTypeArray %6 %16
+ %18 = OpTypeStruct %17
+ %19 = OpTypePointer Uniform %18
+ %20 = OpVariable %19 Uniform
+ %21 = OpTypePointer Uniform %6
+ %44 = OpTypePointer Function %12
+ %46 = OpConstant %6 1
+ %72 = OpTypePointer Function %6
+ %83 = OpConstant %6 5
+ %84 = OpTypeBool
+ %99 = OpTypeFloat 32
+ %100 = OpTypeVector %99 4
+ %101 = OpTypePointer Input %100
+ %102 = OpVariable %101 Input
+ %103 = OpConstant %10 1
+ %104 = OpTypePointer Input %99
+ %107 = OpTypeArray %99 %103
+ %108 = OpTypeStruct %107
+ %109 = OpTypePointer Uniform %108
+ %110 = OpVariable %109 Uniform
+ %111 = OpTypePointer Uniform %99
+ %119 = OpConstant %10 0
+ %145 = OpConstant %6 2
+ %155 = OpTypePointer Output %100
+ %156 = OpVariable %155 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %15 = OpVariable %14 Function
+ %45 = OpVariable %44 Function
+ %74 = OpVariable %72 Function
+ %88 = OpVariable %72 Function
+ %128 = OpVariable %72 Function
+ OpStore %8 %9
+ %22 = OpAccessChain %21 %20 %9 %9
+ %23 = OpLoad %6 %22
+ %24 = OpAccessChain %21 %20 %9 %9
+ %25 = OpLoad %6 %24
+ %26 = OpAccessChain %21 %20 %9 %9
+ %27 = OpLoad %6 %26
+ %28 = OpAccessChain %21 %20 %9 %9
+ %29 = OpLoad %6 %28
+ %30 = OpAccessChain %21 %20 %9 %9
+ %31 = OpLoad %6 %30
+ %32 = OpAccessChain %21 %20 %9 %9
+ %33 = OpLoad %6 %32
+ %34 = OpAccessChain %21 %20 %9 %9
+ %35 = OpLoad %6 %34
+ %36 = OpAccessChain %21 %20 %9 %9
+ %37 = OpLoad %6 %36
+ %38 = OpAccessChain %21 %20 %9 %9
+ %39 = OpLoad %6 %38
+ %40 = OpAccessChain %21 %20 %9 %9
+ %41 = OpLoad %6 %40
+ %42 = OpCompositeConstruct %12 %23 %25 %27 %29 %31 %33 %35 %37 %39 %41
+ %43 = OpCompositeConstruct %13 %42
+ OpStore %15 %43
+ %47 = OpAccessChain %21 %20 %9 %46
+ %48 = OpLoad %6 %47
+ %49 = OpAccessChain %21 %20 %9 %46
+ %50 = OpLoad %6 %49
+ %51 = OpAccessChain %21 %20 %9 %46
+ %52 = OpLoad %6 %51
+ %53 = OpAccessChain %21 %20 %9 %46
+ %54 = OpLoad %6 %53
+ %55 = OpAccessChain %21 %20 %9 %46
+ %56 = OpLoad %6 %55
+ %57 = OpAccessChain %21 %20 %9 %46
+ %58 = OpLoad %6 %57
+ %59 = OpAccessChain %21 %20 %9 %46
+ %60 = OpLoad %6 %59
+ %61 = OpAccessChain %21 %20 %9 %46
+ %62 = OpLoad %6 %61
+ %63 = OpAccessChain %21 %20 %9 %46
+ %64 = OpLoad %6 %63
+ %65 = OpAccessChain %21 %20 %9 %46
+ %66 = OpLoad %6 %65
+ %67 = OpCompositeConstruct %12 %48 %50 %52 %54 %56 %58 %60 %62 %64 %66
+ OpStore %45 %67
+ %68 = OpAccessChain %21 %20 %9 %9
+ %69 = OpLoad %6 %68
+ %70 = OpAccessChain %21 %20 %9 %46
+ %71 = OpLoad %6 %70
+ %73 = OpAccessChain %72 %15 %9 %69
+ OpStore %73 %71
+ %75 = OpAccessChain %21 %20 %9 %9
+ %76 = OpLoad %6 %75
+ OpStore %74 %76
+ OpBranch %77
+ %77 = OpLabel
+ OpLoopMerge %79 %80 None
+ OpBranch %81
+ %81 = OpLabel
+ %82 = OpLoad %6 %8
+ %85 = OpSLessThan %84 %82 %83
+ OpBranchConditional %85 %78 %79
+ %78 = OpLabel
+ %86 = OpLoad %6 %8
+ %87 = OpIAdd %6 %86 %46
+ OpStore %8 %87
+ %89 = OpAccessChain %21 %20 %9 %9
+ %90 = OpLoad %6 %89
+ %91 = OpAccessChain %72 %45 %90
+ %92 = OpLoad %6 %91
+ OpStore %88 %92
+ OpBranch %93
+ %93 = OpLabel
+ OpLoopMerge %95 %96 None
+ OpBranch %94
+ %94 = OpLabel
+ %97 = OpLoad %6 %8
+ %98 = OpIAdd %6 %97 %46
+ OpStore %8 %98
+ %105 = OpAccessChain %104 %102 %103
+ %106 = OpLoad %99 %105
+ %112 = OpAccessChain %111 %110 %9 %9
+ %113 = OpLoad %99 %112
+ %114 = OpFOrdGreaterThan %84 %106 %113
+ OpSelectionMerge %116 None
+ OpBranchConditional %114 %115 %116
+ %115 = OpLabel
+ %117 = OpLoad %6 %88
+ %118 = OpIAdd %6 %117 %46
+ OpStore %88 %118
+ OpBranch %116
+ %116 = OpLabel
+ OpBranch %96
+ %96 = OpLabel
+ %120 = OpAccessChain %104 %102 %119
+ %121 = OpLoad %99 %120
+ %122 = OpAccessChain %111 %110 %9 %9
+ %123 = OpLoad %99 %122
+ %124 = OpFOrdGreaterThan %84 %121 %123
+ %125 = OpLoad %6 %8
+ %126 = OpSLessThan %84 %125 %83
+ %127 = OpLogicalAnd %84 %124 %126
+ OpBranchConditional %127 %93 %95
+ %95 = OpLabel
+ %129 = OpAccessChain %21 %20 %9 %9
+ %130 = OpLoad %6 %129
+ OpStore %128 %130
+ %131 = OpLoad %6 %88
+ %132 = OpAccessChain %72 %15 %9 %131
+ %133 = OpLoad %6 %132
+ %134 = OpAccessChain %21 %20 %9 %9
+ %135 = OpLoad %6 %134
+ %136 = OpSLessThanEqual %84 %133 %135
+ OpSelectionMerge %138 None
+ OpBranchConditional %136 %137 %138
+ %137 = OpLabel
+ %139 = OpLoad %6 %128
+ %140 = OpIAdd %6 %139 %46
+ OpStore %128 %140
+ OpBranch %138
+ %138 = OpLabel
+ %141 = OpLoad %6 %74
+ %142 = OpIAdd %6 %141 %46
+ OpStore %74 %142
+ %143 = OpLoad %6 %128
+ %144 = OpAccessChain %72 %45 %142
+ OpStore %144 %143
+ OpBranch %80
+ %80 = OpLabel
+ OpBranch %77
+ %79 = OpLabel
+ %146 = OpAccessChain %21 %20 %9 %145
+ %147 = OpLoad %6 %146
+ %148 = OpAccessChain %72 %45 %147
+ %149 = OpLoad %6 %148
+ %150 = OpAccessChain %21 %20 %9 %145
+ %151 = OpLoad %6 %150
+ %152 = OpIEqual %84 %149 %151
+ OpSelectionMerge %154 None
+ OpBranchConditional %152 %153 %170
+ %153 = OpLabel
+ %157 = OpAccessChain %21 %20 %9 %9
+ %158 = OpLoad %6 %157
+ %159 = OpConvertSToF %99 %158
+ %160 = OpAccessChain %21 %20 %9 %46
+ %161 = OpLoad %6 %160
+ %162 = OpConvertSToF %99 %161
+ %163 = OpAccessChain %21 %20 %9 %46
+ %164 = OpLoad %6 %163
+ %165 = OpConvertSToF %99 %164
+ %166 = OpAccessChain %21 %20 %9 %9
+ %167 = OpLoad %6 %166
+ %168 = OpConvertSToF %99 %167
+ %169 = OpCompositeConstruct %100 %159 %162 %165 %168
+ OpStore %156 %169
+ OpBranch %154
+ %170 = OpLabel
+ %171 = OpAccessChain %21 %20 %9 %46
+ %172 = OpLoad %6 %171
+ %173 = OpConvertSToF %99 %172
+ %174 = OpCompositeConstruct %100 %173 %173 %173 %173
+ OpStore %156 %174
+ OpBranch %154
+ %154 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 2
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _GLF_MAKE_IN_BOUNDS_INT(IDX, SZ) clamp(IDX, 0, SZ - 1)
+# #define _int_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_7 _GLF_uniform_int_values[2]
+# #define _int_9 _GLF_uniform_int_values[3]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_3_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [1.0, 3.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1, 7, 9]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float arr[9] = float[9](_float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0);
+#
+# // Sets arr[7] = 3.
+# for(int i = 1; i < 3; i++)
+# {
+# arr[_int_7] += _float_1_0;
+# }
+#
+# // Does nothing. Still needed for the coverage.
+# int a = _int_1;
+# while(true)
+# {
+# if(a++ >= 4)
+# {
+# break;
+# }
+# }
+#
+# int idx = clamp(int(gl_FragCoord.y), _int_0, _int_9 - _int_1);
+#
+# // Always true.
+# if(arr[_GLF_MAKE_IN_BOUNDS_INT(idx, 9)] == (idx == _int_7 ? _float_3_0 : _float_1_0))
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 143
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %88 %124
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "arr"
+ OpName %14 "buf0"
+ OpMemberName %14 0 "_GLF_uniform_float_values"
+ OpName %16 ""
+ OpName %40 "i"
+ OpName %53 "buf1"
+ OpMemberName %53 0 "_GLF_uniform_int_values"
+ OpName %55 ""
+ OpName %69 "a"
+ OpName %85 "idx"
+ OpName %88 "gl_FragCoord"
+ OpName %124 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 0
+ OpDecorate %52 ArrayStride 16
+ OpMemberDecorate %53 0 Offset 0
+ OpDecorate %53 Block
+ OpDecorate %55 DescriptorSet 0
+ OpDecorate %55 Binding 1
+ OpDecorate %88 BuiltIn FragCoord
+ OpDecorate %124 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 9
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypePointer Function %9
+ %12 = OpConstant %7 2
+ %13 = OpTypeArray %6 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpTypeInt 32 1
+ %18 = OpConstant %17 0
+ %19 = OpTypePointer Uniform %6
+ %39 = OpTypePointer Function %17
+ %41 = OpConstant %17 1
+ %48 = OpConstant %17 3
+ %49 = OpTypeBool
+ %51 = OpConstant %7 4
+ %52 = OpTypeArray %17 %51
+ %53 = OpTypeStruct %52
+ %54 = OpTypePointer Uniform %53
+ %55 = OpVariable %54 Uniform
+ %56 = OpConstant %17 2
+ %57 = OpTypePointer Uniform %17
+ %62 = OpTypePointer Function %6
+ %77 = OpConstantTrue %49
+ %80 = OpConstant %17 4
+ %86 = OpTypeVector %6 4
+ %87 = OpTypePointer Input %86
+ %88 = OpVariable %87 Input
+ %89 = OpConstant %7 1
+ %90 = OpTypePointer Input %6
+ %103 = OpConstant %17 8
+ %123 = OpTypePointer Output %86
+ %124 = OpVariable %123 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %40 = OpVariable %39 Function
+ %69 = OpVariable %39 Function
+ %85 = OpVariable %39 Function
+ %111 = OpVariable %62 Function
+ %20 = OpAccessChain %19 %16 %18 %18
+ %21 = OpLoad %6 %20
+ %22 = OpAccessChain %19 %16 %18 %18
+ %23 = OpLoad %6 %22
+ %24 = OpAccessChain %19 %16 %18 %18
+ %25 = OpLoad %6 %24
+ %26 = OpAccessChain %19 %16 %18 %18
+ %27 = OpLoad %6 %26
+ %28 = OpAccessChain %19 %16 %18 %18
+ %29 = OpLoad %6 %28
+ %30 = OpAccessChain %19 %16 %18 %18
+ %31 = OpLoad %6 %30
+ %32 = OpAccessChain %19 %16 %18 %18
+ %33 = OpLoad %6 %32
+ %34 = OpAccessChain %19 %16 %18 %18
+ %35 = OpLoad %6 %34
+ %36 = OpAccessChain %19 %16 %18 %18
+ %37 = OpLoad %6 %36
+ %38 = OpCompositeConstruct %9 %21 %23 %25 %27 %29 %31 %33 %35 %37
+ OpStore %11 %38
+ OpStore %40 %41
+ OpBranch %42
+ %42 = OpLabel
+ OpLoopMerge %44 %45 None
+ OpBranch %46
+ %46 = OpLabel
+ %47 = OpLoad %17 %40
+ %50 = OpSLessThan %49 %47 %48
+ OpBranchConditional %50 %43 %44
+ %43 = OpLabel
+ %58 = OpAccessChain %57 %55 %18 %56
+ %59 = OpLoad %17 %58
+ %60 = OpAccessChain %19 %16 %18 %18
+ %61 = OpLoad %6 %60
+ %63 = OpAccessChain %62 %11 %59
+ %64 = OpLoad %6 %63
+ %65 = OpFAdd %6 %64 %61
+ %66 = OpAccessChain %62 %11 %59
+ OpStore %66 %65
+ OpBranch %45
+ %45 = OpLabel
+ %67 = OpLoad %17 %40
+ %68 = OpIAdd %17 %67 %41
+ OpStore %40 %68
+ OpBranch %42
+ %44 = OpLabel
+ %70 = OpAccessChain %57 %55 %18 %41
+ %71 = OpLoad %17 %70
+ OpStore %69 %71
+ OpBranch %72
+ %72 = OpLabel
+ OpLoopMerge %74 %75 None
+ OpBranch %76
+ %76 = OpLabel
+ OpBranchConditional %77 %73 %74
+ %73 = OpLabel
+ %78 = OpLoad %17 %69
+ %79 = OpIAdd %17 %78 %41
+ OpStore %69 %79
+ %81 = OpSGreaterThanEqual %49 %78 %80
+ OpSelectionMerge %83 None
+ OpBranchConditional %81 %82 %83
+ %82 = OpLabel
+ OpBranch %74
+ %83 = OpLabel
+ OpBranch %75
+ %75 = OpLabel
+ OpBranch %72
+ %74 = OpLabel
+ %91 = OpAccessChain %90 %88 %89
+ %92 = OpLoad %6 %91
+ %93 = OpConvertFToS %17 %92
+ %94 = OpAccessChain %57 %55 %18 %18
+ %95 = OpLoad %17 %94
+ %96 = OpAccessChain %57 %55 %18 %48
+ %97 = OpLoad %17 %96
+ %98 = OpAccessChain %57 %55 %18 %41
+ %99 = OpLoad %17 %98
+ %100 = OpISub %17 %97 %99
+ %101 = OpExtInst %17 %1 SClamp %93 %95 %100
+ OpStore %85 %101
+ %102 = OpLoad %17 %85
+ %104 = OpExtInst %17 %1 SClamp %102 %18 %103
+ %105 = OpAccessChain %62 %11 %104
+ %106 = OpLoad %6 %105
+ %107 = OpLoad %17 %85
+ %108 = OpAccessChain %57 %55 %18 %56
+ %109 = OpLoad %17 %108
+ %110 = OpIEqual %49 %107 %109
+ OpSelectionMerge %113 None
+ OpBranchConditional %110 %112 %116
+ %112 = OpLabel
+ %114 = OpAccessChain %19 %16 %18 %41
+ %115 = OpLoad %6 %114
+ OpStore %111 %115
+ OpBranch %113
+ %116 = OpLabel
+ %117 = OpAccessChain %19 %16 %18 %18
+ %118 = OpLoad %6 %117
+ OpStore %111 %118
+ OpBranch %113
+ %113 = OpLabel
+ %119 = OpLoad %6 %111
+ %120 = OpFOrdEqual %49 %106 %119
+ OpSelectionMerge %122 None
+ OpBranchConditional %120 %121 %138
+ %121 = OpLabel
+ %125 = OpAccessChain %57 %55 %18 %41
+ %126 = OpLoad %17 %125
+ %127 = OpConvertSToF %6 %126
+ %128 = OpAccessChain %57 %55 %18 %18
+ %129 = OpLoad %17 %128
+ %130 = OpConvertSToF %6 %129
+ %131 = OpAccessChain %57 %55 %18 %18
+ %132 = OpLoad %17 %131
+ %133 = OpConvertSToF %6 %132
+ %134 = OpAccessChain %57 %55 %18 %41
+ %135 = OpLoad %17 %134
+ %136 = OpConvertSToF %6 %135
+ %137 = OpCompositeConstruct %86 %127 %130 %133 %136
+ OpStore %124 %137
+ OpBranch %122
+ %138 = OpLabel
+ %139 = OpAccessChain %57 %55 %18 %18
+ %140 = OpLoad %17 %139
+ %141 = OpConvertSToF %6 %140
+ %142 = OpCompositeConstruct %86 %141 %141 %141 %141
+ OpStore %124 %142
+ OpBranch %122
+ %122 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 1 7 9
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 3.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_5 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _int_2 _GLF_uniform_int_values[3]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [5, 1, 0, 2]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[4];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S
+# {
+# int data[5];
+# };
+#
+# void main()
+# {
+# S obj = S(int[5](1, _int_1, _int_1, _int_1, _int_1));
+# int arr[5] = int[5](_int_0, _int_0, _int_0, _int_0, _int_0);
+#
+# for(int i = _int_0; i < _int_5; i++)
+# {
+# int a = _int_0;
+# int b = arr[_int_1];
+# int c = _int_1;
+#
+# // Always true.
+# if(obj.data[b] <= 1)
+# {
+# c++;
+# }
+#
+# // arr[i] = 2 + i
+# arr[a + i] = c + i;
+# }
+#
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#
+# // Check the results and set the color to black if failed.
+# for(int i = _int_0; i < _int_5; i++)
+# {
+# if(arr[i] != i + _int_2)
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 133
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %90
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %10 "S"
+ OpMemberName %10 0 "data"
+ OpName %12 "obj"
+ OpName %16 "buf0"
+ OpMemberName %16 0 "_GLF_uniform_int_values"
+ OpName %18 ""
+ OpName %32 "arr"
+ OpName %46 "i"
+ OpName %59 "a"
+ OpName %62 "b"
+ OpName %67 "c"
+ OpName %90 "_GLF_color"
+ OpName %104 "i"
+ OpDecorate %15 ArrayStride 16
+ OpMemberDecorate %16 0 Offset 0
+ OpDecorate %16 Block
+ OpDecorate %18 DescriptorSet 0
+ OpDecorate %18 Binding 0
+ OpDecorate %90 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 5
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypeStruct %9
+ %11 = OpTypePointer Function %10
+ %13 = OpConstant %6 1
+ %14 = OpConstant %7 4
+ %15 = OpTypeArray %6 %14
+ %16 = OpTypeStruct %15
+ %17 = OpTypePointer Uniform %16
+ %18 = OpVariable %17 Uniform
+ %19 = OpConstant %6 0
+ %20 = OpTypePointer Uniform %6
+ %31 = OpTypePointer Function %9
+ %33 = OpConstant %6 2
+ %45 = OpTypePointer Function %6
+ %57 = OpTypeBool
+ %87 = OpTypeFloat 32
+ %88 = OpTypeVector %87 4
+ %89 = OpTypePointer Output %88
+ %90 = OpVariable %89 Output
+ %120 = OpConstant %6 3
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %12 = OpVariable %11 Function
+ %32 = OpVariable %31 Function
+ %46 = OpVariable %45 Function
+ %59 = OpVariable %45 Function
+ %62 = OpVariable %45 Function
+ %67 = OpVariable %45 Function
+ %104 = OpVariable %45 Function
+ %21 = OpAccessChain %20 %18 %19 %13
+ %22 = OpLoad %6 %21
+ %23 = OpAccessChain %20 %18 %19 %13
+ %24 = OpLoad %6 %23
+ %25 = OpAccessChain %20 %18 %19 %13
+ %26 = OpLoad %6 %25
+ %27 = OpAccessChain %20 %18 %19 %13
+ %28 = OpLoad %6 %27
+ %29 = OpCompositeConstruct %9 %13 %22 %24 %26 %28
+ %30 = OpCompositeConstruct %10 %29
+ OpStore %12 %30
+ %34 = OpAccessChain %20 %18 %19 %33
+ %35 = OpLoad %6 %34
+ %36 = OpAccessChain %20 %18 %19 %33
+ %37 = OpLoad %6 %36
+ %38 = OpAccessChain %20 %18 %19 %33
+ %39 = OpLoad %6 %38
+ %40 = OpAccessChain %20 %18 %19 %33
+ %41 = OpLoad %6 %40
+ %42 = OpAccessChain %20 %18 %19 %33
+ %43 = OpLoad %6 %42
+ %44 = OpCompositeConstruct %9 %35 %37 %39 %41 %43
+ OpStore %32 %44
+ %47 = OpAccessChain %20 %18 %19 %33
+ %48 = OpLoad %6 %47
+ OpStore %46 %48
+ OpBranch %49
+ %49 = OpLabel
+ OpLoopMerge %51 %52 None
+ OpBranch %53
+ %53 = OpLabel
+ %54 = OpLoad %6 %46
+ %55 = OpAccessChain %20 %18 %19 %19
+ %56 = OpLoad %6 %55
+ %58 = OpSLessThan %57 %54 %56
+ OpBranchConditional %58 %50 %51
+ %50 = OpLabel
+ %60 = OpAccessChain %20 %18 %19 %33
+ %61 = OpLoad %6 %60
+ OpStore %59 %61
+ %63 = OpAccessChain %20 %18 %19 %13
+ %64 = OpLoad %6 %63
+ %65 = OpAccessChain %45 %32 %64
+ %66 = OpLoad %6 %65
+ OpStore %62 %66
+ %68 = OpAccessChain %20 %18 %19 %13
+ %69 = OpLoad %6 %68
+ OpStore %67 %69
+ %70 = OpLoad %6 %62
+ %71 = OpAccessChain %45 %12 %19 %70
+ %72 = OpLoad %6 %71
+ %73 = OpSLessThanEqual %57 %72 %13
+ OpSelectionMerge %75 None
+ OpBranchConditional %73 %74 %75
+ %74 = OpLabel
+ %76 = OpLoad %6 %67
+ %77 = OpIAdd %6 %76 %13
+ OpStore %67 %77
+ OpBranch %75
+ %75 = OpLabel
+ %78 = OpLoad %6 %59
+ %79 = OpLoad %6 %46
+ %80 = OpIAdd %6 %78 %79
+ %81 = OpLoad %6 %67
+ %82 = OpLoad %6 %46
+ %83 = OpIAdd %6 %81 %82
+ %84 = OpAccessChain %45 %32 %80
+ OpStore %84 %83
+ OpBranch %52
+ %52 = OpLabel
+ %85 = OpLoad %6 %46
+ %86 = OpIAdd %6 %85 %13
+ OpStore %46 %86
+ OpBranch %49
+ %51 = OpLabel
+ %91 = OpAccessChain %20 %18 %19 %13
+ %92 = OpLoad %6 %91
+ %93 = OpConvertSToF %87 %92
+ %94 = OpAccessChain %20 %18 %19 %33
+ %95 = OpLoad %6 %94
+ %96 = OpConvertSToF %87 %95
+ %97 = OpAccessChain %20 %18 %19 %33
+ %98 = OpLoad %6 %97
+ %99 = OpConvertSToF %87 %98
+ %100 = OpAccessChain %20 %18 %19 %13
+ %101 = OpLoad %6 %100
+ %102 = OpConvertSToF %87 %101
+ %103 = OpCompositeConstruct %88 %93 %96 %99 %102
+ OpStore %90 %103
+ %105 = OpAccessChain %20 %18 %19 %33
+ %106 = OpLoad %6 %105
+ OpStore %104 %106
+ OpBranch %107
+ %107 = OpLabel
+ OpLoopMerge %109 %110 None
+ OpBranch %111
+ %111 = OpLabel
+ %112 = OpLoad %6 %104
+ %113 = OpAccessChain %20 %18 %19 %19
+ %114 = OpLoad %6 %113
+ %115 = OpSLessThan %57 %112 %114
+ OpBranchConditional %115 %108 %109
+ %108 = OpLabel
+ %116 = OpLoad %6 %104
+ %117 = OpAccessChain %45 %32 %116
+ %118 = OpLoad %6 %117
+ %119 = OpLoad %6 %104
+ %121 = OpAccessChain %20 %18 %19 %120
+ %122 = OpLoad %6 %121
+ %123 = OpIAdd %6 %119 %122
+ %124 = OpINotEqual %57 %118 %123
+ OpSelectionMerge %126 None
+ OpBranchConditional %124 %125 %126
+ %125 = OpLabel
+ %127 = OpAccessChain %20 %18 %19 %33
+ %128 = OpLoad %6 %127
+ %129 = OpConvertSToF %87 %128
+ %130 = OpCompositeConstruct %88 %129 %129 %129 %129
+ OpStore %90 %130
+ OpBranch %126
+ %126 = OpLabel
+ OpBranch %110
+ %110 = OpLabel
+ %131 = OpLoad %6 %104
+ %132 = OpIAdd %6 %131 %13
+ OpStore %104 %132
+ OpBranch %107
+ %109 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 5 1 0 2
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_4 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_1 _GLF_uniform_int_values[2]
+# #define _int_2 _GLF_uniform_int_values[3]
+# #define _int_3 _GLF_uniform_int_values[4]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 1.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [4, 0, 1, 2, 3]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[5];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# vec4 v = vec4(_int_0, _int_1, _int_2, _int_3);
+#
+# for(int i = _int_0; i < _int_4; i++)
+# {
+# // True for i = 2 and 3.
+# if(vec4(v)[i] > _float_1_0)
+# {
+# // Same as v[i] = v[1];
+# v[i] = clamp(vec4(_float_1_0), v, v)[_int_1];
+# }
+# }
+#
+# // Always true.
+# if(v == vec4(_int_0, _int_1, _int_1, _int_1))
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 122
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %103
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "v"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %37 "i"
+ OpName %60 "buf0"
+ OpMemberName %60 0 "_GLF_uniform_float_values"
+ OpName %62 ""
+ OpName %103 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %59 ArrayStride 16
+ OpMemberDecorate %60 0 Offset 0
+ OpDecorate %60 Block
+ OpDecorate %62 DescriptorSet 0
+ OpDecorate %62 Binding 0
+ OpDecorate %103 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Function %7
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 5
+ %13 = OpTypeArray %10 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %10 0
+ %18 = OpConstant %10 1
+ %19 = OpTypePointer Uniform %10
+ %23 = OpConstant %10 2
+ %27 = OpConstant %10 3
+ %31 = OpConstant %10 4
+ %36 = OpTypePointer Function %10
+ %48 = OpTypeBool
+ %58 = OpConstant %11 1
+ %59 = OpTypeArray %6 %58
+ %60 = OpTypeStruct %59
+ %61 = OpTypePointer Uniform %60
+ %62 = OpVariable %61 Uniform
+ %63 = OpTypePointer Uniform %6
+ %79 = OpTypePointer Function %6
+ %97 = OpTypeVector %48 4
+ %102 = OpTypePointer Output %7
+ %103 = OpVariable %102 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %9 = OpVariable %8 Function
+ %37 = OpVariable %36 Function
+ %20 = OpAccessChain %19 %16 %17 %18
+ %21 = OpLoad %10 %20
+ %22 = OpConvertSToF %6 %21
+ %24 = OpAccessChain %19 %16 %17 %23
+ %25 = OpLoad %10 %24
+ %26 = OpConvertSToF %6 %25
+ %28 = OpAccessChain %19 %16 %17 %27
+ %29 = OpLoad %10 %28
+ %30 = OpConvertSToF %6 %29
+ %32 = OpAccessChain %19 %16 %17 %31
+ %33 = OpLoad %10 %32
+ %34 = OpConvertSToF %6 %33
+ %35 = OpCompositeConstruct %7 %22 %26 %30 %34
+ OpStore %9 %35
+ %38 = OpAccessChain %19 %16 %17 %18
+ %39 = OpLoad %10 %38
+ OpStore %37 %39
+ OpBranch %40
+ %40 = OpLabel
+ OpLoopMerge %42 %43 None
+ OpBranch %44
+ %44 = OpLabel
+ %45 = OpLoad %10 %37
+ %46 = OpAccessChain %19 %16 %17 %17
+ %47 = OpLoad %10 %46
+ %49 = OpSLessThan %48 %45 %47
+ OpBranchConditional %49 %41 %42
+ %41 = OpLabel
+ %50 = OpLoad %7 %9
+ %51 = OpCompositeExtract %6 %50 0
+ %52 = OpCompositeExtract %6 %50 1
+ %53 = OpCompositeExtract %6 %50 2
+ %54 = OpCompositeExtract %6 %50 3
+ %55 = OpCompositeConstruct %7 %51 %52 %53 %54
+ %56 = OpLoad %10 %37
+ %57 = OpVectorExtractDynamic %6 %55 %56
+ %64 = OpAccessChain %63 %62 %17 %17
+ %65 = OpLoad %6 %64
+ %66 = OpFOrdGreaterThan %48 %57 %65
+ OpSelectionMerge %68 None
+ OpBranchConditional %66 %67 %68
+ %67 = OpLabel
+ %69 = OpLoad %10 %37
+ %70 = OpAccessChain %63 %62 %17 %17
+ %71 = OpLoad %6 %70
+ %72 = OpCompositeConstruct %7 %71 %71 %71 %71
+ %73 = OpLoad %7 %9
+ %74 = OpLoad %7 %9
+ %75 = OpExtInst %7 %1 FClamp %72 %73 %74
+ %76 = OpAccessChain %19 %16 %17 %23
+ %77 = OpLoad %10 %76
+ %78 = OpVectorExtractDynamic %6 %75 %77
+ %80 = OpAccessChain %79 %9 %69
+ OpStore %80 %78
+ OpBranch %68
+ %68 = OpLabel
+ OpBranch %43
+ %43 = OpLabel
+ %81 = OpLoad %10 %37
+ %82 = OpIAdd %10 %81 %18
+ OpStore %37 %82
+ OpBranch %40
+ %42 = OpLabel
+ %83 = OpLoad %7 %9
+ %84 = OpAccessChain %19 %16 %17 %18
+ %85 = OpLoad %10 %84
+ %86 = OpConvertSToF %6 %85
+ %87 = OpAccessChain %19 %16 %17 %23
+ %88 = OpLoad %10 %87
+ %89 = OpConvertSToF %6 %88
+ %90 = OpAccessChain %19 %16 %17 %23
+ %91 = OpLoad %10 %90
+ %92 = OpConvertSToF %6 %91
+ %93 = OpAccessChain %19 %16 %17 %23
+ %94 = OpLoad %10 %93
+ %95 = OpConvertSToF %6 %94
+ %96 = OpCompositeConstruct %7 %86 %89 %92 %95
+ %98 = OpFOrdEqual %97 %83 %96
+ %99 = OpAll %48 %98
+ OpSelectionMerge %101 None
+ OpBranchConditional %99 %100 %117
+ %100 = OpLabel
+ %104 = OpAccessChain %19 %16 %17 %23
+ %105 = OpLoad %10 %104
+ %106 = OpConvertSToF %6 %105
+ %107 = OpAccessChain %19 %16 %17 %18
+ %108 = OpLoad %10 %107
+ %109 = OpConvertSToF %6 %108
+ %110 = OpAccessChain %19 %16 %17 %18
+ %111 = OpLoad %10 %110
+ %112 = OpConvertSToF %6 %111
+ %113 = OpAccessChain %19 %16 %17 %23
+ %114 = OpLoad %10 %113
+ %115 = OpConvertSToF %6 %114
+ %116 = OpCompositeConstruct %7 %106 %109 %112 %115
+ OpStore %103 %116
+ OpBranch %101
+ %117 = OpLabel
+ %118 = OpAccessChain %19 %16 %17 %18
+ %119 = OpLoad %10 %118
+ %120 = OpConvertSToF %6 %119
+ %121 = OpCompositeConstruct %7 %120 %120 %120 %120
+ OpStore %103 %121
+ OpBranch %101
+ %101 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 4 0 1 2 3
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_3 _GLF_uniform_int_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 3]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of zero: 0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int zero;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int a = zero;
+# int b = _int_1;
+#
+# // Iterated once.
+# do
+# {
+# // Always false.
+# if(b > _int_3)
+# {
+# break;
+# }
+#
+#
+# int arr[10] = int[10](_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1);
+#
+# // Makes indices 0..4 undefined as the first iteration reads outside the array
+# // and other iterations copy that value.
+# for(int i = 0; i < 5; i++)
+# {
+# arr[i] += arr[i - 1];
+# }
+#
+# b++;
+# // Use an array element that still contains a defined value (one).
+# a += arr[5];
+# }
+# while(a != _int_1);
+#
+# if (b == 2)
+# _GLF_color = vec4(1, 0, 0, 1);
+# else
+# _GLF_color = vec4(0);
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 107
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %101
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "a"
+ OpName %9 "buf1"
+ OpMemberName %9 0 "zero"
+ OpName %11 ""
+ OpName %16 "b"
+ OpName %20 "buf0"
+ OpMemberName %20 0 "_GLF_uniform_int_values"
+ OpName %22 ""
+ OpName %41 "arr"
+ OpName %63 "i"
+ OpName %101 "_GLF_color"
+ OpMemberDecorate %9 0 Offset 0
+ OpDecorate %9 Block
+ OpDecorate %11 DescriptorSet 0
+ OpDecorate %11 Binding 1
+ OpDecorate %19 ArrayStride 16
+ OpMemberDecorate %20 0 Offset 0
+ OpDecorate %20 Block
+ OpDecorate %22 DescriptorSet 0
+ OpDecorate %22 Binding 0
+ OpDecorate %101 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeStruct %6
+ %10 = OpTypePointer Uniform %9
+ %11 = OpVariable %10 Uniform
+ %12 = OpConstant %6 0
+ %13 = OpTypePointer Uniform %6
+ %17 = OpTypeInt 32 0
+ %18 = OpConstant %17 2
+ %19 = OpTypeArray %6 %18
+ %20 = OpTypeStruct %19
+ %21 = OpTypePointer Uniform %20
+ %22 = OpVariable %21 Uniform
+ %30 = OpConstant %6 1
+ %33 = OpTypeBool
+ %38 = OpConstant %17 10
+ %39 = OpTypeArray %6 %38
+ %40 = OpTypePointer Function %39
+ %70 = OpConstant %6 5
+ %94 = OpConstant %6 2
+ %98 = OpTypeFloat 32
+ %99 = OpTypeVector %98 4
+ %100 = OpTypePointer Output %99
+ %101 = OpVariable %100 Output
+ %102 = OpConstant %98 1
+ %103 = OpConstant %98 0
+ %104 = OpConstantComposite %99 %102 %103 %103 %102
+ %106 = OpConstantComposite %99 %103 %103 %103 %103
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %16 = OpVariable %7 Function
+ %41 = OpVariable %40 Function
+ %63 = OpVariable %7 Function
+ %14 = OpAccessChain %13 %11 %12
+ %15 = OpLoad %6 %14
+ OpStore %8 %15
+ %23 = OpAccessChain %13 %22 %12 %12
+ %24 = OpLoad %6 %23
+ OpStore %16 %24
+ OpBranch %25
+ %25 = OpLabel
+ OpLoopMerge %27 %28 None
+ OpBranch %26
+ %26 = OpLabel
+ %29 = OpLoad %6 %16
+ %31 = OpAccessChain %13 %22 %12 %30
+ %32 = OpLoad %6 %31
+ %34 = OpSGreaterThan %33 %29 %32
+ OpSelectionMerge %36 None
+ OpBranchConditional %34 %35 %36
+ %35 = OpLabel
+ OpBranch %27
+ %36 = OpLabel
+ %42 = OpAccessChain %13 %22 %12 %12
+ %43 = OpLoad %6 %42
+ %44 = OpAccessChain %13 %22 %12 %12
+ %45 = OpLoad %6 %44
+ %46 = OpAccessChain %13 %22 %12 %12
+ %47 = OpLoad %6 %46
+ %48 = OpAccessChain %13 %22 %12 %12
+ %49 = OpLoad %6 %48
+ %50 = OpAccessChain %13 %22 %12 %12
+ %51 = OpLoad %6 %50
+ %52 = OpAccessChain %13 %22 %12 %12
+ %53 = OpLoad %6 %52
+ %54 = OpAccessChain %13 %22 %12 %12
+ %55 = OpLoad %6 %54
+ %56 = OpAccessChain %13 %22 %12 %12
+ %57 = OpLoad %6 %56
+ %58 = OpAccessChain %13 %22 %12 %12
+ %59 = OpLoad %6 %58
+ %60 = OpAccessChain %13 %22 %12 %12
+ %61 = OpLoad %6 %60
+ %62 = OpCompositeConstruct %39 %43 %45 %47 %49 %51 %53 %55 %57 %59 %61
+ OpStore %41 %62
+ OpStore %63 %12
+ OpBranch %64
+ %64 = OpLabel
+ OpLoopMerge %66 %67 None
+ OpBranch %68
+ %68 = OpLabel
+ %69 = OpLoad %6 %63
+ %71 = OpSLessThan %33 %69 %70
+ OpBranchConditional %71 %65 %66
+ %65 = OpLabel
+ %72 = OpLoad %6 %63
+ %73 = OpLoad %6 %63
+ %74 = OpISub %6 %73 %30
+ %75 = OpAccessChain %7 %41 %74
+ %76 = OpLoad %6 %75
+ %77 = OpAccessChain %7 %41 %72
+ %78 = OpLoad %6 %77
+ %79 = OpIAdd %6 %78 %76
+ %80 = OpAccessChain %7 %41 %72
+ OpStore %80 %79
+ OpBranch %67
+ %67 = OpLabel
+ %81 = OpLoad %6 %63
+ %82 = OpIAdd %6 %81 %30
+ OpStore %63 %82
+ OpBranch %64
+ %66 = OpLabel
+ %83 = OpLoad %6 %16
+ %84 = OpIAdd %6 %83 %30
+ OpStore %16 %84
+ %85 = OpAccessChain %7 %41 %70
+ %86 = OpLoad %6 %85
+ %87 = OpLoad %6 %8
+ %88 = OpIAdd %6 %87 %86
+ OpStore %8 %88
+ OpBranch %28
+ %28 = OpLabel
+ %89 = OpLoad %6 %8
+ %90 = OpAccessChain %13 %22 %12 %12
+ %91 = OpLoad %6 %90
+ %92 = OpINotEqual %33 %89 %91
+ OpBranchConditional %92 %25 %27
+ %27 = OpLabel
+ %93 = OpLoad %6 %16
+ %95 = OpIEqual %33 %93 %94
+ OpSelectionMerge %97 None
+ OpBranchConditional %95 %96 %105
+ %96 = OpLabel
+ OpStore %101 %104
+ OpBranch %97
+ %105 = OpLabel
+ OpStore %101 %106
+ OpBranch %97
+ %97 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# zero
+BUFFER variant_zero DATA_TYPE int32 STD140 DATA
+ 0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 3
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_zero AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_2 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [2, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of _GLF_uniform_float_values: 1.0
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# vec4 v = vec4(_float_1_0);
+#
+# // Decreases v.yz by one.
+# for(int i = _int_2; i > _int_0; i--)
+# {
+# v[i] -= _float_1_0;
+# }
+#
+# // Assigns the same value multiple times.
+# for(int i = 2; i > 0; i--)
+# {
+# for(int j = 2; j != 0; j--)
+# {
+# _GLF_color = v;
+# }
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 77
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %71
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "v"
+ OpName %13 "buf1"
+ OpMemberName %13 0 "_GLF_uniform_float_values"
+ OpName %15 ""
+ OpName %23 "i"
+ OpName %26 "buf0"
+ OpMemberName %26 0 "_GLF_uniform_int_values"
+ OpName %28 ""
+ OpName %53 "i"
+ OpName %62 "j"
+ OpName %71 "_GLF_color"
+ OpDecorate %12 ArrayStride 16
+ OpMemberDecorate %13 0 Offset 0
+ OpDecorate %13 Block
+ OpDecorate %15 DescriptorSet 0
+ OpDecorate %15 Binding 1
+ OpDecorate %25 ArrayStride 16
+ OpMemberDecorate %26 0 Offset 0
+ OpDecorate %26 Block
+ OpDecorate %28 DescriptorSet 0
+ OpDecorate %28 Binding 0
+ OpDecorate %71 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Function %7
+ %10 = OpTypeInt 32 0
+ %11 = OpConstant %10 1
+ %12 = OpTypeArray %6 %11
+ %13 = OpTypeStruct %12
+ %14 = OpTypePointer Uniform %13
+ %15 = OpVariable %14 Uniform
+ %16 = OpTypeInt 32 1
+ %17 = OpConstant %16 0
+ %18 = OpTypePointer Uniform %6
+ %22 = OpTypePointer Function %16
+ %24 = OpConstant %10 2
+ %25 = OpTypeArray %16 %24
+ %26 = OpTypeStruct %25
+ %27 = OpTypePointer Uniform %26
+ %28 = OpVariable %27 Uniform
+ %29 = OpTypePointer Uniform %16
+ %38 = OpConstant %16 1
+ %41 = OpTypeBool
+ %46 = OpTypePointer Function %6
+ %54 = OpConstant %16 2
+ %70 = OpTypePointer Output %7
+ %71 = OpVariable %70 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %9 = OpVariable %8 Function
+ %23 = OpVariable %22 Function
+ %53 = OpVariable %22 Function
+ %62 = OpVariable %22 Function
+ %19 = OpAccessChain %18 %15 %17 %17
+ %20 = OpLoad %6 %19
+ %21 = OpCompositeConstruct %7 %20 %20 %20 %20
+ OpStore %9 %21
+ %30 = OpAccessChain %29 %28 %17 %17
+ %31 = OpLoad %16 %30
+ OpStore %23 %31
+ OpBranch %32
+ %32 = OpLabel
+ OpLoopMerge %34 %35 None
+ OpBranch %36
+ %36 = OpLabel
+ %37 = OpLoad %16 %23
+ %39 = OpAccessChain %29 %28 %17 %38
+ %40 = OpLoad %16 %39
+ %42 = OpSGreaterThan %41 %37 %40
+ OpBranchConditional %42 %33 %34
+ %33 = OpLabel
+ %43 = OpLoad %16 %23
+ %44 = OpAccessChain %18 %15 %17 %17
+ %45 = OpLoad %6 %44
+ %47 = OpAccessChain %46 %9 %43
+ %48 = OpLoad %6 %47
+ %49 = OpFSub %6 %48 %45
+ %50 = OpAccessChain %46 %9 %43
+ OpStore %50 %49
+ OpBranch %35
+ %35 = OpLabel
+ %51 = OpLoad %16 %23
+ %52 = OpISub %16 %51 %38
+ OpStore %23 %52
+ OpBranch %32
+ %34 = OpLabel
+ OpStore %53 %54
+ OpBranch %55
+ %55 = OpLabel
+ OpLoopMerge %57 %58 None
+ OpBranch %59
+ %59 = OpLabel
+ %60 = OpLoad %16 %53
+ %61 = OpSGreaterThan %41 %60 %17
+ OpBranchConditional %61 %56 %57
+ %56 = OpLabel
+ OpStore %62 %54
+ OpBranch %63
+ %63 = OpLabel
+ OpLoopMerge %65 %66 None
+ OpBranch %67
+ %67 = OpLabel
+ %68 = OpLoad %16 %62
+ %69 = OpINotEqual %41 %68 %17
+ OpBranchConditional %69 %64 %65
+ %64 = OpLabel
+ %72 = OpLoad %7 %9
+ OpStore %71 %72
+ OpBranch %66
+ %66 = OpLabel
+ %73 = OpLoad %16 %62
+ %74 = OpISub %16 %73 %38
+ OpStore %62 %74
+ OpBranch %63
+ %65 = OpLabel
+ OpBranch %58
+ %58 = OpLabel
+ %75 = OpLoad %16 %53
+ %76 = OpISub %16 %75 %38
+ OpStore %53 %76
+ OpBranch %55
+ %57 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 2 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_10 _GLF_uniform_int_values[2]
+# #define _uint_1 _GLF_uniform_uint_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_2_0 _GLF_uniform_float_values[1]
+# #define _float_3_0 _GLF_uniform_float_values[2]
+# #define _float_4_0 _GLF_uniform_float_values[3]
+# #define _float_5_0 _GLF_uniform_float_values[4]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_uint_values: 1
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# uint _GLF_uniform_uint_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 10]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# // Contents of _GLF_uniform_float_values: [1.0, 2.0, 3.0, 4.0, 5.0]
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# float _GLF_uniform_float_values[5];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# uint a = _uint_1;
+# float arr[16] = float[16](_float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0);
+# int i = _int_1;
+#
+# // Iterated once.
+# do
+# {
+# // usubBorrow returns zero and sets a to zero. If this was to be iterated more usubBorrow would return -1.
+# arr[i++] += float[5](_float_1_0, _float_2_0, _float_3_0, _float_4_0, _float_5_0)[usubBorrow(a, _uint_1, a)];
+# }
+# while(i < _int_1);
+#
+# // Always true.
+# if(arr[_int_1] == _float_2_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 148
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %128
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "_GLF_global_loop_count"
+ OpName %12 "a"
+ OpName %15 "buf0"
+ OpMemberName %15 0 "_GLF_uniform_uint_values"
+ OpName %17 ""
+ OpName %25 "arr"
+ OpName %28 "buf2"
+ OpMemberName %28 0 "_GLF_uniform_float_values"
+ OpName %30 ""
+ OpName %66 "i"
+ OpName %69 "buf1"
+ OpMemberName %69 0 "_GLF_uniform_int_values"
+ OpName %71 ""
+ OpName %99 "ResType"
+ OpName %104 "indexable"
+ OpName %128 "_GLF_color"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 0
+ OpDecorate %27 ArrayStride 16
+ OpMemberDecorate %28 0 Offset 0
+ OpDecorate %28 Block
+ OpDecorate %30 DescriptorSet 0
+ OpDecorate %30 Binding 2
+ OpDecorate %68 ArrayStride 16
+ OpMemberDecorate %69 0 Offset 0
+ OpDecorate %69 Block
+ OpDecorate %71 DescriptorSet 0
+ OpDecorate %71 Binding 1
+ OpDecorate %128 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %10 = OpTypeInt 32 0
+ %11 = OpTypePointer Function %10
+ %13 = OpConstant %10 1
+ %14 = OpTypeArray %10 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpTypePointer Uniform %10
+ %21 = OpTypeFloat 32
+ %22 = OpConstant %10 16
+ %23 = OpTypeArray %21 %22
+ %24 = OpTypePointer Function %23
+ %26 = OpConstant %10 5
+ %27 = OpTypeArray %21 %26
+ %28 = OpTypeStruct %27
+ %29 = OpTypePointer Uniform %28
+ %30 = OpVariable %29 Uniform
+ %31 = OpTypePointer Uniform %21
+ %65 = OpTypePointer Function %6
+ %67 = OpConstant %10 3
+ %68 = OpTypeArray %6 %67
+ %69 = OpTypeStruct %68
+ %70 = OpTypePointer Uniform %69
+ %71 = OpVariable %70 Uniform
+ %72 = OpTypePointer Uniform %6
+ %80 = OpConstant %6 1
+ %86 = OpConstant %6 2
+ %89 = OpConstant %6 3
+ %92 = OpConstant %6 4
+ %99 = OpTypeStruct %10 %10
+ %103 = OpTypePointer Function %27
+ %105 = OpTypePointer Function %21
+ %115 = OpTypeBool
+ %126 = OpTypeVector %21 4
+ %127 = OpTypePointer Output %126
+ %128 = OpVariable %127 Output
+ %147 = OpConstant %6 10
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %12 = OpVariable %11 Function
+ %25 = OpVariable %24 Function
+ %66 = OpVariable %65 Function
+ %104 = OpVariable %103 Function
+ OpStore %8 %9
+ %19 = OpAccessChain %18 %17 %9 %9
+ %20 = OpLoad %10 %19
+ OpStore %12 %20
+ %32 = OpAccessChain %31 %30 %9 %9
+ %33 = OpLoad %21 %32
+ %34 = OpAccessChain %31 %30 %9 %9
+ %35 = OpLoad %21 %34
+ %36 = OpAccessChain %31 %30 %9 %9
+ %37 = OpLoad %21 %36
+ %38 = OpAccessChain %31 %30 %9 %9
+ %39 = OpLoad %21 %38
+ %40 = OpAccessChain %31 %30 %9 %9
+ %41 = OpLoad %21 %40
+ %42 = OpAccessChain %31 %30 %9 %9
+ %43 = OpLoad %21 %42
+ %44 = OpAccessChain %31 %30 %9 %9
+ %45 = OpLoad %21 %44
+ %46 = OpAccessChain %31 %30 %9 %9
+ %47 = OpLoad %21 %46
+ %48 = OpAccessChain %31 %30 %9 %9
+ %49 = OpLoad %21 %48
+ %50 = OpAccessChain %31 %30 %9 %9
+ %51 = OpLoad %21 %50
+ %52 = OpAccessChain %31 %30 %9 %9
+ %53 = OpLoad %21 %52
+ %54 = OpAccessChain %31 %30 %9 %9
+ %55 = OpLoad %21 %54
+ %56 = OpAccessChain %31 %30 %9 %9
+ %57 = OpLoad %21 %56
+ %58 = OpAccessChain %31 %30 %9 %9
+ %59 = OpLoad %21 %58
+ %60 = OpAccessChain %31 %30 %9 %9
+ %61 = OpLoad %21 %60
+ %62 = OpAccessChain %31 %30 %9 %9
+ %63 = OpLoad %21 %62
+ %64 = OpCompositeConstruct %23 %33 %35 %37 %39 %41 %43 %45 %47 %49 %51 %53 %55 %57 %59 %61 %63
+ OpStore %25 %64
+ %73 = OpAccessChain %72 %71 %9 %9
+ %74 = OpLoad %6 %73
+ OpStore %66 %74
+ OpBranch %75
+ %75 = OpLabel
+ OpLoopMerge %77 %78 None
+ OpBranch %76
+ %76 = OpLabel
+ %79 = OpLoad %6 %66
+ %81 = OpIAdd %6 %79 %80
+ OpStore %66 %81
+ %82 = OpAccessChain %31 %30 %9 %9
+ %83 = OpLoad %21 %82
+ %84 = OpAccessChain %31 %30 %9 %80
+ %85 = OpLoad %21 %84
+ %87 = OpAccessChain %31 %30 %9 %86
+ %88 = OpLoad %21 %87
+ %90 = OpAccessChain %31 %30 %9 %89
+ %91 = OpLoad %21 %90
+ %93 = OpAccessChain %31 %30 %9 %92
+ %94 = OpLoad %21 %93
+ %95 = OpCompositeConstruct %27 %83 %85 %88 %91 %94
+ %96 = OpLoad %10 %12
+ %97 = OpAccessChain %18 %17 %9 %9
+ %98 = OpLoad %10 %97
+ %100 = OpISubBorrow %99 %96 %98
+ %101 = OpCompositeExtract %10 %100 1
+ OpStore %12 %101
+ %102 = OpCompositeExtract %10 %100 0
+ OpStore %104 %95
+ %106 = OpAccessChain %105 %104 %102
+ %107 = OpLoad %21 %106
+ %108 = OpAccessChain %105 %25 %79
+ %109 = OpLoad %21 %108
+ %110 = OpFAdd %21 %109 %107
+ %111 = OpAccessChain %105 %25 %79
+ OpStore %111 %110
+ OpBranch %78
+ %78 = OpLabel
+ %112 = OpLoad %6 %66
+ %113 = OpAccessChain %72 %71 %9 %9
+ %114 = OpLoad %6 %113
+ %116 = OpSLessThan %115 %112 %114
+ OpBranchConditional %116 %75 %77
+ %77 = OpLabel
+ %117 = OpAccessChain %72 %71 %9 %9
+ %118 = OpLoad %6 %117
+ %119 = OpAccessChain %105 %25 %118
+ %120 = OpLoad %21 %119
+ %121 = OpAccessChain %31 %30 %9 %80
+ %122 = OpLoad %21 %121
+ %123 = OpFOrdEqual %115 %120 %122
+ OpSelectionMerge %125 None
+ OpBranchConditional %123 %124 %142
+ %124 = OpLabel
+ %129 = OpAccessChain %72 %71 %9 %9
+ %130 = OpLoad %6 %129
+ %131 = OpConvertSToF %21 %130
+ %132 = OpAccessChain %72 %71 %9 %80
+ %133 = OpLoad %6 %132
+ %134 = OpConvertSToF %21 %133
+ %135 = OpAccessChain %72 %71 %9 %80
+ %136 = OpLoad %6 %135
+ %137 = OpConvertSToF %21 %136
+ %138 = OpAccessChain %72 %71 %9 %9
+ %139 = OpLoad %6 %138
+ %140 = OpConvertSToF %21 %139
+ %141 = OpCompositeConstruct %126 %131 %134 %137 %140
+ OpStore %128 %141
+ OpBranch %125
+ %142 = OpLabel
+ %143 = OpAccessChain %72 %71 %9 %80
+ %144 = OpLoad %6 %143
+ %145 = OpConvertSToF %21 %144
+ %146 = OpCompositeConstruct %126 %145 %145 %145 %145
+ OpStore %128 %146
+ OpBranch %125
+ %125 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 2.0 3.0 4.0 5.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 10
+END
+# _GLF_uniform_uint_values
+BUFFER variant__GLF_uniform_uint_values DATA_TYPE int32[] STD140 DATA
+ 1
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_uint_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_2 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [1, 2, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void func()
+# {
+# int a = -86465;
+#
+# for(int i = 0; i < 3; i++)
+# {
+# // Always clamps the index to one and selects value two.
+# if(int[256](_int_1, _int_2, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1)[clamp(a, 1, 255)] == _int_2)
+# {
+# _GLF_color = vec4(1, 0, 0, 1);
+# }
+#
+# a++;
+# }
+# }
+#
+# void main()
+# {
+# _GLF_color = vec4(_int_0);
+# func();
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 575
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %561
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %6 "func("
+ OpName %10 "a"
+ OpName %12 "i"
+ OpName %26 "buf0"
+ OpMemberName %26 0 "_GLF_uniform_int_values"
+ OpName %28 ""
+ OpName %550 "indexable"
+ OpName %561 "_GLF_color"
+ OpDecorate %25 ArrayStride 16
+ OpMemberDecorate %26 0 Offset 0
+ OpDecorate %26 Block
+ OpDecorate %28 DescriptorSet 0
+ OpDecorate %28 Binding 0
+ OpDecorate %561 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %8 = OpTypeInt 32 1
+ %9 = OpTypePointer Function %8
+ %11 = OpConstant %8 -86465
+ %13 = OpConstant %8 0
+ %20 = OpConstant %8 3
+ %21 = OpTypeBool
+ %23 = OpTypeInt 32 0
+ %24 = OpConstant %23 3
+ %25 = OpTypeArray %8 %24
+ %26 = OpTypeStruct %25
+ %27 = OpTypePointer Uniform %26
+ %28 = OpVariable %27 Uniform
+ %29 = OpTypePointer Uniform %8
+ %32 = OpConstant %8 1
+ %543 = OpConstant %23 256
+ %544 = OpTypeArray %8 %543
+ %547 = OpConstant %8 255
+ %549 = OpTypePointer Function %544
+ %558 = OpTypeFloat 32
+ %559 = OpTypeVector %558 4
+ %560 = OpTypePointer Output %559
+ %561 = OpVariable %560 Output
+ %562 = OpConstant %558 1
+ %563 = OpConstant %558 0
+ %564 = OpConstantComposite %559 %562 %563 %563 %562
+ %569 = OpConstant %8 2
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %570 = OpAccessChain %29 %28 %13 %569
+ %571 = OpLoad %8 %570
+ %572 = OpConvertSToF %558 %571
+ %573 = OpCompositeConstruct %559 %572 %572 %572 %572
+ OpStore %561 %573
+ %574 = OpFunctionCall %2 %6
+ OpReturn
+ OpFunctionEnd
+ %6 = OpFunction %2 None %3
+ %7 = OpLabel
+ %10 = OpVariable %9 Function
+ %12 = OpVariable %9 Function
+ %550 = OpVariable %549 Function
+ OpStore %10 %11
+ OpStore %12 %13
+ OpBranch %14
+ %14 = OpLabel
+ OpLoopMerge %16 %17 None
+ OpBranch %18
+ %18 = OpLabel
+ %19 = OpLoad %8 %12
+ %22 = OpSLessThan %21 %19 %20
+ OpBranchConditional %22 %15 %16
+ %15 = OpLabel
+ %30 = OpAccessChain %29 %28 %13 %13
+ %31 = OpLoad %8 %30
+ %33 = OpAccessChain %29 %28 %13 %32
+ %34 = OpLoad %8 %33
+ %35 = OpAccessChain %29 %28 %13 %13
+ %36 = OpLoad %8 %35
+ %37 = OpAccessChain %29 %28 %13 %13
+ %38 = OpLoad %8 %37
+ %39 = OpAccessChain %29 %28 %13 %13
+ %40 = OpLoad %8 %39
+ %41 = OpAccessChain %29 %28 %13 %13
+ %42 = OpLoad %8 %41
+ %43 = OpAccessChain %29 %28 %13 %13
+ %44 = OpLoad %8 %43
+ %45 = OpAccessChain %29 %28 %13 %13
+ %46 = OpLoad %8 %45
+ %47 = OpAccessChain %29 %28 %13 %13
+ %48 = OpLoad %8 %47
+ %49 = OpAccessChain %29 %28 %13 %13
+ %50 = OpLoad %8 %49
+ %51 = OpAccessChain %29 %28 %13 %13
+ %52 = OpLoad %8 %51
+ %53 = OpAccessChain %29 %28 %13 %13
+ %54 = OpLoad %8 %53
+ %55 = OpAccessChain %29 %28 %13 %13
+ %56 = OpLoad %8 %55
+ %57 = OpAccessChain %29 %28 %13 %13
+ %58 = OpLoad %8 %57
+ %59 = OpAccessChain %29 %28 %13 %13
+ %60 = OpLoad %8 %59
+ %61 = OpAccessChain %29 %28 %13 %13
+ %62 = OpLoad %8 %61
+ %63 = OpAccessChain %29 %28 %13 %13
+ %64 = OpLoad %8 %63
+ %65 = OpAccessChain %29 %28 %13 %13
+ %66 = OpLoad %8 %65
+ %67 = OpAccessChain %29 %28 %13 %13
+ %68 = OpLoad %8 %67
+ %69 = OpAccessChain %29 %28 %13 %13
+ %70 = OpLoad %8 %69
+ %71 = OpAccessChain %29 %28 %13 %13
+ %72 = OpLoad %8 %71
+ %73 = OpAccessChain %29 %28 %13 %13
+ %74 = OpLoad %8 %73
+ %75 = OpAccessChain %29 %28 %13 %13
+ %76 = OpLoad %8 %75
+ %77 = OpAccessChain %29 %28 %13 %13
+ %78 = OpLoad %8 %77
+ %79 = OpAccessChain %29 %28 %13 %13
+ %80 = OpLoad %8 %79
+ %81 = OpAccessChain %29 %28 %13 %13
+ %82 = OpLoad %8 %81
+ %83 = OpAccessChain %29 %28 %13 %13
+ %84 = OpLoad %8 %83
+ %85 = OpAccessChain %29 %28 %13 %13
+ %86 = OpLoad %8 %85
+ %87 = OpAccessChain %29 %28 %13 %13
+ %88 = OpLoad %8 %87
+ %89 = OpAccessChain %29 %28 %13 %13
+ %90 = OpLoad %8 %89
+ %91 = OpAccessChain %29 %28 %13 %13
+ %92 = OpLoad %8 %91
+ %93 = OpAccessChain %29 %28 %13 %13
+ %94 = OpLoad %8 %93
+ %95 = OpAccessChain %29 %28 %13 %13
+ %96 = OpLoad %8 %95
+ %97 = OpAccessChain %29 %28 %13 %13
+ %98 = OpLoad %8 %97
+ %99 = OpAccessChain %29 %28 %13 %13
+ %100 = OpLoad %8 %99
+ %101 = OpAccessChain %29 %28 %13 %13
+ %102 = OpLoad %8 %101
+ %103 = OpAccessChain %29 %28 %13 %13
+ %104 = OpLoad %8 %103
+ %105 = OpAccessChain %29 %28 %13 %13
+ %106 = OpLoad %8 %105
+ %107 = OpAccessChain %29 %28 %13 %13
+ %108 = OpLoad %8 %107
+ %109 = OpAccessChain %29 %28 %13 %13
+ %110 = OpLoad %8 %109
+ %111 = OpAccessChain %29 %28 %13 %13
+ %112 = OpLoad %8 %111
+ %113 = OpAccessChain %29 %28 %13 %13
+ %114 = OpLoad %8 %113
+ %115 = OpAccessChain %29 %28 %13 %13
+ %116 = OpLoad %8 %115
+ %117 = OpAccessChain %29 %28 %13 %13
+ %118 = OpLoad %8 %117
+ %119 = OpAccessChain %29 %28 %13 %13
+ %120 = OpLoad %8 %119
+ %121 = OpAccessChain %29 %28 %13 %13
+ %122 = OpLoad %8 %121
+ %123 = OpAccessChain %29 %28 %13 %13
+ %124 = OpLoad %8 %123
+ %125 = OpAccessChain %29 %28 %13 %13
+ %126 = OpLoad %8 %125
+ %127 = OpAccessChain %29 %28 %13 %13
+ %128 = OpLoad %8 %127
+ %129 = OpAccessChain %29 %28 %13 %13
+ %130 = OpLoad %8 %129
+ %131 = OpAccessChain %29 %28 %13 %13
+ %132 = OpLoad %8 %131
+ %133 = OpAccessChain %29 %28 %13 %13
+ %134 = OpLoad %8 %133
+ %135 = OpAccessChain %29 %28 %13 %13
+ %136 = OpLoad %8 %135
+ %137 = OpAccessChain %29 %28 %13 %13
+ %138 = OpLoad %8 %137
+ %139 = OpAccessChain %29 %28 %13 %13
+ %140 = OpLoad %8 %139
+ %141 = OpAccessChain %29 %28 %13 %13
+ %142 = OpLoad %8 %141
+ %143 = OpAccessChain %29 %28 %13 %13
+ %144 = OpLoad %8 %143
+ %145 = OpAccessChain %29 %28 %13 %13
+ %146 = OpLoad %8 %145
+ %147 = OpAccessChain %29 %28 %13 %13
+ %148 = OpLoad %8 %147
+ %149 = OpAccessChain %29 %28 %13 %13
+ %150 = OpLoad %8 %149
+ %151 = OpAccessChain %29 %28 %13 %13
+ %152 = OpLoad %8 %151
+ %153 = OpAccessChain %29 %28 %13 %13
+ %154 = OpLoad %8 %153
+ %155 = OpAccessChain %29 %28 %13 %13
+ %156 = OpLoad %8 %155
+ %157 = OpAccessChain %29 %28 %13 %13
+ %158 = OpLoad %8 %157
+ %159 = OpAccessChain %29 %28 %13 %13
+ %160 = OpLoad %8 %159
+ %161 = OpAccessChain %29 %28 %13 %13
+ %162 = OpLoad %8 %161
+ %163 = OpAccessChain %29 %28 %13 %13
+ %164 = OpLoad %8 %163
+ %165 = OpAccessChain %29 %28 %13 %13
+ %166 = OpLoad %8 %165
+ %167 = OpAccessChain %29 %28 %13 %13
+ %168 = OpLoad %8 %167
+ %169 = OpAccessChain %29 %28 %13 %13
+ %170 = OpLoad %8 %169
+ %171 = OpAccessChain %29 %28 %13 %13
+ %172 = OpLoad %8 %171
+ %173 = OpAccessChain %29 %28 %13 %13
+ %174 = OpLoad %8 %173
+ %175 = OpAccessChain %29 %28 %13 %13
+ %176 = OpLoad %8 %175
+ %177 = OpAccessChain %29 %28 %13 %13
+ %178 = OpLoad %8 %177
+ %179 = OpAccessChain %29 %28 %13 %13
+ %180 = OpLoad %8 %179
+ %181 = OpAccessChain %29 %28 %13 %13
+ %182 = OpLoad %8 %181
+ %183 = OpAccessChain %29 %28 %13 %13
+ %184 = OpLoad %8 %183
+ %185 = OpAccessChain %29 %28 %13 %13
+ %186 = OpLoad %8 %185
+ %187 = OpAccessChain %29 %28 %13 %13
+ %188 = OpLoad %8 %187
+ %189 = OpAccessChain %29 %28 %13 %13
+ %190 = OpLoad %8 %189
+ %191 = OpAccessChain %29 %28 %13 %13
+ %192 = OpLoad %8 %191
+ %193 = OpAccessChain %29 %28 %13 %13
+ %194 = OpLoad %8 %193
+ %195 = OpAccessChain %29 %28 %13 %13
+ %196 = OpLoad %8 %195
+ %197 = OpAccessChain %29 %28 %13 %13
+ %198 = OpLoad %8 %197
+ %199 = OpAccessChain %29 %28 %13 %13
+ %200 = OpLoad %8 %199
+ %201 = OpAccessChain %29 %28 %13 %13
+ %202 = OpLoad %8 %201
+ %203 = OpAccessChain %29 %28 %13 %13
+ %204 = OpLoad %8 %203
+ %205 = OpAccessChain %29 %28 %13 %13
+ %206 = OpLoad %8 %205
+ %207 = OpAccessChain %29 %28 %13 %13
+ %208 = OpLoad %8 %207
+ %209 = OpAccessChain %29 %28 %13 %13
+ %210 = OpLoad %8 %209
+ %211 = OpAccessChain %29 %28 %13 %13
+ %212 = OpLoad %8 %211
+ %213 = OpAccessChain %29 %28 %13 %13
+ %214 = OpLoad %8 %213
+ %215 = OpAccessChain %29 %28 %13 %13
+ %216 = OpLoad %8 %215
+ %217 = OpAccessChain %29 %28 %13 %13
+ %218 = OpLoad %8 %217
+ %219 = OpAccessChain %29 %28 %13 %13
+ %220 = OpLoad %8 %219
+ %221 = OpAccessChain %29 %28 %13 %13
+ %222 = OpLoad %8 %221
+ %223 = OpAccessChain %29 %28 %13 %13
+ %224 = OpLoad %8 %223
+ %225 = OpAccessChain %29 %28 %13 %13
+ %226 = OpLoad %8 %225
+ %227 = OpAccessChain %29 %28 %13 %13
+ %228 = OpLoad %8 %227
+ %229 = OpAccessChain %29 %28 %13 %13
+ %230 = OpLoad %8 %229
+ %231 = OpAccessChain %29 %28 %13 %13
+ %232 = OpLoad %8 %231
+ %233 = OpAccessChain %29 %28 %13 %13
+ %234 = OpLoad %8 %233
+ %235 = OpAccessChain %29 %28 %13 %13
+ %236 = OpLoad %8 %235
+ %237 = OpAccessChain %29 %28 %13 %13
+ %238 = OpLoad %8 %237
+ %239 = OpAccessChain %29 %28 %13 %13
+ %240 = OpLoad %8 %239
+ %241 = OpAccessChain %29 %28 %13 %13
+ %242 = OpLoad %8 %241
+ %243 = OpAccessChain %29 %28 %13 %13
+ %244 = OpLoad %8 %243
+ %245 = OpAccessChain %29 %28 %13 %13
+ %246 = OpLoad %8 %245
+ %247 = OpAccessChain %29 %28 %13 %13
+ %248 = OpLoad %8 %247
+ %249 = OpAccessChain %29 %28 %13 %13
+ %250 = OpLoad %8 %249
+ %251 = OpAccessChain %29 %28 %13 %13
+ %252 = OpLoad %8 %251
+ %253 = OpAccessChain %29 %28 %13 %13
+ %254 = OpLoad %8 %253
+ %255 = OpAccessChain %29 %28 %13 %13
+ %256 = OpLoad %8 %255
+ %257 = OpAccessChain %29 %28 %13 %13
+ %258 = OpLoad %8 %257
+ %259 = OpAccessChain %29 %28 %13 %13
+ %260 = OpLoad %8 %259
+ %261 = OpAccessChain %29 %28 %13 %13
+ %262 = OpLoad %8 %261
+ %263 = OpAccessChain %29 %28 %13 %13
+ %264 = OpLoad %8 %263
+ %265 = OpAccessChain %29 %28 %13 %13
+ %266 = OpLoad %8 %265
+ %267 = OpAccessChain %29 %28 %13 %13
+ %268 = OpLoad %8 %267
+ %269 = OpAccessChain %29 %28 %13 %13
+ %270 = OpLoad %8 %269
+ %271 = OpAccessChain %29 %28 %13 %13
+ %272 = OpLoad %8 %271
+ %273 = OpAccessChain %29 %28 %13 %13
+ %274 = OpLoad %8 %273
+ %275 = OpAccessChain %29 %28 %13 %13
+ %276 = OpLoad %8 %275
+ %277 = OpAccessChain %29 %28 %13 %13
+ %278 = OpLoad %8 %277
+ %279 = OpAccessChain %29 %28 %13 %13
+ %280 = OpLoad %8 %279
+ %281 = OpAccessChain %29 %28 %13 %13
+ %282 = OpLoad %8 %281
+ %283 = OpAccessChain %29 %28 %13 %13
+ %284 = OpLoad %8 %283
+ %285 = OpAccessChain %29 %28 %13 %13
+ %286 = OpLoad %8 %285
+ %287 = OpAccessChain %29 %28 %13 %13
+ %288 = OpLoad %8 %287
+ %289 = OpAccessChain %29 %28 %13 %13
+ %290 = OpLoad %8 %289
+ %291 = OpAccessChain %29 %28 %13 %13
+ %292 = OpLoad %8 %291
+ %293 = OpAccessChain %29 %28 %13 %13
+ %294 = OpLoad %8 %293
+ %295 = OpAccessChain %29 %28 %13 %13
+ %296 = OpLoad %8 %295
+ %297 = OpAccessChain %29 %28 %13 %13
+ %298 = OpLoad %8 %297
+ %299 = OpAccessChain %29 %28 %13 %13
+ %300 = OpLoad %8 %299
+ %301 = OpAccessChain %29 %28 %13 %13
+ %302 = OpLoad %8 %301
+ %303 = OpAccessChain %29 %28 %13 %13
+ %304 = OpLoad %8 %303
+ %305 = OpAccessChain %29 %28 %13 %13
+ %306 = OpLoad %8 %305
+ %307 = OpAccessChain %29 %28 %13 %13
+ %308 = OpLoad %8 %307
+ %309 = OpAccessChain %29 %28 %13 %13
+ %310 = OpLoad %8 %309
+ %311 = OpAccessChain %29 %28 %13 %13
+ %312 = OpLoad %8 %311
+ %313 = OpAccessChain %29 %28 %13 %13
+ %314 = OpLoad %8 %313
+ %315 = OpAccessChain %29 %28 %13 %13
+ %316 = OpLoad %8 %315
+ %317 = OpAccessChain %29 %28 %13 %13
+ %318 = OpLoad %8 %317
+ %319 = OpAccessChain %29 %28 %13 %13
+ %320 = OpLoad %8 %319
+ %321 = OpAccessChain %29 %28 %13 %13
+ %322 = OpLoad %8 %321
+ %323 = OpAccessChain %29 %28 %13 %13
+ %324 = OpLoad %8 %323
+ %325 = OpAccessChain %29 %28 %13 %13
+ %326 = OpLoad %8 %325
+ %327 = OpAccessChain %29 %28 %13 %13
+ %328 = OpLoad %8 %327
+ %329 = OpAccessChain %29 %28 %13 %13
+ %330 = OpLoad %8 %329
+ %331 = OpAccessChain %29 %28 %13 %13
+ %332 = OpLoad %8 %331
+ %333 = OpAccessChain %29 %28 %13 %13
+ %334 = OpLoad %8 %333
+ %335 = OpAccessChain %29 %28 %13 %13
+ %336 = OpLoad %8 %335
+ %337 = OpAccessChain %29 %28 %13 %13
+ %338 = OpLoad %8 %337
+ %339 = OpAccessChain %29 %28 %13 %13
+ %340 = OpLoad %8 %339
+ %341 = OpAccessChain %29 %28 %13 %13
+ %342 = OpLoad %8 %341
+ %343 = OpAccessChain %29 %28 %13 %13
+ %344 = OpLoad %8 %343
+ %345 = OpAccessChain %29 %28 %13 %13
+ %346 = OpLoad %8 %345
+ %347 = OpAccessChain %29 %28 %13 %13
+ %348 = OpLoad %8 %347
+ %349 = OpAccessChain %29 %28 %13 %13
+ %350 = OpLoad %8 %349
+ %351 = OpAccessChain %29 %28 %13 %13
+ %352 = OpLoad %8 %351
+ %353 = OpAccessChain %29 %28 %13 %13
+ %354 = OpLoad %8 %353
+ %355 = OpAccessChain %29 %28 %13 %13
+ %356 = OpLoad %8 %355
+ %357 = OpAccessChain %29 %28 %13 %13
+ %358 = OpLoad %8 %357
+ %359 = OpAccessChain %29 %28 %13 %13
+ %360 = OpLoad %8 %359
+ %361 = OpAccessChain %29 %28 %13 %13
+ %362 = OpLoad %8 %361
+ %363 = OpAccessChain %29 %28 %13 %13
+ %364 = OpLoad %8 %363
+ %365 = OpAccessChain %29 %28 %13 %13
+ %366 = OpLoad %8 %365
+ %367 = OpAccessChain %29 %28 %13 %13
+ %368 = OpLoad %8 %367
+ %369 = OpAccessChain %29 %28 %13 %13
+ %370 = OpLoad %8 %369
+ %371 = OpAccessChain %29 %28 %13 %13
+ %372 = OpLoad %8 %371
+ %373 = OpAccessChain %29 %28 %13 %13
+ %374 = OpLoad %8 %373
+ %375 = OpAccessChain %29 %28 %13 %13
+ %376 = OpLoad %8 %375
+ %377 = OpAccessChain %29 %28 %13 %13
+ %378 = OpLoad %8 %377
+ %379 = OpAccessChain %29 %28 %13 %13
+ %380 = OpLoad %8 %379
+ %381 = OpAccessChain %29 %28 %13 %13
+ %382 = OpLoad %8 %381
+ %383 = OpAccessChain %29 %28 %13 %13
+ %384 = OpLoad %8 %383
+ %385 = OpAccessChain %29 %28 %13 %13
+ %386 = OpLoad %8 %385
+ %387 = OpAccessChain %29 %28 %13 %13
+ %388 = OpLoad %8 %387
+ %389 = OpAccessChain %29 %28 %13 %13
+ %390 = OpLoad %8 %389
+ %391 = OpAccessChain %29 %28 %13 %13
+ %392 = OpLoad %8 %391
+ %393 = OpAccessChain %29 %28 %13 %13
+ %394 = OpLoad %8 %393
+ %395 = OpAccessChain %29 %28 %13 %13
+ %396 = OpLoad %8 %395
+ %397 = OpAccessChain %29 %28 %13 %13
+ %398 = OpLoad %8 %397
+ %399 = OpAccessChain %29 %28 %13 %13
+ %400 = OpLoad %8 %399
+ %401 = OpAccessChain %29 %28 %13 %13
+ %402 = OpLoad %8 %401
+ %403 = OpAccessChain %29 %28 %13 %13
+ %404 = OpLoad %8 %403
+ %405 = OpAccessChain %29 %28 %13 %13
+ %406 = OpLoad %8 %405
+ %407 = OpAccessChain %29 %28 %13 %13
+ %408 = OpLoad %8 %407
+ %409 = OpAccessChain %29 %28 %13 %13
+ %410 = OpLoad %8 %409
+ %411 = OpAccessChain %29 %28 %13 %13
+ %412 = OpLoad %8 %411
+ %413 = OpAccessChain %29 %28 %13 %13
+ %414 = OpLoad %8 %413
+ %415 = OpAccessChain %29 %28 %13 %13
+ %416 = OpLoad %8 %415
+ %417 = OpAccessChain %29 %28 %13 %13
+ %418 = OpLoad %8 %417
+ %419 = OpAccessChain %29 %28 %13 %13
+ %420 = OpLoad %8 %419
+ %421 = OpAccessChain %29 %28 %13 %13
+ %422 = OpLoad %8 %421
+ %423 = OpAccessChain %29 %28 %13 %13
+ %424 = OpLoad %8 %423
+ %425 = OpAccessChain %29 %28 %13 %13
+ %426 = OpLoad %8 %425
+ %427 = OpAccessChain %29 %28 %13 %13
+ %428 = OpLoad %8 %427
+ %429 = OpAccessChain %29 %28 %13 %13
+ %430 = OpLoad %8 %429
+ %431 = OpAccessChain %29 %28 %13 %13
+ %432 = OpLoad %8 %431
+ %433 = OpAccessChain %29 %28 %13 %13
+ %434 = OpLoad %8 %433
+ %435 = OpAccessChain %29 %28 %13 %13
+ %436 = OpLoad %8 %435
+ %437 = OpAccessChain %29 %28 %13 %13
+ %438 = OpLoad %8 %437
+ %439 = OpAccessChain %29 %28 %13 %13
+ %440 = OpLoad %8 %439
+ %441 = OpAccessChain %29 %28 %13 %13
+ %442 = OpLoad %8 %441
+ %443 = OpAccessChain %29 %28 %13 %13
+ %444 = OpLoad %8 %443
+ %445 = OpAccessChain %29 %28 %13 %13
+ %446 = OpLoad %8 %445
+ %447 = OpAccessChain %29 %28 %13 %13
+ %448 = OpLoad %8 %447
+ %449 = OpAccessChain %29 %28 %13 %13
+ %450 = OpLoad %8 %449
+ %451 = OpAccessChain %29 %28 %13 %13
+ %452 = OpLoad %8 %451
+ %453 = OpAccessChain %29 %28 %13 %13
+ %454 = OpLoad %8 %453
+ %455 = OpAccessChain %29 %28 %13 %13
+ %456 = OpLoad %8 %455
+ %457 = OpAccessChain %29 %28 %13 %13
+ %458 = OpLoad %8 %457
+ %459 = OpAccessChain %29 %28 %13 %13
+ %460 = OpLoad %8 %459
+ %461 = OpAccessChain %29 %28 %13 %13
+ %462 = OpLoad %8 %461
+ %463 = OpAccessChain %29 %28 %13 %13
+ %464 = OpLoad %8 %463
+ %465 = OpAccessChain %29 %28 %13 %13
+ %466 = OpLoad %8 %465
+ %467 = OpAccessChain %29 %28 %13 %13
+ %468 = OpLoad %8 %467
+ %469 = OpAccessChain %29 %28 %13 %13
+ %470 = OpLoad %8 %469
+ %471 = OpAccessChain %29 %28 %13 %13
+ %472 = OpLoad %8 %471
+ %473 = OpAccessChain %29 %28 %13 %13
+ %474 = OpLoad %8 %473
+ %475 = OpAccessChain %29 %28 %13 %13
+ %476 = OpLoad %8 %475
+ %477 = OpAccessChain %29 %28 %13 %13
+ %478 = OpLoad %8 %477
+ %479 = OpAccessChain %29 %28 %13 %13
+ %480 = OpLoad %8 %479
+ %481 = OpAccessChain %29 %28 %13 %13
+ %482 = OpLoad %8 %481
+ %483 = OpAccessChain %29 %28 %13 %13
+ %484 = OpLoad %8 %483
+ %485 = OpAccessChain %29 %28 %13 %13
+ %486 = OpLoad %8 %485
+ %487 = OpAccessChain %29 %28 %13 %13
+ %488 = OpLoad %8 %487
+ %489 = OpAccessChain %29 %28 %13 %13
+ %490 = OpLoad %8 %489
+ %491 = OpAccessChain %29 %28 %13 %13
+ %492 = OpLoad %8 %491
+ %493 = OpAccessChain %29 %28 %13 %13
+ %494 = OpLoad %8 %493
+ %495 = OpAccessChain %29 %28 %13 %13
+ %496 = OpLoad %8 %495
+ %497 = OpAccessChain %29 %28 %13 %13
+ %498 = OpLoad %8 %497
+ %499 = OpAccessChain %29 %28 %13 %13
+ %500 = OpLoad %8 %499
+ %501 = OpAccessChain %29 %28 %13 %13
+ %502 = OpLoad %8 %501
+ %503 = OpAccessChain %29 %28 %13 %13
+ %504 = OpLoad %8 %503
+ %505 = OpAccessChain %29 %28 %13 %13
+ %506 = OpLoad %8 %505
+ %507 = OpAccessChain %29 %28 %13 %13
+ %508 = OpLoad %8 %507
+ %509 = OpAccessChain %29 %28 %13 %13
+ %510 = OpLoad %8 %509
+ %511 = OpAccessChain %29 %28 %13 %13
+ %512 = OpLoad %8 %511
+ %513 = OpAccessChain %29 %28 %13 %13
+ %514 = OpLoad %8 %513
+ %515 = OpAccessChain %29 %28 %13 %13
+ %516 = OpLoad %8 %515
+ %517 = OpAccessChain %29 %28 %13 %13
+ %518 = OpLoad %8 %517
+ %519 = OpAccessChain %29 %28 %13 %13
+ %520 = OpLoad %8 %519
+ %521 = OpAccessChain %29 %28 %13 %13
+ %522 = OpLoad %8 %521
+ %523 = OpAccessChain %29 %28 %13 %13
+ %524 = OpLoad %8 %523
+ %525 = OpAccessChain %29 %28 %13 %13
+ %526 = OpLoad %8 %525
+ %527 = OpAccessChain %29 %28 %13 %13
+ %528 = OpLoad %8 %527
+ %529 = OpAccessChain %29 %28 %13 %13
+ %530 = OpLoad %8 %529
+ %531 = OpAccessChain %29 %28 %13 %13
+ %532 = OpLoad %8 %531
+ %533 = OpAccessChain %29 %28 %13 %13
+ %534 = OpLoad %8 %533
+ %535 = OpAccessChain %29 %28 %13 %13
+ %536 = OpLoad %8 %535
+ %537 = OpAccessChain %29 %28 %13 %13
+ %538 = OpLoad %8 %537
+ %539 = OpAccessChain %29 %28 %13 %13
+ %540 = OpLoad %8 %539
+ %541 = OpAccessChain %29 %28 %13 %13
+ %542 = OpLoad %8 %541
+ %545 = OpCompositeConstruct %544 %31 %34 %36 %38 %40 %42 %44 %46 %48 %50 %52 %54 %56 %58 %60 %62 %64 %66 %68 %70 %72 %74 %76 %78 %80 %82 %84 %86 %88 %90 %92 %94 %96 %98 %100 %102 %104 %106 %108 %110 %112 %114 %116 %118 %120 %122 %124 %126 %128 %130 %132 %134 %136 %138 %140 %142 %144 %146 %148 %150 %152 %154 %156 %158 %160 %162 %164 %166 %168 %170 %172 %174 %176 %178 %180 %182 %184 %186 %188 %190 %192 %194 %196 %198 %200 %202 %204 %206 %208 %210 %212 %214 %216 %218 %220 %222 %224 %226 %228 %230 %232 %234 %236 %238 %240 %242 %244 %246 %248 %250 %252 %254 %256 %258 %260 %262 %264 %266 %268 %270 %272 %274 %276 %278 %280 %282 %284 %286 %288 %290 %292 %294 %296 %298 %300 %302 %304 %306 %308 %310 %312 %314 %316 %318 %320 %322 %324 %326 %328 %330 %332 %334 %336 %338 %340 %342 %344 %346 %348 %350 %352 %354 %356 %358 %360 %362 %364 %366 %368 %370 %372 %374 %376 %378 %380 %382 %384 %386 %388 %390 %392 %394 %396 %398 %400 %402 %404 %406 %408 %410 %412 %414 %416 %418 %420 %422 %424 %426 %428 %430 %432 %434 %436 %438 %440 %442 %444 %446 %448 %450 %452 %454 %456 %458 %460 %462 %464 %466 %468 %470 %472 %474 %476 %478 %480 %482 %484 %486 %488 %490 %492 %494 %496 %498 %500 %502 %504 %506 %508 %510 %512 %514 %516 %518 %520 %522 %524 %526 %528 %530 %532 %534 %536 %538 %540 %542
+ %546 = OpLoad %8 %10
+ %548 = OpExtInst %8 %1 SClamp %546 %32 %547
+ OpStore %550 %545
+ %551 = OpAccessChain %9 %550 %548
+ %552 = OpLoad %8 %551
+ %553 = OpAccessChain %29 %28 %13 %32
+ %554 = OpLoad %8 %553
+ %555 = OpIEqual %21 %552 %554
+ OpSelectionMerge %557 None
+ OpBranchConditional %555 %556 %557
+ %556 = OpLabel
+ OpStore %561 %564
+ OpBranch %557
+ %557 = OpLabel
+ %565 = OpLoad %8 %10
+ %566 = OpIAdd %8 %565 %32
+ OpStore %10 %566
+ OpBranch %17
+ %17 = OpLabel
+ %567 = OpLoad %8 %12
+ %568 = OpIAdd %8 %567 %32
+ OpStore %12 %568
+ OpBranch %14
+ %16 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 2 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+#
+# #define _int_1 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_8 _GLF_uniform_int_values[2]
+# #define _float_0_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 0.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [1, 0, 8]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# // Contents of one: 1.0
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# float one;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int arr[10] = int[10](_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1);
+#
+# for(int i = 1; i < 10; i++)
+# {
+# if(i != 1)
+# {
+# // Iterated once.
+# do
+# {
+# if(i != 7)
+# {
+# // Iterated once.
+# do
+# {
+# if(i == 8)
+# {
+# arr[i] = _int_0;
+# }
+# }
+# while(_float_0_0 > one);
+# }
+# }
+# while(_float_0_0 > one);
+# }
+# }
+#
+# // Always true.
+# if(arr[_int_1] == _int_1 && arr[_int_8] == _int_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# discard;
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 138
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %122
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "arr"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %41 "i"
+ OpName %81 "buf0"
+ OpMemberName %81 0 "_GLF_uniform_float_values"
+ OpName %83 ""
+ OpName %87 "buf2"
+ OpMemberName %87 0 "one"
+ OpName %89 ""
+ OpName %122 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %80 ArrayStride 16
+ OpMemberDecorate %81 0 Offset 0
+ OpDecorate %81 Block
+ OpDecorate %83 DescriptorSet 0
+ OpDecorate %83 Binding 0
+ OpMemberDecorate %87 0 Offset 0
+ OpDecorate %87 Block
+ OpDecorate %89 DescriptorSet 0
+ OpDecorate %89 Binding 2
+ OpDecorate %122 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 10
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypePointer Function %9
+ %12 = OpConstant %7 3
+ %13 = OpTypeArray %6 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %6 0
+ %18 = OpTypePointer Uniform %6
+ %40 = OpTypePointer Function %6
+ %42 = OpConstant %6 1
+ %49 = OpConstant %6 10
+ %50 = OpTypeBool
+ %61 = OpConstant %6 7
+ %70 = OpConstant %6 8
+ %78 = OpTypeFloat 32
+ %79 = OpConstant %7 1
+ %80 = OpTypeArray %78 %79
+ %81 = OpTypeStruct %80
+ %82 = OpTypePointer Uniform %81
+ %83 = OpVariable %82 Uniform
+ %84 = OpTypePointer Uniform %78
+ %87 = OpTypeStruct %78
+ %88 = OpTypePointer Uniform %87
+ %89 = OpVariable %88 Uniform
+ %109 = OpConstant %6 2
+ %120 = OpTypeVector %78 4
+ %121 = OpTypePointer Output %120
+ %122 = OpVariable %121 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %41 = OpVariable %40 Function
+ %19 = OpAccessChain %18 %16 %17 %17
+ %20 = OpLoad %6 %19
+ %21 = OpAccessChain %18 %16 %17 %17
+ %22 = OpLoad %6 %21
+ %23 = OpAccessChain %18 %16 %17 %17
+ %24 = OpLoad %6 %23
+ %25 = OpAccessChain %18 %16 %17 %17
+ %26 = OpLoad %6 %25
+ %27 = OpAccessChain %18 %16 %17 %17
+ %28 = OpLoad %6 %27
+ %29 = OpAccessChain %18 %16 %17 %17
+ %30 = OpLoad %6 %29
+ %31 = OpAccessChain %18 %16 %17 %17
+ %32 = OpLoad %6 %31
+ %33 = OpAccessChain %18 %16 %17 %17
+ %34 = OpLoad %6 %33
+ %35 = OpAccessChain %18 %16 %17 %17
+ %36 = OpLoad %6 %35
+ %37 = OpAccessChain %18 %16 %17 %17
+ %38 = OpLoad %6 %37
+ %39 = OpCompositeConstruct %9 %20 %22 %24 %26 %28 %30 %32 %34 %36 %38
+ OpStore %11 %39
+ OpStore %41 %42
+ OpBranch %43
+ %43 = OpLabel
+ OpLoopMerge %45 %46 None
+ OpBranch %47
+ %47 = OpLabel
+ %48 = OpLoad %6 %41
+ %51 = OpSLessThan %50 %48 %49
+ OpBranchConditional %51 %44 %45
+ %44 = OpLabel
+ %52 = OpLoad %6 %41
+ %53 = OpINotEqual %50 %52 %42
+ OpSelectionMerge %55 None
+ OpBranchConditional %53 %54 %55
+ %54 = OpLabel
+ OpBranch %56
+ %56 = OpLabel
+ OpLoopMerge %58 %59 None
+ OpBranch %57
+ %57 = OpLabel
+ %60 = OpLoad %6 %41
+ %62 = OpINotEqual %50 %60 %61
+ OpSelectionMerge %64 None
+ OpBranchConditional %62 %63 %64
+ %63 = OpLabel
+ OpBranch %65
+ %65 = OpLabel
+ OpLoopMerge %67 %68 None
+ OpBranch %66
+ %66 = OpLabel
+ %69 = OpLoad %6 %41
+ %71 = OpIEqual %50 %69 %70
+ OpSelectionMerge %73 None
+ OpBranchConditional %71 %72 %73
+ %72 = OpLabel
+ %74 = OpLoad %6 %41
+ %75 = OpAccessChain %18 %16 %17 %42
+ %76 = OpLoad %6 %75
+ %77 = OpAccessChain %40 %11 %74
+ OpStore %77 %76
+ OpBranch %73
+ %73 = OpLabel
+ OpBranch %68
+ %68 = OpLabel
+ %85 = OpAccessChain %84 %83 %17 %17
+ %86 = OpLoad %78 %85
+ %90 = OpAccessChain %84 %89 %17
+ %91 = OpLoad %78 %90
+ %92 = OpFOrdGreaterThan %50 %86 %91
+ OpBranchConditional %92 %65 %67
+ %67 = OpLabel
+ OpBranch %64
+ %64 = OpLabel
+ OpBranch %59
+ %59 = OpLabel
+ %93 = OpAccessChain %84 %83 %17 %17
+ %94 = OpLoad %78 %93
+ %95 = OpAccessChain %84 %89 %17
+ %96 = OpLoad %78 %95
+ %97 = OpFOrdGreaterThan %50 %94 %96
+ OpBranchConditional %97 %56 %58
+ %58 = OpLabel
+ OpBranch %55
+ %55 = OpLabel
+ OpBranch %46
+ %46 = OpLabel
+ %98 = OpLoad %6 %41
+ %99 = OpIAdd %6 %98 %42
+ OpStore %41 %99
+ OpBranch %43
+ %45 = OpLabel
+ %100 = OpAccessChain %18 %16 %17 %17
+ %101 = OpLoad %6 %100
+ %102 = OpAccessChain %40 %11 %101
+ %103 = OpLoad %6 %102
+ %104 = OpAccessChain %18 %16 %17 %17
+ %105 = OpLoad %6 %104
+ %106 = OpIEqual %50 %103 %105
+ OpSelectionMerge %108 None
+ OpBranchConditional %106 %107 %108
+ %107 = OpLabel
+ %110 = OpAccessChain %18 %16 %17 %109
+ %111 = OpLoad %6 %110
+ %112 = OpAccessChain %40 %11 %111
+ %113 = OpLoad %6 %112
+ %114 = OpAccessChain %18 %16 %17 %42
+ %115 = OpLoad %6 %114
+ %116 = OpIEqual %50 %113 %115
+ OpBranch %108
+ %108 = OpLabel
+ %117 = OpPhi %50 %106 %45 %116 %107
+ OpSelectionMerge %119 None
+ OpBranchConditional %117 %118 %136
+ %118 = OpLabel
+ %123 = OpAccessChain %18 %16 %17 %17
+ %124 = OpLoad %6 %123
+ %125 = OpConvertSToF %78 %124
+ %126 = OpAccessChain %18 %16 %17 %42
+ %127 = OpLoad %6 %126
+ %128 = OpConvertSToF %78 %127
+ %129 = OpAccessChain %18 %16 %17 %42
+ %130 = OpLoad %6 %129
+ %131 = OpConvertSToF %78 %130
+ %132 = OpAccessChain %18 %16 %17 %17
+ %133 = OpLoad %6 %132
+ %134 = OpConvertSToF %78 %133
+ %135 = OpCompositeConstruct %120 %125 %128 %131 %134
+ OpStore %122 %135
+ OpBranch %119
+ %136 = OpLabel
+ OpKill
+ %119 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# one
+BUFFER variant_one DATA_TYPE float STD140 DATA
+ 1.0
+END
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 1 0 8
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_one AS uniform DESCRIPTOR_SET 0 BINDING 2
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 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.
+
+
+# A test for a coverage-gap found by the GraphicsFuzz project.
+
+# Short description: A fragment shader that covers specific LLVM code paths
+
+# The test passes because the shader always writes red.
+
+# Optimized using spirv-opt with the following arguments:
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--eliminate-local-multi-store'
+# '--inline-entry-points-exhaustive'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--redundancy-elimination'
+# '--reduce-load-size'
+# '--simplify-instructions'
+# '--simplify-instructions'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# spirv-opt commit hash: a0370efd589be33d5d9a85cfde2f85841b3755af
+
+
+
+SHADER vertex variant_vertex_shader PASSTHROUGH
+
+# variant_fragment_shader is derived from the following GLSL:
+# #version 320 es
+# #define _int_3 _GLF_uniform_int_values[0]
+# #define _int_5 _GLF_uniform_int_values[1]
+# #define _int_2 _GLF_uniform_int_values[2]
+# #define _int_1 _GLF_uniform_int_values[3]
+# #define _int_0 _GLF_uniform_int_values[4]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+# #define _float_19_0 _GLF_uniform_float_values[1]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: [1.0, 19.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [3, 5, 2, 1, 0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[5];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float arr[9] = float[9](_float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0, _float_1_0);
+#
+# for(int i = _int_1; i < _int_5; i ++)
+# {
+# for(int j = 2; j <= 4; j ++)
+# {
+# for(int k = 0; k < j; k ++)
+# {
+# for(int l = 0; l < 2; l ++)
+# {
+# // Iterated 18 times for each value of i.
+# switch(i)
+# {
+# case 0:
+# arr[i] += _float_1_0;
+# break;
+# case 1:
+# arr[i] += _float_1_0;
+# break;
+# // Matrices only contain zero values.
+# case 2:
+# arr[i] += mat2x4(0.0)[clamp(k, _int_0, _int_1)][l];
+# break;
+# case 3:
+# arr[i] += mat3x2(0.0)[clamp(k, _int_0, _int_2)][l];
+# break;
+# case 4:
+# arr[i] += mat3(0.0)[clamp(k, _int_0, _int_2)][l];
+# break;
+# // Cases below are never executed.
+# case 5:
+# arr[i] += mat3x4(0.0)[clamp(k, 0, _int_2)][l];
+# break;
+# case 6:
+# arr[i] += mat4x2(0.0)[clamp(k, 0, 3)][l];
+# break;
+# case 7:
+# arr[i] += mat4x3(0.0)[clamp(k, 0, 3)][l];
+# // Fallthrough
+# case 8:
+# arr[i] += mat4(0.0)[clamp(k, 0, _int_3)][l];
+# break;
+# }
+# }
+# }
+# }
+# }
+#
+# // Always true.
+# if(arr[_int_0] == _float_1_0 && arr[_int_1] == _float_19_0 && arr[_int_2] == _float_1_0)
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+# else
+# {
+# _GLF_color = vec4(_int_0);
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 307
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %282
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "arr"
+ OpName %14 "buf0"
+ OpMemberName %14 0 "_GLF_uniform_float_values"
+ OpName %16 ""
+ OpName %40 "i"
+ OpName %43 "buf1"
+ OpMemberName %43 0 "_GLF_uniform_int_values"
+ OpName %45 ""
+ OpName %61 "j"
+ OpName %71 "k"
+ OpName %80 "l"
+ OpName %130 "indexable"
+ OpName %151 "indexable"
+ OpName %172 "indexable"
+ OpName %189 "indexable"
+ OpName %204 "indexable"
+ OpName %219 "indexable"
+ OpName %235 "indexable"
+ OpName %282 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 0
+ OpDecorate %42 ArrayStride 16
+ OpMemberDecorate %43 0 Offset 0
+ OpDecorate %43 Block
+ OpDecorate %45 DescriptorSet 0
+ OpDecorate %45 Binding 1
+ OpDecorate %282 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeInt 32 0
+ %8 = OpConstant %7 9
+ %9 = OpTypeArray %6 %8
+ %10 = OpTypePointer Function %9
+ %12 = OpConstant %7 2
+ %13 = OpTypeArray %6 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpTypeInt 32 1
+ %18 = OpConstant %17 0
+ %19 = OpTypePointer Uniform %6
+ %39 = OpTypePointer Function %17
+ %41 = OpConstant %7 5
+ %42 = OpTypeArray %17 %41
+ %43 = OpTypeStruct %42
+ %44 = OpTypePointer Uniform %43
+ %45 = OpVariable %44 Uniform
+ %46 = OpConstant %17 3
+ %47 = OpTypePointer Uniform %17
+ %56 = OpConstant %17 1
+ %59 = OpTypeBool
+ %62 = OpConstant %17 2
+ %69 = OpConstant %17 4
+ %102 = OpTypePointer Function %6
+ %117 = OpTypeVector %6 4
+ %118 = OpTypeMatrix %117 2
+ %119 = OpConstant %6 0
+ %120 = OpConstantComposite %117 %119 %119 %119 %119
+ %121 = OpConstantComposite %118 %120 %120
+ %129 = OpTypePointer Function %118
+ %139 = OpTypeVector %6 2
+ %140 = OpTypeMatrix %139 3
+ %141 = OpConstantComposite %139 %119 %119
+ %142 = OpConstantComposite %140 %141 %141 %141
+ %150 = OpTypePointer Function %140
+ %160 = OpTypeVector %6 3
+ %161 = OpTypeMatrix %160 3
+ %162 = OpConstantComposite %160 %119 %119 %119
+ %163 = OpConstantComposite %161 %162 %162 %162
+ %171 = OpTypePointer Function %161
+ %181 = OpTypeMatrix %117 3
+ %182 = OpConstantComposite %181 %120 %120 %120
+ %188 = OpTypePointer Function %181
+ %198 = OpTypeMatrix %139 4
+ %199 = OpConstantComposite %198 %141 %141 %141 %141
+ %203 = OpTypePointer Function %198
+ %213 = OpTypeMatrix %160 4
+ %214 = OpConstantComposite %213 %162 %162 %162 %162
+ %218 = OpTypePointer Function %213
+ %227 = OpTypeMatrix %117 4
+ %228 = OpConstantComposite %227 %120 %120 %120 %120
+ %234 = OpTypePointer Function %227
+ %281 = OpTypePointer Output %117
+ %282 = OpVariable %281 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %40 = OpVariable %39 Function
+ %61 = OpVariable %39 Function
+ %71 = OpVariable %39 Function
+ %80 = OpVariable %39 Function
+ %130 = OpVariable %129 Function
+ %151 = OpVariable %150 Function
+ %172 = OpVariable %171 Function
+ %189 = OpVariable %188 Function
+ %204 = OpVariable %203 Function
+ %219 = OpVariable %218 Function
+ %235 = OpVariable %234 Function
+ %20 = OpAccessChain %19 %16 %18 %18
+ %21 = OpLoad %6 %20
+ %38 = OpCompositeConstruct %9 %21 %21 %21 %21 %21 %21 %21 %21 %21
+ OpStore %11 %38
+ %48 = OpAccessChain %47 %45 %18 %46
+ %49 = OpLoad %17 %48
+ OpStore %40 %49
+ OpBranch %50
+ %50 = OpLabel
+ %301 = OpPhi %17 %49 %5 %251 %53
+ OpLoopMerge %52 %53 None
+ OpBranch %54
+ %54 = OpLabel
+ %57 = OpAccessChain %47 %45 %18 %56
+ %58 = OpLoad %17 %57
+ %60 = OpSLessThan %59 %301 %58
+ OpBranchConditional %60 %51 %52
+ %51 = OpLabel
+ OpStore %61 %62
+ OpBranch %63
+ %63 = OpLabel
+ %302 = OpPhi %17 %62 %51 %249 %66
+ OpLoopMerge %65 %66 None
+ OpBranch %67
+ %67 = OpLabel
+ %70 = OpSLessThanEqual %59 %302 %69
+ OpBranchConditional %70 %64 %65
+ %64 = OpLabel
+ OpStore %71 %18
+ OpBranch %72
+ %72 = OpLabel
+ %304 = OpPhi %17 %18 %64 %247 %75
+ OpLoopMerge %74 %75 None
+ OpBranch %76
+ %76 = OpLabel
+ %79 = OpSLessThan %59 %304 %302
+ OpBranchConditional %79 %73 %74
+ %73 = OpLabel
+ OpStore %80 %18
+ OpBranch %81
+ %81 = OpLabel
+ %306 = OpPhi %17 %18 %73 %245 %84
+ OpLoopMerge %83 %84 None
+ OpBranch %85
+ %85 = OpLabel
+ %87 = OpSLessThan %59 %306 %62
+ OpBranchConditional %87 %82 %83
+ %82 = OpLabel
+ OpSelectionMerge %98 None
+ OpSwitch %301 %98 0 %89 1 %90 2 %91 3 %92 4 %93 5 %94 6 %95 7 %96 8 %97
+ %89 = OpLabel
+ %103 = OpAccessChain %102 %11 %301
+ %104 = OpLoad %6 %103
+ %105 = OpFAdd %6 %104 %21
+ OpStore %103 %105
+ OpBranch %98
+ %90 = OpLabel
+ %111 = OpAccessChain %102 %11 %301
+ %112 = OpLoad %6 %111
+ %113 = OpFAdd %6 %112 %21
+ OpStore %111 %113
+ OpBranch %98
+ %91 = OpLabel
+ %123 = OpAccessChain %47 %45 %18 %69
+ %124 = OpLoad %17 %123
+ %127 = OpExtInst %17 %1 SClamp %304 %124 %49
+ OpStore %130 %121
+ %131 = OpAccessChain %102 %130 %127 %306
+ %132 = OpLoad %6 %131
+ %133 = OpAccessChain %102 %11 %301
+ %134 = OpLoad %6 %133
+ %135 = OpFAdd %6 %134 %132
+ OpStore %133 %135
+ OpBranch %98
+ %92 = OpLabel
+ %144 = OpAccessChain %47 %45 %18 %69
+ %145 = OpLoad %17 %144
+ %146 = OpAccessChain %47 %45 %18 %62
+ %147 = OpLoad %17 %146
+ %148 = OpExtInst %17 %1 SClamp %304 %145 %147
+ OpStore %151 %142
+ %152 = OpAccessChain %102 %151 %148 %306
+ %153 = OpLoad %6 %152
+ %154 = OpAccessChain %102 %11 %301
+ %155 = OpLoad %6 %154
+ %156 = OpFAdd %6 %155 %153
+ OpStore %154 %156
+ OpBranch %98
+ %93 = OpLabel
+ %165 = OpAccessChain %47 %45 %18 %69
+ %166 = OpLoad %17 %165
+ %167 = OpAccessChain %47 %45 %18 %62
+ %168 = OpLoad %17 %167
+ %169 = OpExtInst %17 %1 SClamp %304 %166 %168
+ OpStore %172 %163
+ %173 = OpAccessChain %102 %172 %169 %306
+ %174 = OpLoad %6 %173
+ %175 = OpAccessChain %102 %11 %301
+ %176 = OpLoad %6 %175
+ %177 = OpFAdd %6 %176 %174
+ OpStore %175 %177
+ OpBranch %98
+ %94 = OpLabel
+ %184 = OpAccessChain %47 %45 %18 %62
+ %185 = OpLoad %17 %184
+ %186 = OpExtInst %17 %1 SClamp %304 %18 %185
+ OpStore %189 %182
+ %190 = OpAccessChain %102 %189 %186 %306
+ %191 = OpLoad %6 %190
+ %192 = OpAccessChain %102 %11 %301
+ %193 = OpLoad %6 %192
+ %194 = OpFAdd %6 %193 %191
+ OpStore %192 %194
+ OpBranch %98
+ %95 = OpLabel
+ %201 = OpExtInst %17 %1 SClamp %304 %18 %46
+ OpStore %204 %199
+ %205 = OpAccessChain %102 %204 %201 %306
+ %206 = OpLoad %6 %205
+ %207 = OpAccessChain %102 %11 %301
+ %208 = OpLoad %6 %207
+ %209 = OpFAdd %6 %208 %206
+ OpStore %207 %209
+ OpBranch %98
+ %96 = OpLabel
+ %216 = OpExtInst %17 %1 SClamp %304 %18 %46
+ OpStore %219 %214
+ %220 = OpAccessChain %102 %219 %216 %306
+ %221 = OpLoad %6 %220
+ %222 = OpAccessChain %102 %11 %301
+ %223 = OpLoad %6 %222
+ %224 = OpFAdd %6 %223 %221
+ OpStore %222 %224
+ OpBranch %97
+ %97 = OpLabel
+ %230 = OpAccessChain %47 %45 %18 %18
+ %231 = OpLoad %17 %230
+ %232 = OpExtInst %17 %1 SClamp %304 %18 %231
+ OpStore %235 %228
+ %236 = OpAccessChain %102 %235 %232 %306
+ %237 = OpLoad %6 %236
+ %238 = OpAccessChain %102 %11 %301
+ %239 = OpLoad %6 %238
+ %240 = OpFAdd %6 %239 %237
+ OpStore %238 %240
+ OpBranch %98
+ %98 = OpLabel
+ OpBranch %84
+ %84 = OpLabel
+ %245 = OpIAdd %17 %306 %56
+ OpStore %80 %245
+ OpBranch %81
+ %83 = OpLabel
+ OpBranch %75
+ %75 = OpLabel
+ %247 = OpIAdd %17 %304 %56
+ OpStore %71 %247
+ OpBranch %72
+ %74 = OpLabel
+ OpBranch %66
+ %66 = OpLabel
+ %249 = OpIAdd %17 %302 %56
+ OpStore %61 %249
+ OpBranch %63
+ %65 = OpLabel
+ OpBranch %53
+ %53 = OpLabel
+ %251 = OpIAdd %17 %301 %56
+ OpStore %40 %251
+ OpBranch %50
+ %52 = OpLabel
+ %252 = OpAccessChain %47 %45 %18 %69
+ %253 = OpLoad %17 %252
+ %254 = OpAccessChain %102 %11 %253
+ %255 = OpLoad %6 %254
+ %258 = OpFOrdEqual %59 %255 %21
+ OpSelectionMerge %260 None
+ OpBranchConditional %258 %259 %260
+ %259 = OpLabel
+ %263 = OpAccessChain %102 %11 %49
+ %264 = OpLoad %6 %263
+ %265 = OpAccessChain %19 %16 %18 %56
+ %266 = OpLoad %6 %265
+ %267 = OpFOrdEqual %59 %264 %266
+ OpBranch %260
+ %260 = OpLabel
+ %268 = OpPhi %59 %258 %52 %267 %259
+ OpSelectionMerge %270 None
+ OpBranchConditional %268 %269 %270
+ %269 = OpLabel
+ %271 = OpAccessChain %47 %45 %18 %62
+ %272 = OpLoad %17 %271
+ %273 = OpAccessChain %102 %11 %272
+ %274 = OpLoad %6 %273
+ %277 = OpFOrdEqual %59 %274 %21
+ OpBranch %270
+ %270 = OpLabel
+ %278 = OpPhi %59 %268 %260 %277 %269
+ OpSelectionMerge %280 None
+ OpBranchConditional %278 %279 %296
+ %279 = OpLabel
+ %285 = OpConvertSToF %6 %49
+ %288 = OpConvertSToF %6 %253
+ %295 = OpCompositeConstruct %117 %285 %288 %288 %285
+ OpStore %282 %295
+ OpBranch %280
+ %296 = OpLabel
+ %299 = OpConvertSToF %6 %253
+ %300 = OpCompositeConstruct %117 %299 %299 %299 %299
+ OpStore %282 %300
+ OpBranch %280
+ %280 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 3 5 2 1 0
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 1.0 19.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 32 32
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant__GLF_uniform_int_values AS uniform DESCRIPTOR_SET 0 BINDING 1
+ BIND BUFFER variant__GLF_uniform_float_values AS uniform DESCRIPTOR_SET 0 BINDING 0
+END
+CLEAR_COLOR variant_pipeline 0 0 0 255
+
+CLEAR variant_pipeline
+RUN variant_pipeline DRAW_RECT POS 0 0 SIZE 32 32
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 32 32 EQ_RGBA 255 0 0 255
{ "cov-bitfieldreverse-loop-limit-underflow.amber", "cov-bitfieldreverse-loop-limit-underflow", "A fragment shader that covers specific NIR code paths" },
{ "cov-bitwise-and-variable-and-its-negation.amber", "cov-bitwise-and-variable-and-its-negation", "A fragment shader that covers specific LLVM code paths" },
{ "cov-bitwise-inverse-uniform-condition.amber", "cov-bitwise-inverse-uniform-condition", "A fragment shader that covers specific BRW code paths" },
+{ "cov-bitwise-or-uniform-zero-tenth-bit-loop-limit-find-lsb.amber", "cov-bitwise-or-uniform-zero-tenth-bit-loop-limit-find-lsb", "A fragment shader that covers specific LLVM code paths" },
{ "cov-bitwise-shift-right-always-select-one.amber", "cov-bitwise-shift-right-always-select-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-bitwise-shift-right-full-bits-no-effect-clamp.amber", "cov-bitwise-shift-right-full-bits-no-effect-clamp", "A fragment shader that covers specific LLVM code paths" },
{ "cov-blockfrequency-several-for-loops.amber", "cov-blockfrequency-several-for-loops", "A fragment shader that covers a specific block frequency info code path." },
{ "cov-constants-combine-add-sub.amber", "cov-constants-combine-add-sub", "A fragment shader that covers a specific constants and add/sub combining path" },
{ "cov-constants-mix-uniform.amber", "cov-constants-mix-uniform", "A fragment shader that covers a specific constant handling path." },
{ "cov-continue-break-discard-return-in-loop.amber", "cov-continue-break-discard-return-in-loop", "A fragment shader that covers specific NIR code paths" },
+{ "cov-copy-array-elements-except-first-nested-loop-replace-identical-values.amber", "cov-copy-array-elements-except-first-nested-loop-replace-identical-values", "A fragment shader that covers specific LLVM code paths" },
{ "cov-copy-output-color-swizzle-array-indexing.amber", "cov-copy-output-color-swizzle-array-indexing", "A fragment shader that covers specific LLVM code paths" },
{ "cov-copy-prop-arrays-func-argument.amber", "cov-copy-prop-arrays-func-argument", "A fragment shader that covers a specific propagate array copy path." },
{ "cov-copy-prop-arrays-no-stores.amber", "cov-copy-prop-arrays-no-stores", "A fragment shader that covers a specific propagate array copy path." },
{ "cov-dag-combiner-same-cond-nested.amber", "cov-dag-combiner-same-cond-nested", "A fragment shader that covers a specific DAG combiner code path" },
{ "cov-dead-branch-func-return-arg.amber", "cov-dead-branch-func-return-arg", "A fragment shader that covers a specific dead branch elimination path" },
{ "cov-dead-code-unreachable-merge.amber", "cov-dead-code-unreachable-merge", "A fragment shader that covers a specific dead code elimination path." },
+{ "cov-decrement-vector-elements-clamp-index.amber", "cov-decrement-vector-elements-clamp-index", "A fragment shader that covers specific LLVM code paths" },
{ "cov-derivative-uniform-vector-global-loop-count.amber", "cov-derivative-uniform-vector-global-loop-count", "A fragment shader that covers specific BRW code paths" },
{ "cov-descending-loop-index-temporary-array.amber", "cov-descending-loop-index-temporary-array", "A fragment shader that covers specific LLVM code paths" },
{ "cov-descending-loop-min-max-always-zero.amber", "cov-descending-loop-min-max-always-zero", "A fragment shader that covers specific BRW code paths" },
{ "cov-function-infinite-loop-always-return.amber", "cov-function-infinite-loop-always-return", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-infinite-loop-return-identical-condition.amber", "cov-function-infinite-loop-return-identical-condition", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-large-array-max-clamp.amber", "cov-function-large-array-max-clamp", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-large-loop-break-argument-lte-global-loop-bound.amber", "cov-function-large-loop-break-argument-lte-global-loop-bound", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-loop-condition-uniform-shift-right.amber", "cov-function-loop-condition-uniform-shift-right", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-loop-condition-variable-less-than-min-itself.amber", "cov-function-loop-condition-variable-less-than-min-itself", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-loop-copy-array-elements-based-on-arguments.amber", "cov-function-loop-copy-array-elements-based-on-arguments", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-nested-do-whiles-looped-once.amber", "cov-function-nested-do-whiles-looped-once", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-nested-loops-break-early-never-discard.amber", "cov-function-nested-loops-break-early-never-discard", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-nested-loops-limit-uniform-xor-uniform.amber", "cov-function-nested-loops-limit-uniform-xor-uniform", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-function-set-struct-field-zero-loop-reset-first-element.amber", "cov-function-set-struct-field-zero-loop-reset-first-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-trivial-switch-case.amber", "cov-function-trivial-switch-case", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-two-loops-limit-using-arguments-array-element-copies.amber", "cov-function-two-loops-limit-using-arguments-array-element-copies", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-undefined-shift-left-index-array-with-return-value.amber", "cov-function-undefined-shift-left-index-array-with-return-value", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-vec2-never-discard.amber", "cov-function-vec2-never-discard", "A fragment shader that covers specific BRW code paths" },
{ "cov-function-with-nested-loops-called-from-nested-loops.amber", "cov-function-with-nested-loops-called-from-nested-loops", "A fragment shader that covers specific BRW code paths" },
{ "cov-global-loop-bound-true-logical-or.amber", "cov-global-loop-bound-true-logical-or", "A fragment shader that covers specific NIR code paths" },
+{ "cov-global-loop-count-array-struct-field-set-int-array-element.amber", "cov-global-loop-count-array-struct-field-set-int-array-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-global-loop-counter-accumulate-integer-condition-large-array-elements.amber", "cov-global-loop-counter-accumulate-integer-condition-large-array-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-global-loop-counter-exhaust-calling-function-twice.amber", "cov-global-loop-counter-exhaust-calling-function-twice", "A fragment shader that covers specific LLVM code paths" },
{ "cov-global-loop-counter-float-accumulate-matrix.amber", "cov-global-loop-counter-float-accumulate-matrix", "A fragment shader that covers specific BRW code paths" },
{ "cov-increment-inside-clamp.amber", "cov-increment-inside-clamp", "A fragment shader that covers specific value tracking and simplification paths" },
{ "cov-increment-int-loop-counter-mod-array.amber", "cov-increment-int-loop-counter-mod-array", "A fragment shader that covers specific BRW code paths" },
{ "cov-increment-multiple-integers.amber", "cov-increment-multiple-integers", "A fragment shader that covers specific NIR code paths" },
+{ "cov-increment-one-array-element-check-index-from-fragcoord.amber", "cov-increment-one-array-element-check-index-from-fragcoord", "A fragment shader that covers specific LLVM code paths" },
{ "cov-increment-vector-array-matrix-element.amber", "cov-increment-vector-array-matrix-element", "A fragment shader that covers specific NIR code paths" },
{ "cov-increment-vector-component-with-matrix-copy.amber", "cov-increment-vector-component-with-matrix-copy", "A fragment shader that covers specific NIR code paths" },
{ "cov-increment-vector-function-call-conditional.amber", "cov-increment-vector-function-call-conditional", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-abs-multiply-offset.amber", "cov-loop-abs-multiply-offset", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-array-element-copy-index-clamp-sign.amber", "cov-loop-array-element-copy-index-clamp-sign", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-array-index-decrement-never-negative.amber", "cov-loop-array-index-decrement-never-negative", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-array-struct-field-index-array-with-uniforms.amber", "cov-loop-array-struct-field-index-array-with-uniforms", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-break-after-first-iteration-set-array-element.amber", "cov-loop-break-after-first-iteration-set-array-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-break-floor-nan-never-executed.amber", "cov-loop-break-floor-nan-never-executed", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-clamp-to-one-empty-condition.amber", "cov-loop-clamp-to-one-empty-condition", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-condition-increment-integer-fallback-global-counter.amber", "cov-loop-condition-increment-integer-fallback-global-counter", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-condition-logical-or-never-iterated.amber", "cov-loop-condition-logical-or-never-iterated", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-decrease-integer-never-break.amber", "cov-loop-decrease-integer-never-break", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-construct-vec4-from-vec4-clamp-same-min-max.amber", "cov-loop-construct-vec4-from-vec4-clamp-same-min-max", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-copy-previous-array-element-first-undefined.amber", "cov-loop-copy-previous-array-element-first-undefined", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-decrease-vector-components-assign-multiple-times.amber", "cov-loop-decrease-vector-components-assign-multiple-times", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-dfdx-constant-divide.amber", "cov-loop-dfdx-constant-divide", "A fragment shader that covers specific patch optimization code paths" },
{ "cov-loop-exit-conditions-sampler-struct-integer-variable.amber", "cov-loop-exit-conditions-sampler-struct-integer-variable", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-divide-uninitialized-vector-min-unused.amber", "cov-loop-divide-uninitialized-vector-min-unused", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-global-counter-break-set-ivec-elements.amber", "cov-loop-global-counter-break-set-ivec-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-increase-iterator-condition-uniform-copy-array-elements.amber", "cov-loop-increase-iterator-condition-uniform-copy-array-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-increment-array-elements-clamp-index.amber", "cov-loop-increment-array-elements-clamp-index", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-increment-array-index-array-usuborrow-feedback.amber", "cov-loop-increment-array-index-array-usuborrow-feedback", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-increment-integer-findmsb-minus-uniform.amber", "cov-loop-increment-integer-findmsb-minus-uniform", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-increment-integer-set-output-color-break.amber", "cov-loop-increment-integer-set-output-color-break", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-increment-matrix-element-break-after-first-iteration.amber", "cov-loop-increment-matrix-element-break-after-first-iteration", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-increment-or-divide-by-loop-index.amber", "cov-loop-increment-or-divide-by-loop-index", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-integer-half-minus-one.amber", "cov-loop-integer-half-minus-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-iterator-plus-one-variable-outside-index-array.amber", "cov-loop-iterator-plus-one-variable-outside-index-array", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-large-array-index-clamp-negative-value.amber", "cov-loop-large-array-index-clamp-negative-value", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-limiter-min-findlsb.amber", "cov-loop-limiter-min-findlsb", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-limiter-uniform-bitwise-and-one-always-break.amber", "cov-loop-limiter-uniform-bitwise-and-one-always-break", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-logical-xor.amber", "cov-loop-logical-xor", "A fragment shader that covers specific NIR code paths" },
{ "cov-nested-loops-identical-iterators-compare-same-array-elements.amber", "cov-nested-loops-identical-iterators-compare-same-array-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-increase-integer-dot-product.amber", "cov-nested-loops-increase-integer-dot-product", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-inner-loop-min-copy-array-elements.amber", "cov-nested-loops-inner-loop-min-copy-array-elements", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-nested-loops-never-change-array-element-one.amber", "cov-nested-loops-never-change-array-element-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-redundant-condition.amber", "cov-nested-loops-redundant-condition", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-return-inside-while-never-executed.amber", "cov-nested-loops-return-inside-while-never-executed", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-sample-opposite-corners.amber", "cov-nested-loops-sample-opposite-corners", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-switch-case-fallthrough-increment-array-element.amber", "cov-nested-loops-switch-case-fallthrough-increment-array-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-temporary-copy-output-color-index-matrix.amber", "cov-nested-loops-temporary-copy-output-color-index-matrix", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-while-min-iterator-condition-always-false.amber", "cov-nested-loops-while-min-iterator-condition-always-false", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-nested-loops-switch-add-zero-matrix-elements.amber", "cov-nested-loops-switch-add-zero-matrix-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-structs-function-set-inner-struct-field-return.amber", "cov-nested-structs-function-set-inner-struct-field-return", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nir-array-access.amber", "cov-nir-array-access", "A fragment shader that covers a specific nir path" },
{ "cov-nir-opt-large-constants-for-clamp-vector-access.amber", "cov-nir-opt-large-constants-for-clamp-vector-access", "A fragment shader that covers a specific nir opt large constants path" },
dEQP-VK.graphicsfuzz.cov-bitfieldreverse-loop-limit-underflow
dEQP-VK.graphicsfuzz.cov-bitwise-and-variable-and-its-negation
dEQP-VK.graphicsfuzz.cov-bitwise-inverse-uniform-condition
+dEQP-VK.graphicsfuzz.cov-bitwise-or-uniform-zero-tenth-bit-loop-limit-find-lsb
dEQP-VK.graphicsfuzz.cov-bitwise-shift-right-always-select-one
dEQP-VK.graphicsfuzz.cov-bitwise-shift-right-full-bits-no-effect-clamp
dEQP-VK.graphicsfuzz.cov-blockfrequency-several-for-loops
dEQP-VK.graphicsfuzz.cov-constants-combine-add-sub
dEQP-VK.graphicsfuzz.cov-constants-mix-uniform
dEQP-VK.graphicsfuzz.cov-continue-break-discard-return-in-loop
+dEQP-VK.graphicsfuzz.cov-copy-array-elements-except-first-nested-loop-replace-identical-values
dEQP-VK.graphicsfuzz.cov-copy-output-color-swizzle-array-indexing
dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-func-argument
dEQP-VK.graphicsfuzz.cov-copy-prop-arrays-no-stores
dEQP-VK.graphicsfuzz.cov-dag-combiner-same-cond-nested
dEQP-VK.graphicsfuzz.cov-dead-branch-func-return-arg
dEQP-VK.graphicsfuzz.cov-dead-code-unreachable-merge
+dEQP-VK.graphicsfuzz.cov-decrement-vector-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-derivative-uniform-vector-global-loop-count
dEQP-VK.graphicsfuzz.cov-descending-loop-index-temporary-array
dEQP-VK.graphicsfuzz.cov-descending-loop-min-max-always-zero
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-always-return
dEQP-VK.graphicsfuzz.cov-function-infinite-loop-return-identical-condition
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
+dEQP-VK.graphicsfuzz.cov-function-large-loop-break-argument-lte-global-loop-bound
dEQP-VK.graphicsfuzz.cov-function-loop-condition-uniform-shift-right
dEQP-VK.graphicsfuzz.cov-function-loop-condition-variable-less-than-min-itself
dEQP-VK.graphicsfuzz.cov-function-loop-copy-array-elements-based-on-arguments
dEQP-VK.graphicsfuzz.cov-function-nested-do-whiles-looped-once
dEQP-VK.graphicsfuzz.cov-function-nested-loops-break-early-never-discard
dEQP-VK.graphicsfuzz.cov-function-nested-loops-limit-uniform-xor-uniform
+dEQP-VK.graphicsfuzz.cov-function-set-struct-field-zero-loop-reset-first-element
dEQP-VK.graphicsfuzz.cov-function-trivial-switch-case
dEQP-VK.graphicsfuzz.cov-function-two-loops-limit-using-arguments-array-element-copies
dEQP-VK.graphicsfuzz.cov-function-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-function-with-nested-loops-called-from-nested-loops
dEQP-VK.graphicsfuzz.cov-global-loop-bound-true-logical-or
+dEQP-VK.graphicsfuzz.cov-global-loop-count-array-struct-field-set-int-array-element
dEQP-VK.graphicsfuzz.cov-global-loop-counter-accumulate-integer-condition-large-array-elements
dEQP-VK.graphicsfuzz.cov-global-loop-counter-exhaust-calling-function-twice
dEQP-VK.graphicsfuzz.cov-global-loop-counter-float-accumulate-matrix
dEQP-VK.graphicsfuzz.cov-increment-inside-clamp
dEQP-VK.graphicsfuzz.cov-increment-int-loop-counter-mod-array
dEQP-VK.graphicsfuzz.cov-increment-multiple-integers
+dEQP-VK.graphicsfuzz.cov-increment-one-array-element-check-index-from-fragcoord
dEQP-VK.graphicsfuzz.cov-increment-vector-array-matrix-element
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy
dEQP-VK.graphicsfuzz.cov-increment-vector-function-call-conditional
dEQP-VK.graphicsfuzz.cov-loop-abs-multiply-offset
dEQP-VK.graphicsfuzz.cov-loop-array-element-copy-index-clamp-sign
dEQP-VK.graphicsfuzz.cov-loop-array-index-decrement-never-negative
+dEQP-VK.graphicsfuzz.cov-loop-array-struct-field-index-array-with-uniforms
dEQP-VK.graphicsfuzz.cov-loop-break-after-first-iteration-set-array-element
dEQP-VK.graphicsfuzz.cov-loop-break-floor-nan-never-executed
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-increment-integer-fallback-global-counter
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
dEQP-VK.graphicsfuzz.cov-loop-decrease-integer-never-break
+dEQP-VK.graphicsfuzz.cov-loop-construct-vec4-from-vec4-clamp-same-min-max
+dEQP-VK.graphicsfuzz.cov-loop-copy-previous-array-element-first-undefined
+dEQP-VK.graphicsfuzz.cov-loop-decrease-vector-components-assign-multiple-times
dEQP-VK.graphicsfuzz.cov-loop-dfdx-constant-divide
dEQP-VK.graphicsfuzz.cov-loop-exit-conditions-sampler-struct-integer-variable
dEQP-VK.graphicsfuzz.cov-loop-divide-uninitialized-vector-min-unused
dEQP-VK.graphicsfuzz.cov-loop-global-counter-break-set-ivec-elements
dEQP-VK.graphicsfuzz.cov-loop-increase-iterator-condition-uniform-copy-array-elements
dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
+dEQP-VK.graphicsfuzz.cov-loop-increment-array-index-array-usuborrow-feedback
dEQP-VK.graphicsfuzz.cov-loop-increment-integer-findmsb-minus-uniform
dEQP-VK.graphicsfuzz.cov-loop-increment-integer-set-output-color-break
dEQP-VK.graphicsfuzz.cov-loop-increment-matrix-element-break-after-first-iteration
dEQP-VK.graphicsfuzz.cov-loop-increment-or-divide-by-loop-index
dEQP-VK.graphicsfuzz.cov-loop-integer-half-minus-one
dEQP-VK.graphicsfuzz.cov-loop-iterator-plus-one-variable-outside-index-array
+dEQP-VK.graphicsfuzz.cov-loop-large-array-index-clamp-negative-value
dEQP-VK.graphicsfuzz.cov-loop-limiter-min-findlsb
dEQP-VK.graphicsfuzz.cov-loop-limiter-uniform-bitwise-and-one-always-break
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-nested-loops-identical-iterators-compare-same-array-elements
dEQP-VK.graphicsfuzz.cov-nested-loops-increase-integer-dot-product
dEQP-VK.graphicsfuzz.cov-nested-loops-inner-loop-min-copy-array-elements
+dEQP-VK.graphicsfuzz.cov-nested-loops-never-change-array-element-one
dEQP-VK.graphicsfuzz.cov-nested-loops-redundant-condition
dEQP-VK.graphicsfuzz.cov-nested-loops-return-inside-while-never-executed
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-nested-loops-switch-case-fallthrough-increment-array-element
dEQP-VK.graphicsfuzz.cov-nested-loops-temporary-copy-output-color-index-matrix
dEQP-VK.graphicsfuzz.cov-nested-loops-while-min-iterator-condition-always-false
+dEQP-VK.graphicsfuzz.cov-nested-loops-switch-add-zero-matrix-elements
dEQP-VK.graphicsfuzz.cov-nested-structs-function-set-inner-struct-field-return
dEQP-VK.graphicsfuzz.cov-nir-array-access
dEQP-VK.graphicsfuzz.cov-nir-opt-large-constants-for-clamp-vector-access