| 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 |
| %9:ptr<private, i32, read_write> = access %obj, 0u, %8 |
| %10:i32 = load %9 |
| store %temp, %10 |
| %11:i32 = load %i |
| %x_95:i32 = let %11 |
| %13:ptr<private, i32, read_write> = access %obj, 0u, %x_95 |
| %14:i32 = load %j |
| %15:ptr<private, i32, read_write> = access %obj, 0u, %14 |
| %16:i32 = load %15 |
| store %13, %16 |
| %17:i32 = load %j |
| %x_100:i32 = let %17 |
| %19:ptr<private, i32, read_write> = access %obj, 0u, %x_100 |
| %20:i32 = load %temp |
| store %19, %20 |
| 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 |
| %31:i32 = load %h |
| %32:ptr<private, i32, read_write> = access %obj, 0u, %31 |
| %33:i32 = load %32 |
| store %pivot, %33 |
| %34:i32 = load %l |
| %35:i32 = sub %34, 1i |
| store %i_1, %35 |
| %36:i32 = load %l |
| store %j_1, %36 |
| loop [b: $B4, c: $B5] { # loop_1 |
| $B4: { # body |
| %37:i32 = load %j_1 |
| %38:i32 = load %h |
| %39:i32 = sub %38, 1i |
| %40:bool = lte %37, %39 |
| if %40 [t: $B6, f: $B7] { # if_1 |
| $B6: { # true |
| exit_if # if_1 |
| } |
| $B7: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %41:i32 = load %j_1 |
| %42:ptr<private, i32, read_write> = access %obj, 0u, %41 |
| %43:i32 = load %42 |
| %44:i32 = load %pivot |
| %45:bool = lte %43, %44 |
| if %45 [t: $B8] { # if_2 |
| $B8: { # true |
| %46:i32 = load %i_1 |
| %47:i32 = add %46, 1i |
| store %i_1, %47 |
| %48:i32 = load %i_1 |
| store %param, %48 |
| %49:i32 = load %j_1 |
| store %param_1, %49 |
| %50:void = call %swap_i1_i1_, %param, %param_1 |
| exit_if # if_2 |
| } |
| } |
| continue # -> $B5 |
| } |
| $B5: { # continuing |
| %51:i32 = load %j_1 |
| %52:i32 = add %51, 1i |
| store %j_1, %52 |
| next_iteration # -> $B4 |
| } |
| } |
| %53:i32 = load %i_1 |
| %54:i32 = add %53, 1i |
| store %param_2, %54 |
| %55:i32 = load %h |
| store %param_3, %55 |
| %56:void = call %swap_i1_i1_, %param_2, %param_3 |
| %57:i32 = load %i_1 |
| %x_137:i32 = let %57 |
| %59:i32 = add %x_137, 1i |
| ret %59 |
| } |
| } |
| %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 |
| %68:i32 = load %top |
| %69:i32 = add %68, 1i |
| %x_141:i32 = let %69 |
| store %top, %x_141 |
| %71:ptr<function, i32, read_write> = access %stack, %x_141 |
| %72:i32 = load %l_1 |
| store %71, %72 |
| %73:i32 = load %top |
| %74:i32 = add %73, 1i |
| %x_145:i32 = let %74 |
| store %top, %x_145 |
| %76:ptr<function, i32, read_write> = access %stack, %x_145 |
| %77:i32 = load %h_1 |
| store %76, %77 |
| loop [b: $B10, c: $B11] { # loop_2 |
| $B10: { # body |
| %78:i32 = load %top |
| %79:bool = gte %78, 0i |
| if %79 [t: $B12, f: $B13] { # if_3 |
| $B12: { # true |
| exit_if # if_3 |
| } |
| $B13: { # false |
| exit_loop # loop_2 |
| } |
| } |
| %80:i32 = load %top |
| %x_155:i32 = let %80 |
| %82:i32 = load %top |
| %83:i32 = sub %82, 1i |
| store %top, %83 |
| %84:ptr<function, i32, read_write> = access %stack, %x_155 |
| %85:i32 = load %84 |
| store %h_1, %85 |
| %86:i32 = load %top |
| %x_159:i32 = let %86 |
| %88:i32 = load %top |
| %89:i32 = sub %88, 1i |
| store %top, %89 |
| %90:ptr<function, i32, read_write> = access %stack, %x_159 |
| %91:i32 = load %90 |
| store %l_1, %91 |
| %92:i32 = load %l_1 |
| store %param_4, %92 |
| %93:i32 = load %h_1 |
| store %param_5, %93 |
| %94:i32 = call %performPartition_i1_i1_, %param_4, %param_5 |
| %x_165:i32 = let %94 |
| store %p, %x_165 |
| %96:i32 = load %p |
| %97:i32 = sub %96, 1i |
| %98:i32 = load %l_1 |
| %99:bool = gt %97, %98 |
| if %99 [t: $B14] { # if_4 |
| $B14: { # true |
| %100:i32 = load %top |
| %101:i32 = add %100, 1i |
| %x_173:i32 = let %101 |
| store %top, %x_173 |
| %103:ptr<function, i32, read_write> = access %stack, %x_173 |
| %104:i32 = load %l_1 |
| store %103, %104 |
| %105:i32 = load %top |
| %106:i32 = add %105, 1i |
| %x_177:i32 = let %106 |
| store %top, %x_177 |
| %108:ptr<function, i32, read_write> = access %stack, %x_177 |
| %109:i32 = load %p |
| %110:i32 = sub %109, 1i |
| store %108, %110 |
| exit_if # if_4 |
| } |
| } |
| %111:i32 = load %p |
| %112:i32 = add %111, 1i |
| %113:i32 = load %h_1 |
| %114:bool = lt %112, %113 |
| if %114 [t: $B15] { # if_5 |
| $B15: { # true |
| %115:i32 = load %top |
| %116:i32 = add %115, 1i |
| %x_188:i32 = let %116 |
| store %top, %x_188 |
| %118:ptr<function, i32, read_write> = access %stack, %x_188 |
| %119:i32 = load %p |
| %120:i32 = add %119, 1i |
| store %118, %120 |
| %121:i32 = load %top |
| %122:i32 = add %121, 1i |
| %x_193:i32 = let %122 |
| store %top, %x_193 |
| %124:ptr<function, i32, read_write> = access %stack, %x_193 |
| %125:i32 = load %h_1 |
| store %124, %125 |
| 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 |
| %128:i32 = load %i_2 |
| %129:bool = lt %128, 10i |
| if %129 [t: $B19, f: $B20] { # if_6 |
| $B19: { # true |
| exit_if # if_6 |
| } |
| $B20: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %130:i32 = load %i_2 |
| %x_67:i32 = let %130 |
| %132:ptr<private, i32, read_write> = access %obj, 0u, %x_67 |
| %133:i32 = load %i_2 |
| %134:i32 = sub 10i, %133 |
| store %132, %134 |
| %135:i32 = load %i_2 |
| %x_71:i32 = let %135 |
| %137:ptr<private, i32, read_write> = access %obj, 0u, %x_71 |
| %138:i32 = load %i_2 |
| %139:ptr<private, i32, read_write> = access %obj, 0u, %138 |
| %140:i32 = load %139 |
| %141:i32 = load %i_2 |
| %142:ptr<private, i32, read_write> = access %obj, 0u, %141 |
| %143:i32 = load %142 |
| %144:i32 = mul %140, %143 |
| store %137, %144 |
| continue # -> $B18 |
| } |
| $B18: { # continuing |
| %145:i32 = load %i_2 |
| %146:i32 = add %145, 1i |
| store %i_2, %146 |
| next_iteration # -> $B17 |
| } |
| } |
| %147:void = call %quicksort_ |
| %148:ptr<private, i32, read_write> = access %obj, 0u, 0i |
| %149:i32 = load %148 |
| %150:ptr<private, i32, read_write> = access %obj, 0u, 4i |
| %151:i32 = load %150 |
| %152:bool = lt %149, %151 |
| if %152 [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: { |
| %154:void = call %main_1 |
| %155:vec4<f32> = load %x_GLF_color |
| %156:main_out = construct %155 |
| ret %156 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |