This commit adds a batch of GraphicsFuzz coverage tests.
Components: Vulkan
New Tests:
dEQP-VK.graphicsfuzz.cov-condition-increment-zero-to-one-divide-by-two
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-undefined-shift-left-index-array-with-return-value
dEQP-VK.graphicsfuzz.cov-global-loop-counter-select-one-or-zero-never-greater-than-one
dEQP-VK.graphicsfuzz.cov-initialize-integer-array-variable-divided-by-itself
dEQP-VK.graphicsfuzz.cov-large-for-loop-exit-early-set-iterator-array-element
dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
dEQP-VK.graphicsfuzz.cov-loop-divide-uninitialized-vector-min-unused
dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
dEQP-VK.graphicsfuzz.cov-nested-structs-function-set-inner-struct-field-return
dEQP-VK.graphicsfuzz.cov-pow-distance-uniform-vector-constant-one-vector
dEQP-VK.graphicsfuzz.cov-vec2-dot-minus-negative-zero
dEQP-VK.graphicsfuzz.cov-vec2-duplicate-min-always-half
Change-Id: Ibb452dad187ec09fb9802cd05b68b5904cf8857e
dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt
dEQP-VK.graphicsfuzz.cov-condition-bitfield-extract-integer
+dEQP-VK.graphicsfuzz.cov-condition-increment-zero-to-one-divide-by-two
dEQP-VK.graphicsfuzz.cov-condition-loop-index-bitwise-not
dEQP-VK.graphicsfuzz.cov-condition-matrix-determinant-uniform
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
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-loop-same-conditions-multiple-times-struct-array
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-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-unpack-unorm-2x16-one
dEQP-VK.graphicsfuzz.cov-function-variable-plus-one-minus-one
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call
dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus
dEQP-VK.graphicsfuzz.cov-global-loop-counter-read-past-matrix-size-never-executed
+dEQP-VK.graphicsfuzz.cov-global-loop-counter-select-one-or-zero-never-greater-than-one
dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb
dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-global-loop-counter-texture-sample-loop-condition-set-array-element
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy
dEQP-VK.graphicsfuzz.cov-increment-vector-function-call-conditional
dEQP-VK.graphicsfuzz.cov-index-array-using-uniform-bitwise-or-one
+dEQP-VK.graphicsfuzz.cov-initialize-integer-array-variable-divided-by-itself
dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block
dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops
dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop
dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform
dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-ivec-shift-right-by-large-number
+dEQP-VK.graphicsfuzz.cov-large-for-loop-exit-early-set-iterator-array-element
dEQP-VK.graphicsfuzz.cov-large-int-array-nested-loops-set-ivec-index-component-sum
dEQP-VK.graphicsfuzz.cov-ldexp-exponent-undefined-divided-fragcoord-never-executed
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
dEQP-VK.graphicsfuzz.cov-loop-condition-clamp-vec-of-ones
+dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
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-findmsb-findlsb
dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
+dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed
dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency
dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit
dEQP-VK.graphicsfuzz.cov-nested-loops-redundant-condition
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-nested-loops-set-struct-data-verify-in-function
+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-nir-opt-loop-unroll-if-if-if-if-do-while
dEQP-VK.graphicsfuzz.cov-pattern-match-signum
dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit
dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if
+dEQP-VK.graphicsfuzz.cov-pow-distance-uniform-vector-constant-one-vector
dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined
dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-value-tracking-selection-dag-negation-clamp-loop
dEQP-VK.graphicsfuzz.cov-value-tracking-uniform-incident
dEQP-VK.graphicsfuzz.cov-variable-copy-in-function-tex-sample
+dEQP-VK.graphicsfuzz.cov-vec2-dot-minus-negative-zero
+dEQP-VK.graphicsfuzz.cov-vec2-duplicate-min-always-half
dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp
dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component
dEQP-VK.graphicsfuzz.cov-vector-illegal-index-never-executed
dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt
dEQP-VK.graphicsfuzz.cov-condition-bitfield-extract-integer
+dEQP-VK.graphicsfuzz.cov-condition-increment-zero-to-one-divide-by-two
dEQP-VK.graphicsfuzz.cov-condition-loop-index-bitwise-not
dEQP-VK.graphicsfuzz.cov-condition-matrix-determinant-uniform
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
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-loop-same-conditions-multiple-times-struct-array
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-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-unpack-unorm-2x16-one
dEQP-VK.graphicsfuzz.cov-function-variable-plus-one-minus-one
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call
dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus
dEQP-VK.graphicsfuzz.cov-global-loop-counter-read-past-matrix-size-never-executed
+dEQP-VK.graphicsfuzz.cov-global-loop-counter-select-one-or-zero-never-greater-than-one
dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb
dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-global-loop-counter-texture-sample-loop-condition-set-array-element
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy
dEQP-VK.graphicsfuzz.cov-increment-vector-function-call-conditional
dEQP-VK.graphicsfuzz.cov-index-array-using-uniform-bitwise-or-one
+dEQP-VK.graphicsfuzz.cov-initialize-integer-array-variable-divided-by-itself
dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block
dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops
dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop
dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform
dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-ivec-shift-right-by-large-number
+dEQP-VK.graphicsfuzz.cov-large-for-loop-exit-early-set-iterator-array-element
dEQP-VK.graphicsfuzz.cov-large-int-array-nested-loops-set-ivec-index-component-sum
dEQP-VK.graphicsfuzz.cov-ldexp-exponent-undefined-divided-fragcoord-never-executed
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
dEQP-VK.graphicsfuzz.cov-loop-condition-clamp-vec-of-ones
+dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
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-findmsb-findlsb
dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
+dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed
dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency
dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit
dEQP-VK.graphicsfuzz.cov-nested-loops-redundant-condition
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-nested-loops-set-struct-data-verify-in-function
+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-nir-opt-loop-unroll-if-if-if-if-do-while
dEQP-VK.graphicsfuzz.cov-pattern-match-signum
dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit
dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if
+dEQP-VK.graphicsfuzz.cov-pow-distance-uniform-vector-constant-one-vector
dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined
dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-value-tracking-selection-dag-negation-clamp-loop
dEQP-VK.graphicsfuzz.cov-value-tracking-uniform-incident
dEQP-VK.graphicsfuzz.cov-variable-copy-in-function-tex-sample
+dEQP-VK.graphicsfuzz.cov-vec2-dot-minus-negative-zero
+dEQP-VK.graphicsfuzz.cov-vec2-duplicate-min-always-half
dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp
dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component
dEQP-VK.graphicsfuzz.cov-vector-illegal-index-never-executed
--- /dev/null
+#!amber
+
+# Copyright 2021 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]
+#
+# 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];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int a = 0;
+#
+# if(gl_FragCoord.y > 10.0)
+# {
+# a++;
+# }
+#
+# // Before division a is either 0 or 1. In both cases integer division results in zero.
+# a /= 2;
+#
+# // Always true.
+# if(a == 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: 60
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %13 %35
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "a"
+ OpName %13 "gl_FragCoord"
+ OpName %35 "_GLF_color"
+ OpName %38 "buf0"
+ OpMemberName %38 0 "_GLF_uniform_int_values"
+ OpName %40 ""
+ OpDecorate %13 BuiltIn FragCoord
+ OpDecorate %35 Location 0
+ OpDecorate %37 ArrayStride 16
+ OpMemberDecorate %38 0 Offset 0
+ OpDecorate %38 Block
+ OpDecorate %40 DescriptorSet 0
+ OpDecorate %40 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %9 = OpConstant %6 0
+ %10 = OpTypeFloat 32
+ %11 = OpTypeVector %10 4
+ %12 = OpTypePointer Input %11
+ %13 = OpVariable %12 Input
+ %14 = OpTypeInt 32 0
+ %15 = OpConstant %14 1
+ %16 = OpTypePointer Input %10
+ %19 = OpConstant %10 10
+ %20 = OpTypeBool
+ %25 = OpConstant %6 1
+ %27 = OpConstant %6 2
+ %34 = OpTypePointer Output %11
+ %35 = OpVariable %34 Output
+ %36 = OpConstant %14 2
+ %37 = OpTypeArray %6 %36
+ %38 = OpTypeStruct %37
+ %39 = OpTypePointer Uniform %38
+ %40 = OpVariable %39 Uniform
+ %41 = OpTypePointer Uniform %6
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ OpStore %8 %9
+ %17 = OpAccessChain %16 %13 %15
+ %18 = OpLoad %10 %17
+ %21 = OpFOrdGreaterThan %20 %18 %19
+ OpSelectionMerge %23 None
+ OpBranchConditional %21 %22 %23
+ %22 = OpLabel
+ %24 = OpLoad %6 %8
+ %26 = OpIAdd %6 %24 %25
+ OpStore %8 %26
+ OpBranch %23
+ %23 = OpLabel
+ %28 = OpLoad %6 %8
+ %29 = OpSDiv %6 %28 %27
+ OpStore %8 %29
+ %30 = OpLoad %6 %8
+ %31 = OpIEqual %20 %30 %9
+ OpSelectionMerge %33 None
+ OpBranchConditional %31 %32 %55
+ %32 = OpLabel
+ %42 = OpAccessChain %41 %40 %9 %9
+ %43 = OpLoad %6 %42
+ %44 = OpConvertSToF %10 %43
+ %45 = OpAccessChain %41 %40 %9 %25
+ %46 = OpLoad %6 %45
+ %47 = OpConvertSToF %10 %46
+ %48 = OpAccessChain %41 %40 %9 %25
+ %49 = OpLoad %6 %48
+ %50 = OpConvertSToF %10 %49
+ %51 = OpAccessChain %41 %40 %9 %9
+ %52 = OpLoad %6 %51
+ %53 = OpConvertSToF %10 %52
+ %54 = OpCompositeConstruct %11 %44 %47 %50 %53
+ OpStore %35 %54
+ OpBranch %33
+ %55 = OpLabel
+ %56 = OpAccessChain %41 %40 %9 %25
+ %57 = OpLoad %6 %56
+ %58 = OpConvertSToF %10 %57
+ %59 = OpCompositeConstruct %11 %58 %58 %58 %58
+ OpStore %35 %59
+ OpBranch %33
+ %33 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_500 _GLF_uniform_int_values[0]
+# #define _int_1 _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: [500, 1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // This function always returns one.
+# int func()
+# {
+# int a = _int_1;
+# int b = int[10](_int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1)[a];
+#
+# for(int i = _int_1; i < _int_500; i++)
+# {
+# // b < min(i, b) is always false.
+# for(int j = _int_1; b < min(i, b); j ++)
+# {
+# a++;
+# }
+# }
+#
+# return a;
+# }
+#
+# void main()
+# {
+# // Always true.
+# if(func() == _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: 116
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %96
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "func("
+ OpName %11 "a"
+ OpName %15 "buf0"
+ OpMemberName %15 0 "_GLF_uniform_int_values"
+ OpName %17 ""
+ OpName %23 "b"
+ OpName %49 "indexable"
+ OpName %52 "i"
+ OpName %65 "j"
+ OpName %96 "_GLF_color"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 0
+ OpDecorate %96 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeFunction %6
+ %10 = OpTypePointer Function %6
+ %12 = OpTypeInt 32 0
+ %13 = OpConstant %12 3
+ %14 = OpTypeArray %6 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpConstant %6 0
+ %19 = OpConstant %6 1
+ %20 = OpTypePointer Uniform %6
+ %44 = OpConstant %12 10
+ %45 = OpTypeArray %6 %44
+ %48 = OpTypePointer Function %45
+ %63 = OpTypeBool
+ %93 = OpTypeFloat 32
+ %94 = OpTypeVector %93 4
+ %95 = OpTypePointer Output %94
+ %96 = OpVariable %95 Output
+ %100 = OpConstant %6 2
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %87 = OpFunctionCall %6 %8
+ %88 = OpAccessChain %20 %17 %18 %19
+ %89 = OpLoad %6 %88
+ %90 = OpIEqual %63 %87 %89
+ OpSelectionMerge %92 None
+ OpBranchConditional %90 %91 %111
+ %91 = OpLabel
+ %97 = OpAccessChain %20 %17 %18 %19
+ %98 = OpLoad %6 %97
+ %99 = OpConvertSToF %93 %98
+ %101 = OpAccessChain %20 %17 %18 %100
+ %102 = OpLoad %6 %101
+ %103 = OpConvertSToF %93 %102
+ %104 = OpAccessChain %20 %17 %18 %100
+ %105 = OpLoad %6 %104
+ %106 = OpConvertSToF %93 %105
+ %107 = OpAccessChain %20 %17 %18 %19
+ %108 = OpLoad %6 %107
+ %109 = OpConvertSToF %93 %108
+ %110 = OpCompositeConstruct %94 %99 %103 %106 %109
+ OpStore %96 %110
+ OpBranch %92
+ %111 = OpLabel
+ %112 = OpAccessChain %20 %17 %18 %100
+ %113 = OpLoad %6 %112
+ %114 = OpConvertSToF %93 %113
+ %115 = OpCompositeConstruct %94 %114 %114 %114 %114
+ OpStore %96 %115
+ OpBranch %92
+ %92 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %8 = OpFunction %6 None %7
+ %9 = OpLabel
+ %11 = OpVariable %10 Function
+ %23 = OpVariable %10 Function
+ %49 = OpVariable %48 Function
+ %52 = OpVariable %10 Function
+ %65 = OpVariable %10 Function
+ %21 = OpAccessChain %20 %17 %18 %19
+ %22 = OpLoad %6 %21
+ OpStore %11 %22
+ %24 = OpAccessChain %20 %17 %18 %19
+ %25 = OpLoad %6 %24
+ %26 = OpAccessChain %20 %17 %18 %19
+ %27 = OpLoad %6 %26
+ %28 = OpAccessChain %20 %17 %18 %19
+ %29 = OpLoad %6 %28
+ %30 = OpAccessChain %20 %17 %18 %19
+ %31 = OpLoad %6 %30
+ %32 = OpAccessChain %20 %17 %18 %19
+ %33 = OpLoad %6 %32
+ %34 = OpAccessChain %20 %17 %18 %19
+ %35 = OpLoad %6 %34
+ %36 = OpAccessChain %20 %17 %18 %19
+ %37 = OpLoad %6 %36
+ %38 = OpAccessChain %20 %17 %18 %19
+ %39 = OpLoad %6 %38
+ %40 = OpAccessChain %20 %17 %18 %19
+ %41 = OpLoad %6 %40
+ %42 = OpAccessChain %20 %17 %18 %19
+ %43 = OpLoad %6 %42
+ %46 = OpCompositeConstruct %45 %25 %27 %29 %31 %33 %35 %37 %39 %41 %43
+ %47 = OpLoad %6 %11
+ OpStore %49 %46
+ %50 = OpAccessChain %10 %49 %47
+ %51 = OpLoad %6 %50
+ OpStore %23 %51
+ %53 = OpAccessChain %20 %17 %18 %19
+ %54 = OpLoad %6 %53
+ OpStore %52 %54
+ OpBranch %55
+ %55 = OpLabel
+ OpLoopMerge %57 %58 None
+ OpBranch %59
+ %59 = OpLabel
+ %60 = OpLoad %6 %52
+ %61 = OpAccessChain %20 %17 %18 %18
+ %62 = OpLoad %6 %61
+ %64 = OpSLessThan %63 %60 %62
+ OpBranchConditional %64 %56 %57
+ %56 = OpLabel
+ %66 = OpAccessChain %20 %17 %18 %19
+ %67 = OpLoad %6 %66
+ OpStore %65 %67
+ OpBranch %68
+ %68 = OpLabel
+ OpLoopMerge %70 %71 None
+ OpBranch %72
+ %72 = OpLabel
+ %73 = OpLoad %6 %23
+ %74 = OpLoad %6 %52
+ %75 = OpLoad %6 %23
+ %76 = OpExtInst %6 %1 SMin %74 %75
+ %77 = OpSLessThan %63 %73 %76
+ OpBranchConditional %77 %69 %70
+ %69 = OpLabel
+ %78 = OpLoad %6 %11
+ %79 = OpIAdd %6 %78 %19
+ OpStore %11 %79
+ OpBranch %71
+ %71 = OpLabel
+ %80 = OpLoad %6 %65
+ %81 = OpIAdd %6 %80 %19
+ OpStore %65 %81
+ OpBranch %68
+ %70 = OpLabel
+ OpBranch %58
+ %58 = OpLabel
+ %82 = OpLoad %6 %52
+ %83 = OpIAdd %6 %82 %19
+ OpStore %52 %83
+ OpBranch %55
+ %57 = OpLabel
+ %84 = OpLoad %6 %11
+ OpReturnValue %84
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 500 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_0 _GLF_uniform_int_values[0]
+# #define _int_7 _GLF_uniform_int_values[1]
+# #define _int_9 _GLF_uniform_int_values[2]
+# #define _int_1 _GLF_uniform_int_values[3]
+# #define _int_10 _GLF_uniform_int_values[4]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_int_values: [0, 7, 9, 1, 10]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[5];
+# };
+#
+# 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, 2, 3, 4, 5, 6, 7, 8, 9, 10);
+#
+# void func(int x, int y)
+# {
+# int a = _int_1;
+# int b = _int_1;
+#
+# // Sets arr1[1..5] to zero.
+# while(x <= y)
+# {
+# if(b >= 6)
+# {
+# break;
+# }
+#
+# b++;
+#
+# arr1[a++] = arr0[_int_1];
+# }
+#
+# // Same as arr0[x] = arr1[x].
+# for(int i = x; i <= x; i ++)
+# {
+# arr0[i] = arr1[i];
+# }
+# }
+#
+# void main()
+# {
+# // Iterates only i = 1.
+# for(int i = 1; i <= 1; i = 2 * i)
+# {
+# // Iterates j = 0, 2, 4, 6, and 8.
+# for(int j = 0; j < 10; j += 2 * i)
+# {
+# func(j, j + i);
+# }
+# }
+#
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#
+# // Check the results and output black if unexpected values are seen.
+# int ref[10] = int[10](_int_1, _int_0, _int_0, _int_0, _int_0, _int_0, _int_7, _int_0, _int_9, _int_0);
+# for(int i = _int_0; i < _int_10; i++)
+# {
+# if(arr0[i] != 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: 181
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %117
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "func(i1;i1;"
+ OpName %9 "x"
+ OpName %10 "y"
+ OpName %17 "arr0"
+ OpName %20 "arr1"
+ OpName %32 "a"
+ OpName %35 "buf0"
+ OpMemberName %35 0 "_GLF_uniform_int_values"
+ OpName %37 ""
+ OpName %41 "b"
+ OpName %68 "i"
+ OpName %85 "i"
+ OpName %93 "j"
+ OpName %104 "param"
+ OpName %106 "param"
+ OpName %117 "_GLF_color"
+ OpName %132 "ref"
+ OpName %154 "i"
+ OpDecorate %34 ArrayStride 16
+ OpMemberDecorate %35 0 Offset 0
+ OpDecorate %35 Block
+ OpDecorate %37 DescriptorSet 0
+ OpDecorate %37 Binding 0
+ OpDecorate %117 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Function %6
+ %8 = OpTypeFunction %2 %7 %7
+ %13 = OpTypeInt 32 0
+ %14 = OpConstant %13 10
+ %15 = OpTypeArray %6 %14
+ %16 = OpTypePointer Private %15
+ %17 = OpVariable %16 Private
+ %18 = OpConstant %6 0
+ %19 = OpConstantComposite %15 %18 %18 %18 %18 %18 %18 %18 %18 %18 %18
+ %20 = OpVariable %16 Private
+ %21 = OpConstant %6 1
+ %22 = OpConstant %6 2
+ %23 = OpConstant %6 3
+ %24 = OpConstant %6 4
+ %25 = OpConstant %6 5
+ %26 = OpConstant %6 6
+ %27 = OpConstant %6 7
+ %28 = OpConstant %6 8
+ %29 = OpConstant %6 9
+ %30 = OpConstant %6 10
+ %31 = OpConstantComposite %15 %21 %22 %23 %24 %25 %26 %27 %28 %29 %30
+ %33 = OpConstant %13 5
+ %34 = OpTypeArray %6 %33
+ %35 = OpTypeStruct %34
+ %36 = OpTypePointer Uniform %35
+ %37 = OpVariable %36 Uniform
+ %38 = OpTypePointer Uniform %6
+ %51 = OpTypeBool
+ %64 = OpTypePointer Private %6
+ %114 = OpTypeFloat 32
+ %115 = OpTypeVector %114 4
+ %116 = OpTypePointer Output %115
+ %117 = OpVariable %116 Output
+ %131 = OpTypePointer Function %15
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %85 = OpVariable %7 Function
+ %93 = OpVariable %7 Function
+ %104 = OpVariable %7 Function
+ %106 = OpVariable %7 Function
+ %132 = OpVariable %131 Function
+ %154 = OpVariable %7 Function
+ OpStore %17 %19
+ OpStore %20 %31
+ OpStore %85 %21
+ OpBranch %86
+ %86 = OpLabel
+ OpLoopMerge %88 %89 None
+ OpBranch %90
+ %90 = OpLabel
+ %91 = OpLoad %6 %85
+ %92 = OpSLessThanEqual %51 %91 %21
+ OpBranchConditional %92 %87 %88
+ %87 = OpLabel
+ OpStore %93 %18
+ OpBranch %94
+ %94 = OpLabel
+ OpLoopMerge %96 %97 None
+ OpBranch %98
+ %98 = OpLabel
+ %99 = OpLoad %6 %93
+ %100 = OpSLessThan %51 %99 %30
+ OpBranchConditional %100 %95 %96
+ %95 = OpLabel
+ %101 = OpLoad %6 %93
+ %102 = OpLoad %6 %85
+ %103 = OpIAdd %6 %101 %102
+ %105 = OpLoad %6 %93
+ OpStore %104 %105
+ OpStore %106 %103
+ %107 = OpFunctionCall %2 %11 %104 %106
+ OpBranch %97
+ %97 = OpLabel
+ %108 = OpLoad %6 %85
+ %109 = OpIMul %6 %22 %108
+ %110 = OpLoad %6 %93
+ %111 = OpIAdd %6 %110 %109
+ OpStore %93 %111
+ OpBranch %94
+ %96 = OpLabel
+ OpBranch %89
+ %89 = OpLabel
+ %112 = OpLoad %6 %85
+ %113 = OpIMul %6 %22 %112
+ OpStore %85 %113
+ OpBranch %86
+ %88 = OpLabel
+ %118 = OpAccessChain %38 %37 %18 %23
+ %119 = OpLoad %6 %118
+ %120 = OpConvertSToF %114 %119
+ %121 = OpAccessChain %38 %37 %18 %18
+ %122 = OpLoad %6 %121
+ %123 = OpConvertSToF %114 %122
+ %124 = OpAccessChain %38 %37 %18 %18
+ %125 = OpLoad %6 %124
+ %126 = OpConvertSToF %114 %125
+ %127 = OpAccessChain %38 %37 %18 %23
+ %128 = OpLoad %6 %127
+ %129 = OpConvertSToF %114 %128
+ %130 = OpCompositeConstruct %115 %120 %123 %126 %129
+ OpStore %117 %130
+ %133 = OpAccessChain %38 %37 %18 %23
+ %134 = OpLoad %6 %133
+ %135 = OpAccessChain %38 %37 %18 %18
+ %136 = OpLoad %6 %135
+ %137 = OpAccessChain %38 %37 %18 %18
+ %138 = OpLoad %6 %137
+ %139 = OpAccessChain %38 %37 %18 %18
+ %140 = OpLoad %6 %139
+ %141 = OpAccessChain %38 %37 %18 %18
+ %142 = OpLoad %6 %141
+ %143 = OpAccessChain %38 %37 %18 %18
+ %144 = OpLoad %6 %143
+ %145 = OpAccessChain %38 %37 %18 %21
+ %146 = OpLoad %6 %145
+ %147 = OpAccessChain %38 %37 %18 %18
+ %148 = OpLoad %6 %147
+ %149 = OpAccessChain %38 %37 %18 %22
+ %150 = OpLoad %6 %149
+ %151 = OpAccessChain %38 %37 %18 %18
+ %152 = OpLoad %6 %151
+ %153 = OpCompositeConstruct %15 %134 %136 %138 %140 %142 %144 %146 %148 %150 %152
+ OpStore %132 %153
+ %155 = OpAccessChain %38 %37 %18 %18
+ %156 = OpLoad %6 %155
+ OpStore %154 %156
+ OpBranch %157
+ %157 = OpLabel
+ OpLoopMerge %159 %160 None
+ OpBranch %161
+ %161 = OpLabel
+ %162 = OpLoad %6 %154
+ %163 = OpAccessChain %38 %37 %18 %24
+ %164 = OpLoad %6 %163
+ %165 = OpSLessThan %51 %162 %164
+ OpBranchConditional %165 %158 %159
+ %158 = OpLabel
+ %166 = OpLoad %6 %154
+ %167 = OpAccessChain %64 %17 %166
+ %168 = OpLoad %6 %167
+ %169 = OpLoad %6 %154
+ %170 = OpAccessChain %7 %132 %169
+ %171 = OpLoad %6 %170
+ %172 = OpINotEqual %51 %168 %171
+ OpSelectionMerge %174 None
+ OpBranchConditional %172 %173 %174
+ %173 = OpLabel
+ %175 = OpAccessChain %38 %37 %18 %18
+ %176 = OpLoad %6 %175
+ %177 = OpConvertSToF %114 %176
+ %178 = OpCompositeConstruct %115 %177 %177 %177 %177
+ OpStore %117 %178
+ OpBranch %174
+ %174 = OpLabel
+ OpBranch %160
+ %160 = OpLabel
+ %179 = OpLoad %6 %154
+ %180 = OpIAdd %6 %179 %21
+ OpStore %154 %180
+ OpBranch %157
+ %159 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %11 = OpFunction %2 None %8
+ %9 = OpFunctionParameter %7
+ %10 = OpFunctionParameter %7
+ %12 = OpLabel
+ %32 = OpVariable %7 Function
+ %41 = OpVariable %7 Function
+ %68 = OpVariable %7 Function
+ %39 = OpAccessChain %38 %37 %18 %23
+ %40 = OpLoad %6 %39
+ OpStore %32 %40
+ %42 = OpAccessChain %38 %37 %18 %23
+ %43 = OpLoad %6 %42
+ OpStore %41 %43
+ OpBranch %44
+ %44 = OpLabel
+ OpLoopMerge %46 %47 None
+ OpBranch %48
+ %48 = OpLabel
+ %49 = OpLoad %6 %9
+ %50 = OpLoad %6 %10
+ %52 = OpSLessThanEqual %51 %49 %50
+ OpBranchConditional %52 %45 %46
+ %45 = OpLabel
+ %53 = OpLoad %6 %41
+ %54 = OpSGreaterThanEqual %51 %53 %26
+ OpSelectionMerge %56 None
+ OpBranchConditional %54 %55 %56
+ %55 = OpLabel
+ OpBranch %46
+ %56 = OpLabel
+ %58 = OpLoad %6 %41
+ %59 = OpIAdd %6 %58 %21
+ OpStore %41 %59
+ %60 = OpLoad %6 %32
+ %61 = OpIAdd %6 %60 %21
+ OpStore %32 %61
+ %62 = OpAccessChain %38 %37 %18 %23
+ %63 = OpLoad %6 %62
+ %65 = OpAccessChain %64 %17 %63
+ %66 = OpLoad %6 %65
+ %67 = OpAccessChain %64 %20 %60
+ OpStore %67 %66
+ OpBranch %47
+ %47 = OpLabel
+ OpBranch %44
+ %46 = OpLabel
+ %69 = OpLoad %6 %9
+ OpStore %68 %69
+ OpBranch %70
+ %70 = OpLabel
+ OpLoopMerge %72 %73 None
+ OpBranch %74
+ %74 = OpLabel
+ %75 = OpLoad %6 %68
+ %76 = OpLoad %6 %9
+ %77 = OpSLessThanEqual %51 %75 %76
+ OpBranchConditional %77 %71 %72
+ %71 = OpLabel
+ %78 = OpLoad %6 %68
+ %79 = OpLoad %6 %68
+ %80 = OpAccessChain %64 %20 %79
+ %81 = OpLoad %6 %80
+ %82 = OpAccessChain %64 %17 %78
+ OpStore %82 %81
+ OpBranch %73
+ %73 = OpLabel
+ %83 = OpLoad %6 %68
+ %84 = OpIAdd %6 %83 %21
+ OpStore %68 %84
+ OpBranch %70
+ %72 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 0 7 9 1 10
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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]
+#
+# 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];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // This function always returns one.
+# int func()
+# {
+# int a = _int_1;
+# // Result of the shift is undefined, but it's never used.
+# a < (10 << 87454);
+#
+# return _int_1;
+# }
+#
+# void main()
+# {
+# // Always selects (1, 0, 0, 1).
+# _GLF_color = vec4[4](vec4(_int_0), vec4(_int_1, _int_0, _int_0, _int_1), vec4(_int_0), 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: 69
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %33
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "func("
+ OpName %11 "a"
+ OpName %15 "buf0"
+ OpMemberName %15 0 "_GLF_uniform_int_values"
+ OpName %17 ""
+ OpName %33 "_GLF_color"
+ OpName %65 "indexable"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 0
+ OpDecorate %33 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeFunction %6
+ %10 = OpTypePointer Function %6
+ %12 = OpTypeInt 32 0
+ %13 = OpConstant %12 2
+ %14 = OpTypeArray %6 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpConstant %6 0
+ %19 = OpTypePointer Uniform %6
+ %23 = OpConstant %6 -2147483648
+ %24 = OpTypeBool
+ %30 = OpTypeFloat 32
+ %31 = OpTypeVector %30 4
+ %32 = OpTypePointer Output %31
+ %33 = OpVariable %32 Output
+ %34 = OpConstant %6 1
+ %60 = OpConstant %12 4
+ %61 = OpTypeArray %31 %60
+ %64 = OpTypePointer Function %61
+ %66 = OpTypePointer Function %31
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %65 = OpVariable %64 Function
+ %35 = OpAccessChain %19 %17 %18 %34
+ %36 = OpLoad %6 %35
+ %37 = OpConvertSToF %30 %36
+ %38 = OpCompositeConstruct %31 %37 %37 %37 %37
+ %39 = OpAccessChain %19 %17 %18 %18
+ %40 = OpLoad %6 %39
+ %41 = OpConvertSToF %30 %40
+ %42 = OpAccessChain %19 %17 %18 %34
+ %43 = OpLoad %6 %42
+ %44 = OpConvertSToF %30 %43
+ %45 = OpAccessChain %19 %17 %18 %34
+ %46 = OpLoad %6 %45
+ %47 = OpConvertSToF %30 %46
+ %48 = OpAccessChain %19 %17 %18 %18
+ %49 = OpLoad %6 %48
+ %50 = OpConvertSToF %30 %49
+ %51 = OpCompositeConstruct %31 %41 %44 %47 %50
+ %52 = OpAccessChain %19 %17 %18 %34
+ %53 = OpLoad %6 %52
+ %54 = OpConvertSToF %30 %53
+ %55 = OpCompositeConstruct %31 %54 %54 %54 %54
+ %56 = OpAccessChain %19 %17 %18 %34
+ %57 = OpLoad %6 %56
+ %58 = OpConvertSToF %30 %57
+ %59 = OpCompositeConstruct %31 %58 %58 %58 %58
+ %62 = OpCompositeConstruct %61 %38 %51 %55 %59
+ %63 = OpFunctionCall %6 %8
+ OpStore %65 %62
+ %67 = OpAccessChain %66 %65 %63
+ %68 = OpLoad %31 %67
+ OpStore %33 %68
+ OpReturn
+ OpFunctionEnd
+ %8 = OpFunction %6 None %7
+ %9 = OpLabel
+ %11 = OpVariable %10 Function
+ %20 = OpAccessChain %19 %17 %18 %18
+ %21 = OpLoad %6 %20
+ OpStore %11 %21
+ %22 = OpLoad %6 %11
+ %25 = OpSLessThan %24 %22 %23
+ %26 = OpAccessChain %19 %17 %18 %18
+ %27 = OpLoad %6 %26
+ OpReturnValue %27
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_2_0 _GLF_uniform_float_values[0]
+#
+# precision highp float;
+# precision highp int;
+#
+# // Contents of _GLF_uniform_float_values: 2.0
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# // Contents of one: 1.0
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# float one;
+# };
+#
+# void main()
+# {
+# // Iterated once.
+# do
+# {
+# _GLF_global_loop_count++;
+# }
+# while((one < _float_2_0 ? 1 : 0) > 1 && _GLF_global_loop_count < _GLF_global_loop_bound);
+#
+# // Always true.
+# if(_GLF_global_loop_count == _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: 73
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %54
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "_GLF_global_loop_count"
+ OpName %18 "buf2"
+ OpMemberName %18 0 "one"
+ OpName %20 ""
+ OpName %27 "buf0"
+ OpMemberName %27 0 "_GLF_uniform_float_values"
+ OpName %29 ""
+ OpName %43 "buf1"
+ OpMemberName %43 0 "_GLF_uniform_int_values"
+ OpName %45 ""
+ OpName %54 "_GLF_color"
+ OpMemberDecorate %18 0 Offset 0
+ OpDecorate %18 Block
+ OpDecorate %20 DescriptorSet 0
+ OpDecorate %20 Binding 2
+ OpDecorate %26 ArrayStride 16
+ OpMemberDecorate %27 0 Offset 0
+ OpDecorate %27 Block
+ OpDecorate %29 DescriptorSet 0
+ OpDecorate %29 Binding 0
+ OpDecorate %42 ArrayStride 16
+ OpMemberDecorate %43 0 Offset 0
+ OpDecorate %43 Block
+ OpDecorate %45 DescriptorSet 0
+ OpDecorate %45 Binding 1
+ OpDecorate %54 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %15 = OpConstant %6 1
+ %17 = OpTypeFloat 32
+ %18 = OpTypeStruct %17
+ %19 = OpTypePointer Uniform %18
+ %20 = OpVariable %19 Uniform
+ %21 = OpTypePointer Uniform %17
+ %24 = OpTypeInt 32 0
+ %25 = OpConstant %24 1
+ %26 = OpTypeArray %17 %25
+ %27 = OpTypeStruct %26
+ %28 = OpTypePointer Uniform %27
+ %29 = OpVariable %28 Uniform
+ %32 = OpTypeBool
+ %37 = OpConstant %6 10
+ %41 = OpConstant %24 2
+ %42 = OpTypeArray %6 %41
+ %43 = OpTypeStruct %42
+ %44 = OpTypePointer Uniform %43
+ %45 = OpVariable %44 Uniform
+ %46 = OpTypePointer Uniform %6
+ %52 = OpTypeVector %17 4
+ %53 = OpTypePointer Output %52
+ %54 = OpVariable %53 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ OpStore %8 %9
+ OpBranch %10
+ %10 = OpLabel
+ OpLoopMerge %12 %13 None
+ OpBranch %11
+ %11 = OpLabel
+ %14 = OpLoad %6 %8
+ %16 = OpIAdd %6 %14 %15
+ OpStore %8 %16
+ OpBranch %13
+ %13 = OpLabel
+ %22 = OpAccessChain %21 %20 %9
+ %23 = OpLoad %17 %22
+ %30 = OpAccessChain %21 %29 %9 %9
+ %31 = OpLoad %17 %30
+ %33 = OpFOrdLessThan %32 %23 %31
+ %34 = OpSelect %6 %33 %15 %9
+ %35 = OpSGreaterThan %32 %34 %15
+ %36 = OpLoad %6 %8
+ %38 = OpSLessThan %32 %36 %37
+ %39 = OpLogicalAnd %32 %35 %38
+ OpBranchConditional %39 %10 %12
+ %12 = OpLabel
+ %40 = OpLoad %6 %8
+ %47 = OpAccessChain %46 %45 %9 %15
+ %48 = OpLoad %6 %47
+ %49 = OpIEqual %32 %40 %48
+ OpSelectionMerge %51 None
+ OpBranchConditional %49 %50 %68
+ %50 = OpLabel
+ %55 = OpAccessChain %46 %45 %9 %15
+ %56 = OpLoad %6 %55
+ %57 = OpConvertSToF %17 %56
+ %58 = OpAccessChain %46 %45 %9 %9
+ %59 = OpLoad %6 %58
+ %60 = OpConvertSToF %17 %59
+ %61 = OpAccessChain %46 %45 %9 %9
+ %62 = OpLoad %6 %61
+ %63 = OpConvertSToF %17 %62
+ %64 = OpAccessChain %46 %45 %9 %15
+ %65 = OpLoad %6 %64
+ %66 = OpConvertSToF %17 %65
+ %67 = OpCompositeConstruct %52 %57 %60 %63 %66
+ OpStore %54 %67
+ OpBranch %51
+ %68 = OpLabel
+ %69 = OpAccessChain %46 %45 %9 %9
+ %70 = OpLoad %6 %69
+ %71 = OpConvertSToF %17 %70
+ %72 = OpCompositeConstruct %52 %71 %71 %71 %71
+ OpStore %54 %72
+ OpBranch %51
+ %51 = 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
+ 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] 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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# const int _GLF_global_loop_bound = 10;
+# int _GLF_global_loop_count = 0;
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int a = _int_1;
+#
+# // Iterated ten times.
+# while(_GLF_global_loop_count < _GLF_global_loop_bound)
+# {
+# _GLF_global_loop_count ++;
+#
+# int b = _int_1;
+#
+# int arr[10] = int[10](_int_0, (a / a), _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0, _int_0);
+#
+# // a still has a value of one after this assignment.
+# a = arr[b];
+# }
+#
+# // Always true.
+# if(a == _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: 93
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %74
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "_GLF_global_loop_count"
+ OpName %11 "a"
+ OpName %15 "buf0"
+ OpMemberName %15 0 "_GLF_uniform_int_values"
+ OpName %17 ""
+ OpName %33 "b"
+ OpName %39 "arr"
+ OpName %74 "_GLF_color"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 0
+ OpDecorate %74 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypePointer Private %6
+ %8 = OpVariable %7 Private
+ %9 = OpConstant %6 0
+ %10 = OpTypePointer Function %6
+ %12 = OpTypeInt 32 0
+ %13 = OpConstant %12 2
+ %14 = OpTypeArray %6 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpTypePointer Uniform %6
+ %27 = OpConstant %6 10
+ %28 = OpTypeBool
+ %31 = OpConstant %6 1
+ %36 = OpConstant %12 10
+ %37 = OpTypeArray %6 %36
+ %38 = OpTypePointer Function %37
+ %71 = OpTypeFloat 32
+ %72 = OpTypeVector %71 4
+ %73 = OpTypePointer Output %72
+ %74 = OpVariable %73 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %33 = OpVariable %10 Function
+ %39 = OpVariable %38 Function
+ OpStore %8 %9
+ %19 = OpAccessChain %18 %17 %9 %9
+ %20 = OpLoad %6 %19
+ OpStore %11 %20
+ OpBranch %21
+ %21 = OpLabel
+ OpLoopMerge %23 %24 None
+ OpBranch %25
+ %25 = OpLabel
+ %26 = OpLoad %6 %8
+ %29 = OpSLessThan %28 %26 %27
+ OpBranchConditional %29 %22 %23
+ %22 = OpLabel
+ %30 = OpLoad %6 %8
+ %32 = OpIAdd %6 %30 %31
+ OpStore %8 %32
+ %34 = OpAccessChain %18 %17 %9 %9
+ %35 = OpLoad %6 %34
+ OpStore %33 %35
+ %40 = OpAccessChain %18 %17 %9 %31
+ %41 = OpLoad %6 %40
+ %42 = OpLoad %6 %11
+ %43 = OpLoad %6 %11
+ %44 = OpSDiv %6 %42 %43
+ %45 = OpAccessChain %18 %17 %9 %31
+ %46 = OpLoad %6 %45
+ %47 = OpAccessChain %18 %17 %9 %31
+ %48 = OpLoad %6 %47
+ %49 = OpAccessChain %18 %17 %9 %31
+ %50 = OpLoad %6 %49
+ %51 = OpAccessChain %18 %17 %9 %31
+ %52 = OpLoad %6 %51
+ %53 = OpAccessChain %18 %17 %9 %31
+ %54 = OpLoad %6 %53
+ %55 = OpAccessChain %18 %17 %9 %31
+ %56 = OpLoad %6 %55
+ %57 = OpAccessChain %18 %17 %9 %31
+ %58 = OpLoad %6 %57
+ %59 = OpAccessChain %18 %17 %9 %31
+ %60 = OpLoad %6 %59
+ %61 = OpCompositeConstruct %37 %41 %44 %46 %48 %50 %52 %54 %56 %58 %60
+ OpStore %39 %61
+ %62 = OpLoad %6 %33
+ %63 = OpAccessChain %10 %39 %62
+ %64 = OpLoad %6 %63
+ OpStore %11 %64
+ OpBranch %24
+ %24 = OpLabel
+ OpBranch %21
+ %23 = OpLabel
+ %65 = OpLoad %6 %11
+ %66 = OpAccessChain %18 %17 %9 %9
+ %67 = OpLoad %6 %66
+ %68 = OpIEqual %28 %65 %67
+ OpSelectionMerge %70 None
+ OpBranchConditional %68 %69 %88
+ %69 = OpLabel
+ %75 = OpAccessChain %18 %17 %9 %9
+ %76 = OpLoad %6 %75
+ %77 = OpConvertSToF %71 %76
+ %78 = OpAccessChain %18 %17 %9 %31
+ %79 = OpLoad %6 %78
+ %80 = OpConvertSToF %71 %79
+ %81 = OpAccessChain %18 %17 %9 %31
+ %82 = OpLoad %6 %81
+ %83 = OpConvertSToF %71 %82
+ %84 = OpAccessChain %18 %17 %9 %9
+ %85 = OpLoad %6 %84
+ %86 = OpConvertSToF %71 %85
+ %87 = OpCompositeConstruct %72 %77 %80 %83 %86
+ OpStore %74 %87
+ OpBranch %70
+ %88 = OpLabel
+ %89 = OpAccessChain %18 %17 %9 %31
+ %90 = OpLoad %6 %89
+ %91 = OpConvertSToF %71 %90
+ %92 = OpCompositeConstruct %72 %91 %91 %91 %91
+ OpStore %74 %92
+ OpBranch %70
+ %70 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_800 _GLF_uniform_int_values[0]
+# #define _int_47942 _GLF_uniform_int_values[1]
+# #define _int_0 _GLF_uniform_int_values[2]
+# #define _int_1 _GLF_uniform_int_values[3]
+# #define _int_47941 _GLF_uniform_int_values[4]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_int_values: [800, 47942, 0, 1, 47941]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[5];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# int arr[10] = int[10](_int_1, _int_47941, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1, _int_1);
+#
+# int i = _int_0;
+#
+# // Iterated once.
+# for( i = _int_1; i < _int_800; i ++)
+# {
+# int a = i + 1;
+#
+# // Iterated once.
+# while(i < a)
+# {
+# i = arr[_int_1];
+# }
+# }
+#
+# // Always true.
+# if(i == _int_47942)
+# {
+# _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: 105
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %86
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %11 "arr"
+ OpName %14 "buf0"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %43 "i"
+ OpName %59 "a"
+ OpName %86 "_GLF_color"
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 0
+ OpDecorate %86 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 5
+ %13 = OpTypeArray %6 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %6 0
+ %18 = OpConstant %6 3
+ %19 = OpTypePointer Uniform %6
+ %22 = OpConstant %6 4
+ %42 = OpTypePointer Function %6
+ %44 = OpConstant %6 2
+ %57 = OpTypeBool
+ %61 = OpConstant %6 1
+ %83 = OpTypeFloat 32
+ %84 = OpTypeVector %83 4
+ %85 = OpTypePointer Output %84
+ %86 = OpVariable %85 Output
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %11 = OpVariable %10 Function
+ %43 = OpVariable %42 Function
+ %59 = OpVariable %42 Function
+ %20 = OpAccessChain %19 %16 %17 %18
+ %21 = OpLoad %6 %20
+ %23 = OpAccessChain %19 %16 %17 %22
+ %24 = OpLoad %6 %23
+ %25 = OpAccessChain %19 %16 %17 %18
+ %26 = OpLoad %6 %25
+ %27 = OpAccessChain %19 %16 %17 %18
+ %28 = OpLoad %6 %27
+ %29 = OpAccessChain %19 %16 %17 %18
+ %30 = OpLoad %6 %29
+ %31 = OpAccessChain %19 %16 %17 %18
+ %32 = OpLoad %6 %31
+ %33 = OpAccessChain %19 %16 %17 %18
+ %34 = OpLoad %6 %33
+ %35 = OpAccessChain %19 %16 %17 %18
+ %36 = OpLoad %6 %35
+ %37 = OpAccessChain %19 %16 %17 %18
+ %38 = OpLoad %6 %37
+ %39 = OpAccessChain %19 %16 %17 %18
+ %40 = OpLoad %6 %39
+ %41 = OpCompositeConstruct %9 %21 %24 %26 %28 %30 %32 %34 %36 %38 %40
+ OpStore %11 %41
+ %45 = OpAccessChain %19 %16 %17 %44
+ %46 = OpLoad %6 %45
+ OpStore %43 %46
+ %47 = OpAccessChain %19 %16 %17 %18
+ %48 = OpLoad %6 %47
+ OpStore %43 %48
+ OpBranch %49
+ %49 = OpLabel
+ OpLoopMerge %51 %52 None
+ OpBranch %53
+ %53 = OpLabel
+ %54 = OpLoad %6 %43
+ %55 = OpAccessChain %19 %16 %17 %17
+ %56 = OpLoad %6 %55
+ %58 = OpSLessThan %57 %54 %56
+ OpBranchConditional %58 %50 %51
+ %50 = OpLabel
+ %60 = OpLoad %6 %43
+ %62 = OpIAdd %6 %60 %61
+ OpStore %59 %62
+ OpBranch %63
+ %63 = OpLabel
+ OpLoopMerge %65 %66 None
+ OpBranch %67
+ %67 = OpLabel
+ %68 = OpLoad %6 %43
+ %69 = OpLoad %6 %59
+ %70 = OpSLessThan %57 %68 %69
+ OpBranchConditional %70 %64 %65
+ %64 = OpLabel
+ %71 = OpAccessChain %19 %16 %17 %18
+ %72 = OpLoad %6 %71
+ %73 = OpAccessChain %42 %11 %72
+ %74 = OpLoad %6 %73
+ OpStore %43 %74
+ OpBranch %66
+ %66 = OpLabel
+ OpBranch %63
+ %65 = OpLabel
+ OpBranch %52
+ %52 = OpLabel
+ %75 = OpLoad %6 %43
+ %76 = OpIAdd %6 %75 %61
+ OpStore %43 %76
+ OpBranch %49
+ %51 = OpLabel
+ %77 = OpLoad %6 %43
+ %78 = OpAccessChain %19 %16 %17 %61
+ %79 = OpLoad %6 %78
+ %80 = OpIEqual %57 %77 %79
+ OpSelectionMerge %82 None
+ OpBranchConditional %80 %81 %100
+ %81 = OpLabel
+ %87 = OpAccessChain %19 %16 %17 %18
+ %88 = OpLoad %6 %87
+ %89 = OpConvertSToF %83 %88
+ %90 = OpAccessChain %19 %16 %17 %44
+ %91 = OpLoad %6 %90
+ %92 = OpConvertSToF %83 %91
+ %93 = OpAccessChain %19 %16 %17 %44
+ %94 = OpLoad %6 %93
+ %95 = OpConvertSToF %83 %94
+ %96 = OpAccessChain %19 %16 %17 %18
+ %97 = OpLoad %6 %96
+ %98 = OpConvertSToF %83 %97
+ %99 = OpCompositeConstruct %84 %89 %92 %95 %98
+ OpStore %86 %99
+ OpBranch %82
+ %100 = OpLabel
+ %101 = OpAccessChain %19 %16 %17 %44
+ %102 = OpLoad %6 %101
+ %103 = OpConvertSToF %83 %102
+ %104 = OpCompositeConstruct %84 %103 %103 %103 %103
+ OpStore %86 %104
+ OpBranch %82
+ %82 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 800 47942 0 1 47941
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_0 _GLF_uniform_int_values[0]
+# #define _int_1 _GLF_uniform_int_values[1]
+# #define _float_1_0 _GLF_uniform_float_values[0]
+#
+# precision highp int;
+# precision highp float;
+#
+# // 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: [0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[2];
+# };
+#
+# // Contents of quarter: 0.25
+# layout(set = 0, binding = 2) uniform buf2
+# {
+# float quarter;
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# _GLF_color = vec4(_int_0);
+#
+# for(int i = 1; i < 9; i++)
+# {
+# for(int j = 1; j < 10; j++)
+# {
+# if(i > _int_1)
+# {
+# continue;
+# }
+#
+# // Always false.
+# if(_float_1_0 / quarter < _float_1_0)
+# {
+# return;
+# }
+# }
+# }
+#
+# // The execution always reaches this point.
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 88
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %9
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "_GLF_color"
+ OpName %14 "buf1"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %24 "i"
+ OpName %35 "j"
+ OpName %53 "buf0"
+ OpMemberName %53 0 "_GLF_uniform_float_values"
+ OpName %55 ""
+ OpName %59 "buf2"
+ OpMemberName %59 0 "quarter"
+ OpName %61 ""
+ OpDecorate %9 Location 0
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 1
+ OpDecorate %52 ArrayStride 16
+ OpMemberDecorate %53 0 Offset 0
+ OpDecorate %53 Block
+ OpDecorate %55 DescriptorSet 0
+ OpDecorate %55 Binding 0
+ OpMemberDecorate %59 0 Offset 0
+ OpDecorate %59 Block
+ OpDecorate %61 DescriptorSet 0
+ OpDecorate %61 Binding 2
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Output %7
+ %9 = OpVariable %8 Output
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 2
+ %13 = OpTypeArray %10 %12
+ %14 = OpTypeStruct %13
+ %15 = OpTypePointer Uniform %14
+ %16 = OpVariable %15 Uniform
+ %17 = OpConstant %10 0
+ %18 = OpTypePointer Uniform %10
+ %23 = OpTypePointer Function %10
+ %25 = OpConstant %10 1
+ %32 = OpConstant %10 9
+ %33 = OpTypeBool
+ %42 = OpConstant %10 10
+ %51 = OpConstant %11 1
+ %52 = OpTypeArray %6 %51
+ %53 = OpTypeStruct %52
+ %54 = OpTypePointer Uniform %53
+ %55 = OpVariable %54 Uniform
+ %56 = OpTypePointer Uniform %6
+ %59 = OpTypeStruct %6
+ %60 = OpTypePointer Uniform %59
+ %61 = OpVariable %60 Uniform
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %24 = OpVariable %23 Function
+ %35 = OpVariable %23 Function
+ %19 = OpAccessChain %18 %16 %17 %17
+ %20 = OpLoad %10 %19
+ %21 = OpConvertSToF %6 %20
+ %22 = OpCompositeConstruct %7 %21 %21 %21 %21
+ OpStore %9 %22
+ OpStore %24 %25
+ OpBranch %26
+ %26 = OpLabel
+ OpLoopMerge %28 %29 None
+ OpBranch %30
+ %30 = OpLabel
+ %31 = OpLoad %10 %24
+ %34 = OpSLessThan %33 %31 %32
+ OpBranchConditional %34 %27 %28
+ %27 = OpLabel
+ OpStore %35 %25
+ OpBranch %36
+ %36 = OpLabel
+ OpLoopMerge %38 %39 None
+ OpBranch %40
+ %40 = OpLabel
+ %41 = OpLoad %10 %35
+ %43 = OpSLessThan %33 %41 %42
+ OpBranchConditional %43 %37 %38
+ %37 = OpLabel
+ %44 = OpLoad %10 %24
+ %45 = OpAccessChain %18 %16 %17 %25
+ %46 = OpLoad %10 %45
+ %47 = OpSGreaterThan %33 %44 %46
+ OpSelectionMerge %49 None
+ OpBranchConditional %47 %48 %49
+ %48 = OpLabel
+ OpBranch %39
+ %49 = OpLabel
+ %57 = OpAccessChain %56 %55 %17 %17
+ %58 = OpLoad %6 %57
+ %62 = OpAccessChain %56 %61 %17
+ %63 = OpLoad %6 %62
+ %64 = OpFDiv %6 %58 %63
+ %65 = OpAccessChain %56 %55 %17 %17
+ %66 = OpLoad %6 %65
+ %67 = OpFOrdLessThan %33 %64 %66
+ OpSelectionMerge %69 None
+ OpBranchConditional %67 %68 %69
+ %68 = OpLabel
+ OpReturn
+ %69 = OpLabel
+ OpBranch %39
+ %39 = OpLabel
+ %71 = OpLoad %10 %35
+ %72 = OpIAdd %10 %71 %25
+ OpStore %35 %72
+ OpBranch %36
+ %38 = OpLabel
+ OpBranch %29
+ %29 = OpLabel
+ %73 = OpLoad %10 %24
+ %74 = OpIAdd %10 %73 %25
+ OpStore %24 %74
+ OpBranch %26
+ %28 = OpLabel
+ %75 = OpAccessChain %18 %16 %17 %25
+ %76 = OpLoad %10 %75
+ %77 = OpConvertSToF %6 %76
+ %78 = OpAccessChain %18 %16 %17 %17
+ %79 = OpLoad %10 %78
+ %80 = OpConvertSToF %6 %79
+ %81 = OpAccessChain %18 %16 %17 %17
+ %82 = OpLoad %10 %81
+ %83 = OpConvertSToF %6 %82
+ %84 = OpAccessChain %18 %16 %17 %25
+ %85 = OpLoad %10 %84
+ %86 = OpConvertSToF %6 %85
+ %87 = OpCompositeConstruct %7 %77 %80 %83 %86
+ OpStore %9 %87
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# quarter
+BUFFER variant_quarter DATA_TYPE float STD140 DATA
+ 0.25
+END
+# _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
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ BIND BUFFER variant_framebuffer AS color LOCATION 0
+ BIND BUFFER variant_quarter 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_10 _GLF_uniform_int_values[0]
+# #define _int_0 _GLF_uniform_int_values[1]
+# #define _int_1 _GLF_uniform_int_values[2]
+# #define _float_11_0 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+#
+# precision highp int;
+# precision highp float;
+#
+# // Contents of _GLF_uniform_float_values: [11.0, 1.0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# // Contents of _GLF_uniform_int_values: [10, 0, 1]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# float f = _float_1_0;
+# vec4 v;
+#
+# for(int i = _int_0; i < _int_10; i++)
+# {
+# f += _float_1_0;
+# // v / f is undefined because v is uninitialized, but the results are not used.
+# min(vec4(_float_1_0), v / f);
+# }
+#
+# // Always true.
+# if(f == _float_11_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: 85
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %65
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "f"
+ OpName %12 "buf0"
+ OpMemberName %12 0 "_GLF_uniform_float_values"
+ OpName %14 ""
+ OpName %22 "i"
+ OpName %25 "buf1"
+ OpMemberName %25 0 "_GLF_uniform_int_values"
+ OpName %27 ""
+ OpName %50 "v"
+ OpName %65 "_GLF_color"
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 0
+ OpDecorate %24 ArrayStride 16
+ OpMemberDecorate %25 0 Offset 0
+ OpDecorate %25 Block
+ OpDecorate %27 DescriptorSet 0
+ OpDecorate %27 Binding 1
+ OpDecorate %65 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 2
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpTypeInt 32 1
+ %16 = OpConstant %15 0
+ %17 = OpConstant %15 1
+ %18 = OpTypePointer Uniform %6
+ %21 = OpTypePointer Function %15
+ %23 = OpConstant %9 3
+ %24 = OpTypeArray %15 %23
+ %25 = OpTypeStruct %24
+ %26 = OpTypePointer Uniform %25
+ %27 = OpVariable %26 Uniform
+ %28 = OpTypePointer Uniform %15
+ %39 = OpTypeBool
+ %47 = OpTypeVector %6 4
+ %49 = OpTypePointer Function %47
+ %64 = OpTypePointer Output %47
+ %65 = OpVariable %64 Output
+ %66 = OpConstant %15 2
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %22 = OpVariable %21 Function
+ %50 = OpVariable %49 Function
+ %19 = OpAccessChain %18 %14 %16 %17
+ %20 = OpLoad %6 %19
+ OpStore %8 %20
+ %29 = OpAccessChain %28 %27 %16 %17
+ %30 = OpLoad %15 %29
+ OpStore %22 %30
+ OpBranch %31
+ %31 = OpLabel
+ OpLoopMerge %33 %34 None
+ OpBranch %35
+ %35 = OpLabel
+ %36 = OpLoad %15 %22
+ %37 = OpAccessChain %28 %27 %16 %16
+ %38 = OpLoad %15 %37
+ %40 = OpSLessThan %39 %36 %38
+ OpBranchConditional %40 %32 %33
+ %32 = OpLabel
+ %41 = OpAccessChain %18 %14 %16 %17
+ %42 = OpLoad %6 %41
+ %43 = OpLoad %6 %8
+ %44 = OpFAdd %6 %43 %42
+ OpStore %8 %44
+ %45 = OpAccessChain %18 %14 %16 %17
+ %46 = OpLoad %6 %45
+ %48 = OpCompositeConstruct %47 %46 %46 %46 %46
+ %51 = OpLoad %47 %50
+ %52 = OpLoad %6 %8
+ %53 = OpCompositeConstruct %47 %52 %52 %52 %52
+ %54 = OpFDiv %47 %51 %53
+ %55 = OpExtInst %47 %1 FMin %48 %54
+ OpBranch %34
+ %34 = OpLabel
+ %56 = OpLoad %15 %22
+ %57 = OpIAdd %15 %56 %17
+ OpStore %22 %57
+ OpBranch %31
+ %33 = OpLabel
+ %58 = OpLoad %6 %8
+ %59 = OpAccessChain %18 %14 %16 %16
+ %60 = OpLoad %6 %59
+ %61 = OpFOrdEqual %39 %58 %60
+ OpSelectionMerge %63 None
+ OpBranchConditional %61 %62 %80
+ %62 = OpLabel
+ %67 = OpAccessChain %28 %27 %16 %66
+ %68 = OpLoad %15 %67
+ %69 = OpConvertSToF %6 %68
+ %70 = OpAccessChain %28 %27 %16 %17
+ %71 = OpLoad %15 %70
+ %72 = OpConvertSToF %6 %71
+ %73 = OpAccessChain %28 %27 %16 %17
+ %74 = OpLoad %15 %73
+ %75 = OpConvertSToF %6 %74
+ %76 = OpAccessChain %28 %27 %16 %66
+ %77 = OpLoad %15 %76
+ %78 = OpConvertSToF %6 %77
+ %79 = OpCompositeConstruct %47 %69 %72 %75 %78
+ OpStore %65 %79
+ OpBranch %63
+ %80 = OpLabel
+ %81 = OpAccessChain %28 %27 %16 %17
+ %82 = OpLoad %15 %81
+ %83 = OpConvertSToF %6 %82
+ %84 = OpCompositeConstruct %47 %83 %83 %83 %83
+ OpStore %65 %84
+ OpBranch %63
+ %63 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 10 0 1
+END
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 11.0 1.0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_10 _GLF_uniform_int_values[0]
+# #define _int_1 _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: [10, 1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# _GLF_color = vec4(_int_1, _int_0, _int_0, _int_1);
+#
+# for(int i = 1; i < _int_10; i++)
+# {
+# // Always true.
+# if(i > 0)
+# {
+# }
+# else
+# {
+# // Never executed.
+# switch(i)
+# {
+# case - 1:
+# _GLF_color = vec4(_int_0);
+# break;
+# case 0:
+# _GLF_color = vec4(_int_1);
+# return;
+# }
+# }
+# }
+# }
+SHADER fragment variant_fragment_shader SPIRV-ASM TARGET_ENV spv1.0
+; SPIR-V
+; Version: 1.0
+; Generator: Khronos Glslang Reference Front End; 10
+; Bound: 68
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %9
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "_GLF_color"
+ OpName %14 "buf0"
+ OpMemberName %14 0 "_GLF_uniform_int_values"
+ OpName %16 ""
+ OpName %35 "i"
+ OpDecorate %9 Location 0
+ OpDecorate %13 ArrayStride 16
+ OpMemberDecorate %14 0 Offset 0
+ OpDecorate %14 Block
+ OpDecorate %16 DescriptorSet 0
+ OpDecorate %16 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Output %7
+ %9 = OpVariable %8 Output
+ %10 = OpTypeInt 32 1
+ %11 = OpTypeInt 32 0
+ %12 = OpConstant %11 3
+ %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
+ %34 = OpTypePointer Function %10
+ %44 = OpTypeBool
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %35 = OpVariable %34 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
+ %27 = OpAccessChain %19 %16 %17 %23
+ %28 = OpLoad %10 %27
+ %29 = OpConvertSToF %6 %28
+ %30 = OpAccessChain %19 %16 %17 %18
+ %31 = OpLoad %10 %30
+ %32 = OpConvertSToF %6 %31
+ %33 = OpCompositeConstruct %7 %22 %26 %29 %32
+ OpStore %9 %33
+ OpStore %35 %18
+ OpBranch %36
+ %36 = OpLabel
+ OpLoopMerge %38 %39 None
+ OpBranch %40
+ %40 = OpLabel
+ %41 = OpLoad %10 %35
+ %42 = OpAccessChain %19 %16 %17 %17
+ %43 = OpLoad %10 %42
+ %45 = OpSLessThan %44 %41 %43
+ OpBranchConditional %45 %37 %38
+ %37 = OpLabel
+ %46 = OpLoad %10 %35
+ %47 = OpSGreaterThan %44 %46 %17
+ OpSelectionMerge %49 None
+ OpBranchConditional %47 %48 %50
+ %48 = OpLabel
+ OpBranch %49
+ %50 = OpLabel
+ %51 = OpLoad %10 %35
+ OpSelectionMerge %54 None
+ OpSwitch %51 %54 -1 %52 0 %53
+ %52 = OpLabel
+ %55 = OpAccessChain %19 %16 %17 %23
+ %56 = OpLoad %10 %55
+ %57 = OpConvertSToF %6 %56
+ %58 = OpCompositeConstruct %7 %57 %57 %57 %57
+ OpStore %9 %58
+ OpBranch %54
+ %53 = OpLabel
+ %60 = OpAccessChain %19 %16 %17 %18
+ %61 = OpLoad %10 %60
+ %62 = OpConvertSToF %6 %61
+ %63 = OpCompositeConstruct %7 %62 %62 %62 %62
+ OpStore %9 %63
+ OpReturn
+ %54 = OpLabel
+ OpBranch %49
+ %49 = OpLabel
+ OpBranch %39
+ %39 = OpLabel
+ %66 = OpLoad %10 %35
+ %67 = OpIAdd %10 %66 %18
+ OpStore %35 %67
+ OpBranch %36
+ %38 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 10 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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:
+# '--convert-local-access-chains'
+# '--reduce-load-size'
+# '--simplify-instructions'
+# '--vector-dce'
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--eliminate-local-single-block'
+# '--eliminate-dead-branches'
+# '--merge-blocks'
+# '--redundancy-elimination'
+# '--convert-local-access-chains'
+# '--eliminate-local-single-store'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--scalar-replacement=100'
+# '--eliminate-dead-inserts'
+# '--eliminate-local-single-block'
+# '--convert-local-access-chains'
+# '--eliminate-dead-branches'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--eliminate-local-single-block'
+# '--eliminate-dead-branches'
+# '--merge-return'
+# '--simplify-instructions'
+# '--copy-propagate-arrays'
+# '--reduce-load-size'
+# '--scalar-replacement=100'
+# '--eliminate-dead-inserts'
+# '--eliminate-dead-inserts'
+# '--vector-dce'
+# '--combine-access-chains'
+# '--eliminate-local-multi-store'
+# '--if-conversion'
+# '--combine-access-chains'
+# 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_1 _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: [3, 1, 0]
+# layout(set = 0, binding = 0) uniform buf0
+# {
+# int _GLF_uniform_int_values[3];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# struct S0
+# {
+# int a;
+# };
+#
+# struct S1
+# {
+# S0 data0;
+# // data1 is unused.
+# vec4 data1;
+# };
+#
+# // This function always returns one.
+# int func()
+# {
+# S1 s;
+#
+# for(int i = _int_0; i < _int_3; i++)
+# {
+# s.data0.a = _int_1;
+# }
+#
+# return s.data0.a;
+# }
+#
+# void main()
+# {
+# // Always true.
+# if(func() == _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: 102
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %56
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "func("
+ OpName %11 "i"
+ OpName %15 "buf0"
+ OpMemberName %15 0 "_GLF_uniform_int_values"
+ OpName %17 ""
+ OpName %33 "S0"
+ OpMemberName %33 0 "a"
+ OpName %36 "S1"
+ OpMemberName %36 0 "data0"
+ OpMemberName %36 1 "data1"
+ OpName %56 "_GLF_color"
+ OpDecorate %14 ArrayStride 16
+ OpMemberDecorate %15 0 Offset 0
+ OpDecorate %15 Block
+ OpDecorate %17 DescriptorSet 0
+ OpDecorate %17 Binding 0
+ OpDecorate %56 Location 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeInt 32 1
+ %7 = OpTypeFunction %6
+ %10 = OpTypePointer Function %6
+ %12 = OpTypeInt 32 0
+ %13 = OpConstant %12 3
+ %14 = OpTypeArray %6 %13
+ %15 = OpTypeStruct %14
+ %16 = OpTypePointer Uniform %15
+ %17 = OpVariable %16 Uniform
+ %18 = OpConstant %6 0
+ %19 = OpConstant %6 2
+ %20 = OpTypePointer Uniform %6
+ %31 = OpTypeBool
+ %33 = OpTypeStruct %6
+ %34 = OpTypeFloat 32
+ %35 = OpTypeVector %34 4
+ %36 = OpTypeStruct %33 %35
+ %37 = OpTypePointer Function %36
+ %39 = OpConstant %6 1
+ %55 = OpTypePointer Output %35
+ %56 = OpVariable %55 Output
+ %78 = OpTypePointer Function %33
+ %80 = OpTypePointer Function %35
+ %99 = OpUndef %35
+ %101 = OpUndef %6
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %49 = OpFunctionCall %6 %8
+ %50 = OpAccessChain %20 %17 %18 %39
+ %51 = OpLoad %6 %50
+ %52 = OpIEqual %31 %49 %51
+ OpSelectionMerge %54 None
+ OpBranchConditional %52 %53 %70
+ %53 = OpLabel
+ %59 = OpConvertSToF %34 %51
+ %60 = OpAccessChain %20 %17 %18 %19
+ %61 = OpLoad %6 %60
+ %62 = OpConvertSToF %34 %61
+ %69 = OpCompositeConstruct %35 %59 %62 %62 %59
+ OpStore %56 %69
+ OpBranch %54
+ %70 = OpLabel
+ %71 = OpAccessChain %20 %17 %18 %19
+ %72 = OpLoad %6 %71
+ %73 = OpConvertSToF %34 %72
+ %74 = OpCompositeConstruct %35 %73 %73 %73 %73
+ OpStore %56 %74
+ OpBranch %54
+ %54 = OpLabel
+ OpReturn
+ OpFunctionEnd
+ %8 = OpFunction %6 None %7
+ %9 = OpLabel
+ %91 = OpVariable %10 Function
+ %81 = OpVariable %80 Function
+ %11 = OpVariable %10 Function
+ %21 = OpAccessChain %20 %17 %18 %19
+ %22 = OpLoad %6 %21
+ OpStore %11 %22
+ OpBranch %23
+ %23 = OpLabel
+ %100 = OpPhi %6 %101 %9 %94 %24
+ %98 = OpPhi %35 %99 %9 %98 %24
+ %97 = OpPhi %6 %22 %9 %44 %24
+ %29 = OpAccessChain %20 %17 %18 %18
+ %30 = OpLoad %6 %29
+ %32 = OpSLessThan %31 %97 %30
+ OpLoopMerge %25 %24 None
+ OpBranchConditional %32 %24 %25
+ %24 = OpLabel
+ %40 = OpAccessChain %20 %17 %18 %39
+ %41 = OpLoad %6 %40
+ %93 = OpCompositeConstruct %33 %100
+ %85 = OpCompositeConstruct %36 %93 %98
+ %76 = OpCompositeInsert %36 %41 %85 0 0
+ %86 = OpCompositeExtract %33 %76 0
+ %94 = OpCompositeExtract %6 %86 0
+ OpStore %91 %94
+ OpStore %81 %98
+ %44 = OpIAdd %6 %97 %39
+ OpStore %11 %44
+ OpBranch %23
+ %25 = OpLabel
+ %96 = OpCompositeConstruct %33 %100
+ %90 = OpCompositeConstruct %36 %96 %98
+ OpReturnValue %100
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_int_values
+BUFFER variant__GLF_uniform_int_values DATA_TYPE int32[] STD140 DATA
+ 3 1 0
+END
+
+BUFFER variant_framebuffer FORMAT B8G8R8A8_UNORM
+
+PIPELINE graphics variant_pipeline
+ ATTACH variant_vertex_shader
+ ATTACH variant_fragment_shader
+ FRAMEBUFFER_SIZE 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_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()
+# {
+# vec4 v = vec4(1.0);
+# // Distance is zero and so is 0^2.
+# float f = pow(distance(v, vec4(_float_1_0)), 2.0);
+#
+# // Always true.
+# if (f == 0.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: 62
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %37
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "v"
+ OpName %13 "f"
+ OpName %18 "buf0"
+ OpMemberName %18 0 "_GLF_uniform_float_values"
+ OpName %20 ""
+ OpName %37 "_GLF_color"
+ OpName %39 "buf1"
+ OpMemberName %39 0 "_GLF_uniform_int_values"
+ OpName %41 ""
+ OpDecorate %17 ArrayStride 16
+ OpMemberDecorate %18 0 Offset 0
+ OpDecorate %18 Block
+ OpDecorate %20 DescriptorSet 0
+ OpDecorate %20 Binding 0
+ OpDecorate %37 Location 0
+ OpDecorate %38 ArrayStride 16
+ OpMemberDecorate %39 0 Offset 0
+ OpDecorate %39 Block
+ OpDecorate %41 DescriptorSet 0
+ OpDecorate %41 Binding 1
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 4
+ %8 = OpTypePointer Function %7
+ %10 = OpConstant %6 1
+ %11 = OpConstantComposite %7 %10 %10 %10 %10
+ %12 = OpTypePointer Function %6
+ %15 = OpTypeInt 32 0
+ %16 = OpConstant %15 2
+ %17 = OpTypeArray %6 %16
+ %18 = OpTypeStruct %17
+ %19 = OpTypePointer Uniform %18
+ %20 = OpVariable %19 Uniform
+ %21 = OpTypeInt 32 1
+ %22 = OpConstant %21 0
+ %23 = OpTypePointer Uniform %6
+ %28 = OpConstant %6 2
+ %31 = OpConstant %6 0
+ %32 = OpTypeBool
+ %36 = OpTypePointer Output %7
+ %37 = OpVariable %36 Output
+ %38 = OpTypeArray %21 %16
+ %39 = OpTypeStruct %38
+ %40 = OpTypePointer Uniform %39
+ %41 = OpVariable %40 Uniform
+ %42 = OpConstant %21 1
+ %43 = OpTypePointer Uniform %21
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %9 = OpVariable %8 Function
+ %13 = OpVariable %12 Function
+ OpStore %9 %11
+ %14 = OpLoad %7 %9
+ %24 = OpAccessChain %23 %20 %22 %22
+ %25 = OpLoad %6 %24
+ %26 = OpCompositeConstruct %7 %25 %25 %25 %25
+ %27 = OpExtInst %6 %1 Distance %14 %26
+ %29 = OpExtInst %6 %1 Pow %27 %28
+ OpStore %13 %29
+ %30 = OpLoad %6 %13
+ %33 = OpFOrdEqual %32 %30 %31
+ OpSelectionMerge %35 None
+ OpBranchConditional %33 %34 %57
+ %34 = OpLabel
+ %44 = OpAccessChain %43 %41 %22 %42
+ %45 = OpLoad %21 %44
+ %46 = OpConvertSToF %6 %45
+ %47 = OpAccessChain %43 %41 %22 %22
+ %48 = OpLoad %21 %47
+ %49 = OpConvertSToF %6 %48
+ %50 = OpAccessChain %43 %41 %22 %22
+ %51 = OpLoad %21 %50
+ %52 = OpConvertSToF %6 %51
+ %53 = OpAccessChain %43 %41 %22 %42
+ %54 = OpLoad %21 %53
+ %55 = OpConvertSToF %6 %54
+ %56 = OpCompositeConstruct %7 %46 %49 %52 %55
+ OpStore %37 %56
+ OpBranch %35
+ %57 = OpLabel
+ %58 = OpAccessChain %43 %41 %22 %22
+ %59 = OpLoad %21 %58
+ %60 = OpConvertSToF %6 %59
+ %61 = OpCompositeConstruct %7 %60 %60 %60 %60
+ OpStore %37 %61
+ OpBranch %35
+ %35 = 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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_2_0 _GLF_uniform_float_values[0]
+# #define _float_1_0 _GLF_uniform_float_values[1]
+#
+# precision highp int;
+# precision highp float;
+#
+# // 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: [2.0, 1.0]
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[2];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# // (1, 1 - (-0)) dot (1, 1) = (1, 1) dot (1, 1) = 1 * 1 + 1 * 1 = 2
+# float f = dot(vec2(_float_1_0, _float_1_0 - (- 0.0)), vec2(_float_1_0));
+#
+# // Always true.
+# if(f == _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: 64
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %40
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %8 "f"
+ OpName %12 "buf1"
+ OpMemberName %12 0 "_GLF_uniform_float_values"
+ OpName %14 ""
+ OpName %40 "_GLF_color"
+ OpName %42 "buf0"
+ OpMemberName %42 0 "_GLF_uniform_int_values"
+ OpName %44 ""
+ OpDecorate %11 ArrayStride 16
+ OpMemberDecorate %12 0 Offset 0
+ OpDecorate %12 Block
+ OpDecorate %14 DescriptorSet 0
+ OpDecorate %14 Binding 1
+ OpDecorate %40 Location 0
+ OpDecorate %41 ArrayStride 16
+ OpMemberDecorate %42 0 Offset 0
+ OpDecorate %42 Block
+ OpDecorate %44 DescriptorSet 0
+ OpDecorate %44 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypePointer Function %6
+ %9 = OpTypeInt 32 0
+ %10 = OpConstant %9 2
+ %11 = OpTypeArray %6 %10
+ %12 = OpTypeStruct %11
+ %13 = OpTypePointer Uniform %12
+ %14 = OpVariable %13 Uniform
+ %15 = OpTypeInt 32 1
+ %16 = OpConstant %15 0
+ %17 = OpConstant %15 1
+ %18 = OpTypePointer Uniform %6
+ %23 = OpConstant %6 -0
+ %25 = OpTypeVector %6 2
+ %34 = OpTypeBool
+ %38 = OpTypeVector %6 4
+ %39 = OpTypePointer Output %38
+ %40 = OpVariable %39 Output
+ %41 = OpTypeArray %15 %10
+ %42 = OpTypeStruct %41
+ %43 = OpTypePointer Uniform %42
+ %44 = OpVariable %43 Uniform
+ %45 = OpTypePointer Uniform %15
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %8 = OpVariable %7 Function
+ %19 = OpAccessChain %18 %14 %16 %17
+ %20 = OpLoad %6 %19
+ %21 = OpAccessChain %18 %14 %16 %17
+ %22 = OpLoad %6 %21
+ %24 = OpFSub %6 %22 %23
+ %26 = OpCompositeConstruct %25 %20 %24
+ %27 = OpAccessChain %18 %14 %16 %17
+ %28 = OpLoad %6 %27
+ %29 = OpCompositeConstruct %25 %28 %28
+ %30 = OpDot %6 %26 %29
+ OpStore %8 %30
+ %31 = OpLoad %6 %8
+ %32 = OpAccessChain %18 %14 %16 %16
+ %33 = OpLoad %6 %32
+ %35 = OpFOrdEqual %34 %31 %33
+ OpSelectionMerge %37 None
+ OpBranchConditional %35 %36 %59
+ %36 = OpLabel
+ %46 = OpAccessChain %45 %44 %16 %16
+ %47 = OpLoad %15 %46
+ %48 = OpConvertSToF %6 %47
+ %49 = OpAccessChain %45 %44 %16 %17
+ %50 = OpLoad %15 %49
+ %51 = OpConvertSToF %6 %50
+ %52 = OpAccessChain %45 %44 %16 %17
+ %53 = OpLoad %15 %52
+ %54 = OpConvertSToF %6 %53
+ %55 = OpAccessChain %45 %44 %16 %16
+ %56 = OpLoad %15 %55
+ %57 = OpConvertSToF %6 %56
+ %58 = OpCompositeConstruct %38 %48 %51 %54 %57
+ OpStore %40 %58
+ OpBranch %37
+ %59 = OpLabel
+ %60 = OpAccessChain %45 %44 %16 %17
+ %61 = OpLoad %15 %60
+ %62 = OpConvertSToF %6 %61
+ %63 = OpCompositeConstruct %38 %62 %62 %62 %62
+ OpStore %40 %63
+ OpBranch %37
+ %37 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 2.0 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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
--- /dev/null
+#!amber
+
+# Copyright 2021 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_0_5 _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: 0.5
+# layout(set = 0, binding = 1) uniform buf1
+# {
+# float _GLF_uniform_float_values[1];
+# };
+#
+# layout(location = 0) out vec4 _GLF_color;
+#
+# void main()
+# {
+# // Same as min(gl_FragCoord.xy, vec2(0.5)) which always results in vec2(0.5).
+# vec2 v0 = min(gl_FragCoord.xy, min(gl_FragCoord.xy, vec2(_float_0_5)));
+#
+# // Always true.
+# if(v0 == vec2(_float_0_5))
+# {
+# _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: 68
+; Schema: 0
+ OpCapability Shader
+ %1 = OpExtInstImport "GLSL.std.450"
+ OpMemoryModel Logical GLSL450
+ OpEntryPoint Fragment %4 "main" %12 %42
+ OpExecutionMode %4 OriginUpperLeft
+ OpSource ESSL 320
+ OpName %4 "main"
+ OpName %9 "v0"
+ OpName %12 "gl_FragCoord"
+ OpName %20 "buf1"
+ OpMemberName %20 0 "_GLF_uniform_float_values"
+ OpName %22 ""
+ OpName %42 "_GLF_color"
+ OpName %45 "buf0"
+ OpMemberName %45 0 "_GLF_uniform_int_values"
+ OpName %47 ""
+ OpDecorate %12 BuiltIn FragCoord
+ OpDecorate %19 ArrayStride 16
+ OpMemberDecorate %20 0 Offset 0
+ OpDecorate %20 Block
+ OpDecorate %22 DescriptorSet 0
+ OpDecorate %22 Binding 1
+ OpDecorate %42 Location 0
+ OpDecorate %44 ArrayStride 16
+ OpMemberDecorate %45 0 Offset 0
+ OpDecorate %45 Block
+ OpDecorate %47 DescriptorSet 0
+ OpDecorate %47 Binding 0
+ %2 = OpTypeVoid
+ %3 = OpTypeFunction %2
+ %6 = OpTypeFloat 32
+ %7 = OpTypeVector %6 2
+ %8 = OpTypePointer Function %7
+ %10 = OpTypeVector %6 4
+ %11 = OpTypePointer Input %10
+ %12 = OpVariable %11 Input
+ %17 = OpTypeInt 32 0
+ %18 = OpConstant %17 1
+ %19 = OpTypeArray %6 %18
+ %20 = OpTypeStruct %19
+ %21 = OpTypePointer Uniform %20
+ %22 = OpVariable %21 Uniform
+ %23 = OpTypeInt 32 1
+ %24 = OpConstant %23 0
+ %25 = OpTypePointer Uniform %6
+ %35 = OpTypeBool
+ %36 = OpTypeVector %35 2
+ %41 = OpTypePointer Output %10
+ %42 = OpVariable %41 Output
+ %43 = OpConstant %17 2
+ %44 = OpTypeArray %23 %43
+ %45 = OpTypeStruct %44
+ %46 = OpTypePointer Uniform %45
+ %47 = OpVariable %46 Uniform
+ %48 = OpTypePointer Uniform %23
+ %52 = OpConstant %23 1
+ %4 = OpFunction %2 None %3
+ %5 = OpLabel
+ %9 = OpVariable %8 Function
+ %13 = OpLoad %10 %12
+ %14 = OpVectorShuffle %7 %13 %13 0 1
+ %15 = OpLoad %10 %12
+ %16 = OpVectorShuffle %7 %15 %15 0 1
+ %26 = OpAccessChain %25 %22 %24 %24
+ %27 = OpLoad %6 %26
+ %28 = OpCompositeConstruct %7 %27 %27
+ %29 = OpExtInst %7 %1 FMin %16 %28
+ %30 = OpExtInst %7 %1 FMin %14 %29
+ OpStore %9 %30
+ %31 = OpLoad %7 %9
+ %32 = OpAccessChain %25 %22 %24 %24
+ %33 = OpLoad %6 %32
+ %34 = OpCompositeConstruct %7 %33 %33
+ %37 = OpFOrdEqual %36 %31 %34
+ %38 = OpAll %35 %37
+ OpSelectionMerge %40 None
+ OpBranchConditional %38 %39 %63
+ %39 = OpLabel
+ %49 = OpAccessChain %48 %47 %24 %24
+ %50 = OpLoad %23 %49
+ %51 = OpConvertSToF %6 %50
+ %53 = OpAccessChain %48 %47 %24 %52
+ %54 = OpLoad %23 %53
+ %55 = OpConvertSToF %6 %54
+ %56 = OpAccessChain %48 %47 %24 %52
+ %57 = OpLoad %23 %56
+ %58 = OpConvertSToF %6 %57
+ %59 = OpAccessChain %48 %47 %24 %24
+ %60 = OpLoad %23 %59
+ %61 = OpConvertSToF %6 %60
+ %62 = OpCompositeConstruct %10 %51 %55 %58 %61
+ OpStore %42 %62
+ OpBranch %40
+ %63 = OpLabel
+ %64 = OpAccessChain %48 %47 %24 %52
+ %65 = OpLoad %23 %64
+ %66 = OpConvertSToF %6 %65
+ %67 = OpCompositeConstruct %10 %66 %66 %66 %66
+ OpStore %42 %67
+ OpBranch %40
+ %40 = OpLabel
+ OpReturn
+ OpFunctionEnd
+END
+
+# uniforms for variant
+
+# _GLF_uniform_float_values
+BUFFER variant__GLF_uniform_float_values DATA_TYPE float[] STD140 DATA
+ 0.5
+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 256 256
+ 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 256 256
+
+EXPECT variant_framebuffer IDX 0 0 SIZE 256 256 EQ_RGBA 255 0 0 255
{ "cov-color-output-undefined-in-unexecuted-branch.amber", "cov-color-output-undefined-in-unexecuted-branch", "A fragment shader that covers specific LLVM code paths" },
{ "cov-combine-and-or-xor-gt-lt.amber", "cov-combine-and-or-xor-gt-lt", "A fragment shader that covers a specific bitwise operator cobmining code path" },
{ "cov-condition-bitfield-extract-integer.amber", "cov-condition-bitfield-extract-integer", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-condition-increment-zero-to-one-divide-by-two.amber", "cov-condition-increment-zero-to-one-divide-by-two", "A fragment shader that covers specific LLVM code paths" },
{ "cov-condition-loop-index-bitwise-not.amber", "cov-condition-loop-index-bitwise-not", "A fragment shader that covers specific BRW code paths" },
{ "cov-condition-matrix-determinant-uniform.amber", "cov-condition-matrix-determinant-uniform", "A fragment shader that covers specific LLVM code paths" },
{ "cov-conditional-discard-inside-loop.amber", "cov-conditional-discard-inside-loop", "A fragment shader that covers specific NIR code paths" },
{ "cov-function-fragcoord-condition-always-return.amber", "cov-function-fragcoord-condition-always-return", "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-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-loop-same-conditions-multiple-times-struct-array.amber", "cov-function-loop-same-conditions-multiple-times-struct-array", "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-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-unpack-unorm-2x16-one.amber", "cov-function-unpack-unorm-2x16-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-function-variable-plus-one-minus-one.amber", "cov-function-variable-plus-one-minus-one", "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-global-loop-counter-main-function-call.amber", "cov-global-loop-counter-main-function-call", "A fragment shader that covers specific NIR code paths" },
{ "cov-global-loop-counter-multiply-one-minus.amber", "cov-global-loop-counter-multiply-one-minus", "A fragment shader that covers specific BRW code paths" },
{ "cov-global-loop-counter-read-past-matrix-size-never-executed.amber", "cov-global-loop-counter-read-past-matrix-size-never-executed", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-global-loop-counter-select-one-or-zero-never-greater-than-one.amber", "cov-global-loop-counter-select-one-or-zero-never-greater-than-one", "A fragment shader that covers specific LLVM code paths" },
{ "cov-global-loop-counter-set-array-element-once-index-using-findmsb.amber", "cov-global-loop-counter-set-array-element-once-index-using-findmsb", "A fragment shader that covers specific LLVM code paths" },
{ "cov-global-loop-counter-squared-comparison.amber", "cov-global-loop-counter-squared-comparison", "A fragment shader that covers specific LLVM code paths" },
{ "cov-global-loop-counter-texture-sample-loop-condition-set-array-element.amber", "cov-global-loop-counter-texture-sample-loop-condition-set-array-element", "A fragment shader that covers specific LLVM 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-index-array-using-uniform-bitwise-or-one.amber", "cov-index-array-using-uniform-bitwise-or-one", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-initialize-integer-array-variable-divided-by-itself.amber", "cov-initialize-integer-array-variable-divided-by-itself", "A fragment shader that covers specific LLVM code paths" },
{ "cov-inline-pass-empty-block.amber", "cov-inline-pass-empty-block", "A fragment shader that covers a specific inlining optimization path." },
{ "cov-inline-pass-nested-loops.amber", "cov-inline-pass-nested-loops", "A fragment shader that covers a specific inlining optimization path." },
{ "cov-inline-pass-return-in-loop.amber", "cov-inline-pass-return-in-loop", "A fragment shader that covers a specific inlining optimization path." },
{ "cov-irbuilder-matrix-cell-uniform.amber", "cov-irbuilder-matrix-cell-uniform", "A fragment shader that covers a specific IR builder path." },
{ "cov-isnan-asinh-clamp-always-zero.amber", "cov-isnan-asinh-clamp-always-zero", "A fragment shader that covers specific LLVM code paths" },
{ "cov-ivec-shift-right-by-large-number.amber", "cov-ivec-shift-right-by-large-number", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-large-for-loop-exit-early-set-iterator-array-element.amber", "cov-large-for-loop-exit-early-set-iterator-array-element", "A fragment shader that covers specific LLVM code paths" },
{ "cov-large-int-array-nested-loops-set-ivec-index-component-sum.amber", "cov-large-int-array-nested-loops-set-ivec-index-component-sum", "A fragment shader that covers specific LLVM code paths" },
{ "cov-ldexp-exponent-undefined-divided-fragcoord-never-executed.amber", "cov-ldexp-exponent-undefined-divided-fragcoord-never-executed", "A fragment shader that covers specific LLVM code paths" },
{ "cov-ldexp-undefined-mat-vec-multiply.amber", "cov-ldexp-undefined-mat-vec-multiply", "Covers specific inst combine simplify demanded and inst combine shifts path" },
{ "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-bitfield-extract-set-array-elements.amber", "cov-loop-condition-bitfield-extract-set-array-elements", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-condition-clamp-vec-of-ones.amber", "cov-loop-condition-clamp-vec-of-ones", "A fragment shader that covers specific NIR code paths" },
+{ "cov-loop-condition-divide-by-uniform-always-false.amber", "cov-loop-condition-divide-by-uniform-always-false", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-condition-double-negate.amber", "cov-loop-condition-double-negate", "A fragment shader that covers specific NIR 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-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-findmsb-findlsb.amber", "cov-loop-findmsb-findlsb", "A fragment shader that covers specific simplification and value tracking paths" },
{ "cov-loop-fragcoord-identical-condition.amber", "cov-loop-fragcoord-identical-condition", "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-logical-xor.amber", "cov-loop-logical-xor", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-returns-behind-true-and-false.amber", "cov-loop-returns-behind-true-and-false", "A fragment shader that covers specific NIR code paths" },
{ "cov-loop-set-vector-components-pow-two.amber", "cov-loop-set-vector-components-pow-two", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-loop-start-from-one-switch-case-invalid-color-never-executed.amber", "cov-loop-start-from-one-switch-case-invalid-color-never-executed", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-start-from-one-switch-case-never-executed.amber", "cov-loop-start-from-one-switch-case-never-executed", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-struct-array-field-set-value-self-dependency.amber", "cov-loop-struct-array-field-set-value-self-dependency", "A fragment shader that covers specific LLVM code paths" },
{ "cov-loop-switch-discard-never-hit.amber", "cov-loop-switch-discard-never-hit", "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-sample-opposite-corners.amber", "cov-nested-loops-sample-opposite-corners", "A fragment shader that covers specific LLVM code paths" },
{ "cov-nested-loops-set-struct-data-verify-in-function.amber", "cov-nested-loops-set-struct-data-verify-in-function", "A fragment shader that covers specific BRW 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" },
{ "cov-nir-opt-loop-unroll-if-if-if-if-do-while.amber", "cov-nir-opt-loop-unroll-if-if-if-if-do-while", "A fragment shader that covers a specific nir opt loop unroll path" },
{ "cov-pattern-match-signum.amber", "cov-pattern-match-signum", "A fragment shader that covers a specific pattern matching path." },
{ "cov-pattern-match-single-bit.amber", "cov-pattern-match-single-bit", "A fragment shader that covers a specific pattern matching path." },
{ "cov-peephole-optimizer-target-instr-info-for-if-if-if.amber", "cov-peephole-optimizer-target-instr-info-for-if-if-if", "Covers peephole optimizer and instr info code paths" },
+{ "cov-pow-distance-uniform-vector-constant-one-vector.amber", "cov-pow-distance-uniform-vector-constant-one-vector", "A fragment shader that covers specific LLVM code paths" },
{ "cov-pow-identical-value-sqrt.amber", "cov-pow-identical-value-sqrt", "A fragment shader that covers specific SPIR-V lower math code paths" },
{ "cov-pow-undefined.amber", "cov-pow-undefined", "A fragment shader that covers specific constant fold and selection dag code paths" },
{ "cov-pow-undefined-result-condition-with-always-true.amber", "cov-pow-undefined-result-condition-with-always-true", "A fragment shader that covers specific LLVM code paths" },
{ "cov-value-tracking-selection-dag-negation-clamp-loop.amber", "cov-value-tracking-selection-dag-negation-clamp-loop", "A fragment shader that calculates negation of clamped loop iterator values" },
{ "cov-value-tracking-uniform-incident.amber", "cov-value-tracking-uniform-incident", "A fragment shader that covers a specific value tracking code path" },
{ "cov-variable-copy-in-function-tex-sample.amber", "cov-variable-copy-in-function-tex-sample", "A fragment shader that covers specific NIR code paths" },
+{ "cov-vec2-dot-minus-negative-zero.amber", "cov-vec2-dot-minus-negative-zero", "A fragment shader that covers specific LLVM code paths" },
+{ "cov-vec2-duplicate-min-always-half.amber", "cov-vec2-duplicate-min-always-half", "A fragment shader that covers specific LLVM code paths" },
{ "cov-vector-dce-inc-unused-comp.amber", "cov-vector-dce-inc-unused-comp", "A fragment shader that covers a specific vector DCE path." },
{ "cov-vector-dce-unused-component.amber", "cov-vector-dce-unused-component", "A fragment shader that covers a specific vector DCE path." },
{ "cov-vector-illegal-index-never-executed.amber", "cov-vector-illegal-index-never-executed", "A fragment shader that covers specific NIR code paths" },
dEQP-VK.graphicsfuzz.cov-color-output-undefined-in-unexecuted-branch
dEQP-VK.graphicsfuzz.cov-combine-and-or-xor-gt-lt
dEQP-VK.graphicsfuzz.cov-condition-bitfield-extract-integer
+dEQP-VK.graphicsfuzz.cov-condition-increment-zero-to-one-divide-by-two
dEQP-VK.graphicsfuzz.cov-condition-loop-index-bitwise-not
dEQP-VK.graphicsfuzz.cov-condition-matrix-determinant-uniform
dEQP-VK.graphicsfuzz.cov-conditional-discard-inside-loop
dEQP-VK.graphicsfuzz.cov-function-fragcoord-condition-always-return
dEQP-VK.graphicsfuzz.cov-function-large-array-max-clamp
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-loop-same-conditions-multiple-times-struct-array
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-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-unpack-unorm-2x16-one
dEQP-VK.graphicsfuzz.cov-function-variable-plus-one-minus-one
dEQP-VK.graphicsfuzz.cov-function-vec2-never-discard
dEQP-VK.graphicsfuzz.cov-global-loop-counter-main-function-call
dEQP-VK.graphicsfuzz.cov-global-loop-counter-multiply-one-minus
dEQP-VK.graphicsfuzz.cov-global-loop-counter-read-past-matrix-size-never-executed
+dEQP-VK.graphicsfuzz.cov-global-loop-counter-select-one-or-zero-never-greater-than-one
dEQP-VK.graphicsfuzz.cov-global-loop-counter-set-array-element-once-index-using-findmsb
dEQP-VK.graphicsfuzz.cov-global-loop-counter-squared-comparison
dEQP-VK.graphicsfuzz.cov-global-loop-counter-texture-sample-loop-condition-set-array-element
dEQP-VK.graphicsfuzz.cov-increment-vector-component-with-matrix-copy
dEQP-VK.graphicsfuzz.cov-increment-vector-function-call-conditional
dEQP-VK.graphicsfuzz.cov-index-array-using-uniform-bitwise-or-one
+dEQP-VK.graphicsfuzz.cov-initialize-integer-array-variable-divided-by-itself
dEQP-VK.graphicsfuzz.cov-inline-pass-empty-block
dEQP-VK.graphicsfuzz.cov-inline-pass-nested-loops
dEQP-VK.graphicsfuzz.cov-inline-pass-return-in-loop
dEQP-VK.graphicsfuzz.cov-irbuilder-matrix-cell-uniform
dEQP-VK.graphicsfuzz.cov-isnan-asinh-clamp-always-zero
dEQP-VK.graphicsfuzz.cov-ivec-shift-right-by-large-number
+dEQP-VK.graphicsfuzz.cov-large-for-loop-exit-early-set-iterator-array-element
dEQP-VK.graphicsfuzz.cov-large-int-array-nested-loops-set-ivec-index-component-sum
dEQP-VK.graphicsfuzz.cov-ldexp-exponent-undefined-divided-fragcoord-never-executed
dEQP-VK.graphicsfuzz.cov-ldexp-undefined-mat-vec-multiply
dEQP-VK.graphicsfuzz.cov-loop-clamp-to-one-empty-condition
dEQP-VK.graphicsfuzz.cov-loop-condition-bitfield-extract-set-array-elements
dEQP-VK.graphicsfuzz.cov-loop-condition-clamp-vec-of-ones
+dEQP-VK.graphicsfuzz.cov-loop-condition-divide-by-uniform-always-false
dEQP-VK.graphicsfuzz.cov-loop-condition-double-negate
dEQP-VK.graphicsfuzz.cov-loop-condition-logical-or-never-iterated
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-findmsb-findlsb
dEQP-VK.graphicsfuzz.cov-loop-fragcoord-identical-condition
dEQP-VK.graphicsfuzz.cov-loop-increment-array-elements-clamp-index
dEQP-VK.graphicsfuzz.cov-loop-logical-xor
dEQP-VK.graphicsfuzz.cov-loop-returns-behind-true-and-false
dEQP-VK.graphicsfuzz.cov-loop-set-vector-components-pow-two
+dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-invalid-color-never-executed
dEQP-VK.graphicsfuzz.cov-loop-start-from-one-switch-case-never-executed
dEQP-VK.graphicsfuzz.cov-loop-struct-array-field-set-value-self-dependency
dEQP-VK.graphicsfuzz.cov-loop-switch-discard-never-hit
dEQP-VK.graphicsfuzz.cov-nested-loops-redundant-condition
dEQP-VK.graphicsfuzz.cov-nested-loops-sample-opposite-corners
dEQP-VK.graphicsfuzz.cov-nested-loops-set-struct-data-verify-in-function
+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-nir-opt-loop-unroll-if-if-if-if-do-while
dEQP-VK.graphicsfuzz.cov-pattern-match-signum
dEQP-VK.graphicsfuzz.cov-pattern-match-single-bit
dEQP-VK.graphicsfuzz.cov-peephole-optimizer-target-instr-info-for-if-if-if
+dEQP-VK.graphicsfuzz.cov-pow-distance-uniform-vector-constant-one-vector
dEQP-VK.graphicsfuzz.cov-pow-identical-value-sqrt
dEQP-VK.graphicsfuzz.cov-pow-undefined
dEQP-VK.graphicsfuzz.cov-pow-undefined-result-condition-with-always-true
dEQP-VK.graphicsfuzz.cov-value-tracking-selection-dag-negation-clamp-loop
dEQP-VK.graphicsfuzz.cov-value-tracking-uniform-incident
dEQP-VK.graphicsfuzz.cov-variable-copy-in-function-tex-sample
+dEQP-VK.graphicsfuzz.cov-vec2-dot-minus-negative-zero
+dEQP-VK.graphicsfuzz.cov-vec2-duplicate-min-always-half
dEQP-VK.graphicsfuzz.cov-vector-dce-inc-unused-comp
dEQP-VK.graphicsfuzz.cov-vector-dce-unused-component
dEQP-VK.graphicsfuzz.cov-vector-illegal-index-never-executed