blob: 484b4ca483579dfdb346623777f5618b10ae128a [file] [log] [blame]
Ben Claytondef73132021-06-21 19:04:56 +00001#include <metal_stdlib>
2
3using namespace metal;
4int f() {
5 int i = 0;
6 int j = 0;
7 while (true) {
Antonio Maioranod388bc92021-07-30 18:59:06 +00008 i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
Ben Claytondef73132021-06-21 19:04:56 +00009 if ((i > 4)) {
10 return 1;
11 }
12 while (true) {
Antonio Maioranod388bc92021-07-30 18:59:06 +000013 j = as_type<int>((as_type<uint>(j) + as_type<uint>(1)));
Ben Claytondef73132021-06-21 19:04:56 +000014 if ((j > 4)) {
15 return 2;
16 }
17 }
18 }
Ben Claytondef73132021-06-21 19:04:56 +000019}
20