blob: 4f47486b005fd5a48489e02cd89d2e094362fb40 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
threadgroup int* a;
threadgroup int* b;
};
#define TINT_ISOLATE_UB(VOLATILE_NAME) \
volatile bool VOLATILE_NAME = true; \
if (VOLATILE_NAME)
void foo(tint_module_vars_struct tint_module_vars) {
{
int i = 0;
TINT_ISOLATE_UB(tint_volatile_true) 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;
}
}
}