| 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 |
| %tree_1:ptr<private, array<BST, 10>, read_write> = var |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %makeTreeNode_struct_BST_i1_i1_i11_i1_ = func(%tree:ptr<function, BST, read_write>, %data:ptr<function, i32, read_write>):void { |
| $B2: { |
| %6:i32 = load %data |
| %x_158:i32 = let %6 |
| %8:ptr<function, i32, read_write> = access %tree, 0u |
| store %8, %x_158 |
| %9:ptr<function, i32, read_write> = access %tree, 1u |
| store %9, -1i |
| %10:ptr<function, i32, read_write> = access %tree, 2u |
| store %10, -1i |
| ret |
| } |
| } |
| %insert_i1_i1_ = func(%treeIndex:ptr<function, i32, read_write>, %data_1:ptr<function, i32, read_write>):void { |
| $B3: { |
| %baseIndex:ptr<function, i32, read_write> = var |
| %param:ptr<function, BST, read_write> = var |
| %param_1:ptr<function, i32, read_write> = var |
| %param_2:ptr<function, BST, read_write> = var |
| %param_3:ptr<function, i32, read_write> = var |
| store %baseIndex, 0i |
| loop [b: $B4, c: $B5] { # loop_1 |
| $B4: { # body |
| %19:i32 = load %baseIndex |
| %x_167:i32 = let %19 |
| %21:i32 = load %treeIndex |
| %x_168:i32 = let %21 |
| %23:bool = lte %x_167, %x_168 |
| if %23 [t: $B6, f: $B7] { # if_1 |
| $B6: { # true |
| exit_if # if_1 |
| } |
| $B7: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %24:i32 = load %data_1 |
| %x_171:i32 = let %24 |
| %26:i32 = load %baseIndex |
| %x_172:i32 = let %26 |
| %28:ptr<private, i32, read_write> = access %tree_1, %x_172, 0u |
| %29:i32 = load %28 |
| %x_174:i32 = let %29 |
| %31:bool = lte %x_171, %x_174 |
| if %31 [t: $B8, f: $B9] { # if_2 |
| $B8: { # true |
| %32:i32 = load %baseIndex |
| %x_179:i32 = let %32 |
| %34:ptr<private, i32, read_write> = access %tree_1, %x_179, 1u |
| %35:i32 = load %34 |
| %x_181:i32 = let %35 |
| %37:bool = eq %x_181, -1i |
| if %37 [t: $B10, f: $B11] { # if_3 |
| $B10: { # true |
| %38:i32 = load %baseIndex |
| %x_186:i32 = let %38 |
| %40:i32 = load %treeIndex |
| %x_187:i32 = let %40 |
| %42:ptr<private, i32, read_write> = access %tree_1, %x_186, 1u |
| store %42, %x_187 |
| %43:i32 = load %treeIndex |
| %x_189:i32 = let %43 |
| %45:ptr<private, BST, read_write> = access %tree_1, %x_189 |
| %46:BST = load %45 |
| %x_191:BST = let %46 |
| store %param, %x_191 |
| %48:i32 = load %data_1 |
| %x_192:i32 = let %48 |
| store %param_1, %x_192 |
| %50:void = call %makeTreeNode_struct_BST_i1_i1_i11_i1_, %param, %param_1 |
| %51:BST = load %param |
| %x_194:BST = let %51 |
| %53:ptr<private, BST, read_write> = access %tree_1, %x_189 |
| store %53, %x_194 |
| ret |
| } |
| $B11: { # false |
| %54:i32 = load %baseIndex |
| %x_196:i32 = let %54 |
| %56:ptr<private, i32, read_write> = access %tree_1, %x_196, 1u |
| %57:i32 = load %56 |
| %x_198:i32 = let %57 |
| store %baseIndex, %x_198 |
| continue # -> $B5 |
| } |
| } |
| exit_if # if_2 |
| } |
| $B9: { # false |
| %59:i32 = load %baseIndex |
| %x_199:i32 = let %59 |
| %61:ptr<private, i32, read_write> = access %tree_1, %x_199, 2u |
| %62:i32 = load %61 |
| %x_201:i32 = let %62 |
| %64:bool = eq %x_201, -1i |
| if %64 [t: $B12, f: $B13] { # if_4 |
| $B12: { # true |
| %65:i32 = load %baseIndex |
| %x_206:i32 = let %65 |
| %67:i32 = load %treeIndex |
| %x_207:i32 = let %67 |
| %69:ptr<private, i32, read_write> = access %tree_1, %x_206, 2u |
| store %69, %x_207 |
| %70:i32 = load %treeIndex |
| %x_209:i32 = let %70 |
| %72:ptr<private, BST, read_write> = access %tree_1, %x_209 |
| %73:BST = load %72 |
| %x_211:BST = let %73 |
| store %param_2, %x_211 |
| %75:i32 = load %data_1 |
| %x_212:i32 = let %75 |
| store %param_3, %x_212 |
| %77:void = call %makeTreeNode_struct_BST_i1_i1_i11_i1_, %param_2, %param_3 |
| %78:BST = load %param_2 |
| %x_214:BST = let %78 |
| %80:ptr<private, BST, read_write> = access %tree_1, %x_209 |
| store %80, %x_214 |
| ret |
| } |
| $B13: { # false |
| %81:i32 = load %baseIndex |
| %x_216:i32 = let %81 |
| %83:ptr<private, i32, read_write> = access %tree_1, %x_216, 2u |
| %84:i32 = load %83 |
| %x_218:i32 = let %84 |
| store %baseIndex, %x_218 |
| continue # -> $B5 |
| } |
| } |
| exit_if # if_2 |
| } |
| } |
| unreachable |
| } |
| $B5: { # continuing |
| next_iteration # -> $B4 |
| } |
| } |
| ret |
| } |
| } |
| %search_i1_ = func(%t:ptr<function, i32, read_write>):i32 { |
| $B14: { |
| %index:ptr<function, i32, read_write> = var |
| %currentNode:ptr<function, BST, read_write> = var |
| %x_220:ptr<function, i32, read_write> = var |
| store %index, 0i |
| loop [b: $B15, c: $B16] { # loop_2 |
| $B15: { # body |
| %91:i32 = load %index |
| %x_225:i32 = let %91 |
| %93:bool = neq %x_225, -1i |
| if %93 [t: $B17, f: $B18] { # if_5 |
| $B17: { # true |
| exit_if # if_5 |
| } |
| $B18: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %94:i32 = load %index |
| %x_228:i32 = let %94 |
| %96:ptr<private, BST, read_write> = access %tree_1, %x_228 |
| %97:BST = load %96 |
| %x_230:BST = let %97 |
| store %currentNode, %x_230 |
| %99:ptr<function, i32, read_write> = access %currentNode, 0u |
| %100:i32 = load %99 |
| %x_232:i32 = let %100 |
| %102:i32 = load %t |
| %x_233:i32 = let %102 |
| %104:bool = eq %x_232, %x_233 |
| if %104 [t: $B19] { # if_6 |
| $B19: { # true |
| %105:i32 = load %t |
| %x_237:i32 = let %105 |
| ret %x_237 |
| } |
| } |
| %107:i32 = load %t |
| %x_238:i32 = let %107 |
| %109:ptr<function, i32, read_write> = access %currentNode, 0u |
| %110:i32 = load %109 |
| %x_240:i32 = let %110 |
| %112:bool = gt %x_238, %x_240 |
| if %112 [t: $B20, f: $B21] { # if_7 |
| $B20: { # true |
| %113:ptr<function, i32, read_write> = access %currentNode, 2u |
| %114:i32 = load %113 |
| %x_246:i32 = let %114 |
| store %x_220, %x_246 |
| exit_if # if_7 |
| } |
| $B21: { # false |
| %116:ptr<function, i32, read_write> = access %currentNode, 1u |
| %117:i32 = load %116 |
| %x_248:i32 = let %117 |
| store %x_220, %x_248 |
| exit_if # if_7 |
| } |
| } |
| %119:i32 = load %x_220 |
| %x_249:i32 = let %119 |
| store %index, %x_249 |
| continue # -> $B16 |
| } |
| $B16: { # continuing |
| next_iteration # -> $B15 |
| } |
| } |
| ret -1i |
| } |
| } |
| %main_1 = func():void { |
| $B22: { |
| %treeIndex_1:ptr<function, i32, read_write> = var |
| %param_4:ptr<function, BST, read_write> = var |
| %param_5:ptr<function, i32, read_write> = var |
| %param_6:ptr<function, i32, read_write> = var |
| %param_7:ptr<function, i32, read_write> = var |
| %param_8:ptr<function, i32, read_write> = var |
| %param_9:ptr<function, i32, read_write> = var |
| %param_10:ptr<function, i32, read_write> = var |
| %param_11:ptr<function, i32, read_write> = var |
| %param_12:ptr<function, i32, read_write> = var |
| %param_13:ptr<function, i32, read_write> = var |
| %param_14:ptr<function, i32, read_write> = var |
| %param_15:ptr<function, i32, read_write> = var |
| %param_16:ptr<function, i32, read_write> = var |
| %param_17:ptr<function, i32, read_write> = var |
| %param_18:ptr<function, i32, read_write> = var |
| %param_19:ptr<function, i32, read_write> = var |
| %param_20:ptr<function, i32, read_write> = var |
| %param_21:ptr<function, i32, read_write> = var |
| %param_22:ptr<function, i32, read_write> = var |
| %param_23:ptr<function, i32, read_write> = var |
| %count:ptr<function, i32, read_write> = var |
| %i:ptr<function, i32, read_write> = var |
| %result:ptr<function, i32, read_write> = var |
| %param_24:ptr<function, i32, read_write> = var |
| store %treeIndex_1, 0i |
| %147:ptr<private, BST, read_write> = access %tree_1, 0i |
| %148:BST = load %147 |
| %x_84:BST = let %148 |
| store %param_4, %x_84 |
| store %param_5, 9i |
| %150:void = call %makeTreeNode_struct_BST_i1_i1_i11_i1_, %param_4, %param_5 |
| %151:BST = load %param_4 |
| %x_86:BST = let %151 |
| %153:ptr<private, BST, read_write> = access %tree_1, 0i |
| store %153, %x_86 |
| %154:i32 = load %treeIndex_1 |
| %x_88:i32 = let %154 |
| %156:i32 = add %x_88, 1i |
| store %treeIndex_1, %156 |
| %157:i32 = load %treeIndex_1 |
| %x_90:i32 = let %157 |
| store %param_6, %x_90 |
| store %param_7, 5i |
| %159:void = call %insert_i1_i1_, %param_6, %param_7 |
| %160:i32 = load %treeIndex_1 |
| %x_92:i32 = let %160 |
| %162:i32 = add %x_92, 1i |
| store %treeIndex_1, %162 |
| %163:i32 = load %treeIndex_1 |
| %x_94:i32 = let %163 |
| store %param_8, %x_94 |
| store %param_9, 12i |
| %165:void = call %insert_i1_i1_, %param_8, %param_9 |
| %166:i32 = load %treeIndex_1 |
| %x_96:i32 = let %166 |
| %168:i32 = add %x_96, 1i |
| store %treeIndex_1, %168 |
| %169:i32 = load %treeIndex_1 |
| %x_98:i32 = let %169 |
| store %param_10, %x_98 |
| store %param_11, 15i |
| %171:void = call %insert_i1_i1_, %param_10, %param_11 |
| %172:i32 = load %treeIndex_1 |
| %x_100:i32 = let %172 |
| %174:i32 = add %x_100, 1i |
| store %treeIndex_1, %174 |
| %175:i32 = load %treeIndex_1 |
| %x_102:i32 = let %175 |
| store %param_12, %x_102 |
| store %param_13, 7i |
| %177:void = call %insert_i1_i1_, %param_12, %param_13 |
| %178:i32 = load %treeIndex_1 |
| %x_104:i32 = let %178 |
| %180:i32 = add %x_104, 1i |
| store %treeIndex_1, %180 |
| %181:i32 = load %treeIndex_1 |
| %x_106:i32 = let %181 |
| store %param_14, %x_106 |
| store %param_15, 8i |
| %183:void = call %insert_i1_i1_, %param_14, %param_15 |
| %184:i32 = load %treeIndex_1 |
| %x_108:i32 = let %184 |
| %186:i32 = add %x_108, 1i |
| store %treeIndex_1, %186 |
| %187:i32 = load %treeIndex_1 |
| %x_110:i32 = let %187 |
| store %param_16, %x_110 |
| store %param_17, 2i |
| %189:void = call %insert_i1_i1_, %param_16, %param_17 |
| %190:i32 = load %treeIndex_1 |
| %x_112:i32 = let %190 |
| %192:i32 = add %x_112, 1i |
| store %treeIndex_1, %192 |
| %193:i32 = load %treeIndex_1 |
| %x_114:i32 = let %193 |
| store %param_18, %x_114 |
| store %param_19, 6i |
| %195:void = call %insert_i1_i1_, %param_18, %param_19 |
| %196:i32 = load %treeIndex_1 |
| %x_116:i32 = let %196 |
| %198:i32 = add %x_116, 1i |
| store %treeIndex_1, %198 |
| %199:i32 = load %treeIndex_1 |
| %x_118:i32 = let %199 |
| store %param_20, %x_118 |
| store %param_21, 17i |
| %201:void = call %insert_i1_i1_, %param_20, %param_21 |
| %202:i32 = load %treeIndex_1 |
| %x_120:i32 = let %202 |
| %204:i32 = add %x_120, 1i |
| store %treeIndex_1, %204 |
| %205:i32 = load %treeIndex_1 |
| %x_122:i32 = let %205 |
| store %param_22, %x_122 |
| store %param_23, 13i |
| %207:void = call %insert_i1_i1_, %param_22, %param_23 |
| store %count, 0i |
| store %i, 0i |
| loop [b: $B23, c: $B24] { # loop_3 |
| $B23: { # body |
| %208:i32 = load %i |
| %x_128:i32 = let %208 |
| %210:bool = lt %x_128, 20i |
| if %210 [t: $B25, f: $B26] { # if_8 |
| $B25: { # true |
| exit_if # if_8 |
| } |
| $B26: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %211:i32 = load %i |
| %x_131:i32 = let %211 |
| store %param_24, %x_131 |
| %213:i32 = call %search_i1_, %param_24 |
| %x_132:i32 = let %213 |
| store %result, %x_132 |
| %215:i32 = load %i |
| %x_133:i32 = let %215 |
| switch %x_133 [c: (2i 5i 6i 7i 8i 9i 12i 13i 15i 17i, $B27), c: (default, $B28)] { # switch_1 |
| $B27: { # case |
| %217:i32 = load %result |
| %x_143:i32 = let %217 |
| %219:i32 = load %i |
| %x_144:i32 = let %219 |
| %221:bool = eq %x_143, %x_144 |
| if %221 [t: $B29] { # if_9 |
| $B29: { # true |
| %222:i32 = load %count |
| %x_148:i32 = let %222 |
| %224:i32 = add %x_148, 1i |
| store %count, %224 |
| exit_if # if_9 |
| } |
| } |
| exit_switch # switch_1 |
| } |
| $B28: { # case |
| %225:i32 = load %result |
| %x_137:i32 = let %225 |
| %227:bool = eq %x_137, -1i |
| if %227 [t: $B30] { # if_10 |
| $B30: { # true |
| %228:i32 = load %count |
| %x_141:i32 = let %228 |
| %230:i32 = add %x_141, 1i |
| store %count, %230 |
| exit_if # if_10 |
| } |
| } |
| exit_switch # switch_1 |
| } |
| } |
| continue # -> $B24 |
| } |
| $B24: { # continuing |
| %231:i32 = load %i |
| %x_150:i32 = let %231 |
| %233:i32 = add %x_150, 1i |
| store %i, %233 |
| next_iteration # -> $B23 |
| } |
| } |
| %234:i32 = load %count |
| %x_152:i32 = let %234 |
| %236:bool = eq %x_152, 20i |
| if %236 [t: $B31, f: $B32] { # if_11 |
| $B31: { # true |
| store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f) |
| exit_if # if_11 |
| } |
| $B32: { # false |
| store %x_GLF_color, vec4<f32>(0.0f, 0.0f, 1.0f, 1.0f) |
| exit_if # if_11 |
| } |
| } |
| ret |
| } |
| } |
| %tint_symbol = @fragment func():main_out { |
| $B33: { |
| %238:void = call %main_1 |
| %239:vec4<f32> = load %x_GLF_color |
| %240:main_out = construct %239 |
| ret %240 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |