dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negat.../0-opt.wgsl.expected.msl

133 lines
3.8 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ float el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[3];
};
struct buf1 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_float_values;
};
struct tint_padded_array_element_1 {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad_1[12];
};
struct tint_array_wrapper_1 {
/* 0x0000 */ tint_padded_array_element_1 arr[4];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper_1 x_GLF_uniform_int_values;
};
struct tint_array_wrapper_2 {
float 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 buf1& x_6, constant buf0& x_9, thread float4* const tint_symbol_4) {
tint_array_wrapper_2 A = {};
int i = 0;
int j = 0;
bool x_101 = false;
bool x_102_phi = false;
float const x_39 = x_6.x_GLF_uniform_float_values.arr[1].el;
A.arr[0] = x_39;
float const x_42 = x_6.x_GLF_uniform_float_values.arr[1].el;
A.arr[1] = x_42;
int const x_45 = x_9.x_GLF_uniform_int_values.arr[0].el;
i = x_45;
while (true) {
int const x_50 = i;
int const x_52 = x_9.x_GLF_uniform_int_values.arr[3].el;
if ((x_50 < x_52)) {
} else {
break;
}
int const x_56 = x_9.x_GLF_uniform_int_values.arr[0].el;
j = x_56;
while (true) {
int const x_61 = j;
int const x_63 = x_9.x_GLF_uniform_int_values.arr[2].el;
if ((x_61 < x_63)) {
} else {
break;
}
int const x_66 = j;
switch(x_66) {
case 1: {
int const x_78 = i;
float const x_80 = x_6.x_GLF_uniform_float_values.arr[0].el;
A.arr[x_78] = x_80;
break;
}
case 0: {
int const x_70 = i;
if ((-2147483648 < x_70)) {
{
int const x_82 = j;
j = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
continue;
}
int const x_74 = i;
float const x_76 = x_6.x_GLF_uniform_float_values.arr[2].el;
A.arr[x_74] = x_76;
break;
}
default: {
break;
}
}
{
int const x_82 = j;
j = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
{
int const x_84 = i;
i = as_type<int>((as_type<uint>(x_84) + as_type<uint>(1)));
}
}
int const x_87 = x_9.x_GLF_uniform_int_values.arr[0].el;
float const x_89 = A.arr[x_87];
float const x_91 = x_6.x_GLF_uniform_float_values.arr[0].el;
bool const x_92 = (x_89 == x_91);
x_102_phi = x_92;
if (x_92) {
int const x_96 = x_9.x_GLF_uniform_int_values.arr[1].el;
float const x_98 = A.arr[x_96];
float const x_100 = x_6.x_GLF_uniform_float_values.arr[0].el;
x_101 = (x_98 == x_100);
x_102_phi = x_101;
}
bool const x_102 = x_102_phi;
if (x_102) {
int const x_107 = x_9.x_GLF_uniform_int_values.arr[1].el;
int const x_110 = x_9.x_GLF_uniform_int_values.arr[0].el;
int const x_113 = x_9.x_GLF_uniform_int_values.arr[0].el;
int const x_116 = x_9.x_GLF_uniform_int_values.arr[1].el;
*(tint_symbol_4) = float4(float(x_107), float(x_110), float(x_113), float(x_116));
} else {
int const x_120 = x_9.x_GLF_uniform_int_values.arr[1].el;
float const x_121 = float(x_120);
*(tint_symbol_4) = float4(x_121, x_121, x_121, x_121);
}
return;
}
fragment tint_symbol_1 tint_symbol(constant buf1& x_6 [[buffer(1)]], constant buf0& x_9 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_1(x_6, x_9, &(tint_symbol_5));
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
return tint_symbol_3;
}