| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:1257 internal compiler error: BST = struct @align(4) { |
| data:i32 @offset(0) |
| leftIndex:i32 @offset(4) |
| rightIndex:i32 @offset(8) |
| } |
| |
| main_out = struct @align(16) { |
| x_GLF_color_1:vec4<f32> @offset(0), @location(0) |
| } |
| |
| $B1: { # root |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %main_1 = func():void { |
| $B2: { |
| %tree:ptr<function, array<BST, 10>, read_write> = var |
| %x_360:ptr<function, i32, read_write> = var |
| %x_62_phi:ptr<function, i32, read_write> = var |
| %x_90_phi:ptr<function, bool, read_write> = var |
| %x_357_phi:ptr<function, i32, read_write> = var |
| %x_360_phi:ptr<function, i32, read_write> = var |
| %x_362_phi:ptr<function, i32, read_write> = var |
| %10:ptr<function, BST, read_write> = access %tree, 0i |
| store %10, BST(9i, -1i, -1i) |
| switch 0u [c: (default, $B3)] { # switch_1 |
| $B3: { # case |
| store %x_62_phi, 0i |
| loop [b: $B4, c: $B5] { # loop_1 |
| $B4: { # body |
| %x_88:ptr<function, i32, read_write> = var |
| %x_80:ptr<function, i32, read_write> = var |
| %x_63:ptr<function, i32, read_write> = var |
| %x_63_phi:ptr<function, i32, read_write> = var |
| %15:i32 = load %x_62_phi |
| %x_62:i32 = let %15 |
| store %x_90_phi, false |
| %17:bool = lte %x_62, 1i |
| if %17 [t: $B6, f: $B7] { # if_1 |
| $B6: { # true |
| exit_if # if_1 |
| } |
| $B7: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %18:ptr<function, i32, read_write> = access %tree, %x_62, 0u |
| %19:i32 = load %18 |
| %x_69:i32 = let %19 |
| %21:bool = lte 5i, %x_69 |
| if %21 [t: $B8, f: $B9] { # if_2 |
| $B8: { # true |
| %x_82_save:i32 = let %x_62 |
| %23:ptr<function, i32, read_write> = access %tree, %x_82_save, 1u |
| %24:i32 = load %23 |
| %x_83:i32 = let %24 |
| %26:bool = eq %x_83, -1i |
| if %26 [t: $B10, f: $B11] { # if_3 |
| $B10: { # true |
| %27:ptr<function, i32, read_write> = access %tree, %x_82_save, 1u |
| store %27, 1i |
| %28:ptr<function, BST, read_write> = access %tree, 1i |
| store %28, BST(5i, -1i, -1i) |
| store %x_90_phi, true |
| exit_loop # loop_1 |
| } |
| $B11: { # false |
| %29:ptr<function, i32, read_write> = access %tree, %x_82_save, 1u |
| %30:i32 = load %29 |
| store %x_88, %30 |
| %31:i32 = load %x_88 |
| store %x_63_phi, %31 |
| continue # -> $B5 |
| } |
| } |
| exit_if # if_2 |
| } |
| $B9: { # false |
| %x_74_save:i32 = let %x_62 |
| %33:ptr<function, i32, read_write> = access %tree, %x_74_save, 2u |
| %34:i32 = load %33 |
| %x_75:i32 = let %34 |
| %36:bool = eq %x_75, -1i |
| if %36 [t: $B12, f: $B13] { # if_4 |
| $B12: { # true |
| %37:ptr<function, i32, read_write> = access %tree, %x_74_save, 2u |
| store %37, 1i |
| %38:ptr<function, BST, read_write> = access %tree, 1i |
| store %38, BST(5i, -1i, -1i) |
| store %x_90_phi, true |
| exit_loop # loop_1 |
| } |
| $B13: { # false |
| %39:ptr<function, i32, read_write> = access %tree, %x_74_save, 2u |
| %40:i32 = load %39 |
| store %x_80, %40 |
| %41:i32 = load %x_80 |
| store %x_63_phi, %41 |
| continue # -> $B5 |
| } |
| } |
| exit_if # if_2 |
| } |
| } |
| unreachable |
| } |
| $B5: { # continuing |
| %42:i32 = load %x_63_phi |
| store %x_63, %42 |
| %43:i32 = load %x_63 |
| store %x_62_phi, %43 |
| next_iteration # -> $B4 |
| } |
| } |
| %44:bool = load %x_90_phi |
| %x_90:bool = let %44 |
| if %x_90 [t: $B14] { # if_5 |
| $B14: { # true |
| exit_switch # switch_1 |
| } |
| } |
| exit_switch # switch_1 |
| } |
| } |
| %x_95_phi:ptr<function, i32, read_write> = var |
| %x_123_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B15)] { # switch_2 |
| $B15: { # case |
| store %x_95_phi, 0i |
| loop [b: $B16, c: $B17] { # loop_2 |
| $B16: { # body |
| %x_121:ptr<function, i32, read_write> = var |
| %x_113:ptr<function, i32, read_write> = var |
| %x_96:ptr<function, i32, read_write> = var |
| %x_96_phi:ptr<function, i32, read_write> = var |
| %52:i32 = load %x_95_phi |
| %x_95:i32 = let %52 |
| store %x_123_phi, false |
| %54:bool = lte %x_95, 2i |
| if %54 [t: $B18, f: $B19] { # if_6 |
| $B18: { # true |
| exit_if # if_6 |
| } |
| $B19: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %55:ptr<function, i32, read_write> = access %tree, %x_95, 0u |
| %56:i32 = load %55 |
| %x_102:i32 = let %56 |
| %58:bool = lte 12i, %x_102 |
| if %58 [t: $B20, f: $B21] { # if_7 |
| $B20: { # true |
| %x_115_save:i32 = let %x_95 |
| %60:ptr<function, i32, read_write> = access %tree, %x_115_save, 1u |
| %61:i32 = load %60 |
| %x_116:i32 = let %61 |
| %63:bool = eq %x_116, -1i |
| if %63 [t: $B22, f: $B23] { # if_8 |
| $B22: { # true |
| %64:ptr<function, i32, read_write> = access %tree, %x_115_save, 1u |
| store %64, 2i |
| %65:ptr<function, BST, read_write> = access %tree, 2i |
| store %65, BST(12i, -1i, -1i) |
| store %x_123_phi, true |
| exit_loop # loop_2 |
| } |
| $B23: { # false |
| %66:ptr<function, i32, read_write> = access %tree, %x_115_save, 1u |
| %67:i32 = load %66 |
| store %x_121, %67 |
| %68:i32 = load %x_121 |
| store %x_96_phi, %68 |
| continue # -> $B17 |
| } |
| } |
| exit_if # if_7 |
| } |
| $B21: { # false |
| %x_107_save:i32 = let %x_95 |
| %70:ptr<function, i32, read_write> = access %tree, %x_107_save, 2u |
| %71:i32 = load %70 |
| %x_108:i32 = let %71 |
| %73:bool = eq %x_108, -1i |
| if %73 [t: $B24, f: $B25] { # if_9 |
| $B24: { # true |
| %74:ptr<function, i32, read_write> = access %tree, %x_107_save, 2u |
| store %74, 2i |
| %75:ptr<function, BST, read_write> = access %tree, 2i |
| store %75, BST(12i, -1i, -1i) |
| store %x_123_phi, true |
| exit_loop # loop_2 |
| } |
| $B25: { # false |
| %76:ptr<function, i32, read_write> = access %tree, %x_107_save, 2u |
| %77:i32 = load %76 |
| store %x_113, %77 |
| %78:i32 = load %x_113 |
| store %x_96_phi, %78 |
| continue # -> $B17 |
| } |
| } |
| exit_if # if_7 |
| } |
| } |
| unreachable |
| } |
| $B17: { # continuing |
| %79:i32 = load %x_96_phi |
| store %x_96, %79 |
| %80:i32 = load %x_96 |
| store %x_95_phi, %80 |
| next_iteration # -> $B16 |
| } |
| } |
| %81:bool = load %x_123_phi |
| %x_123:bool = let %81 |
| if %x_123 [t: $B26] { # if_10 |
| $B26: { # true |
| exit_switch # switch_2 |
| } |
| } |
| exit_switch # switch_2 |
| } |
| } |
| %x_128_phi:ptr<function, i32, read_write> = var |
| %x_156_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B27)] { # switch_3 |
| $B27: { # case |
| store %x_128_phi, 0i |
| loop [b: $B28, c: $B29] { # loop_3 |
| $B28: { # body |
| %x_154:ptr<function, i32, read_write> = var |
| %x_146:ptr<function, i32, read_write> = var |
| %x_129:ptr<function, i32, read_write> = var |
| %x_129_phi:ptr<function, i32, read_write> = var |
| %89:i32 = load %x_128_phi |
| %x_128:i32 = let %89 |
| store %x_156_phi, false |
| %91:bool = lte %x_128, 3i |
| if %91 [t: $B30, f: $B31] { # if_11 |
| $B30: { # true |
| exit_if # if_11 |
| } |
| $B31: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %92:ptr<function, i32, read_write> = access %tree, %x_128, 0u |
| %93:i32 = load %92 |
| %x_135:i32 = let %93 |
| %95:bool = lte 15i, %x_135 |
| if %95 [t: $B32, f: $B33] { # if_12 |
| $B32: { # true |
| %x_148_save:i32 = let %x_128 |
| %97:ptr<function, i32, read_write> = access %tree, %x_148_save, 1u |
| %98:i32 = load %97 |
| %x_149:i32 = let %98 |
| %100:bool = eq %x_149, -1i |
| if %100 [t: $B34, f: $B35] { # if_13 |
| $B34: { # true |
| %101:ptr<function, i32, read_write> = access %tree, %x_148_save, 1u |
| store %101, 3i |
| %102:ptr<function, BST, read_write> = access %tree, 3i |
| store %102, BST(15i, -1i, -1i) |
| store %x_156_phi, true |
| exit_loop # loop_3 |
| } |
| $B35: { # false |
| %103:ptr<function, i32, read_write> = access %tree, %x_148_save, 1u |
| %104:i32 = load %103 |
| store %x_154, %104 |
| %105:i32 = load %x_154 |
| store %x_129_phi, %105 |
| continue # -> $B29 |
| } |
| } |
| exit_if # if_12 |
| } |
| $B33: { # false |
| %x_140_save:i32 = let %x_128 |
| %107:ptr<function, i32, read_write> = access %tree, %x_140_save, 2u |
| %108:i32 = load %107 |
| %x_141:i32 = let %108 |
| %110:bool = eq %x_141, -1i |
| if %110 [t: $B36, f: $B37] { # if_14 |
| $B36: { # true |
| %111:ptr<function, i32, read_write> = access %tree, %x_140_save, 2u |
| store %111, 3i |
| %112:ptr<function, BST, read_write> = access %tree, 3i |
| store %112, BST(15i, -1i, -1i) |
| store %x_156_phi, true |
| exit_loop # loop_3 |
| } |
| $B37: { # false |
| %113:ptr<function, i32, read_write> = access %tree, %x_140_save, 2u |
| %114:i32 = load %113 |
| store %x_146, %114 |
| %115:i32 = load %x_146 |
| store %x_129_phi, %115 |
| continue # -> $B29 |
| } |
| } |
| exit_if # if_12 |
| } |
| } |
| unreachable |
| } |
| $B29: { # continuing |
| %116:i32 = load %x_129_phi |
| store %x_129, %116 |
| %117:i32 = load %x_129 |
| store %x_128_phi, %117 |
| next_iteration # -> $B28 |
| } |
| } |
| %118:bool = load %x_156_phi |
| %x_156:bool = let %118 |
| if %x_156 [t: $B38] { # if_15 |
| $B38: { # true |
| exit_switch # switch_3 |
| } |
| } |
| exit_switch # switch_3 |
| } |
| } |
| %x_161_phi:ptr<function, i32, read_write> = var |
| %x_189_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B39)] { # switch_4 |
| $B39: { # case |
| store %x_161_phi, 0i |
| loop [b: $B40, c: $B41] { # loop_4 |
| $B40: { # body |
| %x_187:ptr<function, i32, read_write> = var |
| %x_179:ptr<function, i32, read_write> = var |
| %x_162:ptr<function, i32, read_write> = var |
| %x_162_phi:ptr<function, i32, read_write> = var |
| %126:i32 = load %x_161_phi |
| %x_161:i32 = let %126 |
| store %x_189_phi, false |
| %128:bool = lte %x_161, 4i |
| if %128 [t: $B42, f: $B43] { # if_16 |
| $B42: { # true |
| exit_if # if_16 |
| } |
| $B43: { # false |
| exit_loop # loop_4 |
| } |
| } |
| %129:ptr<function, i32, read_write> = access %tree, %x_161, 0u |
| %130:i32 = load %129 |
| %x_168:i32 = let %130 |
| %132:bool = lte 7i, %x_168 |
| if %132 [t: $B44, f: $B45] { # if_17 |
| $B44: { # true |
| %x_181_save:i32 = let %x_161 |
| %134:ptr<function, i32, read_write> = access %tree, %x_181_save, 1u |
| %135:i32 = load %134 |
| %x_182:i32 = let %135 |
| %137:bool = eq %x_182, -1i |
| if %137 [t: $B46, f: $B47] { # if_18 |
| $B46: { # true |
| %138:ptr<function, i32, read_write> = access %tree, %x_181_save, 1u |
| store %138, 4i |
| %139:ptr<function, BST, read_write> = access %tree, 4i |
| store %139, BST(7i, -1i, -1i) |
| store %x_189_phi, true |
| exit_loop # loop_4 |
| } |
| $B47: { # false |
| %140:ptr<function, i32, read_write> = access %tree, %x_181_save, 1u |
| %141:i32 = load %140 |
| store %x_187, %141 |
| %142:i32 = load %x_187 |
| store %x_162_phi, %142 |
| continue # -> $B41 |
| } |
| } |
| exit_if # if_17 |
| } |
| $B45: { # false |
| %x_173_save:i32 = let %x_161 |
| %144:ptr<function, i32, read_write> = access %tree, %x_173_save, 2u |
| %145:i32 = load %144 |
| %x_174:i32 = let %145 |
| %147:bool = eq %x_174, -1i |
| if %147 [t: $B48, f: $B49] { # if_19 |
| $B48: { # true |
| %148:ptr<function, i32, read_write> = access %tree, %x_173_save, 2u |
| store %148, 4i |
| %149:ptr<function, BST, read_write> = access %tree, 4i |
| store %149, BST(7i, -1i, -1i) |
| store %x_189_phi, true |
| exit_loop # loop_4 |
| } |
| $B49: { # false |
| %150:ptr<function, i32, read_write> = access %tree, %x_173_save, 2u |
| %151:i32 = load %150 |
| store %x_179, %151 |
| %152:i32 = load %x_179 |
| store %x_162_phi, %152 |
| continue # -> $B41 |
| } |
| } |
| exit_if # if_17 |
| } |
| } |
| unreachable |
| } |
| $B41: { # continuing |
| %153:i32 = load %x_162_phi |
| store %x_162, %153 |
| %154:i32 = load %x_162 |
| store %x_161_phi, %154 |
| next_iteration # -> $B40 |
| } |
| } |
| %155:bool = load %x_189_phi |
| %x_189:bool = let %155 |
| if %x_189 [t: $B50] { # if_20 |
| $B50: { # true |
| exit_switch # switch_4 |
| } |
| } |
| exit_switch # switch_4 |
| } |
| } |
| %x_194_phi:ptr<function, i32, read_write> = var |
| %x_222_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B51)] { # switch_5 |
| $B51: { # case |
| store %x_194_phi, 0i |
| loop [b: $B52, c: $B53] { # loop_5 |
| $B52: { # body |
| %x_220:ptr<function, i32, read_write> = var |
| %x_212:ptr<function, i32, read_write> = var |
| %x_195:ptr<function, i32, read_write> = var |
| %x_195_phi:ptr<function, i32, read_write> = var |
| %163:i32 = load %x_194_phi |
| %x_194:i32 = let %163 |
| store %x_222_phi, false |
| %165:bool = lte %x_194, 5i |
| if %165 [t: $B54, f: $B55] { # if_21 |
| $B54: { # true |
| exit_if # if_21 |
| } |
| $B55: { # false |
| exit_loop # loop_5 |
| } |
| } |
| %166:ptr<function, i32, read_write> = access %tree, %x_194, 0u |
| %167:i32 = load %166 |
| %x_201:i32 = let %167 |
| %169:bool = lte 8i, %x_201 |
| if %169 [t: $B56, f: $B57] { # if_22 |
| $B56: { # true |
| %x_214_save:i32 = let %x_194 |
| %171:ptr<function, i32, read_write> = access %tree, %x_214_save, 1u |
| %172:i32 = load %171 |
| %x_215:i32 = let %172 |
| %174:bool = eq %x_215, -1i |
| if %174 [t: $B58, f: $B59] { # if_23 |
| $B58: { # true |
| %175:ptr<function, i32, read_write> = access %tree, %x_214_save, 1u |
| store %175, 5i |
| %176:ptr<function, BST, read_write> = access %tree, 5i |
| store %176, BST(8i, -1i, -1i) |
| store %x_222_phi, true |
| exit_loop # loop_5 |
| } |
| $B59: { # false |
| %177:ptr<function, i32, read_write> = access %tree, %x_214_save, 1u |
| %178:i32 = load %177 |
| store %x_220, %178 |
| %179:i32 = load %x_220 |
| store %x_195_phi, %179 |
| continue # -> $B53 |
| } |
| } |
| exit_if # if_22 |
| } |
| $B57: { # false |
| %x_206_save:i32 = let %x_194 |
| %181:ptr<function, i32, read_write> = access %tree, %x_206_save, 2u |
| %182:i32 = load %181 |
| %x_207:i32 = let %182 |
| %184:bool = eq %x_207, -1i |
| if %184 [t: $B60, f: $B61] { # if_24 |
| $B60: { # true |
| %185:ptr<function, i32, read_write> = access %tree, %x_206_save, 2u |
| store %185, 5i |
| %186:ptr<function, BST, read_write> = access %tree, 5i |
| store %186, BST(8i, -1i, -1i) |
| store %x_222_phi, true |
| exit_loop # loop_5 |
| } |
| $B61: { # false |
| %187:ptr<function, i32, read_write> = access %tree, %x_206_save, 2u |
| %188:i32 = load %187 |
| store %x_212, %188 |
| %189:i32 = load %x_212 |
| store %x_195_phi, %189 |
| continue # -> $B53 |
| } |
| } |
| exit_if # if_22 |
| } |
| } |
| unreachable |
| } |
| $B53: { # continuing |
| %190:i32 = load %x_195_phi |
| store %x_195, %190 |
| %191:i32 = load %x_195 |
| store %x_194_phi, %191 |
| next_iteration # -> $B52 |
| } |
| } |
| %192:bool = load %x_222_phi |
| %x_222:bool = let %192 |
| if %x_222 [t: $B62] { # if_25 |
| $B62: { # true |
| exit_switch # switch_5 |
| } |
| } |
| exit_switch # switch_5 |
| } |
| } |
| %x_227_phi:ptr<function, i32, read_write> = var |
| %x_255_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B63)] { # switch_6 |
| $B63: { # case |
| store %x_227_phi, 0i |
| loop [b: $B64, c: $B65] { # loop_6 |
| $B64: { # body |
| %x_253:ptr<function, i32, read_write> = var |
| %x_245:ptr<function, i32, read_write> = var |
| %x_228:ptr<function, i32, read_write> = var |
| %x_228_phi:ptr<function, i32, read_write> = var |
| %200:i32 = load %x_227_phi |
| %x_227:i32 = let %200 |
| store %x_255_phi, false |
| %202:bool = lte %x_227, 6i |
| if %202 [t: $B66, f: $B67] { # if_26 |
| $B66: { # true |
| exit_if # if_26 |
| } |
| $B67: { # false |
| exit_loop # loop_6 |
| } |
| } |
| %203:ptr<function, i32, read_write> = access %tree, %x_227, 0u |
| %204:i32 = load %203 |
| %x_234:i32 = let %204 |
| %206:bool = lte 2i, %x_234 |
| if %206 [t: $B68, f: $B69] { # if_27 |
| $B68: { # true |
| %x_247_save:i32 = let %x_227 |
| %208:ptr<function, i32, read_write> = access %tree, %x_247_save, 1u |
| %209:i32 = load %208 |
| %x_248:i32 = let %209 |
| %211:bool = eq %x_248, -1i |
| if %211 [t: $B70, f: $B71] { # if_28 |
| $B70: { # true |
| %212:ptr<function, i32, read_write> = access %tree, %x_247_save, 1u |
| store %212, 6i |
| %213:ptr<function, BST, read_write> = access %tree, 6i |
| store %213, BST(2i, -1i, -1i) |
| store %x_255_phi, true |
| exit_loop # loop_6 |
| } |
| $B71: { # false |
| %214:ptr<function, i32, read_write> = access %tree, %x_247_save, 1u |
| %215:i32 = load %214 |
| store %x_253, %215 |
| %216:i32 = load %x_253 |
| store %x_228_phi, %216 |
| continue # -> $B65 |
| } |
| } |
| exit_if # if_27 |
| } |
| $B69: { # false |
| %x_239_save:i32 = let %x_227 |
| %218:ptr<function, i32, read_write> = access %tree, %x_239_save, 2u |
| %219:i32 = load %218 |
| %x_240:i32 = let %219 |
| %221:bool = eq %x_240, -1i |
| if %221 [t: $B72, f: $B73] { # if_29 |
| $B72: { # true |
| %222:ptr<function, i32, read_write> = access %tree, %x_239_save, 2u |
| store %222, 6i |
| %223:ptr<function, BST, read_write> = access %tree, 6i |
| store %223, BST(2i, -1i, -1i) |
| store %x_255_phi, true |
| exit_loop # loop_6 |
| } |
| $B73: { # false |
| %224:ptr<function, i32, read_write> = access %tree, %x_239_save, 2u |
| %225:i32 = load %224 |
| store %x_245, %225 |
| %226:i32 = load %x_245 |
| store %x_228_phi, %226 |
| continue # -> $B65 |
| } |
| } |
| exit_if # if_27 |
| } |
| } |
| unreachable |
| } |
| $B65: { # continuing |
| %227:i32 = load %x_228_phi |
| store %x_228, %227 |
| %228:i32 = load %x_228 |
| store %x_227_phi, %228 |
| next_iteration # -> $B64 |
| } |
| } |
| %229:bool = load %x_255_phi |
| %x_255:bool = let %229 |
| if %x_255 [t: $B74] { # if_30 |
| $B74: { # true |
| exit_switch # switch_6 |
| } |
| } |
| exit_switch # switch_6 |
| } |
| } |
| %x_260_phi:ptr<function, i32, read_write> = var |
| %x_288_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B75)] { # switch_7 |
| $B75: { # case |
| store %x_260_phi, 0i |
| loop [b: $B76, c: $B77] { # loop_7 |
| $B76: { # body |
| %x_286:ptr<function, i32, read_write> = var |
| %x_278:ptr<function, i32, read_write> = var |
| %x_261:ptr<function, i32, read_write> = var |
| %x_261_phi:ptr<function, i32, read_write> = var |
| %237:i32 = load %x_260_phi |
| %x_260:i32 = let %237 |
| store %x_288_phi, false |
| %239:bool = lte %x_260, 7i |
| if %239 [t: $B78, f: $B79] { # if_31 |
| $B78: { # true |
| exit_if # if_31 |
| } |
| $B79: { # false |
| exit_loop # loop_7 |
| } |
| } |
| %240:ptr<function, i32, read_write> = access %tree, %x_260, 0u |
| %241:i32 = load %240 |
| %x_267:i32 = let %241 |
| %243:bool = lte 6i, %x_267 |
| if %243 [t: $B80, f: $B81] { # if_32 |
| $B80: { # true |
| %x_280_save:i32 = let %x_260 |
| %245:ptr<function, i32, read_write> = access %tree, %x_280_save, 1u |
| %246:i32 = load %245 |
| %x_281:i32 = let %246 |
| %248:bool = eq %x_281, -1i |
| if %248 [t: $B82, f: $B83] { # if_33 |
| $B82: { # true |
| %249:ptr<function, i32, read_write> = access %tree, %x_280_save, 1u |
| store %249, 7i |
| %250:ptr<function, BST, read_write> = access %tree, 7i |
| store %250, BST(6i, -1i, -1i) |
| store %x_288_phi, true |
| exit_loop # loop_7 |
| } |
| $B83: { # false |
| %251:ptr<function, i32, read_write> = access %tree, %x_280_save, 1u |
| %252:i32 = load %251 |
| store %x_286, %252 |
| %253:i32 = load %x_286 |
| store %x_261_phi, %253 |
| continue # -> $B77 |
| } |
| } |
| exit_if # if_32 |
| } |
| $B81: { # false |
| %x_272_save:i32 = let %x_260 |
| %255:ptr<function, i32, read_write> = access %tree, %x_272_save, 2u |
| %256:i32 = load %255 |
| %x_273:i32 = let %256 |
| %258:bool = eq %x_273, -1i |
| if %258 [t: $B84, f: $B85] { # if_34 |
| $B84: { # true |
| %259:ptr<function, i32, read_write> = access %tree, %x_272_save, 2u |
| store %259, 7i |
| %260:ptr<function, BST, read_write> = access %tree, 7i |
| store %260, BST(6i, -1i, -1i) |
| store %x_288_phi, true |
| exit_loop # loop_7 |
| } |
| $B85: { # false |
| %261:ptr<function, i32, read_write> = access %tree, %x_272_save, 2u |
| %262:i32 = load %261 |
| store %x_278, %262 |
| %263:i32 = load %x_278 |
| store %x_261_phi, %263 |
| continue # -> $B77 |
| } |
| } |
| exit_if # if_32 |
| } |
| } |
| unreachable |
| } |
| $B77: { # continuing |
| %264:i32 = load %x_261_phi |
| store %x_261, %264 |
| %265:i32 = load %x_261 |
| store %x_260_phi, %265 |
| next_iteration # -> $B76 |
| } |
| } |
| %266:bool = load %x_288_phi |
| %x_288:bool = let %266 |
| if %x_288 [t: $B86] { # if_35 |
| $B86: { # true |
| exit_switch # switch_7 |
| } |
| } |
| exit_switch # switch_7 |
| } |
| } |
| %x_293_phi:ptr<function, i32, read_write> = var |
| %x_321_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B87)] { # switch_8 |
| $B87: { # case |
| store %x_293_phi, 0i |
| loop [b: $B88, c: $B89] { # loop_8 |
| $B88: { # body |
| %x_319:ptr<function, i32, read_write> = var |
| %x_311:ptr<function, i32, read_write> = var |
| %x_294:ptr<function, i32, read_write> = var |
| %x_294_phi:ptr<function, i32, read_write> = var |
| %274:i32 = load %x_293_phi |
| %x_293:i32 = let %274 |
| store %x_321_phi, false |
| %276:bool = lte %x_293, 8i |
| if %276 [t: $B90, f: $B91] { # if_36 |
| $B90: { # true |
| exit_if # if_36 |
| } |
| $B91: { # false |
| exit_loop # loop_8 |
| } |
| } |
| %277:ptr<function, i32, read_write> = access %tree, %x_293, 0u |
| %278:i32 = load %277 |
| %x_300:i32 = let %278 |
| %280:bool = lte 17i, %x_300 |
| if %280 [t: $B92, f: $B93] { # if_37 |
| $B92: { # true |
| %x_313_save:i32 = let %x_293 |
| %282:ptr<function, i32, read_write> = access %tree, %x_313_save, 1u |
| %283:i32 = load %282 |
| %x_314:i32 = let %283 |
| %285:bool = eq %x_314, -1i |
| if %285 [t: $B94, f: $B95] { # if_38 |
| $B94: { # true |
| %286:ptr<function, i32, read_write> = access %tree, %x_313_save, 1u |
| store %286, 8i |
| %287:ptr<function, BST, read_write> = access %tree, 8i |
| store %287, BST(17i, -1i, -1i) |
| store %x_321_phi, true |
| exit_loop # loop_8 |
| } |
| $B95: { # false |
| %288:ptr<function, i32, read_write> = access %tree, %x_313_save, 1u |
| %289:i32 = load %288 |
| store %x_319, %289 |
| %290:i32 = load %x_319 |
| store %x_294_phi, %290 |
| continue # -> $B89 |
| } |
| } |
| exit_if # if_37 |
| } |
| $B93: { # false |
| %x_305_save:i32 = let %x_293 |
| %292:ptr<function, i32, read_write> = access %tree, %x_305_save, 2u |
| %293:i32 = load %292 |
| %x_306:i32 = let %293 |
| %295:bool = eq %x_306, -1i |
| if %295 [t: $B96, f: $B97] { # if_39 |
| $B96: { # true |
| %296:ptr<function, i32, read_write> = access %tree, %x_305_save, 2u |
| store %296, 8i |
| %297:ptr<function, BST, read_write> = access %tree, 8i |
| store %297, BST(17i, -1i, -1i) |
| store %x_321_phi, true |
| exit_loop # loop_8 |
| } |
| $B97: { # false |
| %298:ptr<function, i32, read_write> = access %tree, %x_305_save, 2u |
| %299:i32 = load %298 |
| store %x_311, %299 |
| %300:i32 = load %x_311 |
| store %x_294_phi, %300 |
| continue # -> $B89 |
| } |
| } |
| exit_if # if_37 |
| } |
| } |
| unreachable |
| } |
| $B89: { # continuing |
| %301:i32 = load %x_294_phi |
| store %x_294, %301 |
| %302:i32 = load %x_294 |
| store %x_293_phi, %302 |
| next_iteration # -> $B88 |
| } |
| } |
| %303:bool = load %x_321_phi |
| %x_321:bool = let %303 |
| if %x_321 [t: $B98] { # if_40 |
| $B98: { # true |
| exit_switch # switch_8 |
| } |
| } |
| exit_switch # switch_8 |
| } |
| } |
| %x_326_phi:ptr<function, i32, read_write> = var |
| %x_354_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B99)] { # switch_9 |
| $B99: { # case |
| store %x_326_phi, 0i |
| loop [b: $B100, c: $B101] { # loop_9 |
| $B100: { # body |
| %x_352:ptr<function, i32, read_write> = var |
| %x_344:ptr<function, i32, read_write> = var |
| %x_327:ptr<function, i32, read_write> = var |
| %x_327_phi:ptr<function, i32, read_write> = var |
| %311:i32 = load %x_326_phi |
| %x_326:i32 = let %311 |
| store %x_354_phi, false |
| %313:bool = lte %x_326, 9i |
| if %313 [t: $B102, f: $B103] { # if_41 |
| $B102: { # true |
| exit_if # if_41 |
| } |
| $B103: { # false |
| exit_loop # loop_9 |
| } |
| } |
| %314:ptr<function, i32, read_write> = access %tree, %x_326, 0u |
| %315:i32 = load %314 |
| %x_333:i32 = let %315 |
| %317:bool = lte 13i, %x_333 |
| if %317 [t: $B104, f: $B105] { # if_42 |
| $B104: { # true |
| %x_346_save:i32 = let %x_326 |
| %319:ptr<function, i32, read_write> = access %tree, %x_346_save, 1u |
| %320:i32 = load %319 |
| %x_347:i32 = let %320 |
| %322:bool = eq %x_347, -1i |
| if %322 [t: $B106, f: $B107] { # if_43 |
| $B106: { # true |
| %323:ptr<function, i32, read_write> = access %tree, %x_346_save, 1u |
| store %323, 9i |
| %324:ptr<function, BST, read_write> = access %tree, 9i |
| store %324, BST(13i, -1i, -1i) |
| store %x_354_phi, true |
| exit_loop # loop_9 |
| } |
| $B107: { # false |
| %325:ptr<function, i32, read_write> = access %tree, %x_346_save, 1u |
| %326:i32 = load %325 |
| store %x_352, %326 |
| %327:i32 = load %x_352 |
| store %x_327_phi, %327 |
| continue # -> $B101 |
| } |
| } |
| exit_if # if_42 |
| } |
| $B105: { # false |
| %x_338_save:i32 = let %x_326 |
| %329:ptr<function, i32, read_write> = access %tree, %x_338_save, 2u |
| %330:i32 = load %329 |
| %x_339:i32 = let %330 |
| %332:bool = eq %x_339, -1i |
| if %332 [t: $B108, f: $B109] { # if_44 |
| $B108: { # true |
| %333:ptr<function, i32, read_write> = access %tree, %x_338_save, 2u |
| store %333, 9i |
| %334:ptr<function, BST, read_write> = access %tree, 9i |
| store %334, BST(13i, -1i, -1i) |
| store %x_354_phi, true |
| exit_loop # loop_9 |
| } |
| $B109: { # false |
| %335:ptr<function, i32, read_write> = access %tree, %x_338_save, 2u |
| %336:i32 = load %335 |
| store %x_344, %336 |
| %337:i32 = load %x_344 |
| store %x_327_phi, %337 |
| continue # -> $B101 |
| } |
| } |
| exit_if # if_42 |
| } |
| } |
| unreachable |
| } |
| $B101: { # continuing |
| %338:i32 = load %x_327_phi |
| store %x_327, %338 |
| %339:i32 = load %x_327 |
| store %x_326_phi, %339 |
| next_iteration # -> $B100 |
| } |
| } |
| %340:bool = load %x_354_phi |
| %x_354:bool = let %340 |
| if %x_354 [t: $B110] { # if_45 |
| $B110: { # true |
| exit_switch # switch_9 |
| } |
| } |
| exit_switch # switch_9 |
| } |
| } |
| store %x_357_phi, 0i |
| store %x_360_phi, 0i |
| store %x_362_phi, 0i |
| loop [b: $B111, c: $B112] { # loop_10 |
| $B111: { # body |
| %x_392:ptr<function, i32, read_write> = var |
| %x_402:ptr<function, i32, read_write> = var |
| %x_407:ptr<function, i32, read_write> = var |
| %x_363:ptr<function, i32, read_write> = var |
| %x_358_phi:ptr<function, i32, read_write> = var |
| %x_361_phi:ptr<function, i32, read_write> = var |
| %348:i32 = load %x_357_phi |
| %x_357:i32 = let %348 |
| %350:i32 = load %x_360_phi |
| store %x_360, %350 |
| %351:i32 = load %x_362_phi |
| %x_362:i32 = let %351 |
| %x_365:i32 = let -9i |
| %354:bool = lt %x_362, 20i |
| if %354 [t: $B113, f: $B114] { # if_46 |
| $B113: { # true |
| exit_if # if_46 |
| } |
| $B114: { # false |
| exit_loop # loop_10 |
| } |
| } |
| %x_374_phi:ptr<function, i32, read_write> = var |
| %x_392_phi:ptr<function, i32, read_write> = var |
| %x_393_phi:ptr<function, bool, read_write> = var |
| switch 0u [c: (default, $B115)] { # switch_10 |
| $B115: { # case |
| store %x_374_phi, 0i |
| loop [b: $B116, c: $B117] { # loop_11 |
| $B116: { # body |
| %358:i32 = load %x_374_phi |
| %x_374:i32 = let %358 |
| store %x_392_phi, %x_357 |
| store %x_393_phi, false |
| %360:bool = neq %x_374, -1i |
| if %360 [t: $B118, f: $B119] { # if_47 |
| $B118: { # true |
| exit_if # if_47 |
| } |
| $B119: { # false |
| exit_loop # loop_11 |
| } |
| } |
| %361:ptr<function, BST, read_write> = access %tree, %x_374 |
| %362:BST = load %361 |
| %x_381:BST = let %362 |
| %364:i32 = access %x_381, 0u |
| %x_382:i32 = let %364 |
| %366:i32 = access %x_381, 1u |
| %x_383:i32 = let %366 |
| %368:i32 = access %x_381, 2u |
| %x_385:i32 = let %368 |
| %370:bool = eq %x_382, %x_362 |
| if %370 [t: $B120] { # if_48 |
| $B120: { # true |
| store %x_392_phi, %x_362 |
| store %x_393_phi, true |
| exit_loop # loop_11 |
| } |
| } |
| %371:f32 = load_vector_element %x_GLF_color, 3u |
| %x_389:f32 = let %371 |
| continue # -> $B117 |
| } |
| $B117: { # continuing |
| %373:bool = lte %x_362, %x_382 |
| %374:bool = eq %373, false |
| %375:i32 = select %x_383, %x_385, %374 |
| store %x_374_phi, %375 |
| next_iteration # -> $B116 |
| } |
| } |
| %376:i32 = load %x_392_phi |
| store %x_392, %376 |
| %377:bool = load %x_393_phi |
| %x_393:bool = let %377 |
| %379:i32 = load %x_392 |
| store %x_358_phi, %379 |
| if %x_393 [t: $B121] { # if_49 |
| $B121: { # true |
| exit_switch # switch_10 |
| } |
| } |
| store %x_358_phi, -1i |
| exit_switch # switch_10 |
| } |
| } |
| %x_358:ptr<function, i32, read_write> = var |
| %x_401:ptr<function, i32, read_write> = var |
| %x_406:ptr<function, i32, read_write> = var |
| %x_402_phi:ptr<function, i32, read_write> = var |
| %x_407_phi:ptr<function, i32, read_write> = var |
| %385:i32 = load %x_358_phi |
| store %x_358, %385 |
| switch %x_362 [c: (2i 5i 6i 7i 8i 9i 12i 13i 15i 17i, $B122), c: (default, $B123)] { # switch_11 |
| $B122: { # case |
| %386:i32 = load %x_360 |
| store %x_402_phi, %386 |
| %387:i32 = load %x_358 |
| %388:i32 = let %387 |
| %389:i32 = bitcast %x_362 |
| %390:bool = eq %388, %389 |
| if %390 [t: $B124] { # if_50 |
| $B124: { # true |
| %391:i32 = load %x_360 |
| %392:i32 = add %391, 1i |
| %393:i32 = bitcast %392 |
| store %x_401, %393 |
| %394:i32 = load %x_401 |
| store %x_402_phi, %394 |
| exit_if # if_50 |
| } |
| } |
| %395:i32 = load %x_402_phi |
| store %x_402, %395 |
| %396:i32 = load %x_402 |
| store %x_361_phi, %396 |
| exit_switch # switch_11 |
| } |
| $B123: { # case |
| %397:i32 = load %x_360 |
| store %x_407_phi, %397 |
| %398:i32 = load %x_358 |
| %399:bool = eq %398, -1i |
| if %399 [t: $B125] { # if_51 |
| $B125: { # true |
| %400:i32 = load %x_360 |
| %401:i32 = add %400, 1i |
| %402:i32 = bitcast %401 |
| store %x_406, %402 |
| %403:i32 = load %x_406 |
| store %x_407_phi, %403 |
| exit_if # if_51 |
| } |
| } |
| %404:i32 = load %x_407_phi |
| store %x_407, %404 |
| %405:i32 = load %x_407 |
| store %x_361_phi, %405 |
| exit_switch # switch_11 |
| } |
| } |
| %406:i32 = load %x_361_phi |
| %x_361:i32 = let %406 |
| continue # -> $B112 |
| } |
| $B112: { # continuing |
| %408:i32 = add %x_362, 1i |
| store %x_363, %408 |
| %409:i32 = load %x_358 |
| store %x_357_phi, %409 |
| store %x_360_phi, %x_361 |
| %410:i32 = load %x_363 |
| store %x_362_phi, %410 |
| next_iteration # -> $B111 |
| } |
| } |
| %411:i32 = load %x_360 |
| %412:bool = eq %411, 20i |
| if %412 [t: $B126, f: $B127] { # if_52 |
| $B126: { # true |
| store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f) |
| exit_if # if_52 |
| } |
| $B127: { # false |
| store %x_GLF_color, vec4<f32>(0.0f, 0.0f, 1.0f, 1.0f) |
| exit_if # if_52 |
| } |
| } |
| ret |
| } |
| } |
| %tint_symbol = @fragment func():main_out { |
| $B128: { |
| %414:void = call %main_1 |
| %415:vec4<f32> = load %x_GLF_color |
| %416:main_out = construct %415 |
| ret %416 |
| } |
| } |
| |
| invalid entry point IO struct uses |
| ******************************************************************** |
| * The tint shader compiler has encountered an unexpected error. * |
| * * |
| * Please help us fix this issue by submitting a bug report at * |
| * crbug.com/tint with the source program that triggered the bug. * |
| ******************************************************************** |