| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: QuicksortObject = struct @align(4) { |
| numbers:array<i32, 10> @offset(0) |
| } |
| |
| buf0 = struct @align(8) { |
| resolution:vec2<f32> @offset(0) |
| } |
| |
| main_out = struct @align(16) { |
| x_GLF_color_1:vec4<f32> @offset(0), @location(0) |
| } |
| |
| $B1: { # root |
| %obj:ptr<private, QuicksortObject, read_write> = var |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| %x_30:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| } |
| |
| %swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>):void { |
| $B2: { |
| %temp:ptr<function, i32, read_write> = var |
| %8:i32 = load %i |
| %x_92:i32 = let %8 |
| %10:ptr<private, i32, read_write> = access %obj, 0u, %x_92 |
| %11:i32 = load %10 |
| %x_94:i32 = let %11 |
| store %temp, %x_94 |
| %13:i32 = load %i |
| %x_95:i32 = let %13 |
| %15:i32 = load %j |
| %x_96:i32 = let %15 |
| %17:ptr<private, i32, read_write> = access %obj, 0u, %x_96 |
| %18:i32 = load %17 |
| %x_98:i32 = let %18 |
| %20:ptr<private, i32, read_write> = access %obj, 0u, %x_95 |
| store %20, %x_98 |
| %21:i32 = load %j |
| %x_100:i32 = let %21 |
| %23:i32 = load %temp |
| %x_101:i32 = let %23 |
| %25:ptr<private, i32, read_write> = access %obj, 0u, %x_100 |
| store %25, %x_101 |
| ret |
| } |
| } |
| %performPartition_i1_i1_ = func(%l:ptr<function, i32, read_write>, %h:ptr<function, i32, read_write>):i32 { |
| $B3: { |
| %pivot:ptr<function, i32, read_write> = var |
| %i_1:ptr<function, i32, read_write> = var |
| %j_1:ptr<function, i32, read_write> = var |
| %param:ptr<function, i32, read_write> = var |
| %param_1:ptr<function, i32, read_write> = var |
| %param_2:ptr<function, i32, read_write> = var |
| %param_3:ptr<function, i32, read_write> = var |
| %36:i32 = load %h |
| %x_104:i32 = let %36 |
| %38:ptr<private, i32, read_write> = access %obj, 0u, %x_104 |
| %39:i32 = load %38 |
| %x_106:i32 = let %39 |
| store %pivot, %x_106 |
| %41:i32 = load %l |
| %x_107:i32 = let %41 |
| %43:i32 = sub %x_107, 1i |
| store %i_1, %43 |
| %44:i32 = load %l |
| %x_109:i32 = let %44 |
| store %j_1, %x_109 |
| loop [b: $B4, c: $B5] { # loop_1 |
| $B4: { # body |
| %46:i32 = load %j_1 |
| %x_114:i32 = let %46 |
| %48:i32 = load %h |
| %x_115:i32 = let %48 |
| %50:i32 = sub %x_115, 1i |
| %51:bool = lte %x_114, %50 |
| if %51 [t: $B6, f: $B7] { # if_1 |
| $B6: { # true |
| exit_if # if_1 |
| } |
| $B7: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %52:i32 = load %j_1 |
| %x_119:i32 = let %52 |
| %54:ptr<private, i32, read_write> = access %obj, 0u, %x_119 |
| %55:i32 = load %54 |
| %x_121:i32 = let %55 |
| %57:i32 = load %pivot |
| %x_122:i32 = let %57 |
| %59:bool = lte %x_121, %x_122 |
| if %59 [t: $B8] { # if_2 |
| $B8: { # true |
| %60:i32 = load %i_1 |
| %x_126:i32 = let %60 |
| %62:i32 = add %x_126, 1i |
| store %i_1, %62 |
| %63:i32 = load %i_1 |
| %x_128:i32 = let %63 |
| store %param, %x_128 |
| %65:i32 = load %j_1 |
| %x_129:i32 = let %65 |
| store %param_1, %x_129 |
| %67:void = call %swap_i1_i1_, %param, %param_1 |
| exit_if # if_2 |
| } |
| } |
| continue # -> $B5 |
| } |
| $B5: { # continuing |
| %68:i32 = load %j_1 |
| %x_131:i32 = let %68 |
| %70:i32 = add %x_131, 1i |
| store %j_1, %70 |
| next_iteration # -> $B4 |
| } |
| } |
| %71:i32 = load %i_1 |
| %x_133:i32 = let %71 |
| %73:i32 = add %x_133, 1i |
| store %param_2, %73 |
| %74:i32 = load %h |
| %x_135:i32 = let %74 |
| store %param_3, %x_135 |
| %76:void = call %swap_i1_i1_, %param_2, %param_3 |
| %77:i32 = load %i_1 |
| %x_137:i32 = let %77 |
| %79:i32 = add %x_137, 1i |
| ret %79 |
| } |
| } |
| %quicksort_ = func():void { |
| $B9: { |
| %l_1:ptr<function, i32, read_write> = var |
| %h_1:ptr<function, i32, read_write> = var |
| %top:ptr<function, i32, read_write> = var |
| %stack:ptr<function, array<i32, 10>, read_write> = var |
| %p:ptr<function, i32, read_write> = var |
| %param_4:ptr<function, i32, read_write> = var |
| %param_5:ptr<function, i32, read_write> = var |
| store %l_1, 0i |
| store %h_1, 9i |
| store %top, -1i |
| %88:i32 = load %top |
| %x_140:i32 = let %88 |
| %90:i32 = add %x_140, 1i |
| %x_141:i32 = let %90 |
| store %top, %x_141 |
| %92:i32 = load %l_1 |
| %x_142:i32 = let %92 |
| %94:ptr<function, i32, read_write> = access %stack, %x_141 |
| store %94, %x_142 |
| %95:i32 = load %top |
| %x_144:i32 = let %95 |
| %97:i32 = add %x_144, 1i |
| %x_145:i32 = let %97 |
| store %top, %x_145 |
| %99:i32 = load %h_1 |
| %x_146:i32 = let %99 |
| %101:ptr<function, i32, read_write> = access %stack, %x_145 |
| store %101, %x_146 |
| loop [b: $B10, c: $B11] { # loop_2 |
| $B10: { # body |
| %102:i32 = load %top |
| %x_152:i32 = let %102 |
| %104:bool = gte %x_152, 0i |
| if %104 [t: $B12, f: $B13] { # if_3 |
| $B12: { # true |
| exit_if # if_3 |
| } |
| $B13: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %105:i32 = load %top |
| %x_155:i32 = let %105 |
| %107:i32 = sub %x_155, 1i |
| store %top, %107 |
| %108:ptr<function, i32, read_write> = access %stack, %x_155 |
| %109:i32 = load %108 |
| %x_158:i32 = let %109 |
| store %h_1, %x_158 |
| %111:i32 = load %top |
| %x_159:i32 = let %111 |
| %113:i32 = sub %x_159, 1i |
| store %top, %113 |
| %114:ptr<function, i32, read_write> = access %stack, %x_159 |
| %115:i32 = load %114 |
| %x_162:i32 = let %115 |
| store %l_1, %x_162 |
| %117:i32 = load %l_1 |
| %x_163:i32 = let %117 |
| store %param_4, %x_163 |
| %119:i32 = load %h_1 |
| %x_164:i32 = let %119 |
| store %param_5, %x_164 |
| %121:i32 = call %performPartition_i1_i1_, %param_4, %param_5 |
| %x_165:i32 = let %121 |
| store %p, %x_165 |
| %123:i32 = load %p |
| %x_166:i32 = let %123 |
| %125:i32 = load %l_1 |
| %x_168:i32 = let %125 |
| %127:i32 = sub %x_166, 1i |
| %128:bool = gt %127, %x_168 |
| if %128 [t: $B14] { # if_4 |
| $B14: { # true |
| %129:i32 = load %top |
| %x_172:i32 = let %129 |
| %131:i32 = add %x_172, 1i |
| %x_173:i32 = let %131 |
| store %top, %x_173 |
| %133:i32 = load %l_1 |
| %x_174:i32 = let %133 |
| %135:ptr<function, i32, read_write> = access %stack, %x_173 |
| store %135, %x_174 |
| %136:i32 = load %top |
| %x_176:i32 = let %136 |
| %138:i32 = add %x_176, 1i |
| %x_177:i32 = let %138 |
| store %top, %x_177 |
| %140:i32 = load %p |
| %x_178:i32 = let %140 |
| %142:ptr<function, i32, read_write> = access %stack, %x_177 |
| %143:i32 = sub %x_178, 1i |
| store %142, %143 |
| exit_if # if_4 |
| } |
| } |
| %144:i32 = load %p |
| %x_181:i32 = let %144 |
| %146:i32 = load %h_1 |
| %x_183:i32 = let %146 |
| %148:i32 = add %x_181, 1i |
| %149:bool = lt %148, %x_183 |
| if %149 [t: $B15] { # if_5 |
| $B15: { # true |
| %150:i32 = load %top |
| %x_187:i32 = let %150 |
| %152:i32 = add %x_187, 1i |
| %x_188:i32 = let %152 |
| store %top, %x_188 |
| %154:i32 = load %p |
| %x_189:i32 = let %154 |
| %156:ptr<function, i32, read_write> = access %stack, %x_188 |
| %157:i32 = add %x_189, 1i |
| store %156, %157 |
| %158:i32 = load %top |
| %x_192:i32 = let %158 |
| %160:i32 = add %x_192, 1i |
| %x_193:i32 = let %160 |
| store %top, %x_193 |
| %162:i32 = load %h_1 |
| %x_194:i32 = let %162 |
| %164:ptr<function, i32, read_write> = access %stack, %x_193 |
| store %164, %x_194 |
| exit_if # if_5 |
| } |
| } |
| continue # -> $B11 |
| } |
| $B11: { # continuing |
| next_iteration # -> $B10 |
| } |
| } |
| ret |
| } |
| } |
| %main_1 = func():void { |
| $B16: { |
| %i_2:ptr<function, i32, read_write> = var |
| store %i_2, 0i |
| loop [b: $B17, c: $B18] { # loop_3 |
| $B17: { # body |
| %167:i32 = load %i_2 |
| %x_64:i32 = let %167 |
| %169:bool = lt %x_64, 10i |
| if %169 [t: $B19, f: $B20] { # if_6 |
| $B19: { # true |
| exit_if # if_6 |
| } |
| $B20: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %170:i32 = load %i_2 |
| %x_67:i32 = let %170 |
| %172:i32 = load %i_2 |
| %x_68:i32 = let %172 |
| %174:ptr<private, i32, read_write> = access %obj, 0u, %x_67 |
| %175:i32 = sub 10i, %x_68 |
| store %174, %175 |
| %176:i32 = load %i_2 |
| %x_71:i32 = let %176 |
| %178:i32 = load %i_2 |
| %x_72:i32 = let %178 |
| %180:ptr<private, i32, read_write> = access %obj, 0u, %x_72 |
| %181:i32 = load %180 |
| %x_74:i32 = let %181 |
| %183:i32 = load %i_2 |
| %x_75:i32 = let %183 |
| %185:ptr<private, i32, read_write> = access %obj, 0u, %x_75 |
| %186:i32 = load %185 |
| %x_77:i32 = let %186 |
| %188:ptr<private, i32, read_write> = access %obj, 0u, %x_71 |
| %189:i32 = mul %x_74, %x_77 |
| store %188, %189 |
| continue # -> $B18 |
| } |
| $B18: { # continuing |
| %190:i32 = load %i_2 |
| %x_80:i32 = let %190 |
| %192:i32 = add %x_80, 1i |
| store %i_2, %192 |
| next_iteration # -> $B17 |
| } |
| } |
| %193:void = call %quicksort_ |
| %194:ptr<private, i32, read_write> = access %obj, 0u, 0i |
| %195:i32 = load %194 |
| %x_84:i32 = let %195 |
| %197:ptr<private, i32, read_write> = access %obj, 0u, 4i |
| %198:i32 = load %197 |
| %x_86:i32 = let %198 |
| %200:bool = lt %x_84, %x_86 |
| if %200 [t: $B21, f: $B22] { # if_7 |
| $B21: { # true |
| store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f) |
| exit_if # if_7 |
| } |
| $B22: { # false |
| store %x_GLF_color, vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f) |
| exit_if # if_7 |
| } |
| } |
| ret |
| } |
| } |
| %tint_symbol = @fragment func():main_out { |
| $B23: { |
| %202:void = call %main_1 |
| %203:vec4<f32> = load %x_GLF_color |
| %204:main_out = construct %203 |
| ret %204 |
| } |
| } |
| |
| unhandled variable address space |
| ******************************************************************** |
| * 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. * |
| ******************************************************************** |