Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 1 | #include <metal_stdlib> |
| 2 | |
| 3 | using namespace metal; |
Ben Clayton | 9be037c | 2024-01-19 20:58:56 +0000 | [diff] [blame] | 4 | |
Ben Clayton | 02262d8 | 2024-01-23 18:09:39 +0000 | [diff] [blame] | 5 | #define TINT_ISOLATE_UB(VOLATILE_NAME) \ |
| 6 | volatile bool VOLATILE_NAME = true; \ |
| 7 | if (VOLATILE_NAME) |
Ben Clayton | 9be037c | 2024-01-19 20:58:56 +0000 | [diff] [blame] | 8 | |
Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 9 | kernel void tint_symbol() { |
| 10 | int i = 0; |
dan sinclair | 997bc01 | 2024-02-22 02:08:41 +0000 | [diff] [blame] | 11 | bool tint_continue = false; |
Ben Clayton | 02262d8 | 2024-01-23 18:09:39 +0000 | [diff] [blame] | 12 | TINT_ISOLATE_UB(tint_volatile_true) for(int i_1 = 0; (i_1 < 2); i_1 = as_type<int>((as_type<uint>(i_1) + as_type<uint>(1)))) { |
dan sinclair | 997bc01 | 2024-02-22 02:08:41 +0000 | [diff] [blame] | 13 | tint_continue = false; |
Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 14 | switch(i_1) { |
| 15 | case 0: { |
dan sinclair | 997bc01 | 2024-02-22 02:08:41 +0000 | [diff] [blame] | 16 | tint_continue = true; |
Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 17 | break; |
| 18 | } |
| 19 | default: { |
| 20 | break; |
| 21 | } |
| 22 | } |
dan sinclair | 997bc01 | 2024-02-22 02:08:41 +0000 | [diff] [blame] | 23 | if (tint_continue) { |
| 24 | continue; |
| 25 | } |
Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 26 | switch(i_1) { |
| 27 | case 0: { |
dan sinclair | 997bc01 | 2024-02-22 02:08:41 +0000 | [diff] [blame] | 28 | tint_continue = true; |
Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 29 | break; |
| 30 | } |
| 31 | default: { |
| 32 | break; |
| 33 | } |
| 34 | } |
dan sinclair | 997bc01 | 2024-02-22 02:08:41 +0000 | [diff] [blame] | 35 | if (tint_continue) { |
| 36 | continue; |
| 37 | } |
Antonio Maiorano | d6f6f00 | 2023-09-13 17:50:46 +0000 | [diff] [blame] | 38 | } |
| 39 | return; |
| 40 | } |
| 41 | |