blob: d39052c19fbe56e15411f6dd49b15dc7d44dc97c [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
threadgroup int* a;
threadgroup int* b;
};
void foo(tint_module_vars_struct tint_module_vars) {
{
int i = 0;
while(true) {
int const v = i;
threadgroup_barrier(mem_flags::mem_threadgroup);
int const v_1 = (*tint_module_vars.a);
threadgroup_barrier(mem_flags::mem_threadgroup);
if ((v < v_1)) {
} else {
break;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
int const v_2 = (*tint_module_vars.b);
threadgroup_barrier(mem_flags::mem_threadgroup);
i = (i + v_2);
continue;
}
}
}