test: Remove many expected files

For these tests, we only really care that we can successfully consume
them and generate valid output for each backend. Having the expected
files in the tree generates significant churn for any change to how we
generate backend code, which makes it hard to inspect diffs.

Change-Id: Ic98c248081144c0fb1791f1303eaf6d459548e3d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/62720
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
This commit is contained in:
James Price
2021-08-24 22:49:42 +00:00
committed by Tint LUCI CQ
parent 568136dd10
commit 87cce20f67
8526 changed files with 12 additions and 613699 deletions

View File

@@ -1,78 +0,0 @@
cbuffer cbuffer_x_8 : register(b0, space0) {
uint4 x_8[1];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
int highSigned = 0;
uint highUnsigned = 0u;
int i = 0;
int data[2] = (int[2])0;
uint i_1 = 0u;
bool x_78 = false;
bool x_79_phi = false;
highSigned = 1;
highUnsigned = 2u;
i = 0;
while (true) {
const int x_42 = i;
const int x_43 = highSigned;
const int x_46 = asint(x_8[0].x);
if ((x_42 < (min(10, x_43) + x_46))) {
} else {
break;
}
data[i] = 5;
{
i = (i + 1);
}
}
i_1 = 1u;
while (true) {
const uint x_58 = i_1;
const uint x_59 = highUnsigned;
const int x_62 = asint(x_8[0].x);
if ((x_58 < (min(10u, x_59) + asuint(x_62)))) {
} else {
break;
}
data[i_1] = 6;
{
i_1 = (i_1 + asuint(1));
}
}
const int x_72 = data[0];
const bool x_73 = (x_72 == 5);
x_79_phi = x_73;
if (x_73) {
const int x_77 = data[1];
x_78 = (x_77 == 6);
x_79_phi = x_78;
}
if (x_79_phi) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol {
float4 x_GLF_color_1 : SV_Target0;
};
main_out main_inner() {
main_1();
const main_out tint_symbol_2 = {x_GLF_color};
return tint_symbol_2;
}
tint_symbol main() {
const main_out inner_result = main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,89 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ int zero;
};
struct tint_array_wrapper {
int arr[2];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
int highSigned = 0;
uint highUnsigned = 0u;
int i = 0;
tint_array_wrapper data = {};
uint i_1 = 0u;
bool x_78 = false;
bool x_79_phi = false;
highSigned = 1;
highUnsigned = 2u;
i = 0;
while (true) {
int const x_42 = i;
int const x_43 = highSigned;
int const x_46 = x_8.zero;
if ((x_42 < as_type<int>((as_type<uint>(min(10, x_43)) + as_type<uint>(x_46))))) {
} else {
break;
}
int const x_50 = i;
data.arr[x_50] = 5;
{
int const x_52 = i;
i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
}
}
i_1 = 1u;
while (true) {
uint const x_58 = i_1;
uint const x_59 = highUnsigned;
int const x_62 = x_8.zero;
if ((x_58 < (min(10u, x_59) + as_type<uint>(x_62)))) {
} else {
break;
}
uint const x_67 = i_1;
data.arr[x_67] = 6;
{
uint const x_69 = i_1;
i_1 = (x_69 + as_type<uint>(1));
}
}
int const x_72 = data.arr[0];
bool const x_73 = (x_72 == 5);
x_79_phi = x_73;
if (x_73) {
int const x_77 = data.arr[1];
x_78 = (x_77 == 6);
x_79_phi = x_78;
}
bool const x_79 = x_79_phi;
if (x_79) {
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
main_1(x_8, tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,189 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 111
; Schema: 0
OpCapability Shader
%48 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %highSigned "highSigned"
OpName %highUnsigned "highUnsigned"
OpName %i "i"
OpName %data "data"
OpName %i_1 "i_1"
OpName %x_78 "x_78"
OpName %x_79_phi "x_79_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %_arr_int_uint_2 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%12 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%22 = OpConstantNull %uint
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2
%28 = OpConstantNull %_arr_int_uint_2
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%33 = OpConstantNull %bool
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_10 = OpConstant %int 10
%int_5 = OpConstant %int 5
%uint_1 = OpConstant %uint 1
%uint_10 = OpConstant %uint 10
%int_6 = OpConstant %int 6
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%98 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%99 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%100 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%highSigned = OpVariable %_ptr_Function_int Function %18
%highUnsigned = OpVariable %_ptr_Function_uint Function %22
%i = OpVariable %_ptr_Function_int Function %18
%data = OpVariable %_ptr_Function__arr_int_uint_2 Function %28
%i_1 = OpVariable %_ptr_Function_uint Function %22
%x_78 = OpVariable %_ptr_Function_bool Function %33
%x_79_phi = OpVariable %_ptr_Function_bool Function %33
OpStore %highSigned %int_1
OpStore %highUnsigned %uint_2
OpStore %i %int_0
OpBranch %37
%37 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
%41 = OpLoad %int %i
%42 = OpLoad %int %highSigned
%45 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%46 = OpLoad %int %45
%47 = OpExtInst %int %48 SMin %int_10 %42
%50 = OpIAdd %int %47 %46
%51 = OpSLessThan %bool %41 %50
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
OpBranch %38
%52 = OpLabel
%55 = OpLoad %int %i
%56 = OpAccessChain %_ptr_Function_int %data %55
OpStore %56 %int_5
OpBranch %39
%39 = OpLabel
%58 = OpLoad %int %i
%59 = OpIAdd %int %58 %int_1
OpStore %i %59
OpBranch %37
%38 = OpLabel
OpStore %i_1 %uint_1
OpBranch %61
%61 = OpLabel
OpLoopMerge %62 %63 None
OpBranch %64
%64 = OpLabel
%65 = OpLoad %uint %i_1
%66 = OpLoad %uint %highUnsigned
%67 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%68 = OpLoad %int %67
%69 = OpExtInst %uint %48 UMin %uint_10 %66
%71 = OpBitcast %uint %68
%72 = OpIAdd %uint %69 %71
%73 = OpULessThan %bool %65 %72
OpSelectionMerge %74 None
OpBranchConditional %73 %75 %76
%75 = OpLabel
OpBranch %74
%76 = OpLabel
OpBranch %62
%74 = OpLabel
%77 = OpLoad %uint %i_1
%78 = OpAccessChain %_ptr_Function_int %data %77
OpStore %78 %int_6
OpBranch %63
%63 = OpLabel
%80 = OpLoad %uint %i_1
%81 = OpBitcast %uint %int_1
%82 = OpIAdd %uint %80 %81
OpStore %i_1 %82
OpBranch %61
%62 = OpLabel
%83 = OpAccessChain %_ptr_Function_int %data %int_0
%84 = OpLoad %int %83
%85 = OpIEqual %bool %84 %int_5
OpStore %x_79_phi %85
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpAccessChain %_ptr_Function_int %data %int_1
%89 = OpLoad %int %88
%90 = OpIEqual %bool %89 %int_6
OpStore %x_78 %90
%91 = OpLoad %bool %x_78
OpStore %x_79_phi %91
OpBranch %86
%86 = OpLabel
%92 = OpLoad %bool %x_79_phi
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %95
%94 = OpLabel
OpStore %x_GLF_color %98
OpBranch %93
%95 = OpLabel
OpStore %x_GLF_color %99
OpBranch %93
%93 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %100
%103 = OpLabel
%104 = OpFunctionCall %void %main_1
%105 = OpLoad %v4float %x_GLF_color
%106 = OpCompositeConstruct %main_out %105
OpReturnValue %106
OpFunctionEnd
%main = OpFunction %void None %12
%108 = OpLabel
%109 = OpFunctionCall %main_out %main_inner
%110 = OpCompositeExtract %v4float %109 0
OpStore %x_GLF_color_1_1 %110
OpReturn
OpFunctionEnd

View File

@@ -1,80 +0,0 @@
[[block]]
struct buf0 {
zero : i32;
};
[[group(0), binding(0)]] var<uniform> x_8 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var highSigned : i32;
var highUnsigned : u32;
var i : i32;
var data : array<i32, 2>;
var i_1 : u32;
var x_78 : bool;
var x_79_phi : bool;
highSigned = 1;
highUnsigned = 2u;
i = 0;
loop {
let x_42 : i32 = i;
let x_43 : i32 = highSigned;
let x_46 : i32 = x_8.zero;
if ((x_42 < (min(10, x_43) + x_46))) {
} else {
break;
}
let x_50 : i32 = i;
data[x_50] = 5;
continuing {
let x_52 : i32 = i;
i = (x_52 + 1);
}
}
i_1 = 1u;
loop {
let x_58 : u32 = i_1;
let x_59 : u32 = highUnsigned;
let x_62 : i32 = x_8.zero;
if ((x_58 < (min(10u, x_59) + bitcast<u32>(x_62)))) {
} else {
break;
}
let x_67 : u32 = i_1;
data[x_67] = 6;
continuing {
let x_69 : u32 = i_1;
i_1 = (x_69 + bitcast<u32>(1));
}
}
let x_72 : i32 = data[0];
let x_73 : bool = (x_72 == 5);
x_79_phi = x_73;
if (x_73) {
let x_77 : i32 = data[1];
x_78 = (x_77 == 6);
x_79_phi = x_78;
}
let x_79 : bool = x_79_phi;
if (x_79) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
return;
}
struct main_out {
[[location(0)]]
x_GLF_color_1 : vec4<f32>;
};
[[stage(fragment)]]
fn main() -> main_out {
main_1();
return main_out(x_GLF_color);
}

View File

@@ -1,78 +0,0 @@
cbuffer cbuffer_x_8 : register(b0, space0) {
uint4 x_8[1];
};
static float4 x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
void main_1() {
int highSigned = 0;
uint highUnsigned = 0u;
int i = 0;
int data[2] = (int[2])0;
uint i_1 = 0u;
bool x_78 = false;
bool x_79_phi = false;
highSigned = 1;
highUnsigned = 2u;
i = 0;
while (true) {
const int x_42 = i;
const int x_43 = highSigned;
const int x_46 = asint(x_8[0].x);
if ((x_42 < (min(10, x_43) + x_46))) {
} else {
break;
}
data[i] = 5;
{
i = (i + 1);
}
}
i_1 = 1u;
while (true) {
const uint x_58 = i_1;
const uint x_59 = highUnsigned;
const int x_62 = asint(x_8[0].x);
if ((x_58 < (min(10u, x_59) + asuint(x_62)))) {
} else {
break;
}
data[i_1] = 6;
{
i_1 = (i_1 + asuint(1));
}
}
const int x_72 = data[0];
const bool x_73 = (x_72 == 5);
x_79_phi = x_73;
if (x_73) {
const int x_77 = data[1];
x_78 = (x_77 == 6);
x_79_phi = x_78;
}
if (x_79_phi) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol {
float4 x_GLF_color_1 : SV_Target0;
};
main_out main_inner() {
main_1();
const main_out tint_symbol_2 = {x_GLF_color};
return tint_symbol_2;
}
tint_symbol main() {
const main_out inner_result = main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,89 +0,0 @@
#include <metal_stdlib>
using namespace metal;
struct buf0 {
/* 0x0000 */ int zero;
};
struct tint_array_wrapper {
int arr[2];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
void main_1(constant buf0& x_8, thread float4* const tint_symbol_3) {
int highSigned = 0;
uint highUnsigned = 0u;
int i = 0;
tint_array_wrapper data = {};
uint i_1 = 0u;
bool x_78 = false;
bool x_79_phi = false;
highSigned = 1;
highUnsigned = 2u;
i = 0;
while (true) {
int const x_42 = i;
int const x_43 = highSigned;
int const x_46 = x_8.zero;
if ((x_42 < as_type<int>((as_type<uint>(min(10, x_43)) + as_type<uint>(x_46))))) {
} else {
break;
}
int const x_50 = i;
data.arr[x_50] = 5;
{
int const x_52 = i;
i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
}
}
i_1 = 1u;
while (true) {
uint const x_58 = i_1;
uint const x_59 = highUnsigned;
int const x_62 = x_8.zero;
if ((x_58 < (min(10u, x_59) + as_type<uint>(x_62)))) {
} else {
break;
}
uint const x_67 = i_1;
data.arr[x_67] = 6;
{
uint const x_69 = i_1;
i_1 = (x_69 + as_type<uint>(1));
}
}
int const x_72 = data.arr[0];
bool const x_73 = (x_72 == 5);
x_79_phi = x_73;
if (x_73) {
int const x_77 = data.arr[1];
x_78 = (x_77 == 6);
x_79_phi = x_78;
}
bool const x_79 = x_79_phi;
if (x_79) {
*(tint_symbol_3) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_3) = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
return;
}
main_out tint_symbol_inner(constant buf0& x_8, thread float4* const tint_symbol_4) {
main_1(x_8, tint_symbol_4);
main_out const tint_symbol_2 = {.x_GLF_color_1=*(tint_symbol_4)};
return tint_symbol_2;
}
fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_out const inner_result = tint_symbol_inner(x_8, &(tint_symbol_5));
tint_symbol_1 wrapper_result = {};
wrapper_result.x_GLF_color_1 = inner_result.x_GLF_color_1;
return wrapper_result;
}

View File

@@ -1,189 +0,0 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 111
; Schema: 0
OpCapability Shader
%48 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "zero"
OpName %x_8 "x_8"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %highSigned "highSigned"
OpName %highUnsigned "highUnsigned"
OpName %i "i"
OpName %data "data"
OpName %i_1 "i_1"
OpName %x_78 "x_78"
OpName %x_79_phi "x_79_phi"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %main "main"
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 0
OpDecorate %_arr_int_uint_2 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Output_v4float = OpTypePointer Output %v4float
%5 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %5
%int = OpTypeInt 32 1
%buf0 = OpTypeStruct %int
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_8 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%void = OpTypeVoid
%12 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%18 = OpConstantNull %int
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%22 = OpConstantNull %uint
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%_ptr_Function__arr_int_uint_2 = OpTypePointer Function %_arr_int_uint_2
%28 = OpConstantNull %_arr_int_uint_2
%bool = OpTypeBool
%_ptr_Function_bool = OpTypePointer Function %bool
%33 = OpConstantNull %bool
%int_1 = OpConstant %int 1
%int_0 = OpConstant %int 0
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_10 = OpConstant %int 10
%int_5 = OpConstant %int 5
%uint_1 = OpConstant %uint 1
%uint_10 = OpConstant %uint 10
%int_6 = OpConstant %int 6
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
%98 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%99 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
%100 = OpTypeFunction %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%highSigned = OpVariable %_ptr_Function_int Function %18
%highUnsigned = OpVariable %_ptr_Function_uint Function %22
%i = OpVariable %_ptr_Function_int Function %18
%data = OpVariable %_ptr_Function__arr_int_uint_2 Function %28
%i_1 = OpVariable %_ptr_Function_uint Function %22
%x_78 = OpVariable %_ptr_Function_bool Function %33
%x_79_phi = OpVariable %_ptr_Function_bool Function %33
OpStore %highSigned %int_1
OpStore %highUnsigned %uint_2
OpStore %i %int_0
OpBranch %37
%37 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
%41 = OpLoad %int %i
%42 = OpLoad %int %highSigned
%45 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%46 = OpLoad %int %45
%47 = OpExtInst %int %48 SMin %int_10 %42
%50 = OpIAdd %int %47 %46
%51 = OpSLessThan %bool %41 %50
OpSelectionMerge %52 None
OpBranchConditional %51 %53 %54
%53 = OpLabel
OpBranch %52
%54 = OpLabel
OpBranch %38
%52 = OpLabel
%55 = OpLoad %int %i
%56 = OpAccessChain %_ptr_Function_int %data %55
OpStore %56 %int_5
OpBranch %39
%39 = OpLabel
%58 = OpLoad %int %i
%59 = OpIAdd %int %58 %int_1
OpStore %i %59
OpBranch %37
%38 = OpLabel
OpStore %i_1 %uint_1
OpBranch %61
%61 = OpLabel
OpLoopMerge %62 %63 None
OpBranch %64
%64 = OpLabel
%65 = OpLoad %uint %i_1
%66 = OpLoad %uint %highUnsigned
%67 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0
%68 = OpLoad %int %67
%69 = OpExtInst %uint %48 UMin %uint_10 %66
%71 = OpBitcast %uint %68
%72 = OpIAdd %uint %69 %71
%73 = OpULessThan %bool %65 %72
OpSelectionMerge %74 None
OpBranchConditional %73 %75 %76
%75 = OpLabel
OpBranch %74
%76 = OpLabel
OpBranch %62
%74 = OpLabel
%77 = OpLoad %uint %i_1
%78 = OpAccessChain %_ptr_Function_int %data %77
OpStore %78 %int_6
OpBranch %63
%63 = OpLabel
%80 = OpLoad %uint %i_1
%81 = OpBitcast %uint %int_1
%82 = OpIAdd %uint %80 %81
OpStore %i_1 %82
OpBranch %61
%62 = OpLabel
%83 = OpAccessChain %_ptr_Function_int %data %int_0
%84 = OpLoad %int %83
%85 = OpIEqual %bool %84 %int_5
OpStore %x_79_phi %85
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpAccessChain %_ptr_Function_int %data %int_1
%89 = OpLoad %int %88
%90 = OpIEqual %bool %89 %int_6
OpStore %x_78 %90
%91 = OpLoad %bool %x_78
OpStore %x_79_phi %91
OpBranch %86
%86 = OpLabel
%92 = OpLoad %bool %x_79_phi
OpSelectionMerge %93 None
OpBranchConditional %92 %94 %95
%94 = OpLabel
OpStore %x_GLF_color %98
OpBranch %93
%95 = OpLabel
OpStore %x_GLF_color %99
OpBranch %93
%93 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %100
%103 = OpLabel
%104 = OpFunctionCall %void %main_1
%105 = OpLoad %v4float %x_GLF_color
%106 = OpCompositeConstruct %main_out %105
OpReturnValue %106
OpFunctionEnd
%main = OpFunction %void None %12
%108 = OpLabel
%109 = OpFunctionCall %main_out %main_inner
%110 = OpCompositeExtract %v4float %109 0
OpStore %x_GLF_color_1_1 %110
OpReturn
OpFunctionEnd

View File

@@ -1,80 +0,0 @@
[[block]]
struct buf0 {
zero : i32;
};
[[group(0), binding(0)]] var<uniform> x_8 : buf0;
var<private> x_GLF_color : vec4<f32>;
fn main_1() {
var highSigned : i32;
var highUnsigned : u32;
var i : i32;
var data : array<i32, 2>;
var i_1 : u32;
var x_78 : bool;
var x_79_phi : bool;
highSigned = 1;
highUnsigned = 2u;
i = 0;
loop {
let x_42 : i32 = i;
let x_43 : i32 = highSigned;
let x_46 : i32 = x_8.zero;
if ((x_42 < (min(10, x_43) + x_46))) {
} else {
break;
}
let x_50 : i32 = i;
data[x_50] = 5;
continuing {
let x_52 : i32 = i;
i = (x_52 + 1);
}
}
i_1 = 1u;
loop {
let x_58 : u32 = i_1;
let x_59 : u32 = highUnsigned;
let x_62 : i32 = x_8.zero;
if ((x_58 < (min(10u, x_59) + bitcast<u32>(x_62)))) {
} else {
break;
}
let x_67 : u32 = i_1;
data[x_67] = 6;
continuing {
let x_69 : u32 = i_1;
i_1 = (x_69 + bitcast<u32>(1));
}
}
let x_72 : i32 = data[0];
let x_73 : bool = (x_72 == 5);
x_79_phi = x_73;
if (x_73) {
let x_77 : i32 = data[1];
x_78 = (x_77 == 6);
x_79_phi = x_78;
}
let x_79 : bool = x_79_phi;
if (x_79) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
}
return;
}
struct main_out {
[[location(0)]]
x_GLF_color_1 : vec4<f32>;
};
[[stage(fragment)]]
fn main() -> main_out {
main_1();
return main_out(x_GLF_color);
}