[msl] Emit `abs()` builtin
Bug: 42251016
Change-Id: Iffba63d5a8c327a774a61bf4ac6d50b4a207985a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/192945
Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/msl/writer/printer/printer.cc b/src/tint/lang/msl/writer/printer/printer.cc
index 1ed24b8..4046474 100644
--- a/src/tint/lang/msl/writer/printer/printer.cc
+++ b/src/tint/lang/msl/writer/printer/printer.cc
@@ -890,6 +890,7 @@
void EmitCoreBuiltinName(StringStream& out, core::BuiltinFn func) {
switch (func) {
+ case core::BuiltinFn::kAbs:
case core::BuiltinFn::kAcos:
case core::BuiltinFn::kAcosh:
case core::BuiltinFn::kAll:
diff --git a/test/tint/bug/tint/1739.wgsl.expected.ir.msl b/test/tint/bug/tint/1739.wgsl.expected.ir.msl
index c9b1023..605369d 100644
--- a/test/tint/bug/tint/1739.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/1739.wgsl.expected.ir.msl
@@ -1,17 +1,80 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> t_plane0;
+ texture2d<float, access::sample> t_plane1;
+ const constant tint_ExternalTextureParams* t_params;
+ texture2d<float, access::write> outImage;
+};
-
-@group(0) @binding(0) var t : texture_external;
-
-@group(0) @binding(1) var outImage : texture_storage_2d<rgba8unorm, write>;
-
-@compute @workgroup_size(1)
-fn tint_symbol() {
- var red : vec4<f32> = textureLoad(t, vec2<i32>(10, 10));
- textureStore(outImage, vec2<i32>(0, 0), red);
- var green : vec4<f32> = textureLoad(t, vec2<i32>(70, 118));
- textureStore(outImage, vec2<i32>(1, 0), green);
- return;
+float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
+ float3 const v_1 = float3(params.G);
+ float3 const v_2 = float3(params.D);
+ float3 const v_3 = abs(v);
+ float3 const v_4 = sign(v);
+ return select((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
}
-
-Failed to generate: error: ExternalTextureOptions missing binding entry for [group: 0, binding: 0]
+float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
+ float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_6 = uint2(v_5);
+ float3 v_7 = 0.0f;
+ float v_8 = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ float4 const v_9 = plane_0.read(v_6, 0u);
+ v_7 = v_9.xyz;
+ v_8 = v_9[3u];
+ } else {
+ float const v_10 = plane_0.read(v_6, 0u)[0u];
+ v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_8 = 1.0f;
+ }
+ float3 const v_11 = v_7;
+ float3 v_12 = 0.0f;
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ } else {
+ v_12 = v_11;
+ }
+ return float4(v_12, v_8);
+}
+kernel void tint_symbol(texture2d<float, access::sample> t_plane0 [[texture(1)]], texture2d<float, access::sample> t_plane1 [[texture(2)]], const constant tint_ExternalTextureParams* t_params [[buffer(3)]], texture2d<float, access::write> outImage [[texture(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_plane0=t_plane0, .t_plane1=t_plane1, .t_params=t_params, .outImage=outImage};
+ tint_ExternalTextureParams const v_13 = (*tint_module_vars.t_params);
+ float4 red = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_13, min(uint2(int2(10)), ((v_13.visibleSize + uint2(1u)) - uint2(1u))));
+ float4 const v_14 = red;
+ uint const v_15 = tint_module_vars.outImage.get_width(0u);
+ uint2 const v_16 = (uint2(v_15, tint_module_vars.outImage.get_height(0u)) - uint2(1u));
+ tint_module_vars.outImage.write(v_14, min(uint2(int2(0)), v_16));
+ tint_ExternalTextureParams const v_17 = (*tint_module_vars.t_params);
+ float4 green = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_17, min(uint2(int2(70, 118)), ((v_17.visibleSize + uint2(1u)) - uint2(1u))));
+ float4 const v_18 = green;
+ uint const v_19 = tint_module_vars.outImage.get_width(0u);
+ uint2 const v_20 = (uint2(v_19, tint_module_vars.outImage.get_height(0u)) - uint2(1u));
+ tint_module_vars.outImage.write(v_18, min(uint2(int2(1, 0)), v_20));
+}
diff --git a/test/tint/bug/tint/913.wgsl.expected.ir.msl b/test/tint/bug/tint/913.wgsl.expected.ir.msl
index 366b488..36d304e 100644
--- a/test/tint/bug/tint/913.wgsl.expected.ir.msl
+++ b/test/tint/bug/tint/913.wgsl.expected.ir.msl
@@ -1,254 +1,128 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+template<typename T, size_t N>
+struct tint_array {
+ const constant T& operator[](size_t i) const constant { return elements[i]; }
+ device T& operator[](size_t i) device { return elements[i]; }
+ const device T& operator[](size_t i) const device { return elements[i]; }
+ thread T& operator[](size_t i) thread { return elements[i]; }
+ const thread T& operator[](size_t i) const thread { return elements[i]; }
+ threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
+ const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
+ T elements[N];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: OutputBuf = struct @align(4) {
- result:array<u32> @offset(0)
+struct OutputBuf {
+ tint_array<uint, 1> result;
+};
+struct Uniforms {
+ uint dstTextureFlipY;
+ uint channelCount;
+ uint2 srcCopyOrigin;
+ uint2 dstCopyOrigin;
+ uint2 copySize;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> src;
+ texture2d<float, access::sample> dst;
+ device OutputBuf* output;
+ const constant Uniforms* uniforms;
+};
+
+bool aboutEqual(float value, float expect) {
+ return (abs((value - expect)) < 0.00100000004749745131f);
}
-
-Uniforms = struct @align(8) {
- dstTextureFlipY:u32 @offset(0)
- channelCount:u32 @offset(4)
- srcCopyOrigin:vec2<u32> @offset(8)
- dstCopyOrigin:vec2<u32> @offset(16)
- copySize:vec2<u32> @offset(24)
-}
-
-$B1: { # root
- %src:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 0)
- %dst:ptr<handle, texture_2d<f32>, read> = var @binding_point(0, 1)
- %output:ptr<storage, OutputBuf, read_write> = var @binding_point(0, 2)
- %uniforms:ptr<uniform, Uniforms, read> = var @binding_point(0, 3)
-}
-
-%aboutEqual = func(%value:f32, %expect:f32):bool {
- $B2: {
- %8:f32 = sub %value, %expect
- %9:f32 = abs %8
- %10:bool = lt %9, 0.00100000004749745131f
- ret %10
+void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) {
+ uint const v = tint_module_vars.src.get_width(0u);
+ uint2 const srcSize = uint2(v, tint_module_vars.src.get_height(0u));
+ uint const v_1 = tint_module_vars.dst.get_width(0u);
+ uint2 const dstSize = uint2(v_1, tint_module_vars.dst.get_height(0u));
+ uint2 const dstTexCoord = uint2(GlobalInvocationID.xy);
+ float4 const nonCoveredColor = float4(0.0f, 1.0f, 0.0f, 1.0f);
+ bool success = true;
+ bool v_2 = false;
+ if ((dstTexCoord[0u] < (*tint_module_vars.uniforms).dstCopyOrigin[0u])) {
+ v_2 = true;
+ } else {
+ v_2 = (dstTexCoord[1u] < (*tint_module_vars.uniforms).dstCopyOrigin[1u]);
+ }
+ bool v_3 = false;
+ if (v_2) {
+ v_3 = true;
+ } else {
+ v_3 = (dstTexCoord[0u] >= ((*tint_module_vars.uniforms).dstCopyOrigin[0u] + (*tint_module_vars.uniforms).copySize[0u]));
+ }
+ bool v_4 = false;
+ if (v_3) {
+ v_4 = true;
+ } else {
+ v_4 = (dstTexCoord[1u] >= ((*tint_module_vars.uniforms).dstCopyOrigin[1u] + (*tint_module_vars.uniforms).copySize[1u]));
+ }
+ if (v_4) {
+ bool v_5 = false;
+ if (success) {
+ v_5 = all((tint_module_vars.dst.read(uint2(int2(dstTexCoord)), 0) == nonCoveredColor));
+ } else {
+ v_5 = false;
+ }
+ success = v_5;
+ } else {
+ uint2 srcTexCoord = ((dstTexCoord - (*tint_module_vars.uniforms).dstCopyOrigin) + (*tint_module_vars.uniforms).srcCopyOrigin);
+ if (((*tint_module_vars.uniforms).dstTextureFlipY == 1u)) {
+ srcTexCoord[1u] = ((srcSize[1u] - srcTexCoord[1u]) - 1u);
+ }
+ float4 const srcColor = tint_module_vars.src.read(uint2(int2(srcTexCoord)), 0);
+ float4 const dstColor = tint_module_vars.dst.read(uint2(int2(dstTexCoord)), 0);
+ if (((*tint_module_vars.uniforms).channelCount == 2u)) {
+ bool v_6 = false;
+ if (success) {
+ v_6 = aboutEqual(dstColor[0u], srcColor[0u]);
+ } else {
+ v_6 = false;
+ }
+ bool v_7 = false;
+ if (v_6) {
+ v_7 = aboutEqual(dstColor[1u], srcColor[1u]);
+ } else {
+ v_7 = false;
+ }
+ success = v_7;
+ } else {
+ bool v_8 = false;
+ if (success) {
+ v_8 = aboutEqual(dstColor[0u], srcColor[0u]);
+ } else {
+ v_8 = false;
+ }
+ bool v_9 = false;
+ if (v_8) {
+ v_9 = aboutEqual(dstColor[1u], srcColor[1u]);
+ } else {
+ v_9 = false;
+ }
+ bool v_10 = false;
+ if (v_9) {
+ v_10 = aboutEqual(dstColor[2u], srcColor[2u]);
+ } else {
+ v_10 = false;
+ }
+ bool v_11 = false;
+ if (v_10) {
+ v_11 = aboutEqual(dstColor[3u], srcColor[3u]);
+ } else {
+ v_11 = false;
+ }
+ success = v_11;
+ }
+ }
+ uint const outputIndex = ((GlobalInvocationID[1u] * dstSize[0u]) + GlobalInvocationID[0u]);
+ if (success) {
+ (*tint_module_vars.output).result[outputIndex] = 1u;
+ } else {
+ (*tint_module_vars.output).result[outputIndex] = 0u;
}
}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%GlobalInvocationID:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- %13:texture_2d<f32> = load %src
- %14:vec2<u32> = textureDimensions %13
- %srcSize:vec2<u32> = let %14
- %16:texture_2d<f32> = load %dst
- %17:vec2<u32> = textureDimensions %16
- %dstSize:vec2<u32> = let %17
- %19:vec2<u32> = swizzle %GlobalInvocationID, xy
- %20:vec2<u32> = construct %19
- %dstTexCoord:vec2<u32> = let %20
- %nonCoveredColor:vec4<f32> = let vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f)
- %success:ptr<function, bool, read_write> = var, true
- %24:u32 = access %dstTexCoord, 0u
- %25:ptr<uniform, vec2<u32>, read> = access %uniforms, 3u
- %26:u32 = load_vector_element %25, 0u
- %27:bool = lt %24, %26
- %28:bool = if %27 [t: $B4, f: $B5] { # if_1
- $B4: { # true
- exit_if true # if_1
- }
- $B5: { # false
- %29:u32 = access %dstTexCoord, 1u
- %30:ptr<uniform, vec2<u32>, read> = access %uniforms, 3u
- %31:u32 = load_vector_element %30, 1u
- %32:bool = lt %29, %31
- exit_if %32 # if_1
- }
- }
- %33:bool = if %28 [t: $B6, f: $B7] { # if_2
- $B6: { # true
- exit_if true # if_2
- }
- $B7: { # false
- %34:u32 = access %dstTexCoord, 0u
- %35:ptr<uniform, vec2<u32>, read> = access %uniforms, 3u
- %36:u32 = load_vector_element %35, 0u
- %37:ptr<uniform, vec2<u32>, read> = access %uniforms, 4u
- %38:u32 = load_vector_element %37, 0u
- %39:u32 = add %36, %38
- %40:bool = gte %34, %39
- exit_if %40 # if_2
- }
- }
- %41:bool = if %33 [t: $B8, f: $B9] { # if_3
- $B8: { # true
- exit_if true # if_3
- }
- $B9: { # false
- %42:u32 = access %dstTexCoord, 1u
- %43:ptr<uniform, vec2<u32>, read> = access %uniforms, 3u
- %44:u32 = load_vector_element %43, 1u
- %45:ptr<uniform, vec2<u32>, read> = access %uniforms, 4u
- %46:u32 = load_vector_element %45, 1u
- %47:u32 = add %44, %46
- %48:bool = gte %42, %47
- exit_if %48 # if_3
- }
- }
- if %41 [t: $B10, f: $B11] { # if_4
- $B10: { # true
- %49:bool = load %success
- %50:bool = if %49 [t: $B12, f: $B13] { # if_5
- $B12: { # true
- %51:texture_2d<f32> = load %dst
- %52:texture_2d<f32> = let %51
- %53:vec2<i32> = convert %dstTexCoord
- %54:vec4<f32> = textureLoad %52, %53, 0i
- %55:vec4<bool> = eq %54, %nonCoveredColor
- %56:bool = all %55
- exit_if %56 # if_5
- }
- $B13: { # false
- exit_if false # if_5
- }
- }
- store %success, %50
- exit_if # if_4
- }
- $B11: { # false
- %57:ptr<uniform, vec2<u32>, read> = access %uniforms, 3u
- %58:vec2<u32> = load %57
- %59:vec2<u32> = sub %dstTexCoord, %58
- %60:ptr<uniform, vec2<u32>, read> = access %uniforms, 2u
- %61:vec2<u32> = load %60
- %62:vec2<u32> = add %59, %61
- %srcTexCoord:ptr<function, vec2<u32>, read_write> = var, %62
- %64:ptr<uniform, u32, read> = access %uniforms, 0u
- %65:u32 = load %64
- %66:bool = eq %65, 1u
- if %66 [t: $B14] { # if_6
- $B14: { # true
- %67:u32 = access %srcSize, 1u
- %68:u32 = load_vector_element %srcTexCoord, 1u
- %69:u32 = sub %67, %68
- %70:u32 = sub %69, 1u
- store_vector_element %srcTexCoord, 1u, %70
- exit_if # if_6
- }
- }
- %71:texture_2d<f32> = load %src
- %72:texture_2d<f32> = let %71
- %73:vec2<u32> = load %srcTexCoord
- %74:vec2<i32> = convert %73
- %75:vec4<f32> = textureLoad %72, %74, 0i
- %srcColor:vec4<f32> = let %75
- %77:texture_2d<f32> = load %dst
- %78:texture_2d<f32> = let %77
- %79:vec2<i32> = convert %dstTexCoord
- %80:vec4<f32> = textureLoad %78, %79, 0i
- %dstColor:vec4<f32> = let %80
- %82:ptr<uniform, u32, read> = access %uniforms, 1u
- %83:u32 = load %82
- %84:bool = eq %83, 2u
- if %84 [t: $B15, f: $B16] { # if_7
- $B15: { # true
- %85:bool = load %success
- %86:bool = if %85 [t: $B17, f: $B18] { # if_8
- $B17: { # true
- %87:f32 = access %dstColor, 0u
- %88:f32 = access %srcColor, 0u
- %89:bool = call %aboutEqual, %87, %88
- exit_if %89 # if_8
- }
- $B18: { # false
- exit_if false # if_8
- }
- }
- %90:bool = if %86 [t: $B19, f: $B20] { # if_9
- $B19: { # true
- %91:f32 = access %dstColor, 1u
- %92:f32 = access %srcColor, 1u
- %93:bool = call %aboutEqual, %91, %92
- exit_if %93 # if_9
- }
- $B20: { # false
- exit_if false # if_9
- }
- }
- store %success, %90
- exit_if # if_7
- }
- $B16: { # false
- %94:bool = load %success
- %95:bool = if %94 [t: $B21, f: $B22] { # if_10
- $B21: { # true
- %96:f32 = access %dstColor, 0u
- %97:f32 = access %srcColor, 0u
- %98:bool = call %aboutEqual, %96, %97
- exit_if %98 # if_10
- }
- $B22: { # false
- exit_if false # if_10
- }
- }
- %99:bool = if %95 [t: $B23, f: $B24] { # if_11
- $B23: { # true
- %100:f32 = access %dstColor, 1u
- %101:f32 = access %srcColor, 1u
- %102:bool = call %aboutEqual, %100, %101
- exit_if %102 # if_11
- }
- $B24: { # false
- exit_if false # if_11
- }
- }
- %103:bool = if %99 [t: $B25, f: $B26] { # if_12
- $B25: { # true
- %104:f32 = access %dstColor, 2u
- %105:f32 = access %srcColor, 2u
- %106:bool = call %aboutEqual, %104, %105
- exit_if %106 # if_12
- }
- $B26: { # false
- exit_if false # if_12
- }
- }
- %107:bool = if %103 [t: $B27, f: $B28] { # if_13
- $B27: { # true
- %108:f32 = access %dstColor, 3u
- %109:f32 = access %srcColor, 3u
- %110:bool = call %aboutEqual, %108, %109
- exit_if %110 # if_13
- }
- $B28: { # false
- exit_if false # if_13
- }
- }
- store %success, %107
- exit_if # if_7
- }
- }
- exit_if # if_4
- }
- }
- %111:u32 = access %GlobalInvocationID, 1u
- %112:u32 = access %dstSize, 0u
- %113:u32 = mul %111, %112
- %114:u32 = access %GlobalInvocationID, 0u
- %115:u32 = add %113, %114
- %outputIndex:u32 = let %115
- %117:bool = load %success
- if %117 [t: $B29, f: $B30] { # if_14
- $B29: { # true
- %118:ptr<storage, u32, read_write> = access %output, 0u, %outputIndex
- store %118, 1u
- exit_if # if_14
- }
- $B30: { # false
- %119:ptr<storage, u32, read_write> = access %output, 0u, %outputIndex
- store %119, 0u
- exit_if # if_14
- }
- }
- ret
- }
+kernel void tint_symbol(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d<float, access::sample> src [[texture(0)]], texture2d<float, access::sample> dst [[texture(1)]], device OutputBuf* output [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src=src, .dst=dst, .output=output, .uniforms=uniforms};
+ tint_symbol_inner(GlobalInvocationID, tint_module_vars);
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
index a48e115..fb3f304 100644
--- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.ir.msl
@@ -1,9 +1,88 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:1006 internal compiler error: TINT_UNREACHABLE unhandled: abs
-********************************************************************
-* 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. *
-********************************************************************
+float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
+ float3 const v_1 = float3(params.G);
+ float3 const v_2 = float3(params.D);
+ float3 const v_3 = abs(v);
+ float3 const v_4 = sign(v);
+ return select((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+}
+float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
+ float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_6 = uint2(v_5);
+ float3 v_7 = 0.0f;
+ float v_8 = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ float4 const v_9 = plane_0.read(v_6, 0u);
+ v_7 = v_9.xyz;
+ v_8 = v_9[3u];
+ } else {
+ float const v_10 = plane_0.read(v_6, 0u)[0u];
+ v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_8 = 1.0f;
+ }
+ float3 const v_11 = v_7;
+ float3 v_12 = 0.0f;
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ } else {
+ v_12 = v_11;
+ }
+ return float4(v_12, v_8);
+}
+void textureLoad_1bfdfb(tint_module_vars_struct tint_module_vars) {
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, (*tint_module_vars.arg_0_params), uint2(1u));
+ (*tint_module_vars.prevent_dce) = res;
+}
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ textureLoad_1bfdfb(tint_module_vars);
+ return float4(0.0f);
+}
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_1bfdfb(tint_module_vars);
+}
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_1bfdfb(tint_module_vars);
+}
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
index a48e115..4cef02b 100644
--- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.ir.msl
@@ -1,9 +1,89 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:1006 internal compiler error: TINT_UNREACHABLE unhandled: abs
-********************************************************************
-* 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. *
-********************************************************************
+float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
+ float3 const v_1 = float3(params.G);
+ float3 const v_2 = float3(params.D);
+ float3 const v_3 = abs(v);
+ float3 const v_4 = sign(v);
+ return select((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+}
+float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
+ float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_6 = uint2(v_5);
+ float3 v_7 = 0.0f;
+ float v_8 = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ float4 const v_9 = plane_0.read(v_6, 0u);
+ v_7 = v_9.xyz;
+ v_8 = v_9[3u];
+ } else {
+ float const v_10 = plane_0.read(v_6, 0u)[0u];
+ v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_8 = 1.0f;
+ }
+ float3 const v_11 = v_7;
+ float3 v_12 = 0.0f;
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ } else {
+ v_12 = v_11;
+ }
+ return float4(v_12, v_8);
+}
+void textureLoad_8acf41(tint_module_vars_struct tint_module_vars) {
+ tint_ExternalTextureParams const v_13 = (*tint_module_vars.arg_0_params);
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_13, uint2(int2(1)));
+ (*tint_module_vars.prevent_dce) = res;
+}
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ textureLoad_8acf41(tint_module_vars);
+ return float4(0.0f);
+}
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_8acf41(tint_module_vars);
+}
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_8acf41(tint_module_vars);
+}
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.ir.msl
index 6a1ed9c..64ac6a6 100644
--- a/test/tint/builtins/gen/var/abs/002533.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/002533.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f32>, read_write> = var @binding_point(2, 0)
+void abs_002533(tint_module_vars_struct tint_module_vars) {
+ float4 arg_0 = float4(1.0f);
+ float4 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_002533 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f32>, read_write> = var, vec4<f32>(1.0f)
- %4:vec4<f32> = load %arg_0
- %5:vec4<f32> = abs %4
- %res:ptr<function, vec4<f32>, read_write> = var, %5
- %7:vec4<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_002533(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_002533
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_002533(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_002533
- ret
- }
+kernel void compute_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_002533(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_002533
- ret
- }
+vertex vertex_main_outputs vertex_main(device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.ir.msl
index b8d13b3..e4af1af 100644
--- a/test/tint/builtins/gen/var/abs/005174.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/005174.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f32>, read_write> = var @binding_point(2, 0)
+void abs_005174(tint_module_vars_struct tint_module_vars) {
+ float3 arg_0 = float3(1.0f);
+ float3 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_005174 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f32>, read_write> = var, vec3<f32>(1.0f)
- %4:vec3<f32> = load %arg_0
- %5:vec3<f32> = abs %4
- %res:ptr<function, vec3<f32>, read_write> = var, %5
- %7:vec3<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_005174(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_005174
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_005174(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_005174
- ret
- }
+kernel void compute_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_005174(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_005174
- ret
- }
+vertex vertex_main_outputs vertex_main(device float3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.ir.msl
index 862821a..3251a83 100644
--- a/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/1ce782.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<u32>, read_write> = var @binding_point(2, 0)
+void abs_1ce782(tint_module_vars_struct tint_module_vars) {
+ uint4 arg_0 = uint4(1u);
+ uint4 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_1ce782 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<u32>, read_write> = var, vec4<u32>(1u)
- %4:vec4<u32> = load %arg_0
- %5:vec4<u32> = abs %4
- %res:ptr<function, vec4<u32>, read_write> = var, %5
- %7:vec4<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_1ce782(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_1ce782
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1ce782(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_1ce782
- ret
- }
+kernel void compute_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1ce782(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_1ce782
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.ir.msl
index 39da404..530d28b 100644
--- a/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/1e9d53.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f32>, read_write> = var @binding_point(2, 0)
+void abs_1e9d53(tint_module_vars_struct tint_module_vars) {
+ float2 arg_0 = float2(1.0f);
+ float2 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_1e9d53 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f32>, read_write> = var, vec2<f32>(1.0f)
- %4:vec2<f32> = load %arg_0
- %5:vec2<f32> = abs %4
- %res:ptr<function, vec2<f32>, read_write> = var, %5
- %7:vec2<f32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_1e9d53(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_1e9d53
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1e9d53(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_1e9d53
- ret
- }
+kernel void compute_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_1e9d53(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_1e9d53
- ret
- }
+vertex vertex_main_outputs vertex_main(device float2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.ir.msl
index c78e031..d9d5989 100644
--- a/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/421ca3.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<f16>, read_write> = var @binding_point(2, 0)
+void abs_421ca3(tint_module_vars_struct tint_module_vars) {
+ half3 arg_0 = half3(1.0h);
+ half3 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_421ca3 = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<f16>, read_write> = var, vec3<f16>(1.0h)
- %4:vec3<f16> = load %arg_0
- %5:vec3<f16> = abs %4
- %res:ptr<function, vec3<f16>, read_write> = var, %5
- %7:vec3<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_421ca3(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_421ca3
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_421ca3(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_421ca3
- ret
- }
+kernel void compute_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_421ca3(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_421ca3
- ret
- }
+vertex vertex_main_outputs vertex_main(device half3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/467cd1.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/467cd1.wgsl.expected.ir.msl
index 2eb143b..994d89a 100644
--- a/test/tint/builtins/gen/var/abs/467cd1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/467cd1.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void abs_467cd1(tint_module_vars_struct tint_module_vars) {
+ uint arg_0 = 1u;
+ uint res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_467cd1 = func():void {
- $B2: {
- %arg_0:ptr<function, u32, read_write> = var, 1u
- %4:u32 = load %arg_0
- %5:u32 = abs %4
- %res:ptr<function, u32, read_write> = var, %5
- %7:u32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_467cd1(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_467cd1
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_467cd1(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_467cd1
- ret
- }
+kernel void compute_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_467cd1(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_467cd1
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/4ad288.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/4ad288.wgsl.expected.ir.msl
index 30ee360..1b8eada 100644
--- a/test/tint/builtins/gen/var/abs/4ad288.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/4ad288.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, i32, read_write> = var @binding_point(2, 0)
+void abs_4ad288(tint_module_vars_struct tint_module_vars) {
+ int arg_0 = 1;
+ int res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_4ad288 = func():void {
- $B2: {
- %arg_0:ptr<function, i32, read_write> = var, 1i
- %4:i32 = load %arg_0
- %5:i32 = abs %4
- %res:ptr<function, i32, read_write> = var, %5
- %7:i32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_4ad288(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_4ad288
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_4ad288(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_4ad288
- ret
- }
+kernel void compute_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_4ad288(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_4ad288
- ret
- }
+vertex vertex_main_outputs vertex_main(device int* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.ir.msl
index 88baa00..434a9a0 100644
--- a/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/538d29.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<f16>, read_write> = var @binding_point(2, 0)
+void abs_538d29(tint_module_vars_struct tint_module_vars) {
+ half4 arg_0 = half4(1.0h);
+ half4 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_538d29 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<f16>, read_write> = var, vec4<f16>(1.0h)
- %4:vec4<f16> = load %arg_0
- %5:vec4<f16> = abs %4
- %res:ptr<function, vec4<f16>, read_write> = var, %5
- %7:vec4<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_538d29(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_538d29
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_538d29(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_538d29
- ret
- }
+kernel void compute_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_538d29(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_538d29
- ret
- }
+vertex vertex_main_outputs vertex_main(device half4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.ir.msl
index de31a2a..d6fec6f 100644
--- a/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/5ad50a.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<i32>, read_write> = var @binding_point(2, 0)
+void abs_5ad50a(tint_module_vars_struct tint_module_vars) {
+ int3 arg_0 = int3(1);
+ int3 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_5ad50a = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<i32>, read_write> = var, vec3<i32>(1i)
- %4:vec3<i32> = load %arg_0
- %5:vec3<i32> = abs %4
- %res:ptr<function, vec3<i32>, read_write> = var, %5
- %7:vec3<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_5ad50a(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_5ad50a
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ad50a(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_5ad50a
- ret
- }
+kernel void compute_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ad50a(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_5ad50a
- ret
- }
+vertex vertex_main_outputs vertex_main(device int3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.ir.msl
index 6af8aca..2721644 100644
--- a/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/5ae4fe.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<f16>, read_write> = var @binding_point(2, 0)
+void abs_5ae4fe(tint_module_vars_struct tint_module_vars) {
+ half2 arg_0 = half2(1.0h);
+ half2 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_5ae4fe = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<f16>, read_write> = var, vec2<f16>(1.0h)
- %4:vec2<f16> = load %arg_0
- %5:vec2<f16> = abs %4
- %res:ptr<function, vec2<f16>, read_write> = var, %5
- %7:vec2<f16> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_5ae4fe(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_5ae4fe
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ae4fe(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_5ae4fe
- ret
- }
+kernel void compute_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_5ae4fe(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_5ae4fe
- ret
- }
+vertex vertex_main_outputs vertex_main(device half2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.ir.msl
index a9cb089..818ba92 100644
--- a/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/7326de.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void abs_7326de(tint_module_vars_struct tint_module_vars) {
+ uint3 arg_0 = uint3(1u);
+ uint3 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_7326de = func():void {
- $B2: {
- %arg_0:ptr<function, vec3<u32>, read_write> = var, vec3<u32>(1u)
- %4:vec3<u32> = load %arg_0
- %5:vec3<u32> = abs %4
- %res:ptr<function, vec3<u32>, read_write> = var, %5
- %7:vec3<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_7326de(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_7326de
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7326de(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_7326de
- ret
- }
+kernel void compute_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7326de(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_7326de
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint3* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.ir.msl
index 6a73091..52b1a7c 100644
--- a/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/7f28e6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void abs_7f28e6(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_0 = uint2(1u);
+ uint2 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_7f28e6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<u32>, read_write> = var, vec2<u32>(1u)
- %4:vec2<u32> = load %arg_0
- %5:vec2<u32> = abs %4
- %res:ptr<function, vec2<u32>, read_write> = var, %5
- %7:vec2<u32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_7f28e6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_7f28e6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7f28e6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_7f28e6
- ret
- }
+kernel void compute_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7f28e6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_7f28e6
- ret
- }
+vertex vertex_main_outputs vertex_main(device uint2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.ir.msl
index ea399d8..bb9d360 100644
--- a/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/7faa9e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int2* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec2<i32>, read_write> = var @binding_point(2, 0)
+void abs_7faa9e(tint_module_vars_struct tint_module_vars) {
+ int2 arg_0 = int2(1);
+ int2 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_7faa9e = func():void {
- $B2: {
- %arg_0:ptr<function, vec2<i32>, read_write> = var, vec2<i32>(1i)
- %4:vec2<i32> = load %arg_0
- %5:vec2<i32> = abs %4
- %res:ptr<function, vec2<i32>, read_write> = var, %5
- %7:vec2<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_7faa9e(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_7faa9e
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7faa9e(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_7faa9e
- ret
- }
+kernel void compute_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_7faa9e(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_7faa9e
- ret
- }
+vertex vertex_main_outputs vertex_main(device int2* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.ir.msl
index 3f15419..f72e8fb 100644
--- a/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/9c80a6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device int4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, vec4<i32>, read_write> = var @binding_point(2, 0)
+void abs_9c80a6(tint_module_vars_struct tint_module_vars) {
+ int4 arg_0 = int4(1);
+ int4 res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_9c80a6 = func():void {
- $B2: {
- %arg_0:ptr<function, vec4<i32>, read_write> = var, vec4<i32>(1i)
- %4:vec4<i32> = load %arg_0
- %5:vec4<i32> = abs %4
- %res:ptr<function, vec4<i32>, read_write> = var, %5
- %7:vec4<i32> = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_9c80a6(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_9c80a6
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_9c80a6(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_9c80a6
- ret
- }
+kernel void compute_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_9c80a6(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_9c80a6
- ret
- }
+vertex vertex_main_outputs vertex_main(device int4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.ir.msl
index 2a9a611..44a4dc2 100644
--- a/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/b96037.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device float* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f32, read_write> = var @binding_point(2, 0)
+void abs_b96037(tint_module_vars_struct tint_module_vars) {
+ float arg_0 = 1.0f;
+ float res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_b96037 = func():void {
- $B2: {
- %arg_0:ptr<function, f32, read_write> = var, 1.0f
- %4:f32 = load %arg_0
- %5:f32 = abs %4
- %res:ptr<function, f32, read_write> = var, %5
- %7:f32 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_b96037(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_b96037
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_b96037(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_b96037
- ret
- }
+kernel void compute_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_b96037(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_b96037
- ret
- }
+vertex vertex_main_outputs vertex_main(device float* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.ir.msl
index 29a17c3..43261f1 100644
--- a/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/abs/fd247f.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+ device half* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: { # root
- %prevent_dce:ptr<storage, f16, read_write> = var @binding_point(2, 0)
+void abs_fd247f(tint_module_vars_struct tint_module_vars) {
+ half arg_0 = 1.0h;
+ half res = abs(arg_0);
+ (*tint_module_vars.prevent_dce) = res;
}
-
-%abs_fd247f = func():void {
- $B2: {
- %arg_0:ptr<function, f16, read_write> = var, 1.0h
- %4:f16 = load %arg_0
- %5:f16 = abs %4
- %res:ptr<function, f16, read_write> = var, %5
- %7:f16 = load %res
- store %prevent_dce, %7
- ret
- }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ abs_fd247f(tint_module_vars);
+ return float4(0.0f);
}
-%vertex_main = @vertex func():vec4<f32> [@position] {
- $B3: {
- %9:void = call %abs_fd247f
- ret vec4<f32>(0.0f)
- }
+fragment void fragment_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_fd247f(tint_module_vars);
}
-%fragment_main = @fragment func():void {
- $B4: {
- %11:void = call %abs_fd247f
- ret
- }
+kernel void compute_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ abs_fd247f(tint_module_vars);
}
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
- $B5: {
- %13:void = call %abs_fd247f
- ret
- }
+vertex vertex_main_outputs vertex_main(device half* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
}
-
-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. *
-********************************************************************
diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
index a48e115..c837cef 100644
--- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.ir.msl
@@ -1,9 +1,89 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:1006 internal compiler error: TINT_UNREACHABLE unhandled: abs
-********************************************************************
-* 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. *
-********************************************************************
+float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
+ float3 const v_1 = float3(params.G);
+ float3 const v_2 = float3(params.D);
+ float3 const v_3 = abs(v);
+ float3 const v_4 = sign(v);
+ return select((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+}
+float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
+ float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_6 = uint2(v_5);
+ float3 v_7 = 0.0f;
+ float v_8 = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ float4 const v_9 = plane_0.read(v_6, 0u);
+ v_7 = v_9.xyz;
+ v_8 = v_9[3u];
+ } else {
+ float const v_10 = plane_0.read(v_6, 0u)[0u];
+ v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_8 = 1.0f;
+ }
+ float3 const v_11 = v_7;
+ float3 v_12 = 0.0f;
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ } else {
+ v_12 = v_11;
+ }
+ return float4(v_12, v_8);
+}
+void textureLoad_1bfdfb(tint_module_vars_struct tint_module_vars) {
+ uint2 arg_1 = uint2(1u);
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, (*tint_module_vars.arg_0_params), arg_1);
+ (*tint_module_vars.prevent_dce) = res;
+}
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ textureLoad_1bfdfb(tint_module_vars);
+ return float4(0.0f);
+}
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_1bfdfb(tint_module_vars);
+}
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_1bfdfb(tint_module_vars);
+}
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
index a48e115..e2e7ef4 100644
--- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.ir.msl
@@ -1,9 +1,90 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+ device float4* prevent_dce;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol [[position]];
+};
-../../src/tint/lang/msl/writer/printer/printer.cc:1006 internal compiler error: TINT_UNREACHABLE unhandled: abs
-********************************************************************
-* 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. *
-********************************************************************
+float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
+ float3 const v_1 = float3(params.G);
+ float3 const v_2 = float3(params.D);
+ float3 const v_3 = abs(v);
+ float3 const v_4 = sign(v);
+ return select((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
+}
+float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
+ float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_6 = uint2(v_5);
+ float3 v_7 = 0.0f;
+ float v_8 = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ float4 const v_9 = plane_0.read(v_6, 0u);
+ v_7 = v_9.xyz;
+ v_8 = v_9[3u];
+ } else {
+ float const v_10 = plane_0.read(v_6, 0u)[0u];
+ v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_8 = 1.0f;
+ }
+ float3 const v_11 = v_7;
+ float3 v_12 = 0.0f;
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ } else {
+ v_12 = v_11;
+ }
+ return float4(v_12, v_8);
+}
+void textureLoad_8acf41(tint_module_vars_struct tint_module_vars) {
+ int2 arg_1 = int2(1);
+ tint_ExternalTextureParams const v_13 = (*tint_module_vars.arg_0_params);
+ float4 res = tint_TextureLoadExternal(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, v_13, uint2(arg_1));
+ (*tint_module_vars.prevent_dce) = res;
+}
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ textureLoad_8acf41(tint_module_vars);
+ return float4(0.0f);
+}
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_8acf41(tint_module_vars);
+}
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ textureLoad_8acf41(tint_module_vars);
+}
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]], device float4* prevent_dce [[buffer(0)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params, .prevent_dce=prevent_dce};
+ return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl
index f58a518..f949666 100644
--- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl
+++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl
@@ -1,30 +1,89 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_GammaTransferParams {
+ float G;
+ float A;
+ float B;
+ float C;
+ float D;
+ float E;
+ float F;
+ uint padding;
+};
+struct tint_ExternalTextureParams {
+ uint numPlanes;
+ uint doYuvToRgbConversionOnly;
+ float3x4 yuvToRgbConversionMatrix;
+ tint_GammaTransferParams gammaDecodeParams;
+ tint_GammaTransferParams gammaEncodeParams;
+ float3x3 gamutConversionMatrix;
+ float3x2 sampleTransform;
+ float3x2 loadTransform;
+ float2 samplePlane0RectMin;
+ float2 samplePlane0RectMax;
+ float2 samplePlane1RectMin;
+ float2 samplePlane1RectMax;
+ uint2 visibleSize;
+ float2 plane1CoordFactor;
+};
+struct tint_module_vars_struct {
+ texture2d<float, access::sample> arg_0_plane0;
+ texture2d<float, access::sample> arg_0_plane1;
+ const constant tint_ExternalTextureParams* arg_0_params;
+};
+struct vertex_main_outputs {
+ float4 tint_symbol_1 [[position]];
+};
-
-@group(1) @binding(0) var arg_0 : texture_external;
-
-fn textureLoad2d(tint_symbol : texture_external, coords : vec2<i32>) -> vec4<f32> {
- return textureLoad(tint_symbol, coords);
+float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
+ float3 const v_1 = float3(params.G);
+ float3 const v_2 = float3(params.D);
+ float3 const v_3 = abs(v);
+ float3 const v_4 = sign(v);
+ return select((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
}
-
-fn doTextureLoad() {
- var res : vec4<f32> = textureLoad2d(arg_0, vec2<i32>());
+float4 tint_TextureLoadExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, uint2 coords) {
+ float2 const v_5 = rint((params.loadTransform * float3(float2(min(coords, params.visibleSize)), 1.0f)));
+ uint2 const v_6 = uint2(v_5);
+ float3 v_7 = 0.0f;
+ float v_8 = 0.0f;
+ if ((params.numPlanes == 1u)) {
+ float4 const v_9 = plane_0.read(v_6, 0u);
+ v_7 = v_9.xyz;
+ v_8 = v_9[3u];
+ } else {
+ float const v_10 = plane_0.read(v_6, 0u)[0u];
+ v_7 = (float4(v_10, plane_1.read(uint2((v_5 * params.plane1CoordFactor)), 0u).xy, 1.0f) * params.yuvToRgbConversionMatrix);
+ v_8 = 1.0f;
+ }
+ float3 const v_11 = v_7;
+ float3 v_12 = 0.0f;
+ if ((params.doYuvToRgbConversionOnly == 0u)) {
+ v_12 = tint_GammaCorrection((params.gamutConversionMatrix * tint_GammaCorrection(v_11, params.gammaDecodeParams)), params.gammaEncodeParams);
+ } else {
+ v_12 = v_11;
+ }
+ return float4(v_12, v_8);
}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
- doTextureLoad();
- return vec4<f32>();
+float4 textureLoad2d(texture2d<float, access::sample> tint_symbol_plane0, texture2d<float, access::sample> tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) {
+ return tint_TextureLoadExternal(tint_symbol_plane0, tint_symbol_plane1, tint_symbol_params, uint2(coords));
}
-
-@fragment
-fn fragment_main() {
- doTextureLoad();
+void doTextureLoad(tint_module_vars_struct tint_module_vars) {
+ float4 res = textureLoad2d(tint_module_vars.arg_0_plane0, tint_module_vars.arg_0_plane1, (*tint_module_vars.arg_0_params), int2(0));
}
-
-@compute @workgroup_size(1)
-fn compute_main() {
- doTextureLoad();
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+ doTextureLoad(tint_module_vars);
+ return float4(0.0f);
}
-
-Failed to generate: error: ExternalTextureOptions missing binding entry for [group: 1, binding: 0]
+fragment void fragment_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
+ doTextureLoad(tint_module_vars);
+}
+kernel void compute_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
+ doTextureLoad(tint_module_vars);
+}
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0_plane0 [[texture(0)]], texture2d<float, access::sample> arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams* arg_0_params [[buffer(2)]]) {
+ tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params};
+ return vertex_main_outputs{.tint_symbol_1=vertex_main_inner(tint_module_vars)};
+}
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 51275f6..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,141 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 3> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 3> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_10:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %f0:ptr<function, f32, read_write> = var
- %f1:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %x_63:ptr<function, bool, read_write> = var
- %x_64:ptr<function, bool, read_write> = var
- %10:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %11:f32 = load %10
- store %f0, %11
- %12:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %13:f32 = load %12
- store %f1, %13
- %14:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %15:i32 = load %14
- store %i, %15
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %16:i32 = load %i
- %17:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %18:i32 = load %17
- %19:bool = lt %16, %18
- if %19 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %20:f32 = load %f0
- %21:f32 = mul 1.10000002384185791016f, %20
- %22:f32 = abs %21
- store %f0, %22
- %23:f32 = load %f0
- store %f1, %23
- continue # -> $B4
- }
- $B4: { # continuing
- %24:i32 = load %i
- %25:i32 = add %24, 1i
- store %i, %25
- next_iteration # -> $B3
- }
- }
- %26:f32 = load %f1
- %27:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %28:f32 = load %27
- %29:bool = gt %26, %28
- %x_57:bool = let %29
- store %x_64, %x_57
- if %x_57 [t: $B7] { # if_2
- $B7: { # true
- %31:f32 = load %f1
- %32:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %33:f32 = load %32
- %34:bool = lt %31, %33
- store %x_63, %34
- %35:bool = load %x_63
- store %x_64, %35
- exit_if # if_2
- }
- }
- %36:bool = load %x_64
- if %36 [t: $B8, f: $B9] { # if_3
- $B8: { # true
- %37:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %38:i32 = load %37
- %39:f32 = convert %38
- %40:f32 = let %39
- %41:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %42:i32 = load %41
- %43:f32 = convert %42
- %44:f32 = let %43
- %45:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %46:i32 = load %45
- %47:f32 = convert %46
- %48:f32 = let %47
- %49:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %50:i32 = load %49
- %51:f32 = convert %50
- %52:vec4<f32> = construct %40, %44, %48, %51
- store %x_GLF_color, %52
- exit_if # if_3
- }
- $B9: { # false
- %53:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %54:i32 = load %53
- %55:f32 = convert %54
- %56:vec4<f32> = construct %55
- store %x_GLF_color, %56
- exit_if # if_3
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B10: {
- %58:void = call %main_1
- %59:vec4<f32> = load %x_GLF_color
- %60:main_out = construct %59
- ret %60
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 97fb893..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,160 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 3> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 3> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_10:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %f0:ptr<function, f32, read_write> = var
- %f1:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %x_63:ptr<function, bool, read_write> = var
- %x_64_phi:ptr<function, bool, read_write> = var
- %10:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %11:f32 = load %10
- %x_34:f32 = let %11
- store %f0, %x_34
- %13:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %14:f32 = load %13
- %x_36:f32 = let %14
- store %f1, %x_36
- %16:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %17:i32 = load %16
- %x_38:i32 = let %17
- store %i, %x_38
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %19:i32 = load %i
- %x_43:i32 = let %19
- %21:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %22:i32 = load %21
- %x_45:i32 = let %22
- %24:bool = lt %x_43, %x_45
- if %24 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %25:f32 = load %f0
- %x_48:f32 = let %25
- %27:f32 = mul 1.10000002384185791016f, %x_48
- %28:f32 = abs %27
- store %f0, %28
- %29:f32 = load %f0
- %x_51:f32 = let %29
- store %f1, %x_51
- continue # -> $B4
- }
- $B4: { # continuing
- %31:i32 = load %i
- %x_52:i32 = let %31
- %33:i32 = add %x_52, 1i
- store %i, %33
- next_iteration # -> $B3
- }
- }
- %34:f32 = load %f1
- %x_54:f32 = let %34
- %36:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %37:f32 = load %36
- %x_56:f32 = let %37
- %39:bool = gt %x_54, %x_56
- %x_57:bool = let %39
- store %x_64_phi, %x_57
- if %x_57 [t: $B7] { # if_2
- $B7: { # true
- %41:f32 = load %f1
- %x_60:f32 = let %41
- %43:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %44:f32 = load %43
- %x_62:f32 = let %44
- %46:bool = lt %x_60, %x_62
- store %x_63, %46
- %47:bool = load %x_63
- store %x_64_phi, %47
- exit_if # if_2
- }
- }
- %48:bool = load %x_64_phi
- %x_64:bool = let %48
- if %x_64 [t: $B8, f: $B9] { # if_3
- $B8: { # true
- %50:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %51:i32 = load %50
- %x_69:i32 = let %51
- %53:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %54:i32 = load %53
- %x_72:i32 = let %54
- %56:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %57:i32 = load %56
- %x_75:i32 = let %57
- %59:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %60:i32 = load %59
- %x_78:i32 = let %60
- %62:f32 = convert %x_69
- %63:f32 = let %62
- %64:f32 = convert %x_72
- %65:f32 = let %64
- %66:f32 = convert %x_75
- %67:f32 = let %66
- %68:f32 = convert %x_78
- %69:vec4<f32> = construct %63, %65, %67, %68
- store %x_GLF_color, %69
- exit_if # if_3
- }
- $B9: { # false
- %70:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %71:i32 = load %70
- %x_82:i32 = let %71
- %73:f32 = convert %x_82
- %x_83:f32 = let %73
- %75:vec4<f32> = construct %x_83, %x_83, %x_83, %x_83
- store %x_GLF_color, %75
- exit_if # if_3
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B10: {
- %77:void = call %main_1
- %78:vec4<f32> = load %x_GLF_color
- %79:main_out = construct %78
- ret %79
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 29dd7bf..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,181 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 7> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %v1:ptr<function, vec4<f32>, read_write> = var
- %E:ptr<function, f32, read_write> = var
- %x_75:ptr<function, bool, read_write> = var
- %x_76:ptr<function, bool, read_write> = var
- %x_92:ptr<function, bool, read_write> = var
- %x_93:ptr<function, bool, read_write> = var
- %x_109:ptr<function, bool, read_write> = var
- %x_110:ptr<function, bool, read_write> = var
- %14:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %15:f32 = load %14
- %16:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %17:f32 = load %16
- %18:vec2<f32> = construct %15, %17
- %19:u32 = pack2x16unorm %18
- store %a, %19
- %20:u32 = load %a
- %21:vec4<f32> = unpack4x8snorm %20
- store %v1, %21
- store %E, 0.00999999977648258209f
- %22:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %23:i32 = load %22
- %24:f32 = load_vector_element %v1, %23
- %25:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %26:f32 = load %25
- %27:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %28:f32 = load %27
- %29:f32 = div %26, %28
- %30:f32 = sub %24, %29
- %31:f32 = abs %30
- %32:f32 = load %E
- %33:bool = lt %31, %32
- %x_60:bool = let %33
- store %x_76, %x_60
- if %x_60 [t: $B3] { # if_1
- $B3: { # true
- %35:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %36:i32 = load %35
- %37:f32 = load_vector_element %v1, %36
- %38:ptr<uniform, f32, read> = access %x_6, 0u, 4i, 0u
- %39:f32 = load %38
- %40:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %41:f32 = load %40
- %42:f32 = div %39, %41
- %43:f32 = sub %37, %42
- %44:f32 = abs %43
- %45:f32 = load %E
- %46:bool = lt %44, %45
- store %x_75, %46
- %47:bool = load %x_75
- store %x_76, %47
- exit_if # if_1
- }
- }
- %48:bool = load %x_76
- store %x_93, %48
- %49:bool = load %x_76
- if %49 [t: $B4] { # if_2
- $B4: { # true
- %50:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %51:i32 = load %50
- %52:f32 = load_vector_element %v1, %51
- %53:ptr<uniform, f32, read> = access %x_6, 0u, 5i, 0u
- %54:f32 = load %53
- %55:f32 = negation %54
- %56:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %57:f32 = load %56
- %58:f32 = div %55, %57
- %59:f32 = sub %52, %58
- %60:f32 = abs %59
- %61:f32 = load %E
- %62:bool = lt %60, %61
- store %x_92, %62
- %63:bool = load %x_92
- store %x_93, %63
- exit_if # if_2
- }
- }
- %64:bool = load %x_93
- store %x_110, %64
- %65:bool = load %x_93
- if %65 [t: $B5] { # if_3
- $B5: { # true
- %66:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %67:i32 = load %66
- %68:f32 = load_vector_element %v1, %67
- %69:ptr<uniform, f32, read> = access %x_6, 0u, 6i, 0u
- %70:f32 = load %69
- %71:f32 = negation %70
- %72:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %73:f32 = load %72
- %74:f32 = div %71, %73
- %75:f32 = sub %68, %74
- %76:f32 = abs %75
- %77:f32 = load %E
- %78:bool = lt %76, %77
- store %x_109, %78
- %79:bool = load %x_109
- store %x_110, %79
- exit_if # if_3
- }
- }
- %80:bool = load %x_110
- if %80 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %81:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %82:i32 = load %81
- %83:f32 = convert %82
- %84:f32 = let %83
- %85:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %86:i32 = load %85
- %87:f32 = convert %86
- %88:f32 = let %87
- %89:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %90:i32 = load %89
- %91:f32 = convert %90
- %92:f32 = let %91
- %93:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %94:i32 = load %93
- %95:f32 = convert %94
- %96:vec4<f32> = construct %84, %88, %92, %95
- store %x_GLF_color, %96
- exit_if # if_4
- }
- $B7: { # false
- %97:ptr<uniform, f32, read> = access %x_6, 0u, 5i, 0u
- %98:f32 = load %97
- %99:vec4<f32> = construct %98
- store %x_GLF_color, %99
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %101:void = call %main_1
- %102:vec4<f32> = load %x_GLF_color
- %103:main_out = construct %102
- ret %103
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 2d6e74a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-pack-unpack/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,210 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 7> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %v1:ptr<function, vec4<f32>, read_write> = var
- %E:ptr<function, f32, read_write> = var
- %x_75:ptr<function, bool, read_write> = var
- %x_92:ptr<function, bool, read_write> = var
- %x_109:ptr<function, bool, read_write> = var
- %x_76_phi:ptr<function, bool, read_write> = var
- %x_93_phi:ptr<function, bool, read_write> = var
- %x_110_phi:ptr<function, bool, read_write> = var
- %14:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %15:f32 = load %14
- %x_41:f32 = let %15
- %17:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %18:f32 = load %17
- %x_43:f32 = let %18
- %20:vec2<f32> = construct %x_41, %x_43
- %21:u32 = pack2x16unorm %20
- store %a, %21
- %22:u32 = load %a
- %x_46:u32 = let %22
- %24:vec4<f32> = unpack4x8snorm %x_46
- store %v1, %24
- store %E, 0.00999999977648258209f
- %25:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %26:i32 = load %25
- %x_49:i32 = let %26
- %28:f32 = load_vector_element %v1, %x_49
- %x_51:f32 = let %28
- %30:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %31:f32 = load %30
- %x_53:f32 = let %31
- %33:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %34:f32 = load %33
- %x_55:f32 = let %34
- %36:f32 = load %E
- %x_59:f32 = let %36
- %38:f32 = div %x_53, %x_55
- %39:f32 = sub %x_51, %38
- %40:f32 = abs %39
- %41:bool = lt %40, %x_59
- %x_60:bool = let %41
- store %x_76_phi, %x_60
- if %x_60 [t: $B3] { # if_1
- $B3: { # true
- %43:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %44:i32 = load %43
- %x_64:i32 = let %44
- %46:f32 = load_vector_element %v1, %x_64
- %x_66:f32 = let %46
- %48:ptr<uniform, f32, read> = access %x_6, 0u, 4i, 0u
- %49:f32 = load %48
- %x_68:f32 = let %49
- %51:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %52:f32 = load %51
- %x_70:f32 = let %52
- %54:f32 = load %E
- %x_74:f32 = let %54
- %56:f32 = div %x_68, %x_70
- %57:f32 = sub %x_66, %56
- %58:f32 = abs %57
- %59:bool = lt %58, %x_74
- store %x_75, %59
- %60:bool = load %x_75
- store %x_76_phi, %60
- exit_if # if_1
- }
- }
- %61:bool = load %x_76_phi
- %x_76:bool = let %61
- store %x_93_phi, %x_76
- if %x_76 [t: $B4] { # if_2
- $B4: { # true
- %63:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %64:i32 = load %63
- %x_80:i32 = let %64
- %66:f32 = load_vector_element %v1, %x_80
- %x_82:f32 = let %66
- %68:ptr<uniform, f32, read> = access %x_6, 0u, 5i, 0u
- %69:f32 = load %68
- %x_84:f32 = let %69
- %71:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %72:f32 = load %71
- %x_87:f32 = let %72
- %74:f32 = load %E
- %x_91:f32 = let %74
- %76:f32 = negation %x_84
- %77:f32 = div %76, %x_87
- %78:f32 = sub %x_82, %77
- %79:f32 = abs %78
- %80:bool = lt %79, %x_91
- store %x_92, %80
- %81:bool = load %x_92
- store %x_93_phi, %81
- exit_if # if_2
- }
- }
- %82:bool = load %x_93_phi
- %x_93:bool = let %82
- store %x_110_phi, %x_93
- if %x_93 [t: $B5] { # if_3
- $B5: { # true
- %84:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %85:i32 = load %84
- %x_97:i32 = let %85
- %87:f32 = load_vector_element %v1, %x_97
- %x_99:f32 = let %87
- %89:ptr<uniform, f32, read> = access %x_6, 0u, 6i, 0u
- %90:f32 = load %89
- %x_101:f32 = let %90
- %92:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %93:f32 = load %92
- %x_104:f32 = let %93
- %95:f32 = load %E
- %x_108:f32 = let %95
- %97:f32 = negation %x_101
- %98:f32 = div %97, %x_104
- %99:f32 = sub %x_99, %98
- %100:f32 = abs %99
- %101:bool = lt %100, %x_108
- store %x_109, %101
- %102:bool = load %x_109
- store %x_110_phi, %102
- exit_if # if_3
- }
- }
- %103:bool = load %x_110_phi
- %x_110:bool = let %103
- if %x_110 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %105:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %106:i32 = load %105
- %x_115:i32 = let %106
- %108:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %109:i32 = load %108
- %x_118:i32 = let %109
- %111:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %112:i32 = load %111
- %x_121:i32 = let %112
- %114:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %115:i32 = load %114
- %x_124:i32 = let %115
- %117:f32 = convert %x_115
- %118:f32 = let %117
- %119:f32 = convert %x_118
- %120:f32 = let %119
- %121:f32 = convert %x_121
- %122:f32 = let %121
- %123:f32 = convert %x_124
- %124:vec4<f32> = construct %118, %120, %122, %123
- store %x_GLF_color, %124
- exit_if # if_4
- }
- $B7: { # false
- %125:ptr<uniform, f32, read> = access %x_6, 0u, 5i, 0u
- %126:f32 = load %125
- %x_128:f32 = let %126
- %128:vec4<f32> = construct %x_128, %x_128, %x_128, %x_128
- store %x_GLF_color, %128
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %130:void = call %main_1
- %131:vec4<f32> = load %x_GLF_color
- %132:main_out = construct %131
- ret %132
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 88c02d8..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,174 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr_1, 3> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_8:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %v1:ptr<function, vec4<f32>, read_write> = var
- %E:ptr<function, f32, read_write> = var
- %x_69:ptr<function, bool, read_write> = var
- %x_70:ptr<function, bool, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_86:ptr<function, bool, read_write> = var
- %x_101:ptr<function, bool, read_write> = var
- %x_102:ptr<function, bool, read_write> = var
- store %a, 1006648320u
- %14:u32 = load %a
- %15:vec4<f32> = unpack4x8snorm %14
- store %v1, %15
- store %E, 0.00999999977648258209f
- %16:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %17:i32 = load %16
- %18:f32 = load_vector_element %v1, %17
- %19:ptr<uniform, f32, read> = access %x_10, 0u, 0i, 0u
- %20:f32 = load %19
- %21:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %22:f32 = load %21
- %23:f32 = div %20, %22
- %24:f32 = sub %18, %23
- %25:f32 = abs %24
- %26:f32 = load %E
- %27:bool = lt %25, %26
- %x_54:bool = let %27
- store %x_70, %x_54
- if %x_54 [t: $B3] { # if_1
- $B3: { # true
- %29:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
- %30:i32 = load %29
- %31:f32 = load_vector_element %v1, %30
- %32:ptr<uniform, f32, read> = access %x_10, 0u, 2i, 0u
- %33:f32 = load %32
- %34:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %35:f32 = load %34
- %36:f32 = div %33, %35
- %37:f32 = sub %31, %36
- %38:f32 = abs %37
- %39:f32 = load %E
- %40:bool = lt %38, %39
- store %x_69, %40
- %41:bool = load %x_69
- store %x_70, %41
- exit_if # if_1
- }
- }
- %42:bool = load %x_70
- store %x_86, %42
- %43:bool = load %x_70
- if %43 [t: $B4] { # if_2
- $B4: { # true
- %44:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
- %45:i32 = load %44
- %46:f32 = load_vector_element %v1, %45
- %47:ptr<uniform, f32, read> = access %x_10, 0u, 0i, 0u
- %48:f32 = load %47
- %49:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %50:f32 = load %49
- %51:f32 = div %48, %50
- %52:f32 = sub %46, %51
- %53:f32 = abs %52
- %54:f32 = load %E
- %55:bool = lt %53, %54
- store %x_85, %55
- %56:bool = load %x_85
- store %x_86, %56
- exit_if # if_2
- }
- }
- %57:bool = load %x_86
- store %x_102, %57
- %58:bool = load %x_86
- if %58 [t: $B5] { # if_3
- $B5: { # true
- %59:ptr<uniform, i32, read> = access %x_8, 0u, 3i, 0u
- %60:i32 = load %59
- %61:f32 = load_vector_element %v1, %60
- %62:ptr<uniform, f32, read> = access %x_10, 0u, 2i, 0u
- %63:f32 = load %62
- %64:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %65:f32 = load %64
- %66:f32 = div %63, %65
- %67:f32 = sub %61, %66
- %68:f32 = abs %67
- %69:f32 = load %E
- %70:bool = lt %68, %69
- store %x_101, %70
- %71:bool = load %x_101
- store %x_102, %71
- exit_if # if_3
- }
- }
- %72:bool = load %x_102
- if %72 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %73:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
- %74:i32 = load %73
- %75:f32 = convert %74
- %76:f32 = let %75
- %77:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %78:i32 = load %77
- %79:f32 = convert %78
- %80:f32 = let %79
- %81:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %82:i32 = load %81
- %83:f32 = convert %82
- %84:f32 = let %83
- %85:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
- %86:i32 = load %85
- %87:f32 = convert %86
- %88:vec4<f32> = construct %76, %80, %84, %87
- store %x_GLF_color, %88
- exit_if # if_4
- }
- $B7: { # false
- %89:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %90:i32 = load %89
- %91:f32 = load_vector_element %v1, %90
- %92:vec4<f32> = construct %91
- store %x_GLF_color, %92
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %94:void = call %main_1
- %95:vec4<f32> = load %x_GLF_color
- %96:main_out = construct %95
- ret %96
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 30d73da..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-pack-unpack/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,202 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr_1, 3> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_8:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %v1:ptr<function, vec4<f32>, read_write> = var
- %E:ptr<function, f32, read_write> = var
- %x_69:ptr<function, bool, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_101:ptr<function, bool, read_write> = var
- %x_70_phi:ptr<function, bool, read_write> = var
- %x_86_phi:ptr<function, bool, read_write> = var
- %x_102_phi:ptr<function, bool, read_write> = var
- store %a, 1006648320u
- %14:u32 = load %a
- %x_40:u32 = let %14
- %16:vec4<f32> = unpack4x8snorm %x_40
- store %v1, %16
- store %E, 0.00999999977648258209f
- %17:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %18:i32 = load %17
- %x_43:i32 = let %18
- %20:f32 = load_vector_element %v1, %x_43
- %x_45:f32 = let %20
- %22:ptr<uniform, f32, read> = access %x_10, 0u, 0i, 0u
- %23:f32 = load %22
- %x_47:f32 = let %23
- %25:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %26:f32 = load %25
- %x_49:f32 = let %26
- %28:f32 = load %E
- %x_53:f32 = let %28
- %30:f32 = div %x_47, %x_49
- %31:f32 = sub %x_45, %30
- %32:f32 = abs %31
- %33:bool = lt %32, %x_53
- %x_54:bool = let %33
- store %x_70_phi, %x_54
- if %x_54 [t: $B3] { # if_1
- $B3: { # true
- %35:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
- %36:i32 = load %35
- %x_58:i32 = let %36
- %38:f32 = load_vector_element %v1, %x_58
- %x_60:f32 = let %38
- %40:ptr<uniform, f32, read> = access %x_10, 0u, 2i, 0u
- %41:f32 = load %40
- %x_62:f32 = let %41
- %43:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %44:f32 = load %43
- %x_64:f32 = let %44
- %46:f32 = load %E
- %x_68:f32 = let %46
- %48:f32 = div %x_62, %x_64
- %49:f32 = sub %x_60, %48
- %50:f32 = abs %49
- %51:bool = lt %50, %x_68
- store %x_69, %51
- %52:bool = load %x_69
- store %x_70_phi, %52
- exit_if # if_1
- }
- }
- %53:bool = load %x_70_phi
- %x_70:bool = let %53
- store %x_86_phi, %x_70
- if %x_70 [t: $B4] { # if_2
- $B4: { # true
- %55:ptr<uniform, i32, read> = access %x_8, 0u, 2i, 0u
- %56:i32 = load %55
- %x_74:i32 = let %56
- %58:f32 = load_vector_element %v1, %x_74
- %x_76:f32 = let %58
- %60:ptr<uniform, f32, read> = access %x_10, 0u, 0i, 0u
- %61:f32 = load %60
- %x_78:f32 = let %61
- %63:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %64:f32 = load %63
- %x_80:f32 = let %64
- %66:f32 = load %E
- %x_84:f32 = let %66
- %68:f32 = div %x_78, %x_80
- %69:f32 = sub %x_76, %68
- %70:f32 = abs %69
- %71:bool = lt %70, %x_84
- store %x_85, %71
- %72:bool = load %x_85
- store %x_86_phi, %72
- exit_if # if_2
- }
- }
- %73:bool = load %x_86_phi
- %x_86:bool = let %73
- store %x_102_phi, %x_86
- if %x_86 [t: $B5] { # if_3
- $B5: { # true
- %75:ptr<uniform, i32, read> = access %x_8, 0u, 3i, 0u
- %76:i32 = load %75
- %x_90:i32 = let %76
- %78:f32 = load_vector_element %v1, %x_90
- %x_92:f32 = let %78
- %80:ptr<uniform, f32, read> = access %x_10, 0u, 2i, 0u
- %81:f32 = load %80
- %x_94:f32 = let %81
- %83:ptr<uniform, f32, read> = access %x_10, 0u, 1i, 0u
- %84:f32 = load %83
- %x_96:f32 = let %84
- %86:f32 = load %E
- %x_100:f32 = let %86
- %88:f32 = div %x_94, %x_96
- %89:f32 = sub %x_92, %88
- %90:f32 = abs %89
- %91:bool = lt %90, %x_100
- store %x_101, %91
- %92:bool = load %x_101
- store %x_102_phi, %92
- exit_if # if_3
- }
- }
- %93:bool = load %x_102_phi
- %x_102:bool = let %93
- if %x_102 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %95:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
- %96:i32 = load %95
- %x_107:i32 = let %96
- %98:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %99:i32 = load %98
- %x_110:i32 = let %99
- %101:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %102:i32 = load %101
- %x_113:i32 = let %102
- %104:ptr<uniform, i32, read> = access %x_8, 0u, 0i, 0u
- %105:i32 = load %104
- %x_116:i32 = let %105
- %107:f32 = convert %x_107
- %108:f32 = let %107
- %109:f32 = convert %x_110
- %110:f32 = let %109
- %111:f32 = convert %x_113
- %112:f32 = let %111
- %113:f32 = convert %x_116
- %114:vec4<f32> = construct %108, %110, %112, %113
- store %x_GLF_color, %114
- exit_if # if_4
- }
- $B7: { # false
- %115:ptr<uniform, i32, read> = access %x_8, 0u, 1i, 0u
- %116:i32 = load %115
- %x_120:i32 = let %116
- %118:f32 = load_vector_element %v1, %x_120
- %x_122:f32 = let %118
- %120:vec4<f32> = construct %x_122, %x_122, %x_122, %x_122
- store %x_GLF_color, %120
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %122:void = call %main_1
- %123:vec4<f32> = load %x_GLF_color
- %124:main_out = construct %123
- ret %124
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index aebb60d..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,180 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %v1:ptr<function, vec4<f32>, read_write> = var
- %E:ptr<function, f32, read_write> = var
- %x_69:ptr<function, bool, read_write> = var
- %x_70:ptr<function, bool, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_86:ptr<function, bool, read_write> = var
- %x_101:ptr<function, bool, read_write> = var
- %x_102:ptr<function, bool, read_write> = var
- %14:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %15:f32 = load %14
- %16:vec4<f32> = construct %15
- %17:u32 = pack4x8snorm %16
- store %a, %17
- %18:u32 = load %a
- %19:vec4<f32> = unpack4x8unorm %18
- store %v1, %19
- %20:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %21:f32 = load %20
- store %E, %21
- %22:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %23:i32 = load %22
- %24:f32 = load_vector_element %v1, %23
- %25:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %26:f32 = load %25
- %27:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %28:f32 = load %27
- %29:f32 = div %26, %28
- %30:f32 = sub %24, %29
- %31:f32 = abs %30
- %32:f32 = load %E
- %33:bool = lt %31, %32
- %x_54:bool = let %33
- store %x_70, %x_54
- if %x_54 [t: $B3] { # if_1
- $B3: { # true
- %35:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %36:i32 = load %35
- %37:f32 = load_vector_element %v1, %36
- %38:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %39:f32 = load %38
- %40:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %41:f32 = load %40
- %42:f32 = div %39, %41
- %43:f32 = sub %37, %42
- %44:f32 = abs %43
- %45:f32 = load %E
- %46:bool = lt %44, %45
- store %x_69, %46
- %47:bool = load %x_69
- store %x_70, %47
- exit_if # if_1
- }
- }
- %48:bool = load %x_70
- store %x_86, %48
- %49:bool = load %x_70
- if %49 [t: $B4] { # if_2
- $B4: { # true
- %50:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %51:i32 = load %50
- %52:f32 = load_vector_element %v1, %51
- %53:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %54:f32 = load %53
- %55:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %56:f32 = load %55
- %57:f32 = div %54, %56
- %58:f32 = sub %52, %57
- %59:f32 = abs %58
- %60:f32 = load %E
- %61:bool = lt %59, %60
- store %x_85, %61
- %62:bool = load %x_85
- store %x_86, %62
- exit_if # if_2
- }
- }
- %63:bool = load %x_86
- store %x_102, %63
- %64:bool = load %x_86
- if %64 [t: $B5] { # if_3
- $B5: { # true
- %65:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %66:i32 = load %65
- %67:f32 = load_vector_element %v1, %66
- %68:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %69:f32 = load %68
- %70:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %71:f32 = load %70
- %72:f32 = div %69, %71
- %73:f32 = sub %67, %72
- %74:f32 = abs %73
- %75:f32 = load %E
- %76:bool = lt %74, %75
- store %x_101, %76
- %77:bool = load %x_101
- store %x_102, %77
- exit_if # if_3
- }
- }
- %78:bool = load %x_102
- if %78 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %79:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %80:i32 = load %79
- %81:f32 = convert %80
- %82:f32 = let %81
- %83:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %84:i32 = load %83
- %85:f32 = convert %84
- %86:f32 = let %85
- %87:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %88:i32 = load %87
- %89:f32 = convert %88
- %90:f32 = let %89
- %91:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %92:i32 = load %91
- %93:f32 = convert %92
- %94:vec4<f32> = construct %82, %86, %90, %93
- store %x_GLF_color, %94
- exit_if # if_4
- }
- $B7: { # false
- %95:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %96:i32 = load %95
- %97:f32 = convert %96
- %98:vec4<f32> = construct %97
- store %x_GLF_color, %98
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %100:void = call %main_1
- %101:vec4<f32> = load %x_GLF_color
- %102:main_out = construct %101
- ret %102
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 4fa600b..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-inst-combine-simplify-demanded-packsnorm-unpackunorm/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,210 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %v1:ptr<function, vec4<f32>, read_write> = var
- %E:ptr<function, f32, read_write> = var
- %x_69:ptr<function, bool, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_101:ptr<function, bool, read_write> = var
- %x_70_phi:ptr<function, bool, read_write> = var
- %x_86_phi:ptr<function, bool, read_write> = var
- %x_102_phi:ptr<function, bool, read_write> = var
- %14:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %15:f32 = load %14
- %x_35:f32 = let %15
- %17:vec4<f32> = construct %x_35, %x_35, %x_35, %x_35
- %18:u32 = pack4x8snorm %17
- store %a, %18
- %19:u32 = load %a
- %x_38:u32 = let %19
- %21:vec4<f32> = unpack4x8unorm %x_38
- store %v1, %21
- %22:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %23:f32 = load %22
- %x_41:f32 = let %23
- store %E, %x_41
- %25:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %26:i32 = load %25
- %x_43:i32 = let %26
- %28:f32 = load_vector_element %v1, %x_43
- %x_45:f32 = let %28
- %30:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %31:f32 = load %30
- %x_47:f32 = let %31
- %33:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %34:f32 = load %33
- %x_49:f32 = let %34
- %36:f32 = load %E
- %x_53:f32 = let %36
- %38:f32 = div %x_47, %x_49
- %39:f32 = sub %x_45, %38
- %40:f32 = abs %39
- %41:bool = lt %40, %x_53
- %x_54:bool = let %41
- store %x_70_phi, %x_54
- if %x_54 [t: $B3] { # if_1
- $B3: { # true
- %43:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %44:i32 = load %43
- %x_58:i32 = let %44
- %46:f32 = load_vector_element %v1, %x_58
- %x_60:f32 = let %46
- %48:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %49:f32 = load %48
- %x_62:f32 = let %49
- %51:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %52:f32 = load %51
- %x_64:f32 = let %52
- %54:f32 = load %E
- %x_68:f32 = let %54
- %56:f32 = div %x_62, %x_64
- %57:f32 = sub %x_60, %56
- %58:f32 = abs %57
- %59:bool = lt %58, %x_68
- store %x_69, %59
- %60:bool = load %x_69
- store %x_70_phi, %60
- exit_if # if_1
- }
- }
- %61:bool = load %x_70_phi
- %x_70:bool = let %61
- store %x_86_phi, %x_70
- if %x_70 [t: $B4] { # if_2
- $B4: { # true
- %63:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %64:i32 = load %63
- %x_74:i32 = let %64
- %66:f32 = load_vector_element %v1, %x_74
- %x_76:f32 = let %66
- %68:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %69:f32 = load %68
- %x_78:f32 = let %69
- %71:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %72:f32 = load %71
- %x_80:f32 = let %72
- %74:f32 = load %E
- %x_84:f32 = let %74
- %76:f32 = div %x_78, %x_80
- %77:f32 = sub %x_76, %76
- %78:f32 = abs %77
- %79:bool = lt %78, %x_84
- store %x_85, %79
- %80:bool = load %x_85
- store %x_86_phi, %80
- exit_if # if_2
- }
- }
- %81:bool = load %x_86_phi
- %x_86:bool = let %81
- store %x_102_phi, %x_86
- if %x_86 [t: $B5] { # if_3
- $B5: { # true
- %83:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %84:i32 = load %83
- %x_90:i32 = let %84
- %86:f32 = load_vector_element %v1, %x_90
- %x_92:f32 = let %86
- %88:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %89:f32 = load %88
- %x_94:f32 = let %89
- %91:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %92:f32 = load %91
- %x_96:f32 = let %92
- %94:f32 = load %E
- %x_100:f32 = let %94
- %96:f32 = div %x_94, %x_96
- %97:f32 = sub %x_92, %96
- %98:f32 = abs %97
- %99:bool = lt %98, %x_100
- store %x_101, %99
- %100:bool = load %x_101
- store %x_102_phi, %100
- exit_if # if_3
- }
- }
- %101:bool = load %x_102_phi
- %x_102:bool = let %101
- if %x_102 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %103:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %104:i32 = load %103
- %x_107:i32 = let %104
- %106:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %107:i32 = load %106
- %x_110:i32 = let %107
- %109:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %110:i32 = load %109
- %x_113:i32 = let %110
- %112:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %113:i32 = load %112
- %x_116:i32 = let %113
- %115:f32 = convert %x_107
- %116:f32 = let %115
- %117:f32 = convert %x_110
- %118:f32 = let %117
- %119:f32 = convert %x_113
- %120:f32 = let %119
- %121:f32 = convert %x_116
- %122:vec4<f32> = construct %116, %118, %120, %121
- store %x_GLF_color, %122
- exit_if # if_4
- }
- $B7: { # false
- %123:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %124:i32 = load %123
- %x_120:i32 = let %124
- %126:f32 = convert %x_120
- %x_121:f32 = let %126
- %128:vec4<f32> = construct %x_121, %x_121, %x_121, %x_121
- store %x_GLF_color, %128
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %130:void = call %main_1
- %131:vec4<f32> = load %x_GLF_color
- %132:main_out = construct %131
- ret %132
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 4104033..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,141 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 3> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_9:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %f:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %x_66:ptr<function, bool, read_write> = var
- %x_67:ptr<function, bool, read_write> = var
- %9:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %10:f32 = load %9
- store %f, %10
- %11:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %12:i32 = load %11
- store %i, %12
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %13:i32 = load %i
- %14:ptr<uniform, i32, read> = access %x_9, 0u, 0i, 0u
- %15:i32 = load %14
- %16:bool = lt %13, %15
- if %16 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %17:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %18:f32 = load %17
- %19:f32 = negation %18
- %20:f32 = load %f
- %21:f32 = mul %19, %20
- %22:f32 = abs %21
- %23:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %24:f32 = load %23
- %25:f32 = add %22, %24
- store %f, %25
- continue # -> $B4
- }
- $B4: { # continuing
- %26:i32 = load %i
- %27:i32 = add %26, 1i
- store %i, %27
- next_iteration # -> $B3
- }
- }
- %28:f32 = load %f
- %29:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %30:f32 = load %29
- %31:bool = gt %28, %30
- %x_60:bool = let %31
- store %x_67, %x_60
- if %x_60 [t: $B7] { # if_2
- $B7: { # true
- %33:f32 = load %f
- %34:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %35:f32 = load %34
- %36:bool = lt %33, %35
- store %x_66, %36
- %37:bool = load %x_66
- store %x_67, %37
- exit_if # if_2
- }
- }
- %38:bool = load %x_67
- if %38 [t: $B8, f: $B9] { # if_3
- $B8: { # true
- %39:ptr<uniform, i32, read> = access %x_9, 0u, 2i, 0u
- %40:i32 = load %39
- %41:f32 = convert %40
- %42:f32 = let %41
- %43:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %44:i32 = load %43
- %45:f32 = convert %44
- %46:f32 = let %45
- %47:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %48:i32 = load %47
- %49:f32 = convert %48
- %50:f32 = let %49
- %51:ptr<uniform, i32, read> = access %x_9, 0u, 2i, 0u
- %52:i32 = load %51
- %53:f32 = convert %52
- %54:vec4<f32> = construct %42, %46, %50, %53
- store %x_GLF_color, %54
- exit_if # if_3
- }
- $B9: { # false
- %55:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %56:i32 = load %55
- %57:f32 = convert %56
- %58:vec4<f32> = construct %57
- store %x_GLF_color, %58
- exit_if # if_3
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B10: {
- %60:void = call %main_1
- %61:vec4<f32> = load %x_GLF_color
- %62:main_out = construct %61
- ret %62
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 79fa609..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,160 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 3> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_9:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %f:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- %x_66:ptr<function, bool, read_write> = var
- %x_67_phi:ptr<function, bool, read_write> = var
- %9:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %10:f32 = load %9
- %x_34:f32 = let %10
- store %f, %x_34
- %12:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %13:i32 = load %12
- %x_36:i32 = let %13
- store %i, %x_36
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %15:i32 = load %i
- %x_41:i32 = let %15
- %17:ptr<uniform, i32, read> = access %x_9, 0u, 0i, 0u
- %18:i32 = load %17
- %x_43:i32 = let %18
- %20:bool = lt %x_41, %x_43
- if %20 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %21:ptr<uniform, f32, read> = access %x_6, 0u, 3i, 0u
- %22:f32 = load %21
- %x_47:f32 = let %22
- %24:f32 = load %f
- %x_49:f32 = let %24
- %26:ptr<uniform, f32, read> = access %x_6, 0u, 0i, 0u
- %27:f32 = load %26
- %x_53:f32 = let %27
- %29:f32 = negation %x_47
- %30:f32 = mul %29, %x_49
- %31:f32 = abs %30
- %32:f32 = add %31, %x_53
- store %f, %32
- continue # -> $B4
- }
- $B4: { # continuing
- %33:i32 = load %i
- %x_55:i32 = let %33
- %35:i32 = add %x_55, 1i
- store %i, %35
- next_iteration # -> $B3
- }
- }
- %36:f32 = load %f
- %x_57:f32 = let %36
- %38:ptr<uniform, f32, read> = access %x_6, 0u, 1i, 0u
- %39:f32 = load %38
- %x_59:f32 = let %39
- %41:bool = gt %x_57, %x_59
- %x_60:bool = let %41
- store %x_67_phi, %x_60
- if %x_60 [t: $B7] { # if_2
- $B7: { # true
- %43:f32 = load %f
- %x_63:f32 = let %43
- %45:ptr<uniform, f32, read> = access %x_6, 0u, 2i, 0u
- %46:f32 = load %45
- %x_65:f32 = let %46
- %48:bool = lt %x_63, %x_65
- store %x_66, %48
- %49:bool = load %x_66
- store %x_67_phi, %49
- exit_if # if_2
- }
- }
- %50:bool = load %x_67_phi
- %x_67:bool = let %50
- if %x_67 [t: $B8, f: $B9] { # if_3
- $B8: { # true
- %52:ptr<uniform, i32, read> = access %x_9, 0u, 2i, 0u
- %53:i32 = load %52
- %x_72:i32 = let %53
- %55:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %56:i32 = load %55
- %x_75:i32 = let %56
- %58:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %59:i32 = load %58
- %x_78:i32 = let %59
- %61:ptr<uniform, i32, read> = access %x_9, 0u, 2i, 0u
- %62:i32 = load %61
- %x_81:i32 = let %62
- %64:f32 = convert %x_72
- %65:f32 = let %64
- %66:f32 = convert %x_75
- %67:f32 = let %66
- %68:f32 = convert %x_78
- %69:f32 = let %68
- %70:f32 = convert %x_81
- %71:vec4<f32> = construct %65, %67, %69, %70
- store %x_GLF_color, %71
- exit_if # if_3
- }
- $B9: { # false
- %72:ptr<uniform, i32, read> = access %x_9, 0u, 1i, 0u
- %73:i32 = load %72
- %x_85:i32 = let %73
- %75:f32 = convert %x_85
- %x_86:f32 = let %75
- %77:vec4<f32> = construct %x_86, %x_86, %x_86, %x_86
- store %x_GLF_color, %77
- exit_if # if_3
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B10: {
- %79:void = call %main_1
- %80:vec4<f32> = load %x_GLF_color
- %81:main_out = construct %80
- ret %81
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index c3f59bc..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,188 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_8:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_10:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %values:ptr<function, vec4<f32>, read_write> = var
- %r:ptr<function, vec4<f32>, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_86:ptr<function, bool, read_write> = var
- %x_101:ptr<function, bool, read_write> = var
- %x_102:ptr<function, bool, read_write> = var
- %x_117:ptr<function, bool, read_write> = var
- %x_118:ptr<function, bool, read_write> = var
- store %a, 1006648320u
- %14:u32 = load %a
- %15:vec4<f32> = unpack4x8unorm %14
- store %values, %15
- %16:ptr<uniform, f32, read> = access %x_8, 0u, 3i, 0u
- %17:f32 = load %16
- %18:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
- %19:f32 = load %18
- %20:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
- %21:f32 = load %20
- %22:f32 = div %19, %21
- %23:ptr<uniform, f32, read> = access %x_8, 0u, 3i, 0u
- %24:f32 = load %23
- %25:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
- %26:f32 = load %25
- %27:f32 = div %24, %26
- %28:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
- %29:f32 = load %28
- %30:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
- %31:f32 = load %30
- %32:f32 = div %29, %31
- %33:vec4<f32> = construct %17, %22, %27, %32
- store %r, %33
- %34:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %35:i32 = load %34
- %36:f32 = load_vector_element %values, %35
- %37:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %38:i32 = load %37
- %39:f32 = load_vector_element %r, %38
- %40:f32 = sub %36, %39
- %41:f32 = abs %40
- %42:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %43:f32 = load %42
- %44:bool = lt %41, %43
- %x_70:bool = let %44
- store %x_86, %x_70
- if %x_70 [t: $B3] { # if_1
- $B3: { # true
- %46:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %47:i32 = load %46
- %48:f32 = load_vector_element %values, %47
- %49:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %50:i32 = load %49
- %51:f32 = load_vector_element %r, %50
- %52:f32 = sub %48, %51
- %53:f32 = abs %52
- %54:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %55:f32 = load %54
- %56:bool = lt %53, %55
- store %x_85, %56
- %57:bool = load %x_85
- store %x_86, %57
- exit_if # if_1
- }
- }
- %58:bool = load %x_86
- store %x_102, %58
- %59:bool = load %x_86
- if %59 [t: $B4] { # if_2
- $B4: { # true
- %60:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %61:i32 = load %60
- %62:f32 = load_vector_element %values, %61
- %63:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %64:i32 = load %63
- %65:f32 = load_vector_element %r, %64
- %66:f32 = sub %62, %65
- %67:f32 = abs %66
- %68:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %69:f32 = load %68
- %70:bool = lt %67, %69
- store %x_101, %70
- %71:bool = load %x_101
- store %x_102, %71
- exit_if # if_2
- }
- }
- %72:bool = load %x_102
- store %x_118, %72
- %73:bool = load %x_102
- if %73 [t: $B5] { # if_3
- $B5: { # true
- %74:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %75:i32 = load %74
- %76:f32 = load_vector_element %values, %75
- %77:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %78:i32 = load %77
- %79:f32 = load_vector_element %r, %78
- %80:f32 = sub %76, %79
- %81:f32 = abs %80
- %82:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %83:f32 = load %82
- %84:bool = lt %81, %83
- store %x_117, %84
- %85:bool = load %x_117
- store %x_118, %85
- exit_if # if_3
- }
- }
- %86:bool = load %x_118
- if %86 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %87:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %88:i32 = load %87
- %89:f32 = convert %88
- %90:f32 = let %89
- %91:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %92:i32 = load %91
- %93:f32 = convert %92
- %94:f32 = let %93
- %95:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %96:i32 = load %95
- %97:f32 = convert %96
- %98:f32 = let %97
- %99:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %100:i32 = load %99
- %101:f32 = convert %100
- %102:vec4<f32> = construct %90, %94, %98, %101
- store %x_GLF_color, %102
- exit_if # if_4
- }
- $B7: { # false
- %103:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %104:i32 = load %103
- %105:f32 = convert %104
- %106:vec4<f32> = construct %105
- store %x_GLF_color, %106
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %108:void = call %main_1
- %109:vec4<f32> = load %x_GLF_color
- %110:main_out = construct %109
- ret %110
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 89e9278..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/cov-packhalf-unpackunorm/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,223 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
- el:f32 @offset(0)
-}
-
-buf0 = struct @align(4) {
- x_GLF_uniform_float_values:array<strided_arr, 4> @offset(0)
-}
-
-strided_arr_1 = struct @align(4) {
- el:i32 @offset(0)
-}
-
-buf1 = struct @align(4) {
- x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_8:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_10:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %a:ptr<function, u32, read_write> = var
- %values:ptr<function, vec4<f32>, read_write> = var
- %r:ptr<function, vec4<f32>, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_101:ptr<function, bool, read_write> = var
- %x_117:ptr<function, bool, read_write> = var
- %x_86_phi:ptr<function, bool, read_write> = var
- %x_102_phi:ptr<function, bool, read_write> = var
- %x_118_phi:ptr<function, bool, read_write> = var
- store %a, 1006648320u
- %14:u32 = load %a
- %x_38:u32 = let %14
- %16:vec4<f32> = unpack4x8unorm %x_38
- store %values, %16
- %17:ptr<uniform, f32, read> = access %x_8, 0u, 3i, 0u
- %18:f32 = load %17
- %x_41:f32 = let %18
- %20:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
- %21:f32 = load %20
- %x_43:f32 = let %21
- %23:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
- %24:f32 = load %23
- %x_45:f32 = let %24
- %26:ptr<uniform, f32, read> = access %x_8, 0u, 3i, 0u
- %27:f32 = load %26
- %x_48:f32 = let %27
- %29:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
- %30:f32 = load %29
- %x_50:f32 = let %30
- %32:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
- %33:f32 = load %32
- %x_53:f32 = let %33
- %35:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
- %36:f32 = load %35
- %x_55:f32 = let %36
- %38:f32 = div %x_43, %x_45
- %39:f32 = div %x_48, %x_50
- %40:f32 = div %x_53, %x_55
- %41:vec4<f32> = construct %x_41, %38, %39, %40
- store %r, %41
- %42:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %43:i32 = load %42
- %x_59:i32 = let %43
- %45:f32 = load_vector_element %values, %x_59
- %x_61:f32 = let %45
- %47:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %48:i32 = load %47
- %x_63:i32 = let %48
- %50:f32 = load_vector_element %r, %x_63
- %x_65:f32 = let %50
- %52:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %53:f32 = load %52
- %x_69:f32 = let %53
- %55:f32 = sub %x_61, %x_65
- %56:f32 = abs %55
- %57:bool = lt %56, %x_69
- %x_70:bool = let %57
- store %x_86_phi, %x_70
- if %x_70 [t: $B3] { # if_1
- $B3: { # true
- %59:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %60:i32 = load %59
- %x_74:i32 = let %60
- %62:f32 = load_vector_element %values, %x_74
- %x_76:f32 = let %62
- %64:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %65:i32 = load %64
- %x_78:i32 = let %65
- %67:f32 = load_vector_element %r, %x_78
- %x_80:f32 = let %67
- %69:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %70:f32 = load %69
- %x_84:f32 = let %70
- %72:f32 = sub %x_76, %x_80
- %73:f32 = abs %72
- %74:bool = lt %73, %x_84
- store %x_85, %74
- %75:bool = load %x_85
- store %x_86_phi, %75
- exit_if # if_1
- }
- }
- %76:bool = load %x_86_phi
- %x_86:bool = let %76
- store %x_102_phi, %x_86
- if %x_86 [t: $B4] { # if_2
- $B4: { # true
- %78:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %79:i32 = load %78
- %x_90:i32 = let %79
- %81:f32 = load_vector_element %values, %x_90
- %x_92:f32 = let %81
- %83:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
- %84:i32 = load %83
- %x_94:i32 = let %84
- %86:f32 = load_vector_element %r, %x_94
- %x_96:f32 = let %86
- %88:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %89:f32 = load %88
- %x_100:f32 = let %89
- %91:f32 = sub %x_92, %x_96
- %92:f32 = abs %91
- %93:bool = lt %92, %x_100
- store %x_101, %93
- %94:bool = load %x_101
- store %x_102_phi, %94
- exit_if # if_2
- }
- }
- %95:bool = load %x_102_phi
- %x_102:bool = let %95
- store %x_118_phi, %x_102
- if %x_102 [t: $B5] { # if_3
- $B5: { # true
- %97:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %98:i32 = load %97
- %x_106:i32 = let %98
- %100:f32 = load_vector_element %values, %x_106
- %x_108:f32 = let %100
- %102:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
- %103:i32 = load %102
- %x_110:i32 = let %103
- %105:f32 = load_vector_element %r, %x_110
- %x_112:f32 = let %105
- %107:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
- %108:f32 = load %107
- %x_116:f32 = let %108
- %110:f32 = sub %x_108, %x_112
- %111:f32 = abs %110
- %112:bool = lt %111, %x_116
- store %x_117, %112
- %113:bool = load %x_117
- store %x_118_phi, %113
- exit_if # if_3
- }
- }
- %114:bool = load %x_118_phi
- %x_118:bool = let %114
- if %x_118 [t: $B6, f: $B7] { # if_4
- $B6: { # true
- %116:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %117:i32 = load %116
- %x_123:i32 = let %117
- %119:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %120:i32 = load %119
- %x_126:i32 = let %120
- %122:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %123:i32 = load %122
- %x_129:i32 = let %123
- %125:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
- %126:i32 = load %125
- %x_132:i32 = let %126
- %128:f32 = convert %x_123
- %129:f32 = let %128
- %130:f32 = convert %x_126
- %131:f32 = let %130
- %132:f32 = convert %x_129
- %133:f32 = let %132
- %134:f32 = convert %x_132
- %135:vec4<f32> = construct %129, %131, %133, %134
- store %x_GLF_color, %135
- exit_if # if_4
- }
- $B7: { # false
- %136:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
- %137:i32 = load %136
- %x_136:i32 = let %137
- %139:f32 = convert %x_136
- %x_137:f32 = let %139
- %141:vec4<f32> = construct %x_137, %x_137, %x_137, %x_137
- store %x_GLF_color, %141
- exit_if # if_4
- }
- }
- ret
- }
-}
-%tint_symbol = @fragment func():main_out {
- $B8: {
- %143:void = call %main_1
- %144:vec4<f32> = load %x_GLF_color
- %145:main_out = construct %144
- ret %145
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.ir.msl
deleted file mode 100644
index 65d1eb6..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,354 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_51:ptr<function, f32, read_write> = var
- %x_55:ptr<function, f32, read_write> = var
- %x_58:ptr<function, i32, read_write> = var
- %x_56:ptr<function, f32, read_write> = var
- %x_81:ptr<function, f32, read_write> = var
- %x_82:ptr<function, f32, read_write> = var
- %x_83:ptr<function, bool, read_write> = var
- %x_85:ptr<function, f32, read_write> = var
- %x_118:ptr<function, f32, read_write> = var
- %x_119:ptr<function, f32, read_write> = var
- %x_122:ptr<function, f32, read_write> = var
- %x_129:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %18:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
- %19:f32 = load_vector_element %18, 0u
- %20:f32 = mul %19, 0.125f
- %21:f32 = round %20
- %x_49:f32 = let %21
- %23:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_51, %23
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_55, -0.5f
- store %x_58, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_68:ptr<function, f32, read_write> = var
- %x_76:ptr<function, f32, read_write> = var
- %x_59:ptr<function, i32, read_write> = var
- store %x_81, 0.0f
- %27:f32 = load %x_55
- store %x_82, %27
- store %x_83, false
- %28:i32 = load %x_58
- %29:bool = lt %28, 800i
- if %29 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_75:ptr<function, f32, read_write> = var
- %31:i32 = load %x_58
- %32:i32 = call %tint_mod_i32, %31, 32i
- %34:bool = eq %32, 0i
- if %34 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %35:f32 = load %x_55
- %36:f32 = add %35, 0.40000000596046447754f
- store %x_68, %36
- %37:f32 = load %x_68
- store %x_56, %37
- exit_if # if_2
- }
- $B9: { # false
- %38:f32 = load %x_55
- store %x_76, %38
- %39:i32 = load %x_58
- %40:f32 = convert %39
- %41:f32 = let %40
- %42:f32 = round %x_49
- %43:f32 = let %42
- %44:i32 = load %x_58
- %45:f32 = convert %44
- %46:f32 = let %45
- %47:f32 = round %x_49
- %48:f32 = div %46, %47
- %49:f32 = floor %48
- %50:f32 = mul %43, %49
- %51:f32 = sub %41, %50
- %52:bool = lte %51, 0.00999999977648258209f
- if %52 [t: $B10] { # if_3
- $B10: { # true
- %53:f32 = load %x_55
- %54:f32 = add %53, 100.0f
- store %x_75, %54
- %55:f32 = load %x_75
- store %x_76, %55
- exit_if # if_3
- }
- }
- %56:f32 = load %x_76
- store %x_56, %56
- exit_if # if_2
- }
- }
- %57:i32 = load %x_58
- %58:f32 = convert %57
- %59:f32 = load %x_51
- %60:bool = gte %58, %59
- if %60 [t: $B11] { # if_4
- $B11: { # true
- %61:f32 = load %x_56
- store %x_81, %61
- %62:f32 = load %x_56
- store %x_82, %62
- store %x_83, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %63:i32 = load %x_58
- %64:i32 = add %63, 1i
- store %x_59, %64
- %65:f32 = load %x_56
- store %x_55, %65
- %66:i32 = load %x_59
- store %x_58, %66
- next_iteration # -> $B4
- }
- }
- %67:f32 = load %x_81
- store %x_85, %67
- %68:bool = load %x_83
- if %68 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- %69:f32 = load %x_82
- store %x_85, %69
- exit_switch # switch_1
- }
- }
- %x_88:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_93:ptr<function, f32, read_write> = var
- %x_120:ptr<function, bool, read_write> = var
- %75:f32 = load %x_85
- store_vector_element %c, 0u, %75
- %76:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_88, %76
- switch 0u [c: (default, $B13)] { # switch_2
- $B13: { # case
- store %x_92, -0.5f
- store %x_95, 1i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %x_105:ptr<function, f32, read_write> = var
- %x_113:ptr<function, f32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- store %x_118, 0.0f
- %80:f32 = load %x_92
- store %x_119, %80
- store %x_120, false
- %81:i32 = load %x_95
- %82:bool = lt %81, 800i
- if %82 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %x_112:ptr<function, f32, read_write> = var
- %84:i32 = load %x_95
- %85:i32 = call %tint_mod_i32, %84, 32i
- %86:bool = eq %85, 0i
- if %86 [t: $B18, f: $B19] { # if_7
- $B18: { # true
- %87:f32 = load %x_92
- %88:f32 = add %87, 0.40000000596046447754f
- store %x_105, %88
- %89:f32 = load %x_105
- store %x_93, %89
- exit_if # if_7
- }
- $B19: { # false
- %90:f32 = load %x_92
- store %x_113, %90
- %91:i32 = load %x_95
- %92:f32 = convert %91
- %93:f32 = let %92
- %94:f32 = round %x_49
- %95:f32 = let %94
- %96:i32 = load %x_95
- %97:f32 = convert %96
- %98:f32 = let %97
- %99:f32 = round %x_49
- %100:f32 = div %98, %99
- %101:f32 = floor %100
- %102:f32 = mul %95, %101
- %103:f32 = sub %93, %102
- %104:bool = lte %103, 0.00999999977648258209f
- if %104 [t: $B20] { # if_8
- $B20: { # true
- %105:f32 = load %x_92
- %106:f32 = add %105, 100.0f
- store %x_112, %106
- %107:f32 = load %x_112
- store %x_113, %107
- exit_if # if_8
- }
- }
- %108:f32 = load %x_113
- store %x_93, %108
- exit_if # if_7
- }
- }
- %109:i32 = load %x_95
- %110:f32 = convert %109
- %111:f32 = load %x_88
- %112:bool = gte %110, %111
- if %112 [t: $B21] { # if_9
- $B21: { # true
- %113:f32 = load %x_93
- store %x_118, %113
- %114:f32 = load %x_93
- store %x_119, %114
- store %x_120, true
- exit_loop # loop_2
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %115:i32 = load %x_95
- %116:i32 = add %115, 1i
- store %x_96, %116
- %117:f32 = load %x_93
- store %x_92, %117
- %118:i32 = load %x_96
- store %x_95, %118
- next_iteration # -> $B14
- }
- }
- %119:f32 = load %x_118
- store %x_122, %119
- %120:bool = load %x_120
- if %120 [t: $B22] { # if_10
- $B22: { # true
- exit_switch # switch_2
- }
- }
- %121:f32 = load %x_119
- store %x_122, %121
- exit_switch # switch_2
- }
- }
- %122:f32 = load %x_122
- store_vector_element %c, 1u, %122
- %123:f32 = load_vector_element %c, 0u
- %124:f32 = load_vector_element %c, 1u
- %125:f32 = add %123, %124
- store_vector_element %c, 2u, %125
- store %x_129, 0i
- loop [b: $B23, c: $B24] { # loop_3
- $B23: { # body
- %x_130:ptr<function, i32, read_write> = var
- %127:i32 = load %x_129
- %128:bool = lt %127, 3i
- if %128 [t: $B25, f: $B26] { # if_11
- $B25: { # true
- exit_if # if_11
- }
- $B26: { # false
- exit_loop # loop_3
- }
- }
- %129:i32 = load %x_129
- %130:f32 = load_vector_element %c, %129
- %131:bool = gte %130, 1.0f
- if %131 [t: $B27] { # if_12
- $B27: { # true
- %132:i32 = load %x_129
- %133:i32 = load %x_129
- %134:f32 = load_vector_element %c, %133
- %135:i32 = load %x_129
- %136:f32 = load_vector_element %c, %135
- %137:f32 = mul %134, %136
- store_vector_element %c, %132, %137
- exit_if # if_12
- }
- }
- continue # -> $B24
- }
- $B24: { # continuing
- %138:i32 = load %x_129
- %139:i32 = add %138, 1i
- store %x_130, %139
- %140:i32 = load %x_130
- store %x_129, %140
- next_iteration # -> $B23
- }
- }
- %141:vec3<f32> = load %c
- %142:vec3<f32> = abs %141
- %143:vec3<f32> = normalize %142
- %x_145:vec3<f32> = let %143
- %145:f32 = access %x_145, 0u
- %146:f32 = access %x_145, 1u
- %147:f32 = access %x_145, 2u
- %148:vec4<f32> = construct %145, %146, %147, 1.0f
- store %x_GLF_color, %148
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %151:void = call %main_1
- %152:vec4<f32> = load %x_GLF_color
- %153:main_out = construct %152
- ret %153
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B29: {
- %156:bool = eq %rhs, 0i
- %157:bool = eq %lhs, -2147483648i
- %158:bool = eq %rhs, -1i
- %159:bool = and %157, %158
- %160:bool = or %156, %159
- %161:i32 = select %rhs, 1i, %160
- %162:i32 = let %161
- %163:i32 = div %lhs, %162
- %164:i32 = mul %163, %162
- %165:i32 = sub %lhs, %164
- ret %165
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.ir.msl
deleted file mode 100644
index f3275e4..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,383 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_51:ptr<function, f32, read_write> = var
- %x_55:ptr<function, f32, read_write> = var
- %x_56:ptr<function, f32, read_write> = var
- %x_81:ptr<function, f32, read_write> = var
- %x_82:ptr<function, f32, read_write> = var
- %x_118:ptr<function, f32, read_write> = var
- %x_119:ptr<function, f32, read_write> = var
- %x_55_phi:ptr<function, f32, read_write> = var
- %x_58_phi:ptr<function, i32, read_write> = var
- %x_81_phi:ptr<function, f32, read_write> = var
- %x_82_phi:ptr<function, f32, read_write> = var
- %x_83_phi:ptr<function, bool, read_write> = var
- %x_85_phi:ptr<function, f32, read_write> = var
- %x_122_phi:ptr<function, f32, read_write> = var
- %x_129_phi:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %21:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
- %22:f32 = load_vector_element %21, 0u
- %x_47:f32 = let %22
- %24:f32 = mul %x_47, 0.125f
- %25:f32 = round %24
- %x_49:f32 = let %25
- %27:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_51, %27
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_55_phi, -0.5f
- store %x_58_phi, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_68:ptr<function, f32, read_write> = var
- %x_76:ptr<function, f32, read_write> = var
- %x_59:ptr<function, i32, read_write> = var
- %x_56_phi:ptr<function, f32, read_write> = var
- %32:f32 = load %x_55_phi
- store %x_55, %32
- %33:i32 = load %x_58_phi
- %x_58:i32 = let %33
- store %x_81_phi, 0.0f
- %35:f32 = load %x_55
- store %x_82_phi, %35
- store %x_83_phi, false
- %36:bool = lt %x_58, 800i
- if %36 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_75:ptr<function, f32, read_write> = var
- %x_76_phi:ptr<function, f32, read_write> = var
- %39:i32 = call %tint_mod_i32, %x_58, 32i
- %41:bool = eq %39, 0i
- if %41 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %42:f32 = load %x_55
- %43:f32 = add %42, 0.40000000596046447754f
- store %x_68, %43
- %44:f32 = load %x_68
- store %x_56_phi, %44
- exit_if # if_2
- }
- $B9: { # false
- %45:f32 = load %x_55
- store %x_76_phi, %45
- %46:f32 = convert %x_58
- %47:f32 = let %46
- %48:f32 = round %x_49
- %49:f32 = let %48
- %50:f32 = convert %x_58
- %51:f32 = let %50
- %52:f32 = round %x_49
- %53:f32 = div %51, %52
- %54:f32 = floor %53
- %55:f32 = mul %49, %54
- %56:f32 = sub %47, %55
- %57:bool = lte %56, 0.00999999977648258209f
- if %57 [t: $B10] { # if_3
- $B10: { # true
- %58:f32 = load %x_55
- %59:f32 = add %58, 100.0f
- store %x_75, %59
- %60:f32 = load %x_75
- store %x_76_phi, %60
- exit_if # if_3
- }
- }
- %61:f32 = load %x_76_phi
- store %x_76, %61
- %62:f32 = load %x_76
- store %x_56_phi, %62
- exit_if # if_2
- }
- }
- %63:f32 = load %x_56_phi
- store %x_56, %63
- %64:f32 = convert %x_58
- %65:f32 = load %x_51
- %66:bool = gte %64, %65
- if %66 [t: $B11] { # if_4
- $B11: { # true
- %67:f32 = load %x_56
- store %x_81_phi, %67
- %68:f32 = load %x_56
- store %x_82_phi, %68
- store %x_83_phi, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %69:i32 = add %x_58, 1i
- store %x_59, %69
- %70:f32 = load %x_56
- store %x_55_phi, %70
- %71:i32 = load %x_59
- store %x_58_phi, %71
- next_iteration # -> $B4
- }
- }
- %72:f32 = load %x_81_phi
- store %x_81, %72
- %73:f32 = load %x_82_phi
- store %x_82, %73
- %74:bool = load %x_83_phi
- %x_83:bool = let %74
- %76:f32 = load %x_81
- store %x_85_phi, %76
- if %x_83 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- %77:f32 = load %x_82
- store %x_85_phi, %77
- exit_switch # switch_1
- }
- }
- %x_88:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_93:ptr<function, f32, read_write> = var
- %x_92_phi:ptr<function, f32, read_write> = var
- %x_95_phi:ptr<function, i32, read_write> = var
- %x_118_phi:ptr<function, f32, read_write> = var
- %x_119_phi:ptr<function, f32, read_write> = var
- %x_120_phi:ptr<function, bool, read_write> = var
- %86:f32 = load %x_85_phi
- %x_85:f32 = let %86
- store_vector_element %c, 0u, %x_85
- %88:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_88, %88
- switch 0u [c: (default, $B13)] { # switch_2
- $B13: { # case
- store %x_92_phi, -0.5f
- store %x_95_phi, 1i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %x_105:ptr<function, f32, read_write> = var
- %x_113:ptr<function, f32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- %x_93_phi:ptr<function, f32, read_write> = var
- %93:f32 = load %x_92_phi
- store %x_92, %93
- %94:i32 = load %x_95_phi
- %x_95:i32 = let %94
- store %x_118_phi, 0.0f
- %96:f32 = load %x_92
- store %x_119_phi, %96
- store %x_120_phi, false
- %97:bool = lt %x_95, 800i
- if %97 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %x_112:ptr<function, f32, read_write> = var
- %x_113_phi:ptr<function, f32, read_write> = var
- %100:i32 = call %tint_mod_i32, %x_95, 32i
- %101:bool = eq %100, 0i
- if %101 [t: $B18, f: $B19] { # if_7
- $B18: { # true
- %102:f32 = load %x_92
- %103:f32 = add %102, 0.40000000596046447754f
- store %x_105, %103
- %104:f32 = load %x_105
- store %x_93_phi, %104
- exit_if # if_7
- }
- $B19: { # false
- %105:f32 = load %x_92
- store %x_113_phi, %105
- %106:f32 = convert %x_95
- %107:f32 = let %106
- %108:f32 = round %x_49
- %109:f32 = let %108
- %110:f32 = convert %x_95
- %111:f32 = let %110
- %112:f32 = round %x_49
- %113:f32 = div %111, %112
- %114:f32 = floor %113
- %115:f32 = mul %109, %114
- %116:f32 = sub %107, %115
- %117:bool = lte %116, 0.00999999977648258209f
- if %117 [t: $B20] { # if_8
- $B20: { # true
- %118:f32 = load %x_92
- %119:f32 = add %118, 100.0f
- store %x_112, %119
- %120:f32 = load %x_112
- store %x_113_phi, %120
- exit_if # if_8
- }
- }
- %121:f32 = load %x_113_phi
- store %x_113, %121
- %122:f32 = load %x_113
- store %x_93_phi, %122
- exit_if # if_7
- }
- }
- %123:f32 = load %x_93_phi
- store %x_93, %123
- %124:f32 = convert %x_95
- %125:f32 = load %x_88
- %126:bool = gte %124, %125
- if %126 [t: $B21] { # if_9
- $B21: { # true
- %127:f32 = load %x_93
- store %x_118_phi, %127
- %128:f32 = load %x_93
- store %x_119_phi, %128
- store %x_120_phi, true
- exit_loop # loop_2
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %129:i32 = add %x_95, 1i
- store %x_96, %129
- %130:f32 = load %x_93
- store %x_92_phi, %130
- %131:i32 = load %x_96
- store %x_95_phi, %131
- next_iteration # -> $B14
- }
- }
- %132:f32 = load %x_118_phi
- store %x_118, %132
- %133:f32 = load %x_119_phi
- store %x_119, %133
- %134:bool = load %x_120_phi
- %x_120:bool = let %134
- %136:f32 = load %x_118
- store %x_122_phi, %136
- if %x_120 [t: $B22] { # if_10
- $B22: { # true
- exit_switch # switch_2
- }
- }
- %137:f32 = load %x_119
- store %x_122_phi, %137
- exit_switch # switch_2
- }
- }
- %138:f32 = load %x_122_phi
- %x_122:f32 = let %138
- store_vector_element %c, 1u, %x_122
- %140:f32 = load_vector_element %c, 0u
- %x_124:f32 = let %140
- %142:f32 = load_vector_element %c, 1u
- %x_125:f32 = let %142
- %144:f32 = add %x_124, %x_125
- store_vector_element %c, 2u, %144
- store %x_129_phi, 0i
- loop [b: $B23, c: $B24] { # loop_3
- $B23: { # body
- %x_130:ptr<function, i32, read_write> = var
- %146:i32 = load %x_129_phi
- %x_129:i32 = let %146
- %148:bool = lt %x_129, 3i
- if %148 [t: $B25, f: $B26] { # if_11
- $B25: { # true
- exit_if # if_11
- }
- $B26: { # false
- exit_loop # loop_3
- }
- }
- %149:f32 = load_vector_element %c, %x_129
- %x_136:f32 = let %149
- %151:bool = gte %x_136, 1.0f
- if %151 [t: $B27] { # if_12
- $B27: { # true
- %152:f32 = load_vector_element %c, %x_129
- %x_140:f32 = let %152
- %154:f32 = load_vector_element %c, %x_129
- %x_141:f32 = let %154
- %156:f32 = mul %x_140, %x_141
- store_vector_element %c, %x_129, %156
- exit_if # if_12
- }
- }
- continue # -> $B24
- }
- $B24: { # continuing
- %157:i32 = add %x_129, 1i
- store %x_130, %157
- %158:i32 = load %x_130
- store %x_129_phi, %158
- next_iteration # -> $B23
- }
- }
- %159:vec3<f32> = load %c
- %x_143:vec3<f32> = let %159
- %161:vec3<f32> = abs %x_143
- %162:vec3<f32> = normalize %161
- %x_145:vec3<f32> = let %162
- %164:f32 = access %x_145, 0u
- %165:f32 = access %x_145, 1u
- %166:f32 = access %x_145, 2u
- %167:vec4<f32> = construct %164, %165, %166, 1.0f
- store %x_GLF_color, %167
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %170:void = call %main_1
- %171:vec4<f32> = load %x_GLF_color
- %172:main_out = construct %171
- ret %172
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B29: {
- %175:bool = eq %rhs, 0i
- %176:bool = eq %lhs, -2147483648i
- %177:bool = eq %rhs, -1i
- %178:bool = and %176, %177
- %179:bool = or %175, %178
- %180:i32 = select %rhs, 1i, %179
- %181:i32 = let %180
- %182:i32 = div %lhs, %181
- %183:i32 = mul %182, %181
- %184:i32 = sub %lhs, %183
- ret %184
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.ir.msl
deleted file mode 100644
index a8138db..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,367 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_53:ptr<function, f32, read_write> = var
- %x_57:ptr<function, f32, read_write> = var
- %x_60:ptr<function, i32, read_write> = var
- %x_58:ptr<function, f32, read_write> = var
- %x_83:ptr<function, f32, read_write> = var
- %x_84:ptr<function, f32, read_write> = var
- %x_85:ptr<function, bool, read_write> = var
- %x_87:ptr<function, f32, read_write> = var
- %x_124:ptr<function, f32, read_write> = var
- %x_125:ptr<function, f32, read_write> = var
- %x_128:ptr<function, f32, read_write> = var
- %x_135:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %18:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
- %19:f32 = load_vector_element %18, 0u
- %x_47:f32 = let %19
- %21:vec2<f32> = construct 1.0f, %x_47
- %x_48:vec2<f32> = let %21
- %23:f32 = mul %x_47, 0.125f
- %24:f32 = round %23
- %x_50:f32 = let %24
- %x_51:vec2<f32> = let vec2<f32>(0.0f, -0.5f)
- %27:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_53, %27
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_57, -0.5f
- store %x_60, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_70:ptr<function, f32, read_write> = var
- %x_78:ptr<function, f32, read_write> = var
- %x_61:ptr<function, i32, read_write> = var
- store %x_83, 0.0f
- %31:f32 = load %x_57
- store %x_84, %31
- store %x_85, false
- %32:i32 = load %x_60
- %33:bool = lt %32, 800i
- if %33 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_77:ptr<function, f32, read_write> = var
- %35:i32 = load %x_60
- %36:i32 = call %tint_mod_i32, %35, 32i
- %38:bool = eq %36, 0i
- if %38 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %39:f32 = load %x_57
- %40:f32 = add %39, 0.40000000596046447754f
- store %x_70, %40
- %41:f32 = load %x_70
- store %x_58, %41
- exit_if # if_2
- }
- $B9: { # false
- %42:f32 = load %x_57
- store %x_78, %42
- %43:i32 = load %x_60
- %44:f32 = convert %43
- %45:f32 = let %44
- %46:f32 = round %x_50
- %47:f32 = let %46
- %48:i32 = load %x_60
- %49:f32 = convert %48
- %50:f32 = let %49
- %51:f32 = round %x_50
- %52:f32 = div %50, %51
- %53:f32 = floor %52
- %54:f32 = mul %47, %53
- %55:f32 = sub %45, %54
- %56:bool = lte %55, 0.00999999977648258209f
- if %56 [t: $B10] { # if_3
- $B10: { # true
- %57:f32 = load %x_57
- %58:f32 = add %57, 100.0f
- store %x_77, %58
- %59:f32 = load %x_77
- store %x_78, %59
- exit_if # if_3
- }
- }
- %60:f32 = load %x_78
- store %x_58, %60
- exit_if # if_2
- }
- }
- %61:i32 = load %x_60
- %62:f32 = convert %61
- %63:f32 = load %x_53
- %64:bool = gte %62, %63
- if %64 [t: $B11] { # if_4
- $B11: { # true
- %65:f32 = load %x_58
- store %x_83, %65
- %66:f32 = load %x_58
- store %x_84, %66
- store %x_85, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %67:i32 = load %x_60
- %68:i32 = add %67, 1i
- store %x_61, %68
- %69:f32 = load %x_58
- store %x_57, %69
- %70:i32 = load %x_61
- store %x_60, %70
- next_iteration # -> $B4
- }
- }
- %71:f32 = load %x_83
- store %x_87, %71
- %72:bool = load %x_85
- if %72 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- %73:f32 = load %x_84
- store %x_87, %73
- exit_switch # switch_1
- }
- }
- %x_92:ptr<function, f32, read_write> = var
- %x_98:ptr<function, f32, read_write> = var
- %x_101:ptr<function, i32, read_write> = var
- %x_99:ptr<function, f32, read_write> = var
- %x_126:ptr<function, bool, read_write> = var
- %79:f32 = load %x_84
- %80:f32 = load %x_83
- %81:vec4<f32> = construct %79, 0.40000000596046447754f, %80, 0.40000000596046447754f
- %x_89:vec4<f32> = let %81
- %83:f32 = load %x_87
- store_vector_element %c, 0u, %83
- %84:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_92, %84
- switch 0u [c: (default, $B13)] { # switch_2
- $B13: { # case
- %85:f32 = load %x_57
- %86:vec4<f32> = construct %x_51, 0.0f, %85
- %x_95:vec4<f32> = let %86
- %88:vec3<f32> = construct %x_48, -0.5f
- %89:f32 = access %88, 2u
- store %x_98, %89
- store %x_101, 1i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %x_111:ptr<function, f32, read_write> = var
- %x_119:ptr<function, f32, read_write> = var
- %x_102:ptr<function, i32, read_write> = var
- store %x_124, 0.0f
- %93:f32 = load %x_98
- store %x_125, %93
- store %x_126, false
- %94:i32 = load %x_101
- %95:bool = lt %94, 800i
- if %95 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %x_118:ptr<function, f32, read_write> = var
- %97:i32 = load %x_101
- %98:i32 = call %tint_mod_i32, %97, 32i
- %99:bool = eq %98, 0i
- if %99 [t: $B18, f: $B19] { # if_7
- $B18: { # true
- %100:f32 = load %x_98
- %101:f32 = add %100, 0.40000000596046447754f
- store %x_111, %101
- %102:f32 = load %x_111
- store %x_99, %102
- exit_if # if_7
- }
- $B19: { # false
- %103:f32 = load %x_98
- store %x_119, %103
- %104:i32 = load %x_101
- %105:f32 = convert %104
- %106:f32 = let %105
- %107:f32 = round %x_50
- %108:f32 = let %107
- %109:i32 = load %x_101
- %110:f32 = convert %109
- %111:f32 = let %110
- %112:f32 = round %x_50
- %113:f32 = div %111, %112
- %114:f32 = floor %113
- %115:f32 = mul %108, %114
- %116:f32 = sub %106, %115
- %117:bool = lte %116, 0.00999999977648258209f
- if %117 [t: $B20] { # if_8
- $B20: { # true
- %118:f32 = load %x_98
- %119:f32 = add %118, 100.0f
- store %x_118, %119
- %120:f32 = load %x_118
- store %x_119, %120
- exit_if # if_8
- }
- }
- %121:f32 = load %x_119
- store %x_99, %121
- exit_if # if_7
- }
- }
- %122:i32 = load %x_101
- %123:f32 = convert %122
- %124:f32 = load %x_92
- %125:bool = gte %123, %124
- if %125 [t: $B21] { # if_9
- $B21: { # true
- %126:f32 = load %x_99
- store %x_124, %126
- %127:f32 = load %x_99
- store %x_125, %127
- store %x_126, true
- exit_loop # loop_2
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %128:i32 = load %x_101
- %129:i32 = add %128, 1i
- store %x_102, %129
- %130:f32 = load %x_99
- store %x_98, %130
- %131:i32 = load %x_102
- store %x_101, %131
- next_iteration # -> $B14
- }
- }
- %132:f32 = load %x_124
- store %x_128, %132
- %133:bool = load %x_126
- if %133 [t: $B22] { # if_10
- $B22: { # true
- exit_switch # switch_2
- }
- }
- %134:f32 = load %x_125
- store %x_128, %134
- exit_switch # switch_2
- }
- }
- %135:f32 = load %x_128
- store_vector_element %c, 1u, %135
- %136:f32 = load_vector_element %c, 0u
- %137:f32 = load_vector_element %c, 1u
- %138:f32 = add %136, %137
- store_vector_element %c, 2u, %138
- store %x_135, 0i
- loop [b: $B23, c: $B24] { # loop_3
- $B23: { # body
- %x_136:ptr<function, i32, read_write> = var
- %140:i32 = load %x_135
- %141:bool = lt %140, 3i
- if %141 [t: $B25, f: $B26] { # if_11
- $B25: { # true
- exit_if # if_11
- }
- $B26: { # false
- exit_loop # loop_3
- }
- }
- %142:i32 = load %x_135
- %143:f32 = load_vector_element %c, %142
- %144:bool = gte %143, 1.0f
- if %144 [t: $B27] { # if_12
- $B27: { # true
- %145:i32 = load %x_135
- %146:i32 = load %x_135
- %147:f32 = load_vector_element %c, %146
- %148:i32 = load %x_135
- %149:f32 = load_vector_element %c, %148
- %150:f32 = mul %147, %149
- store_vector_element %c, %145, %150
- exit_if # if_12
- }
- }
- continue # -> $B24
- }
- $B24: { # continuing
- %151:i32 = load %x_135
- %152:i32 = add %151, 1i
- store %x_136, %152
- %153:i32 = load %x_136
- store %x_135, %153
- next_iteration # -> $B23
- }
- }
- %154:vec3<f32> = load %c
- %155:vec3<f32> = abs %154
- %156:vec3<f32> = normalize %155
- %x_151:vec3<f32> = let %156
- %158:f32 = access %x_151, 0u
- %159:f32 = access %x_151, 1u
- %160:f32 = access %x_151, 2u
- %161:vec4<f32> = construct %158, %159, %160, 1.0f
- store %x_GLF_color, %161
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %164:void = call %main_1
- %165:vec4<f32> = load %x_GLF_color
- %166:main_out = construct %165
- ret %166
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B29: {
- %169:bool = eq %rhs, 0i
- %170:bool = eq %lhs, -2147483648i
- %171:bool = eq %rhs, -1i
- %172:bool = and %170, %171
- %173:bool = or %169, %172
- %174:i32 = select %rhs, 1i, %173
- %175:i32 = let %174
- %176:i32 = div %lhs, %175
- %177:i32 = mul %176, %175
- %178:i32 = sub %lhs, %177
- ret %178
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.ir.msl
deleted file mode 100644
index 8d28638..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,396 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_53:ptr<function, f32, read_write> = var
- %x_57:ptr<function, f32, read_write> = var
- %x_58:ptr<function, f32, read_write> = var
- %x_83:ptr<function, f32, read_write> = var
- %x_84:ptr<function, f32, read_write> = var
- %x_124:ptr<function, f32, read_write> = var
- %x_125:ptr<function, f32, read_write> = var
- %x_57_phi:ptr<function, f32, read_write> = var
- %x_60_phi:ptr<function, i32, read_write> = var
- %x_83_phi:ptr<function, f32, read_write> = var
- %x_84_phi:ptr<function, f32, read_write> = var
- %x_85_phi:ptr<function, bool, read_write> = var
- %x_87_phi:ptr<function, f32, read_write> = var
- %x_128_phi:ptr<function, f32, read_write> = var
- %x_135_phi:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %21:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
- %22:f32 = load_vector_element %21, 0u
- %x_47:f32 = let %22
- %24:vec2<f32> = construct 1.0f, %x_47
- %x_48:vec2<f32> = let %24
- %26:f32 = mul %x_47, 0.125f
- %27:f32 = round %26
- %x_50:f32 = let %27
- %x_51:vec2<f32> = let vec2<f32>(0.0f, -0.5f)
- %30:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_53, %30
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_57_phi, -0.5f
- store %x_60_phi, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_70:ptr<function, f32, read_write> = var
- %x_78:ptr<function, f32, read_write> = var
- %x_61:ptr<function, i32, read_write> = var
- %x_58_phi:ptr<function, f32, read_write> = var
- %35:f32 = load %x_57_phi
- store %x_57, %35
- %36:i32 = load %x_60_phi
- %x_60:i32 = let %36
- store %x_83_phi, 0.0f
- %38:f32 = load %x_57
- store %x_84_phi, %38
- store %x_85_phi, false
- %39:bool = lt %x_60, 800i
- if %39 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_77:ptr<function, f32, read_write> = var
- %x_78_phi:ptr<function, f32, read_write> = var
- %42:i32 = call %tint_mod_i32, %x_60, 32i
- %44:bool = eq %42, 0i
- if %44 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %45:f32 = load %x_57
- %46:f32 = add %45, 0.40000000596046447754f
- store %x_70, %46
- %47:f32 = load %x_70
- store %x_58_phi, %47
- exit_if # if_2
- }
- $B9: { # false
- %48:f32 = load %x_57
- store %x_78_phi, %48
- %49:f32 = convert %x_60
- %50:f32 = let %49
- %51:f32 = round %x_50
- %52:f32 = let %51
- %53:f32 = convert %x_60
- %54:f32 = let %53
- %55:f32 = round %x_50
- %56:f32 = div %54, %55
- %57:f32 = floor %56
- %58:f32 = mul %52, %57
- %59:f32 = sub %50, %58
- %60:bool = lte %59, 0.00999999977648258209f
- if %60 [t: $B10] { # if_3
- $B10: { # true
- %61:f32 = load %x_57
- %62:f32 = add %61, 100.0f
- store %x_77, %62
- %63:f32 = load %x_77
- store %x_78_phi, %63
- exit_if # if_3
- }
- }
- %64:f32 = load %x_78_phi
- store %x_78, %64
- %65:f32 = load %x_78
- store %x_58_phi, %65
- exit_if # if_2
- }
- }
- %66:f32 = load %x_58_phi
- store %x_58, %66
- %67:f32 = convert %x_60
- %68:f32 = load %x_53
- %69:bool = gte %67, %68
- if %69 [t: $B11] { # if_4
- $B11: { # true
- %70:f32 = load %x_58
- store %x_83_phi, %70
- %71:f32 = load %x_58
- store %x_84_phi, %71
- store %x_85_phi, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %72:i32 = add %x_60, 1i
- store %x_61, %72
- %73:f32 = load %x_58
- store %x_57_phi, %73
- %74:i32 = load %x_61
- store %x_60_phi, %74
- next_iteration # -> $B4
- }
- }
- %75:f32 = load %x_83_phi
- store %x_83, %75
- %76:f32 = load %x_84_phi
- store %x_84, %76
- %77:bool = load %x_85_phi
- %x_85:bool = let %77
- %79:f32 = load %x_83
- store %x_87_phi, %79
- if %x_85 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- %80:f32 = load %x_84
- store %x_87_phi, %80
- exit_switch # switch_1
- }
- }
- %x_92:ptr<function, f32, read_write> = var
- %x_98:ptr<function, f32, read_write> = var
- %x_99:ptr<function, f32, read_write> = var
- %x_98_phi:ptr<function, f32, read_write> = var
- %x_101_phi:ptr<function, i32, read_write> = var
- %x_124_phi:ptr<function, f32, read_write> = var
- %x_125_phi:ptr<function, f32, read_write> = var
- %x_126_phi:ptr<function, bool, read_write> = var
- %89:f32 = load %x_87_phi
- %x_87:f32 = let %89
- %91:f32 = load %x_84
- %92:f32 = load %x_83
- %93:vec4<f32> = construct %91, 0.40000000596046447754f, %92, 0.40000000596046447754f
- %x_89:vec4<f32> = let %93
- store_vector_element %c, 0u, %x_87
- %95:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_92, %95
- switch 0u [c: (default, $B13)] { # switch_2
- $B13: { # case
- %96:f32 = load %x_57
- %97:vec4<f32> = construct %x_51, 0.0f, %96
- %x_95:vec4<f32> = let %97
- %99:vec3<f32> = construct %x_48, -0.5f
- %100:f32 = access %99, 2u
- %x_96:f32 = let %100
- store %x_98_phi, %x_96
- store %x_101_phi, 1i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %x_111:ptr<function, f32, read_write> = var
- %x_119:ptr<function, f32, read_write> = var
- %x_102:ptr<function, i32, read_write> = var
- %x_99_phi:ptr<function, f32, read_write> = var
- %106:f32 = load %x_98_phi
- store %x_98, %106
- %107:i32 = load %x_101_phi
- %x_101:i32 = let %107
- store %x_124_phi, 0.0f
- %109:f32 = load %x_98
- store %x_125_phi, %109
- store %x_126_phi, false
- %110:bool = lt %x_101, 800i
- if %110 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %x_118:ptr<function, f32, read_write> = var
- %x_119_phi:ptr<function, f32, read_write> = var
- %113:i32 = call %tint_mod_i32, %x_101, 32i
- %114:bool = eq %113, 0i
- if %114 [t: $B18, f: $B19] { # if_7
- $B18: { # true
- %115:f32 = load %x_98
- %116:f32 = add %115, 0.40000000596046447754f
- store %x_111, %116
- %117:f32 = load %x_111
- store %x_99_phi, %117
- exit_if # if_7
- }
- $B19: { # false
- %118:f32 = load %x_98
- store %x_119_phi, %118
- %119:f32 = convert %x_101
- %120:f32 = let %119
- %121:f32 = round %x_50
- %122:f32 = let %121
- %123:f32 = convert %x_101
- %124:f32 = let %123
- %125:f32 = round %x_50
- %126:f32 = div %124, %125
- %127:f32 = floor %126
- %128:f32 = mul %122, %127
- %129:f32 = sub %120, %128
- %130:bool = lte %129, 0.00999999977648258209f
- if %130 [t: $B20] { # if_8
- $B20: { # true
- %131:f32 = load %x_98
- %132:f32 = add %131, 100.0f
- store %x_118, %132
- %133:f32 = load %x_118
- store %x_119_phi, %133
- exit_if # if_8
- }
- }
- %134:f32 = load %x_119_phi
- store %x_119, %134
- %135:f32 = load %x_119
- store %x_99_phi, %135
- exit_if # if_7
- }
- }
- %136:f32 = load %x_99_phi
- store %x_99, %136
- %137:f32 = convert %x_101
- %138:f32 = load %x_92
- %139:bool = gte %137, %138
- if %139 [t: $B21] { # if_9
- $B21: { # true
- %140:f32 = load %x_99
- store %x_124_phi, %140
- %141:f32 = load %x_99
- store %x_125_phi, %141
- store %x_126_phi, true
- exit_loop # loop_2
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %142:i32 = add %x_101, 1i
- store %x_102, %142
- %143:f32 = load %x_99
- store %x_98_phi, %143
- %144:i32 = load %x_102
- store %x_101_phi, %144
- next_iteration # -> $B14
- }
- }
- %145:f32 = load %x_124_phi
- store %x_124, %145
- %146:f32 = load %x_125_phi
- store %x_125, %146
- %147:bool = load %x_126_phi
- %x_126:bool = let %147
- %149:f32 = load %x_124
- store %x_128_phi, %149
- if %x_126 [t: $B22] { # if_10
- $B22: { # true
- exit_switch # switch_2
- }
- }
- %150:f32 = load %x_125
- store %x_128_phi, %150
- exit_switch # switch_2
- }
- }
- %151:f32 = load %x_128_phi
- %x_128:f32 = let %151
- store_vector_element %c, 1u, %x_128
- %153:f32 = load_vector_element %c, 0u
- %x_130:f32 = let %153
- %155:f32 = load_vector_element %c, 1u
- %x_131:f32 = let %155
- %157:f32 = add %x_130, %x_131
- store_vector_element %c, 2u, %157
- store %x_135_phi, 0i
- loop [b: $B23, c: $B24] { # loop_3
- $B23: { # body
- %x_136:ptr<function, i32, read_write> = var
- %159:i32 = load %x_135_phi
- %x_135:i32 = let %159
- %161:bool = lt %x_135, 3i
- if %161 [t: $B25, f: $B26] { # if_11
- $B25: { # true
- exit_if # if_11
- }
- $B26: { # false
- exit_loop # loop_3
- }
- }
- %162:f32 = load_vector_element %c, %x_135
- %x_142:f32 = let %162
- %164:bool = gte %x_142, 1.0f
- if %164 [t: $B27] { # if_12
- $B27: { # true
- %165:f32 = load_vector_element %c, %x_135
- %x_146:f32 = let %165
- %167:f32 = load_vector_element %c, %x_135
- %x_147:f32 = let %167
- %169:f32 = mul %x_146, %x_147
- store_vector_element %c, %x_135, %169
- exit_if # if_12
- }
- }
- continue # -> $B24
- }
- $B24: { # continuing
- %170:i32 = add %x_135, 1i
- store %x_136, %170
- %171:i32 = load %x_136
- store %x_135_phi, %171
- next_iteration # -> $B23
- }
- }
- %172:vec3<f32> = load %c
- %x_149:vec3<f32> = let %172
- %174:vec3<f32> = abs %x_149
- %175:vec3<f32> = normalize %174
- %x_151:vec3<f32> = let %175
- %177:f32 = access %x_151, 0u
- %178:f32 = access %x_151, 1u
- %179:f32 = access %x_151, 2u
- %180:vec4<f32> = construct %177, %178, %179, 1.0f
- store %x_GLF_color, %180
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %183:void = call %main_1
- %184:vec4<f32> = load %x_GLF_color
- %185:main_out = construct %184
- ret %185
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B29: {
- %188:bool = eq %rhs, 0i
- %189:bool = eq %lhs, -2147483648i
- %190:bool = eq %rhs, -1i
- %191:bool = and %189, %190
- %192:bool = or %188, %191
- %193:i32 = select %rhs, 1i, %192
- %194:i32 = let %193
- %195:i32 = div %lhs, %194
- %196:i32 = mul %195, %194
- %197:i32 = sub %lhs, %196
- ret %197
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.ir.msl
deleted file mode 100644
index 4ec86c3..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,162 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_195:ptr<function, array<i32, 256>, read_write> = var
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_209:ptr<function, vec2<i32>, read_write> = var
- %x_213:ptr<function, vec2<i32>, read_write> = var
- %x_241:ptr<function, vec4<f32>, read_write> = var
- %x_243:ptr<function, vec4<f32>, read_write> = var
- %x_244:ptr<function, bool, read_write> = var
- %x_246:ptr<function, vec4<f32>, read_write> = var
- %14:vec4<f32> = load %gl_FragCoord
- %15:vec2<f32> = swizzle %14, xy
- %16:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %17:vec2<f32> = load %16
- %18:vec2<f32> = div %15, %17
- %x_202:vec2<f32> = let %18
- %20:f32 = access %x_202, 0u
- %21:f32 = mul %20, 256.0f
- %22:i32 = call %tint_f32_to_i32, %21
- %24:i32 = let %22
- %25:f32 = access %x_202, 1u
- %26:f32 = mul %25, 256.0f
- %27:i32 = call %tint_f32_to_i32, %26
- %28:vec2<i32> = construct %24, %27
- store %x_209, %28
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %29:vec2<i32> = load %x_209
- store %x_213, %29
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_230:ptr<function, bool, read_write> = var
- %x_231:ptr<function, bool, read_write> = var
- %32:i32 = load_vector_element %x_213, 1u
- %x_216:i32 = let %32
- store %x_243, vec4<f32>(0.0f)
- store %x_244, false
- %34:bool = neq %x_216, 256i
- if %34 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %35:i32 = load_vector_element %x_213, 0u
- %x_220:i32 = let %35
- store %x_195, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %37:ptr<function, i32, read_write> = access %x_195, %x_216
- %38:i32 = load %37
- %39:i32 = add %38, 15i
- %40:bool = lt %x_220, %39
- %x_224:bool = let %40
- store %x_231, %x_224
- if %x_224 [t: $B8] { # if_2
- $B8: { # true
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %42:ptr<function, i32, read_write> = access %x_196, %x_216
- %43:i32 = load %42
- %44:i32 = sub %43, 15i
- %45:bool = gt %x_220, %44
- store %x_230, %45
- %46:bool = load %x_230
- store %x_231, %46
- exit_if # if_2
- }
- }
- %47:bool = load %x_231
- if %47 [t: $B9] { # if_3
- $B9: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %48:ptr<function, i32, read_write> = access %x_197, %x_216
- %49:i32 = load %48
- %50:i32 = sub %x_220, %49
- %51:f32 = convert %50
- %52:f32 = abs %51
- %53:f32 = sub 15.0f, %52
- %54:f32 = mul %53, 0.06666667014360427856f
- %x_240:f32 = let %54
- %56:vec4<f32> = construct %x_240, %x_240, %x_240, 1.0f
- store %x_241, %56
- %57:vec4<f32> = load %x_241
- store %x_243, %57
- store %x_244, true
- exit_loop # loop_1
- }
- }
- %58:vec2<i32> = load %x_213
- %x_214_1:ptr<function, vec2<i32>, read_write> = var, %58
- %60:i32 = add %x_216, 1i
- store_vector_element %x_214_1, 1u, %60
- %61:vec2<i32> = load %x_214_1
- %x_214:vec2<i32> = let %61
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_213, %x_214
- next_iteration # -> $B4
- }
- }
- %63:vec4<f32> = load %x_243
- store %x_246, %63
- %64:bool = load %x_244
- if %64 [t: $B10] { # if_4
- $B10: { # true
- exit_switch # switch_1
- }
- }
- store %x_246, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %65:vec4<f32> = load %x_246
- store %x_GLF_color, %65
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B11: {
- store %gl_FragCoord, %gl_FragCoord_param
- %68:void = call %main_1
- %69:vec4<f32> = load %x_GLF_color
- %70:main_out = construct %69
- ret %70
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B12: {
- %72:i32 = convert %value
- %73:bool = gte %value, -2147483648.0f
- %74:i32 = select -2147483648i, %72, %73
- %75:bool = lte %value, 2147483520.0f
- %76:i32 = select 2147483647i, %74, %75
- ret %76
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.ir.msl
deleted file mode 100644
index cecd947..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,176 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_195:ptr<function, array<i32, 256>, read_write> = var
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_209:ptr<function, vec2<i32>, read_write> = var
- %x_241:ptr<function, vec4<f32>, read_write> = var
- %x_243:ptr<function, vec4<f32>, read_write> = var
- %x_213_phi:ptr<function, vec2<i32>, read_write> = var
- %x_243_phi:ptr<function, vec4<f32>, read_write> = var
- %x_244_phi:ptr<function, bool, read_write> = var
- %x_246_phi:ptr<function, vec4<f32>, read_write> = var
- %15:vec4<f32> = load %gl_FragCoord
- %x_198:vec4<f32> = let %15
- %17:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %18:vec2<f32> = load %17
- %x_201:vec2<f32> = let %18
- %20:f32 = access %x_198, 0u
- %21:f32 = access %x_198, 1u
- %22:vec2<f32> = construct %20, %21
- %23:vec2<f32> = div %22, %x_201
- %x_202:vec2<f32> = let %23
- %25:f32 = access %x_202, 0u
- %26:f32 = mul %25, 256.0f
- %27:i32 = call %tint_f32_to_i32, %26
- %29:i32 = let %27
- %30:f32 = access %x_202, 1u
- %31:f32 = mul %30, 256.0f
- %32:i32 = call %tint_f32_to_i32, %31
- %33:vec2<i32> = construct %29, %32
- store %x_209, %33
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %34:vec2<i32> = load %x_209
- store %x_213_phi, %34
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_230:ptr<function, bool, read_write> = var
- %x_231_phi:ptr<function, bool, read_write> = var
- %37:vec2<i32> = load %x_213_phi
- %x_213:vec2<i32> = let %37
- %39:i32 = access %x_213, 1u
- %x_216:i32 = let %39
- store %x_243_phi, vec4<f32>(0.0f)
- store %x_244_phi, false
- %41:bool = neq %x_216, 256i
- if %41 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %42:i32 = access %x_213, 0u
- %x_220:i32 = let %42
- store %x_195, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %44:ptr<function, i32, read_write> = access %x_195, %x_216
- %45:i32 = load %44
- %x_222:i32 = let %45
- %47:i32 = add %x_222, 15i
- %48:bool = lt %x_220, %47
- %x_224:bool = let %48
- store %x_231_phi, %x_224
- if %x_224 [t: $B8] { # if_2
- $B8: { # true
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %50:ptr<function, i32, read_write> = access %x_196, %x_216
- %51:i32 = load %50
- %x_228:i32 = let %51
- %53:i32 = sub %x_228, 15i
- %54:bool = gt %x_220, %53
- store %x_230, %54
- %55:bool = load %x_230
- store %x_231_phi, %55
- exit_if # if_2
- }
- }
- %56:bool = load %x_231_phi
- %x_231:bool = let %56
- if %x_231 [t: $B9] { # if_3
- $B9: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %58:ptr<function, i32, read_write> = access %x_197, %x_216
- %59:i32 = load %58
- %x_235:i32 = let %59
- %61:i32 = sub %x_220, %x_235
- %62:f32 = convert %61
- %63:f32 = abs %62
- %64:f32 = sub 15.0f, %63
- %65:f32 = mul %64, 0.06666667014360427856f
- %x_240:f32 = let %65
- %67:vec4<f32> = construct %x_240, %x_240, %x_240, 1.0f
- store %x_241, %67
- %68:vec4<f32> = load %x_241
- store %x_243_phi, %68
- store %x_244_phi, true
- exit_loop # loop_1
- }
- }
- %x_214_1:ptr<function, vec2<i32>, read_write> = var, %x_213
- %70:i32 = add %x_216, 1i
- store_vector_element %x_214_1, 1u, %70
- %71:vec2<i32> = load %x_214_1
- %x_214:vec2<i32> = let %71
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_213_phi, %x_214
- next_iteration # -> $B4
- }
- }
- %73:vec4<f32> = load %x_243_phi
- store %x_243, %73
- %74:bool = load %x_244_phi
- %x_244:bool = let %74
- %76:vec4<f32> = load %x_243
- store %x_246_phi, %76
- if %x_244 [t: $B10] { # if_4
- $B10: { # true
- exit_switch # switch_1
- }
- }
- store %x_246_phi, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %77:vec4<f32> = load %x_246_phi
- %x_246:vec4<f32> = let %77
- store %x_GLF_color, %x_246
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B11: {
- store %gl_FragCoord, %gl_FragCoord_param
- %81:void = call %main_1
- %82:vec4<f32> = load %x_GLF_color
- %83:main_out = construct %82
- ret %83
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B12: {
- %85:i32 = convert %value
- %86:bool = gte %value, -2147483648.0f
- %87:i32 = select -2147483648i, %85, %86
- %88:bool = lte %value, 2147483520.0f
- %89:i32 = select 2147483647i, %87, %88
- ret %89
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.ir.msl
deleted file mode 100644
index aa39c09..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,175 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_195:ptr<function, array<i32, 256>, read_write> = var
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_208:ptr<function, vec2<f32>, read_write> = var
- %x_214:ptr<function, vec2<i32>, read_write> = var
- %x_218:ptr<function, vec2<i32>, read_write> = var
- %x_249:ptr<function, vec4<f32>, read_write> = var
- %x_251:ptr<function, vec4<f32>, read_write> = var
- %x_252:ptr<function, bool, read_write> = var
- %x_254:ptr<function, vec4<f32>, read_write> = var
- %15:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %16:vec2<f32> = load %15
- %x_201:vec2<f32> = let %16
- %18:vec4<f32> = load %gl_FragCoord
- %19:vec2<f32> = swizzle %18, xy
- %20:vec2<f32> = div %19, %x_201
- %x_202:vec2<f32> = let %20
- %x_204:i32 = let -82i
- %23:vec4<f32> = construct %x_201, 15.0f, 15.0f
- %24:f32 = access %23, 2u
- %25:vec2<f32> = construct 0.0f, %24
- store %x_208, %25
- %x_209:i32 = let 120i
- %27:f32 = access %x_202, 0u
- %28:f32 = mul %27, 256.0f
- %29:i32 = call %tint_f32_to_i32, %28
- %31:i32 = let %29
- %32:f32 = access %x_202, 1u
- %33:f32 = mul %32, 256.0f
- %34:i32 = call %tint_f32_to_i32, %33
- %35:vec2<i32> = construct %31, %34
- store %x_214, %35
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %36:vec2<i32> = load %x_214
- store %x_218, %36
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_235:ptr<function, bool, read_write> = var
- %x_236:ptr<function, bool, read_write> = var
- %39:i32 = load_vector_element %x_218, 1u
- %x_221:i32 = let %39
- store %x_251, vec4<f32>(0.0f)
- store %x_252, false
- %41:bool = neq %x_221, 256i
- if %41 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %42:i32 = load_vector_element %x_218, 0u
- %x_225:i32 = let %42
- store %x_195, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %44:ptr<function, i32, read_write> = access %x_195, %x_221
- %45:i32 = load %44
- %46:i32 = add %45, 15i
- %47:bool = lt %x_225, %46
- %x_229:bool = let %47
- store %x_236, %x_229
- if %x_229 [t: $B8] { # if_2
- $B8: { # true
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %49:ptr<function, i32, read_write> = access %x_196, %x_221
- %50:i32 = load %49
- %51:i32 = sub %50, 15i
- %52:bool = gt %x_225, %51
- store %x_235, %52
- %53:bool = load %x_235
- store %x_236, %53
- exit_if # if_2
- }
- }
- %54:bool = load %x_236
- if %54 [t: $B9] { # if_3
- $B9: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %x_244:i32 = let 335i
- %56:vec2<f32> = load %x_208
- %57:buf0 = construct %56
- %58:f32 = access %57, 0u, 1u
- %59:f32 = let %58
- %60:ptr<function, i32, read_write> = access %x_197, %x_221
- %61:i32 = load %60
- %62:i32 = sub %x_225, %61
- %63:f32 = convert %62
- %64:f32 = abs %63
- %65:f32 = sub %59, %64
- %66:f32 = mul %65, 0.06666667014360427856f
- %x_248:f32 = let %66
- %68:vec4<f32> = construct %x_248, %x_248, %x_248, 1.0f
- store %x_249, %68
- %69:vec4<f32> = load %x_249
- store %x_251, %69
- store %x_252, true
- exit_loop # loop_1
- }
- }
- %70:vec2<i32> = load %x_218
- %x_219_1:ptr<function, vec2<i32>, read_write> = var, %70
- %72:i32 = add %x_221, 1i
- store_vector_element %x_219_1, 1u, %72
- %73:vec2<i32> = load %x_219_1
- %x_219:vec2<i32> = let %73
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_218, %x_219
- next_iteration # -> $B4
- }
- }
- %75:vec4<f32> = load %x_251
- store %x_254, %75
- %76:bool = load %x_252
- if %76 [t: $B10] { # if_4
- $B10: { # true
- exit_switch # switch_1
- }
- }
- store %x_254, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %77:vec4<f32> = load %x_254
- store %x_GLF_color, %77
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B11: {
- store %gl_FragCoord, %gl_FragCoord_param
- %80:void = call %main_1
- %81:vec4<f32> = load %x_GLF_color
- %82:main_out = construct %81
- ret %82
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B12: {
- %84:i32 = convert %value
- %85:bool = gte %value, -2147483648.0f
- %86:i32 = select -2147483648i, %84, %85
- %87:bool = lte %value, 2147483520.0f
- %88:i32 = select 2147483647i, %86, %87
- ret %88
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.ir.msl
deleted file mode 100644
index dec9ff5..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,188 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_195:ptr<function, array<i32, 256>, read_write> = var
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_208:ptr<function, vec2<f32>, read_write> = var
- %x_214:ptr<function, vec2<i32>, read_write> = var
- %x_249:ptr<function, vec4<f32>, read_write> = var
- %x_251:ptr<function, vec4<f32>, read_write> = var
- %x_218_phi:ptr<function, vec2<i32>, read_write> = var
- %x_251_phi:ptr<function, vec4<f32>, read_write> = var
- %x_252_phi:ptr<function, bool, read_write> = var
- %x_254_phi:ptr<function, vec4<f32>, read_write> = var
- %16:vec4<f32> = load %gl_FragCoord
- %x_198:vec4<f32> = let %16
- %18:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %19:vec2<f32> = load %18
- %x_201:vec2<f32> = let %19
- %21:f32 = access %x_198, 0u
- %22:f32 = access %x_198, 1u
- %23:vec2<f32> = construct %21, %22
- %24:vec2<f32> = div %23, %x_201
- %x_202:vec2<f32> = let %24
- %x_204:i32 = let -82i
- %27:vec4<f32> = construct %x_201, 15.0f, 15.0f
- %28:f32 = access %27, 2u
- %29:vec2<f32> = construct 0.0f, %28
- store %x_208, %29
- %x_209:i32 = let 120i
- %31:f32 = access %x_202, 0u
- %32:f32 = mul %31, 256.0f
- %33:i32 = call %tint_f32_to_i32, %32
- %35:i32 = let %33
- %36:f32 = access %x_202, 1u
- %37:f32 = mul %36, 256.0f
- %38:i32 = call %tint_f32_to_i32, %37
- %39:vec2<i32> = construct %35, %38
- store %x_214, %39
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %40:vec2<i32> = load %x_214
- store %x_218_phi, %40
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_235:ptr<function, bool, read_write> = var
- %x_236_phi:ptr<function, bool, read_write> = var
- %43:vec2<i32> = load %x_218_phi
- %x_218:vec2<i32> = let %43
- %45:i32 = access %x_218, 1u
- %x_221:i32 = let %45
- store %x_251_phi, vec4<f32>(0.0f)
- store %x_252_phi, false
- %47:bool = neq %x_221, 256i
- if %47 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %48:i32 = access %x_218, 0u
- %x_225:i32 = let %48
- store %x_195, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %50:ptr<function, i32, read_write> = access %x_195, %x_221
- %51:i32 = load %50
- %x_227:i32 = let %51
- %53:i32 = add %x_227, 15i
- %54:bool = lt %x_225, %53
- %x_229:bool = let %54
- store %x_236_phi, %x_229
- if %x_229 [t: $B8] { # if_2
- $B8: { # true
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %56:ptr<function, i32, read_write> = access %x_196, %x_221
- %57:i32 = load %56
- %x_233:i32 = let %57
- %59:i32 = sub %x_233, 15i
- %60:bool = gt %x_225, %59
- store %x_235, %60
- %61:bool = load %x_235
- store %x_236_phi, %61
- exit_if # if_2
- }
- }
- %62:bool = load %x_236_phi
- %x_236:bool = let %62
- if %x_236 [t: $B9] { # if_3
- $B9: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %64:ptr<function, i32, read_write> = access %x_197, %x_221
- %65:i32 = load %64
- %x_240:i32 = let %65
- %x_244:i32 = let 335i
- %68:vec2<f32> = load %x_208
- %69:buf0 = construct %68
- %70:f32 = access %69, 0u, 1u
- %71:f32 = let %70
- %72:i32 = sub %x_225, %x_240
- %73:f32 = convert %72
- %74:f32 = abs %73
- %75:f32 = sub %71, %74
- %76:f32 = mul %75, 0.06666667014360427856f
- %x_248:f32 = let %76
- %78:vec4<f32> = construct %x_248, %x_248, %x_248, 1.0f
- store %x_249, %78
- %79:vec4<f32> = load %x_249
- store %x_251_phi, %79
- store %x_252_phi, true
- exit_loop # loop_1
- }
- }
- %x_219_1:ptr<function, vec2<i32>, read_write> = var, %x_218
- %81:i32 = add %x_221, 1i
- store_vector_element %x_219_1, 1u, %81
- %82:vec2<i32> = load %x_219_1
- %x_219:vec2<i32> = let %82
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_218_phi, %x_219
- next_iteration # -> $B4
- }
- }
- %84:vec4<f32> = load %x_251_phi
- store %x_251, %84
- %85:bool = load %x_252_phi
- %x_252:bool = let %85
- %87:vec4<f32> = load %x_251
- store %x_254_phi, %87
- if %x_252 [t: $B10] { # if_4
- $B10: { # true
- exit_switch # switch_1
- }
- }
- store %x_254_phi, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %88:vec4<f32> = load %x_254_phi
- %x_254:vec4<f32> = let %88
- store %x_GLF_color, %x_254
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B11: {
- store %gl_FragCoord, %gl_FragCoord_param
- %92:void = call %main_1
- %93:vec4<f32> = load %x_GLF_color
- %94:main_out = construct %93
- ret %94
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B12: {
- %96:i32 = convert %value
- %97:bool = gte %value, -2147483648.0f
- %98:i32 = select -2147483648i, %96, %97
- %99:bool = lte %value, 2147483520.0f
- %100:i32 = select 2147483647i, %98, %99
- ret %100
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.ir.msl
deleted file mode 100644
index cea86da..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,354 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_51:ptr<function, f32, read_write> = var
- %x_55:ptr<function, f32, read_write> = var
- %x_58:ptr<function, i32, read_write> = var
- %x_56:ptr<function, f32, read_write> = var
- %x_81:ptr<function, f32, read_write> = var
- %x_82:ptr<function, f32, read_write> = var
- %x_83:ptr<function, bool, read_write> = var
- %x_85:ptr<function, f32, read_write> = var
- %x_118:ptr<function, f32, read_write> = var
- %x_119:ptr<function, f32, read_write> = var
- %x_122:ptr<function, f32, read_write> = var
- %x_129:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %18:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
- %19:f32 = load_vector_element %18, 0u
- %20:f32 = mul %19, 0.125f
- %21:f32 = round %20
- %x_49:f32 = let %21
- %23:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_51, %23
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_55, -0.5f
- store %x_58, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_68:ptr<function, f32, read_write> = var
- %x_76:ptr<function, f32, read_write> = var
- %x_59:ptr<function, i32, read_write> = var
- store %x_81, 0.0f
- %27:f32 = load %x_55
- store %x_82, %27
- store %x_83, false
- %28:i32 = load %x_58
- %29:bool = lt %28, 800i
- if %29 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_75:ptr<function, f32, read_write> = var
- %31:i32 = load %x_58
- %32:i32 = call %tint_mod_i32, %31, 32i
- %34:bool = eq %32, 0i
- if %34 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %35:f32 = load %x_55
- %36:f32 = add %35, 0.40000000596046447754f
- store %x_68, %36
- %37:f32 = load %x_68
- store %x_56, %37
- exit_if # if_2
- }
- $B9: { # false
- %38:f32 = load %x_55
- store %x_76, %38
- %39:i32 = load %x_58
- %40:f32 = convert %39
- %41:f32 = let %40
- %42:f32 = round %x_49
- %43:f32 = let %42
- %44:i32 = load %x_58
- %45:f32 = convert %44
- %46:f32 = let %45
- %47:f32 = round %x_49
- %48:f32 = div %46, %47
- %49:f32 = floor %48
- %50:f32 = mul %43, %49
- %51:f32 = sub %41, %50
- %52:bool = lte %51, 0.00999999977648258209f
- if %52 [t: $B10] { # if_3
- $B10: { # true
- %53:f32 = load %x_55
- %54:f32 = add %53, 100.0f
- store %x_75, %54
- %55:f32 = load %x_75
- store %x_76, %55
- exit_if # if_3
- }
- }
- %56:f32 = load %x_76
- store %x_56, %56
- exit_if # if_2
- }
- }
- %57:i32 = load %x_58
- %58:f32 = convert %57
- %59:f32 = load %x_51
- %60:bool = gte %58, %59
- if %60 [t: $B11] { # if_4
- $B11: { # true
- %61:f32 = load %x_56
- store %x_81, %61
- %62:f32 = load %x_56
- store %x_82, %62
- store %x_83, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %63:i32 = load %x_58
- %64:i32 = add %63, 1i
- store %x_59, %64
- %65:f32 = load %x_56
- store %x_55, %65
- %66:i32 = load %x_59
- store %x_58, %66
- next_iteration # -> $B4
- }
- }
- %67:f32 = load %x_81
- store %x_85, %67
- %68:bool = load %x_83
- if %68 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- %69:f32 = load %x_82
- store %x_85, %69
- exit_switch # switch_1
- }
- }
- %x_88:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_93:ptr<function, f32, read_write> = var
- %x_120:ptr<function, bool, read_write> = var
- %75:f32 = load %x_85
- store_vector_element %c, 0u, %75
- %76:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_88, %76
- switch 0u [c: (default, $B13)] { # switch_2
- $B13: { # case
- store %x_92, -0.5f
- store %x_95, 1i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %x_113:ptr<function, f32, read_write> = var
- %x_112:ptr<function, f32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- store %x_118, 0.0f
- %80:f32 = load %x_92
- store %x_119, %80
- store %x_120, false
- %81:i32 = load %x_95
- %82:bool = lt %81, 800i
- if %82 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %x_111:ptr<function, f32, read_write> = var
- %84:i32 = load %x_95
- %85:i32 = call %tint_mod_i32, %84, 32i
- %86:bool = eq %85, 0i
- if %86 [t: $B18, f: $B19] { # if_7
- $B18: { # true
- %87:f32 = load %x_92
- %88:f32 = add %87, 0.40000000596046447754f
- store %x_113, %88
- %89:f32 = load %x_113
- store %x_93, %89
- exit_if # if_7
- }
- $B19: { # false
- %90:f32 = load %x_92
- store %x_112, %90
- %91:i32 = load %x_95
- %92:f32 = convert %91
- %93:f32 = let %92
- %94:f32 = round %x_49
- %95:f32 = let %94
- %96:i32 = load %x_95
- %97:f32 = convert %96
- %98:f32 = let %97
- %99:f32 = round %x_49
- %100:f32 = div %98, %99
- %101:f32 = floor %100
- %102:f32 = mul %95, %101
- %103:f32 = sub %93, %102
- %104:bool = lte %103, 0.00999999977648258209f
- if %104 [t: $B20] { # if_8
- $B20: { # true
- %105:f32 = load %x_92
- %106:f32 = add %105, 100.0f
- store %x_111, %106
- %107:f32 = load %x_111
- store %x_112, %107
- exit_if # if_8
- }
- }
- %108:f32 = load %x_112
- store %x_93, %108
- exit_if # if_7
- }
- }
- %109:i32 = load %x_95
- %110:f32 = convert %109
- %111:f32 = load %x_88
- %112:bool = gte %110, %111
- if %112 [t: $B21] { # if_9
- $B21: { # true
- %113:f32 = load %x_93
- store %x_118, %113
- %114:f32 = load %x_93
- store %x_119, %114
- store %x_120, true
- exit_loop # loop_2
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %115:i32 = load %x_95
- %116:i32 = add %115, 1i
- store %x_96, %116
- %117:f32 = load %x_93
- store %x_92, %117
- %118:i32 = load %x_96
- store %x_95, %118
- next_iteration # -> $B14
- }
- }
- %119:f32 = load %x_118
- store %x_122, %119
- %120:bool = load %x_120
- if %120 [t: $B22] { # if_10
- $B22: { # true
- exit_switch # switch_2
- }
- }
- %121:f32 = load %x_119
- store %x_122, %121
- exit_switch # switch_2
- }
- }
- %122:f32 = load %x_122
- store_vector_element %c, 1u, %122
- %123:f32 = load_vector_element %c, 0u
- %124:f32 = load_vector_element %c, 1u
- %125:f32 = add %123, %124
- store_vector_element %c, 2u, %125
- store %x_129, 0i
- loop [b: $B23, c: $B24] { # loop_3
- $B23: { # body
- %x_130:ptr<function, i32, read_write> = var
- %127:i32 = load %x_129
- %128:bool = lt %127, 3i
- if %128 [t: $B25, f: $B26] { # if_11
- $B25: { # true
- exit_if # if_11
- }
- $B26: { # false
- exit_loop # loop_3
- }
- }
- %129:i32 = load %x_129
- %130:f32 = load_vector_element %c, %129
- %131:bool = gte %130, 1.0f
- if %131 [t: $B27] { # if_12
- $B27: { # true
- %132:i32 = load %x_129
- %133:i32 = load %x_129
- %134:f32 = load_vector_element %c, %133
- %135:i32 = load %x_129
- %136:f32 = load_vector_element %c, %135
- %137:f32 = mul %134, %136
- store_vector_element %c, %132, %137
- exit_if # if_12
- }
- }
- continue # -> $B24
- }
- $B24: { # continuing
- %138:i32 = load %x_129
- %139:i32 = add %138, 1i
- store %x_130, %139
- %140:i32 = load %x_130
- store %x_129, %140
- next_iteration # -> $B23
- }
- }
- %141:vec3<f32> = load %c
- %142:vec3<f32> = abs %141
- %143:vec3<f32> = normalize %142
- %x_145:vec3<f32> = let %143
- %145:f32 = access %x_145, 0u
- %146:f32 = access %x_145, 1u
- %147:f32 = access %x_145, 2u
- %148:vec4<f32> = construct %145, %146, %147, 1.0f
- store %x_GLF_color, %148
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %151:void = call %main_1
- %152:vec4<f32> = load %x_GLF_color
- %153:main_out = construct %152
- ret %153
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B29: {
- %156:bool = eq %rhs, 0i
- %157:bool = eq %lhs, -2147483648i
- %158:bool = eq %rhs, -1i
- %159:bool = and %157, %158
- %160:bool = or %156, %159
- %161:i32 = select %rhs, 1i, %160
- %162:i32 = let %161
- %163:i32 = div %lhs, %162
- %164:i32 = mul %163, %162
- %165:i32 = sub %lhs, %164
- ret %165
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.ir.msl
deleted file mode 100644
index b5f2e5b..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,383 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_7:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_51:ptr<function, f32, read_write> = var
- %x_55:ptr<function, f32, read_write> = var
- %x_56:ptr<function, f32, read_write> = var
- %x_81:ptr<function, f32, read_write> = var
- %x_82:ptr<function, f32, read_write> = var
- %x_118:ptr<function, f32, read_write> = var
- %x_119:ptr<function, f32, read_write> = var
- %x_55_phi:ptr<function, f32, read_write> = var
- %x_58_phi:ptr<function, i32, read_write> = var
- %x_81_phi:ptr<function, f32, read_write> = var
- %x_82_phi:ptr<function, f32, read_write> = var
- %x_83_phi:ptr<function, bool, read_write> = var
- %x_85_phi:ptr<function, f32, read_write> = var
- %x_122_phi:ptr<function, f32, read_write> = var
- %x_129_phi:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %21:ptr<uniform, vec2<f32>, read> = access %x_7, 0u
- %22:f32 = load_vector_element %21, 0u
- %x_47:f32 = let %22
- %24:f32 = mul %x_47, 0.125f
- %25:f32 = round %24
- %x_49:f32 = let %25
- %27:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_51, %27
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_55_phi, -0.5f
- store %x_58_phi, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_68:ptr<function, f32, read_write> = var
- %x_76:ptr<function, f32, read_write> = var
- %x_59:ptr<function, i32, read_write> = var
- %x_56_phi:ptr<function, f32, read_write> = var
- %32:f32 = load %x_55_phi
- store %x_55, %32
- %33:i32 = load %x_58_phi
- %x_58:i32 = let %33
- store %x_81_phi, 0.0f
- %35:f32 = load %x_55
- store %x_82_phi, %35
- store %x_83_phi, false
- %36:bool = lt %x_58, 800i
- if %36 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_75:ptr<function, f32, read_write> = var
- %x_76_phi:ptr<function, f32, read_write> = var
- %39:i32 = call %tint_mod_i32, %x_58, 32i
- %41:bool = eq %39, 0i
- if %41 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %42:f32 = load %x_55
- %43:f32 = add %42, 0.40000000596046447754f
- store %x_68, %43
- %44:f32 = load %x_68
- store %x_56_phi, %44
- exit_if # if_2
- }
- $B9: { # false
- %45:f32 = load %x_55
- store %x_76_phi, %45
- %46:f32 = convert %x_58
- %47:f32 = let %46
- %48:f32 = round %x_49
- %49:f32 = let %48
- %50:f32 = convert %x_58
- %51:f32 = let %50
- %52:f32 = round %x_49
- %53:f32 = div %51, %52
- %54:f32 = floor %53
- %55:f32 = mul %49, %54
- %56:f32 = sub %47, %55
- %57:bool = lte %56, 0.00999999977648258209f
- if %57 [t: $B10] { # if_3
- $B10: { # true
- %58:f32 = load %x_55
- %59:f32 = add %58, 100.0f
- store %x_75, %59
- %60:f32 = load %x_75
- store %x_76_phi, %60
- exit_if # if_3
- }
- }
- %61:f32 = load %x_76_phi
- store %x_76, %61
- %62:f32 = load %x_76
- store %x_56_phi, %62
- exit_if # if_2
- }
- }
- %63:f32 = load %x_56_phi
- store %x_56, %63
- %64:f32 = convert %x_58
- %65:f32 = load %x_51
- %66:bool = gte %64, %65
- if %66 [t: $B11] { # if_4
- $B11: { # true
- %67:f32 = load %x_56
- store %x_81_phi, %67
- %68:f32 = load %x_56
- store %x_82_phi, %68
- store %x_83_phi, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %69:i32 = add %x_58, 1i
- store %x_59, %69
- %70:f32 = load %x_56
- store %x_55_phi, %70
- %71:i32 = load %x_59
- store %x_58_phi, %71
- next_iteration # -> $B4
- }
- }
- %72:f32 = load %x_81_phi
- store %x_81, %72
- %73:f32 = load %x_82_phi
- store %x_82, %73
- %74:bool = load %x_83_phi
- %x_83:bool = let %74
- %76:f32 = load %x_81
- store %x_85_phi, %76
- if %x_83 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- %77:f32 = load %x_82
- store %x_85_phi, %77
- exit_switch # switch_1
- }
- }
- %x_88:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_93:ptr<function, f32, read_write> = var
- %x_92_phi:ptr<function, f32, read_write> = var
- %x_95_phi:ptr<function, i32, read_write> = var
- %x_118_phi:ptr<function, f32, read_write> = var
- %x_119_phi:ptr<function, f32, read_write> = var
- %x_120_phi:ptr<function, bool, read_write> = var
- %86:f32 = load %x_85_phi
- %x_85:f32 = let %86
- store_vector_element %c, 0u, %x_85
- %88:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_88, %88
- switch 0u [c: (default, $B13)] { # switch_2
- $B13: { # case
- store %x_92_phi, -0.5f
- store %x_95_phi, 1i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %x_113:ptr<function, f32, read_write> = var
- %x_112:ptr<function, f32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- %x_93_phi:ptr<function, f32, read_write> = var
- %93:f32 = load %x_92_phi
- store %x_92, %93
- %94:i32 = load %x_95_phi
- %x_95:i32 = let %94
- store %x_118_phi, 0.0f
- %96:f32 = load %x_92
- store %x_119_phi, %96
- store %x_120_phi, false
- %97:bool = lt %x_95, 800i
- if %97 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %x_111:ptr<function, f32, read_write> = var
- %x_112_phi:ptr<function, f32, read_write> = var
- %100:i32 = call %tint_mod_i32, %x_95, 32i
- %101:bool = eq %100, 0i
- if %101 [t: $B18, f: $B19] { # if_7
- $B18: { # true
- %102:f32 = load %x_92
- %103:f32 = add %102, 0.40000000596046447754f
- store %x_113, %103
- %104:f32 = load %x_113
- store %x_93_phi, %104
- exit_if # if_7
- }
- $B19: { # false
- %105:f32 = load %x_92
- store %x_112_phi, %105
- %106:f32 = convert %x_95
- %107:f32 = let %106
- %108:f32 = round %x_49
- %109:f32 = let %108
- %110:f32 = convert %x_95
- %111:f32 = let %110
- %112:f32 = round %x_49
- %113:f32 = div %111, %112
- %114:f32 = floor %113
- %115:f32 = mul %109, %114
- %116:f32 = sub %107, %115
- %117:bool = lte %116, 0.00999999977648258209f
- if %117 [t: $B20] { # if_8
- $B20: { # true
- %118:f32 = load %x_92
- %119:f32 = add %118, 100.0f
- store %x_111, %119
- %120:f32 = load %x_111
- store %x_112_phi, %120
- exit_if # if_8
- }
- }
- %121:f32 = load %x_112_phi
- store %x_112, %121
- %122:f32 = load %x_112
- store %x_93_phi, %122
- exit_if # if_7
- }
- }
- %123:f32 = load %x_93_phi
- store %x_93, %123
- %124:f32 = convert %x_95
- %125:f32 = load %x_88
- %126:bool = gte %124, %125
- if %126 [t: $B21] { # if_9
- $B21: { # true
- %127:f32 = load %x_93
- store %x_118_phi, %127
- %128:f32 = load %x_93
- store %x_119_phi, %128
- store %x_120_phi, true
- exit_loop # loop_2
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %129:i32 = add %x_95, 1i
- store %x_96, %129
- %130:f32 = load %x_93
- store %x_92_phi, %130
- %131:i32 = load %x_96
- store %x_95_phi, %131
- next_iteration # -> $B14
- }
- }
- %132:f32 = load %x_118_phi
- store %x_118, %132
- %133:f32 = load %x_119_phi
- store %x_119, %133
- %134:bool = load %x_120_phi
- %x_120:bool = let %134
- %136:f32 = load %x_118
- store %x_122_phi, %136
- if %x_120 [t: $B22] { # if_10
- $B22: { # true
- exit_switch # switch_2
- }
- }
- %137:f32 = load %x_119
- store %x_122_phi, %137
- exit_switch # switch_2
- }
- }
- %138:f32 = load %x_122_phi
- %x_122:f32 = let %138
- store_vector_element %c, 1u, %x_122
- %140:f32 = load_vector_element %c, 0u
- %x_124:f32 = let %140
- %142:f32 = load_vector_element %c, 1u
- %x_125:f32 = let %142
- %144:f32 = add %x_124, %x_125
- store_vector_element %c, 2u, %144
- store %x_129_phi, 0i
- loop [b: $B23, c: $B24] { # loop_3
- $B23: { # body
- %x_130:ptr<function, i32, read_write> = var
- %146:i32 = load %x_129_phi
- %x_129:i32 = let %146
- %148:bool = lt %x_129, 3i
- if %148 [t: $B25, f: $B26] { # if_11
- $B25: { # true
- exit_if # if_11
- }
- $B26: { # false
- exit_loop # loop_3
- }
- }
- %149:f32 = load_vector_element %c, %x_129
- %x_136:f32 = let %149
- %151:bool = gte %x_136, 1.0f
- if %151 [t: $B27] { # if_12
- $B27: { # true
- %152:f32 = load_vector_element %c, %x_129
- %x_140:f32 = let %152
- %154:f32 = load_vector_element %c, %x_129
- %x_141:f32 = let %154
- %156:f32 = mul %x_140, %x_141
- store_vector_element %c, %x_129, %156
- exit_if # if_12
- }
- }
- continue # -> $B24
- }
- $B24: { # continuing
- %157:i32 = add %x_129, 1i
- store %x_130, %157
- %158:i32 = load %x_130
- store %x_129_phi, %158
- next_iteration # -> $B23
- }
- }
- %159:vec3<f32> = load %c
- %x_143:vec3<f32> = let %159
- %161:vec3<f32> = abs %x_143
- %162:vec3<f32> = normalize %161
- %x_145:vec3<f32> = let %162
- %164:f32 = access %x_145, 0u
- %165:f32 = access %x_145, 1u
- %166:f32 = access %x_145, 2u
- %167:vec4<f32> = construct %164, %165, %166, 1.0f
- store %x_GLF_color, %167
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %170:void = call %main_1
- %171:vec4<f32> = load %x_GLF_color
- %172:main_out = construct %171
- ret %172
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B29: {
- %175:bool = eq %rhs, 0i
- %176:bool = eq %lhs, -2147483648i
- %177:bool = eq %rhs, -1i
- %178:bool = and %176, %177
- %179:bool = or %175, %178
- %180:i32 = select %rhs, 1i, %179
- %181:i32 = let %180
- %182:i32 = div %lhs, %181
- %183:i32 = mul %182, %181
- %184:i32 = sub %lhs, %183
- ret %184
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.ir.msl
deleted file mode 100644
index 862ab59..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,186 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_198:ptr<function, array<i32, 256>, read_write> = var
- %x_210:ptr<function, vec2<i32>, read_write> = var
- %x_214:ptr<function, vec2<i32>, read_write> = var
- %x_251:ptr<function, vec4<f32>, read_write> = var
- %x_253:ptr<function, vec4<f32>, read_write> = var
- %x_254:ptr<function, bool, read_write> = var
- %x_256:ptr<function, vec4<f32>, read_write> = var
- %14:vec4<f32> = load %gl_FragCoord
- %15:vec2<f32> = swizzle %14, xy
- %16:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %17:vec2<f32> = load %16
- %18:vec2<f32> = div %15, %17
- %x_203:vec2<f32> = let %18
- %20:f32 = access %x_203, 0u
- %21:f32 = mul %20, 256.0f
- %22:i32 = call %tint_f32_to_i32, %21
- %24:i32 = let %22
- %25:f32 = access %x_203, 1u
- %26:f32 = mul %25, 256.0f
- %27:i32 = call %tint_f32_to_i32, %26
- %28:vec2<i32> = construct %24, %27
- store %x_210, %28
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %29:vec2<i32> = load %x_210
- store %x_214, %29
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_233:ptr<function, i32, read_write> = var
- %x_234:ptr<function, i32, read_write> = var
- %x_235:ptr<function, i32, read_write> = var
- %x_241:ptr<function, bool, read_write> = var
- %34:i32 = load_vector_element %x_214, 1u
- %x_217:i32 = let %34
- store %x_253, vec4<f32>(0.0f)
- store %x_254, false
- %36:bool = neq %x_217, 256i
- if %36 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %37:i32 = load_vector_element %x_214, 0u
- %x_221:i32 = let %37
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %39:ptr<function, i32, read_write> = access %x_196, %x_217
- %40:i32 = load %39
- %41:i32 = add %40, 15i
- %42:bool = lt %x_221, %41
- %x_225:bool = let %42
- if %x_225 [t: $B8] { # if_2
- $B8: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- exit_if # if_2
- }
- }
- if %x_225 [t: $B9, f: $B10] { # if_3
- $B9: { # true
- %44:ptr<function, i32, read_write> = access %x_197, %x_217
- %45:i32 = load %44
- store %x_233, %45
- %46:i32 = load %x_233
- store %x_235, %46
- exit_if # if_3
- }
- $B10: { # false
- store %x_234, 0i
- %47:i32 = load %x_234
- store %x_235, %47
- exit_if # if_3
- }
- }
- %48:i32 = load %x_235
- %49:i32 = sub %48, 15i
- %50:bool = gt %x_221, %49
- %x_237:bool = let %50
- if %x_225 [t: $B11, f: $B12] { # if_4
- $B11: { # true
- store %x_241, %x_237
- exit_if # if_4
- }
- $B12: { # false
- store %x_241, %x_225
- exit_if # if_4
- }
- }
- %52:bool = load %x_241
- if %52 [t: $B13] { # if_5
- $B13: { # true
- store %x_198, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %53:ptr<function, i32, read_write> = access %x_198, %x_217
- %54:i32 = load %53
- %55:i32 = sub %x_221, %54
- %56:f32 = convert %55
- %57:f32 = abs %56
- %58:f32 = sub 15.0f, %57
- %59:f32 = mul %58, 0.06666667014360427856f
- %x_250:f32 = let %59
- %61:vec4<f32> = construct %x_250, %x_250, %x_250, 1.0f
- store %x_251, %61
- %62:vec4<f32> = load %x_251
- store %x_253, %62
- store %x_254, true
- exit_loop # loop_1
- }
- }
- %63:vec2<i32> = load %x_214
- %x_215_1:ptr<function, vec2<i32>, read_write> = var, %63
- %65:i32 = add %x_217, 1i
- store_vector_element %x_215_1, 1u, %65
- %66:vec2<i32> = load %x_215_1
- %x_215:vec2<i32> = let %66
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_214, %x_215
- next_iteration # -> $B4
- }
- }
- %68:vec4<f32> = load %x_253
- store %x_256, %68
- %69:bool = load %x_254
- if %69 [t: $B14] { # if_6
- $B14: { # true
- exit_switch # switch_1
- }
- }
- store %x_256, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %70:vec4<f32> = load %x_256
- store %x_GLF_color, %70
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B15: {
- store %gl_FragCoord, %gl_FragCoord_param
- %73:void = call %main_1
- %74:vec4<f32> = load %x_GLF_color
- %75:main_out = construct %74
- ret %75
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B16: {
- %77:i32 = convert %value
- %78:bool = gte %value, -2147483648.0f
- %79:i32 = select -2147483648i, %77, %78
- %80:bool = lte %value, 2147483520.0f
- %81:i32 = select 2147483647i, %79, %80
- ret %81
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.ir.msl
deleted file mode 100644
index c64087a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,200 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_198:ptr<function, array<i32, 256>, read_write> = var
- %x_210:ptr<function, vec2<i32>, read_write> = var
- %x_251:ptr<function, vec4<f32>, read_write> = var
- %x_253:ptr<function, vec4<f32>, read_write> = var
- %x_214_phi:ptr<function, vec2<i32>, read_write> = var
- %x_253_phi:ptr<function, vec4<f32>, read_write> = var
- %x_254_phi:ptr<function, bool, read_write> = var
- %x_256_phi:ptr<function, vec4<f32>, read_write> = var
- %15:vec4<f32> = load %gl_FragCoord
- %x_199:vec4<f32> = let %15
- %17:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %18:vec2<f32> = load %17
- %x_202:vec2<f32> = let %18
- %20:f32 = access %x_199, 0u
- %21:f32 = access %x_199, 1u
- %22:vec2<f32> = construct %20, %21
- %23:vec2<f32> = div %22, %x_202
- %x_203:vec2<f32> = let %23
- %25:f32 = access %x_203, 0u
- %26:f32 = mul %25, 256.0f
- %27:i32 = call %tint_f32_to_i32, %26
- %29:i32 = let %27
- %30:f32 = access %x_203, 1u
- %31:f32 = mul %30, 256.0f
- %32:i32 = call %tint_f32_to_i32, %31
- %33:vec2<i32> = construct %29, %32
- store %x_210, %33
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %34:vec2<i32> = load %x_210
- store %x_214_phi, %34
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_233:ptr<function, i32, read_write> = var
- %x_234:ptr<function, i32, read_write> = var
- %x_235_phi:ptr<function, i32, read_write> = var
- %x_241_phi:ptr<function, bool, read_write> = var
- %39:vec2<i32> = load %x_214_phi
- %x_214:vec2<i32> = let %39
- %41:i32 = access %x_214, 1u
- %x_217:i32 = let %41
- store %x_253_phi, vec4<f32>(0.0f)
- store %x_254_phi, false
- %43:bool = neq %x_217, 256i
- if %43 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %44:i32 = access %x_214, 0u
- %x_221:i32 = let %44
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %46:ptr<function, i32, read_write> = access %x_196, %x_217
- %47:i32 = load %46
- %x_223:i32 = let %47
- %49:i32 = add %x_223, 15i
- %50:bool = lt %x_221, %49
- %x_225:bool = let %50
- if %x_225 [t: $B8] { # if_2
- $B8: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- exit_if # if_2
- }
- }
- if %x_225 [t: $B9, f: $B10] { # if_3
- $B9: { # true
- %52:ptr<function, i32, read_write> = access %x_197, %x_217
- %53:i32 = load %52
- store %x_233, %53
- %54:i32 = load %x_233
- store %x_235_phi, %54
- exit_if # if_3
- }
- $B10: { # false
- store %x_234, 0i
- %55:i32 = load %x_234
- store %x_235_phi, %55
- exit_if # if_3
- }
- }
- %56:i32 = load %x_235_phi
- %x_235:i32 = let %56
- %58:i32 = sub %x_235, 15i
- %59:bool = gt %x_221, %58
- %x_237:bool = let %59
- if %x_225 [t: $B11, f: $B12] { # if_4
- $B11: { # true
- store %x_241_phi, %x_237
- exit_if # if_4
- }
- $B12: { # false
- store %x_241_phi, %x_225
- exit_if # if_4
- }
- }
- %61:bool = load %x_241_phi
- %x_241:bool = let %61
- if %x_241 [t: $B13] { # if_5
- $B13: { # true
- store %x_198, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %63:ptr<function, i32, read_write> = access %x_198, %x_217
- %64:i32 = load %63
- %x_245:i32 = let %64
- %66:i32 = sub %x_221, %x_245
- %67:f32 = convert %66
- %68:f32 = abs %67
- %69:f32 = sub 15.0f, %68
- %70:f32 = mul %69, 0.06666667014360427856f
- %x_250:f32 = let %70
- %72:vec4<f32> = construct %x_250, %x_250, %x_250, 1.0f
- store %x_251, %72
- %73:vec4<f32> = load %x_251
- store %x_253_phi, %73
- store %x_254_phi, true
- exit_loop # loop_1
- }
- }
- %x_215_1:ptr<function, vec2<i32>, read_write> = var, %x_214
- %75:i32 = add %x_217, 1i
- store_vector_element %x_215_1, 1u, %75
- %76:vec2<i32> = load %x_215_1
- %x_215:vec2<i32> = let %76
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_214_phi, %x_215
- next_iteration # -> $B4
- }
- }
- %78:vec4<f32> = load %x_253_phi
- store %x_253, %78
- %79:bool = load %x_254_phi
- %x_254:bool = let %79
- %81:vec4<f32> = load %x_253
- store %x_256_phi, %81
- if %x_254 [t: $B14] { # if_6
- $B14: { # true
- exit_switch # switch_1
- }
- }
- store %x_256_phi, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %82:vec4<f32> = load %x_256_phi
- %x_256:vec4<f32> = let %82
- store %x_GLF_color, %x_256
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B15: {
- store %gl_FragCoord, %gl_FragCoord_param
- %86:void = call %main_1
- %87:vec4<f32> = load %x_GLF_color
- %88:main_out = construct %87
- ret %88
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B16: {
- %90:i32 = convert %value
- %91:bool = gte %value, -2147483648.0f
- %92:i32 = select -2147483648i, %90, %91
- %93:bool = lte %value, 2147483520.0f
- %94:i32 = select 2147483647i, %92, %93
- ret %94
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.ir.msl
deleted file mode 100644
index 1664f3a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,174 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_198:ptr<function, array<i32, 256>, read_write> = var
- %x_210:ptr<function, vec2<i32>, read_write> = var
- %x_214:ptr<function, vec2<i32>, read_write> = var
- %x_249:ptr<function, vec4<f32>, read_write> = var
- %x_251:ptr<function, vec4<f32>, read_write> = var
- %x_252:ptr<function, bool, read_write> = var
- %x_254:ptr<function, vec4<f32>, read_write> = var
- %14:vec4<f32> = load %gl_FragCoord
- %15:vec2<f32> = swizzle %14, xy
- %16:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %17:vec2<f32> = load %16
- %18:vec2<f32> = div %15, %17
- %x_203:vec2<f32> = let %18
- %20:f32 = access %x_203, 0u
- %21:f32 = mul %20, 256.0f
- %22:i32 = call %tint_f32_to_i32, %21
- %24:i32 = let %22
- %25:f32 = access %x_203, 1u
- %26:f32 = mul %25, 256.0f
- %27:i32 = call %tint_f32_to_i32, %26
- %28:vec2<i32> = construct %24, %27
- store %x_210, %28
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %29:vec2<i32> = load %x_210
- store %x_214, %29
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_233:ptr<function, i32, read_write> = var
- %x_234:ptr<function, i32, read_write> = var
- %x_235:ptr<function, i32, read_write> = var
- %33:i32 = load_vector_element %x_214, 1u
- %x_217:i32 = let %33
- store %x_251, vec4<f32>(0.0f)
- store %x_252, false
- %35:bool = neq %x_217, 256i
- if %35 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %36:i32 = load_vector_element %x_214, 0u
- %x_221:i32 = let %36
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %38:ptr<function, i32, read_write> = access %x_196, %x_217
- %39:i32 = load %38
- %40:i32 = add %39, 15i
- %41:bool = lt %x_221, %40
- %x_225:bool = let %41
- if %x_225 [t: $B8] { # if_2
- $B8: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- exit_if # if_2
- }
- }
- if %x_225 [t: $B9, f: $B10] { # if_3
- $B9: { # true
- %43:ptr<function, i32, read_write> = access %x_197, %x_217
- %44:i32 = load %43
- store %x_233, %44
- %45:i32 = load %x_233
- store %x_235, %45
- exit_if # if_3
- }
- $B10: { # false
- store %x_234, 0i
- %46:i32 = load %x_234
- store %x_235, %46
- exit_if # if_3
- }
- }
- %47:i32 = load %x_235
- %48:i32 = sub %47, 15i
- %49:bool = gt %x_221, %48
- %50:bool = select %x_225, %49, %x_225
- if %50 [t: $B11] { # if_4
- $B11: { # true
- store %x_198, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %51:ptr<function, i32, read_write> = access %x_198, %x_217
- %52:i32 = load %51
- %53:i32 = sub %x_221, %52
- %54:f32 = convert %53
- %55:f32 = abs %54
- %56:f32 = sub 15.0f, %55
- %57:f32 = mul %56, 0.06666667014360427856f
- %x_248:f32 = let %57
- %59:vec4<f32> = construct %x_248, %x_248, %x_248, 1.0f
- store %x_249, %59
- %60:vec4<f32> = load %x_249
- store %x_251, %60
- store %x_252, true
- exit_loop # loop_1
- }
- }
- %61:vec2<i32> = load %x_214
- %x_215_1:ptr<function, vec2<i32>, read_write> = var, %61
- %63:i32 = add %x_217, 1i
- store_vector_element %x_215_1, 1u, %63
- %64:vec2<i32> = load %x_215_1
- %x_215:vec2<i32> = let %64
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_214, %x_215
- next_iteration # -> $B4
- }
- }
- %66:vec4<f32> = load %x_251
- store %x_254, %66
- %67:bool = load %x_252
- if %67 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- store %x_254, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %68:vec4<f32> = load %x_254
- store %x_GLF_color, %68
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B13: {
- store %gl_FragCoord, %gl_FragCoord_param
- %71:void = call %main_1
- %72:vec4<f32> = load %x_GLF_color
- %73:main_out = construct %72
- ret %73
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B14: {
- %75:i32 = convert %value
- %76:bool = gte %value, -2147483648.0f
- %77:i32 = select -2147483648i, %75, %76
- %78:bool = lte %value, 2147483520.0f
- %79:i32 = select 2147483647i, %77, %78
- ret %79
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.ir.msl
deleted file mode 100644
index c95c30d..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,188 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_196:ptr<function, array<i32, 256>, read_write> = var
- %x_197:ptr<function, array<i32, 256>, read_write> = var
- %x_198:ptr<function, array<i32, 256>, read_write> = var
- %x_210:ptr<function, vec2<i32>, read_write> = var
- %x_249:ptr<function, vec4<f32>, read_write> = var
- %x_251:ptr<function, vec4<f32>, read_write> = var
- %x_214_phi:ptr<function, vec2<i32>, read_write> = var
- %x_251_phi:ptr<function, vec4<f32>, read_write> = var
- %x_252_phi:ptr<function, bool, read_write> = var
- %x_254_phi:ptr<function, vec4<f32>, read_write> = var
- %15:vec4<f32> = load %gl_FragCoord
- %x_199:vec4<f32> = let %15
- %17:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %18:vec2<f32> = load %17
- %x_202:vec2<f32> = let %18
- %20:f32 = access %x_199, 0u
- %21:f32 = access %x_199, 1u
- %22:vec2<f32> = construct %20, %21
- %23:vec2<f32> = div %22, %x_202
- %x_203:vec2<f32> = let %23
- %25:f32 = access %x_203, 0u
- %26:f32 = mul %25, 256.0f
- %27:i32 = call %tint_f32_to_i32, %26
- %29:i32 = let %27
- %30:f32 = access %x_203, 1u
- %31:f32 = mul %30, 256.0f
- %32:i32 = call %tint_f32_to_i32, %31
- %33:vec2<i32> = construct %29, %32
- store %x_210, %33
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- %34:vec2<i32> = load %x_210
- store %x_214_phi, %34
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_233:ptr<function, i32, read_write> = var
- %x_234:ptr<function, i32, read_write> = var
- %x_235_phi:ptr<function, i32, read_write> = var
- %38:vec2<i32> = load %x_214_phi
- %x_214:vec2<i32> = let %38
- %40:i32 = access %x_214, 1u
- %x_217:i32 = let %40
- store %x_251_phi, vec4<f32>(0.0f)
- store %x_252_phi, false
- %42:bool = neq %x_217, 256i
- if %42 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %43:i32 = access %x_214, 0u
- %x_221:i32 = let %43
- store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %45:ptr<function, i32, read_write> = access %x_196, %x_217
- %46:i32 = load %45
- %x_223:i32 = let %46
- %48:i32 = add %x_223, 15i
- %49:bool = lt %x_221, %48
- %x_225:bool = let %49
- if %x_225 [t: $B8] { # if_2
- $B8: { # true
- store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- exit_if # if_2
- }
- }
- if %x_225 [t: $B9, f: $B10] { # if_3
- $B9: { # true
- %51:ptr<function, i32, read_write> = access %x_197, %x_217
- %52:i32 = load %51
- store %x_233, %52
- %53:i32 = load %x_233
- store %x_235_phi, %53
- exit_if # if_3
- }
- $B10: { # false
- store %x_234, 0i
- %54:i32 = load %x_234
- store %x_235_phi, %54
- exit_if # if_3
- }
- }
- %55:i32 = load %x_235_phi
- %x_235:i32 = let %55
- %57:i32 = sub %x_235, 15i
- %58:bool = gt %x_221, %57
- %x_237:bool = let %58
- %60:bool = select %x_225, %x_237, %x_225
- if %60 [t: $B11] { # if_4
- $B11: { # true
- store %x_198, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %61:ptr<function, i32, read_write> = access %x_198, %x_217
- %62:i32 = load %61
- %x_243:i32 = let %62
- %64:i32 = sub %x_221, %x_243
- %65:f32 = convert %64
- %66:f32 = abs %65
- %67:f32 = sub 15.0f, %66
- %68:f32 = mul %67, 0.06666667014360427856f
- %x_248:f32 = let %68
- %70:vec4<f32> = construct %x_248, %x_248, %x_248, 1.0f
- store %x_249, %70
- %71:vec4<f32> = load %x_249
- store %x_251_phi, %71
- store %x_252_phi, true
- exit_loop # loop_1
- }
- }
- %x_215_1:ptr<function, vec2<i32>, read_write> = var, %x_214
- %73:i32 = add %x_217, 1i
- store_vector_element %x_215_1, 1u, %73
- %74:vec2<i32> = load %x_215_1
- %x_215:vec2<i32> = let %74
- continue # -> $B5
- }
- $B5: { # continuing
- store %x_214_phi, %x_215
- next_iteration # -> $B4
- }
- }
- %76:vec4<f32> = load %x_251_phi
- store %x_251, %76
- %77:bool = load %x_252_phi
- %x_252:bool = let %77
- %79:vec4<f32> = load %x_251
- store %x_254_phi, %79
- if %x_252 [t: $B12] { # if_5
- $B12: { # true
- exit_switch # switch_1
- }
- }
- store %x_254_phi, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- exit_switch # switch_1
- }
- }
- %80:vec4<f32> = load %x_254_phi
- %x_254:vec4<f32> = let %80
- store %x_GLF_color, %x_254
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B13: {
- store %gl_FragCoord, %gl_FragCoord_param
- %84:void = call %main_1
- %85:vec4<f32> = load %x_GLF_color
- %86:main_out = construct %85
- ret %86
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B14: {
- %88:i32 = convert %value
- %89:bool = gte %value, -2147483648.0f
- %90:i32 = select -2147483648i, %88, %89
- %91:bool = lte %value, 2147483520.0f
- %92:i32 = select 2147483647i, %90, %91
- ret %92
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.ir.msl
deleted file mode 100644
index f300289..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,157 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%trace_vi2_ = func(%pos:ptr<function, vec2<i32>, read_write>):vec4<f32> {
- $B2: {
- %indexable:ptr<function, array<i32, 256>, read_write> = var
- %indexable_1:ptr<function, array<i32, 256>, read_write> = var
- %p:ptr<function, f32, read_write> = var
- %indexable_2:ptr<function, array<i32, 256>, read_write> = var
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_247:ptr<function, bool, read_write> = var
- %x_248:ptr<function, bool, read_write> = var
- %12:i32 = load_vector_element %pos, 1u
- %13:bool = neq %12, 256i
- if %13 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %14:i32 = load_vector_element %pos, 0u
- %x_231:i32 = let %14
- %16:i32 = load_vector_element %pos, 1u
- %x_233:i32 = let %16
- store %indexable, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %18:ptr<function, i32, read_write> = access %indexable, %x_233
- %19:i32 = load %18
- %20:i32 = add %19, 15i
- %21:bool = lt %x_231, %20
- %x_237:bool = let %21
- store %x_248, %x_237
- if %x_237 [t: $B7] { # if_2
- $B7: { # true
- %23:i32 = load_vector_element %pos, 0u
- %x_241:i32 = let %23
- %25:i32 = load_vector_element %pos, 1u
- %x_243:i32 = let %25
- store %indexable_1, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %27:ptr<function, i32, read_write> = access %indexable_1, %x_243
- %28:i32 = load %27
- %29:i32 = sub %28, 15i
- %30:bool = gt %x_241, %29
- store %x_247, %30
- %31:bool = load %x_247
- store %x_248, %31
- exit_if # if_2
- }
- }
- %32:bool = load %x_248
- if %32 [t: $B8] { # if_3
- $B8: { # true
- %33:i32 = load_vector_element %pos, 0u
- %x_252:i32 = let %33
- %35:i32 = load_vector_element %pos, 1u
- %x_254:i32 = let %35
- store %indexable_2, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %37:ptr<function, i32, read_write> = access %indexable_2, %x_254
- %38:i32 = load %37
- %39:i32 = sub %x_252, %38
- %40:f32 = convert %39
- %41:f32 = abs %40
- %42:f32 = sub 15.0f, %41
- %43:f32 = div %42, 15.0f
- store %p, %43
- %44:f32 = load %p
- %x_262:f32 = let %44
- %46:f32 = load %p
- %x_263:f32 = let %46
- %48:f32 = load %p
- %x_264:f32 = let %48
- %50:vec4<f32> = construct %x_262, %x_263, %x_264, 1.0f
- ret %50
- }
- }
- %51:i32 = load_vector_element %pos, 1u
- %52:i32 = add %51, 1i
- store_vector_element %pos, 1u, %52
- continue # -> $B4
- }
- $B4: { # continuing
- next_iteration # -> $B3
- }
- }
- ret vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- }
-}
-%main_1 = func():void {
- $B9: {
- %pos_1:ptr<function, vec2<f32>, read_write> = var
- %ipos:ptr<function, vec2<i32>, read_write> = var
- %param:ptr<function, vec2<i32>, read_write> = var
- %57:vec4<f32> = load %gl_FragCoord
- %58:vec2<f32> = swizzle %57, xy
- %59:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %60:vec2<f32> = load %59
- %61:vec2<f32> = div %58, %60
- store %pos_1, %61
- %62:f32 = load_vector_element %pos_1, 0u
- %63:f32 = mul %62, 256.0f
- %64:i32 = call %tint_f32_to_i32, %63
- %66:i32 = let %64
- %67:f32 = load_vector_element %pos_1, 1u
- %68:f32 = mul %67, 256.0f
- %69:i32 = call %tint_f32_to_i32, %68
- %70:vec2<i32> = construct %66, %69
- store %ipos, %70
- %71:vec2<i32> = load %ipos
- store %param, %71
- %72:vec4<f32> = call %trace_vi2_, %param
- %x_220:vec4<f32> = let %72
- store %x_GLF_color, %x_220
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B10: {
- store %gl_FragCoord, %gl_FragCoord_param
- %76:void = call %main_1
- %77:vec4<f32> = load %x_GLF_color
- %78:main_out = construct %77
- ret %78
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B11: {
- %80:i32 = convert %value
- %81:bool = gte %value, -2147483648.0f
- %82:i32 = select -2147483648i, %80, %81
- %83:bool = lte %value, 2147483520.0f
- %84:i32 = select 2147483647i, %82, %83
- ret %84
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.ir.msl
deleted file mode 100644
index 0a5f7bb..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,170 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%trace_vi2_ = func(%pos:ptr<function, vec2<i32>, read_write>):vec4<f32> {
- $B2: {
- %indexable:ptr<function, array<i32, 256>, read_write> = var
- %indexable_1:ptr<function, array<i32, 256>, read_write> = var
- %p:ptr<function, f32, read_write> = var
- %indexable_2:ptr<function, array<i32, 256>, read_write> = var
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_247:ptr<function, bool, read_write> = var
- %x_248_phi:ptr<function, bool, read_write> = var
- %12:i32 = load_vector_element %pos, 1u
- %x_227:i32 = let %12
- %14:bool = neq %x_227, 256i
- if %14 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %15:i32 = load_vector_element %pos, 0u
- %x_231:i32 = let %15
- %17:i32 = load_vector_element %pos, 1u
- %x_233:i32 = let %17
- store %indexable, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %19:ptr<function, i32, read_write> = access %indexable, %x_233
- %20:i32 = load %19
- %x_235:i32 = let %20
- %22:i32 = add %x_235, 15i
- %23:bool = lt %x_231, %22
- %x_237:bool = let %23
- store %x_248_phi, %x_237
- if %x_237 [t: $B7] { # if_2
- $B7: { # true
- %25:i32 = load_vector_element %pos, 0u
- %x_241:i32 = let %25
- %27:i32 = load_vector_element %pos, 1u
- %x_243:i32 = let %27
- store %indexable_1, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %29:ptr<function, i32, read_write> = access %indexable_1, %x_243
- %30:i32 = load %29
- %x_245:i32 = let %30
- %32:i32 = sub %x_245, 15i
- %33:bool = gt %x_241, %32
- store %x_247, %33
- %34:bool = load %x_247
- store %x_248_phi, %34
- exit_if # if_2
- }
- }
- %35:bool = load %x_248_phi
- %x_248:bool = let %35
- if %x_248 [t: $B8] { # if_3
- $B8: { # true
- %37:i32 = load_vector_element %pos, 0u
- %x_252:i32 = let %37
- %39:i32 = load_vector_element %pos, 1u
- %x_254:i32 = let %39
- store %indexable_2, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %41:ptr<function, i32, read_write> = access %indexable_2, %x_254
- %42:i32 = load %41
- %x_256:i32 = let %42
- %44:i32 = sub %x_252, %x_256
- %45:f32 = convert %44
- %46:f32 = abs %45
- %47:f32 = sub 15.0f, %46
- %48:f32 = div %47, 15.0f
- store %p, %48
- %49:f32 = load %p
- %x_262:f32 = let %49
- %51:f32 = load %p
- %x_263:f32 = let %51
- %53:f32 = load %p
- %x_264:f32 = let %53
- %55:vec4<f32> = construct %x_262, %x_263, %x_264, 1.0f
- ret %55
- }
- }
- %56:i32 = load_vector_element %pos, 1u
- %x_267:i32 = let %56
- %58:i32 = add %x_267, 1i
- store_vector_element %pos, 1u, %58
- continue # -> $B4
- }
- $B4: { # continuing
- next_iteration # -> $B3
- }
- }
- ret vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- }
-}
-%main_1 = func():void {
- $B9: {
- %pos_1:ptr<function, vec2<f32>, read_write> = var
- %ipos:ptr<function, vec2<i32>, read_write> = var
- %param:ptr<function, vec2<i32>, read_write> = var
- %63:vec4<f32> = load %gl_FragCoord
- %x_205:vec4<f32> = let %63
- %65:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %66:vec2<f32> = load %65
- %x_208:vec2<f32> = let %66
- %68:f32 = access %x_205, 0u
- %69:f32 = access %x_205, 1u
- %70:vec2<f32> = construct %68, %69
- %71:vec2<f32> = div %70, %x_208
- store %pos_1, %71
- %72:f32 = load_vector_element %pos_1, 0u
- %x_211:f32 = let %72
- %74:f32 = load_vector_element %pos_1, 1u
- %x_215:f32 = let %74
- %76:f32 = mul %x_211, 256.0f
- %77:i32 = call %tint_f32_to_i32, %76
- %79:i32 = let %77
- %80:f32 = mul %x_215, 256.0f
- %81:i32 = call %tint_f32_to_i32, %80
- %82:vec2<i32> = construct %79, %81
- store %ipos, %82
- %83:vec2<i32> = load %ipos
- %x_219:vec2<i32> = let %83
- store %param, %x_219
- %85:vec4<f32> = call %trace_vi2_, %param
- %x_220:vec4<f32> = let %85
- store %x_GLF_color, %x_220
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B10: {
- store %gl_FragCoord, %gl_FragCoord_param
- %89:void = call %main_1
- %90:vec4<f32> = load %x_GLF_color
- %91:main_out = construct %90
- ret %91
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B11: {
- %93:i32 = convert %value
- %94:bool = gte %value, -2147483648.0f
- %95:i32 = select -2147483648i, %93, %94
- %96:bool = lte %value, 2147483520.0f
- %97:i32 = select 2147483647i, %95, %96
- ret %97
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.ir.msl
deleted file mode 100644
index d3680ab..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,166 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%trace_vi2_ = func(%pos:ptr<function, vec2<i32>, read_write>):vec4<f32> {
- $B2: {
- %indexable:ptr<function, array<i32, 256>, read_write> = var
- %indexable_1:ptr<function, array<i32, 256>, read_write> = var
- %p:ptr<function, f32, read_write> = var
- %indexable_2:ptr<function, array<i32, 256>, read_write> = var
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_251:ptr<function, bool, read_write> = var
- %x_252:ptr<function, bool, read_write> = var
- %12:i32 = load_vector_element %pos, 1u
- %13:bool = neq %12, 256i
- if %13 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %14:i32 = load_vector_element %pos, 0u
- %x_233:i32 = let %14
- %16:i32 = load_vector_element %pos, 1u
- %x_235:i32 = let %16
- store %indexable, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %18:ptr<function, i32, read_write> = access %indexable, %x_235
- %19:i32 = load %18
- %x_237:i32 = let %19
- %21:array<i32, 256> = load %indexable
- %x_238:array<i32, 256> = let %21
- store %indexable, array<i32, 256>(0i)
- %23:i32 = load_vector_element %pos, 1u
- %x_239:i32 = let %23
- store_vector_element %pos, 1u, 0i
- store_vector_element %pos, 1u, %x_239
- store %indexable, %x_238
- %25:i32 = add %x_237, 15i
- %26:bool = lt %x_233, %25
- %x_241:bool = let %26
- store %x_252, %x_241
- if %x_241 [t: $B7] { # if_2
- $B7: { # true
- %28:i32 = load_vector_element %pos, 0u
- %x_245:i32 = let %28
- %30:i32 = load_vector_element %pos, 1u
- %x_247:i32 = let %30
- store %indexable_1, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %32:ptr<function, i32, read_write> = access %indexable_1, %x_247
- %33:i32 = load %32
- %34:i32 = sub %33, 15i
- %35:bool = gt %x_245, %34
- store %x_251, %35
- %36:bool = load %x_251
- store %x_252, %36
- exit_if # if_2
- }
- }
- %37:bool = load %x_252
- if %37 [t: $B8] { # if_3
- $B8: { # true
- %38:i32 = load_vector_element %pos, 0u
- %x_256:i32 = let %38
- %40:i32 = load_vector_element %pos, 1u
- %x_258:i32 = let %40
- store %indexable_2, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %42:ptr<function, i32, read_write> = access %indexable_2, %x_258
- %43:i32 = load %42
- %44:i32 = sub %x_256, %43
- %45:f32 = convert %44
- %46:f32 = abs %45
- %47:f32 = sub 15.0f, %46
- %48:f32 = div %47, 15.0f
- store %p, %48
- %49:f32 = load %p
- %x_266:f32 = let %49
- %51:f32 = load %p
- %x_267:f32 = let %51
- %53:f32 = load %p
- %x_268:f32 = let %53
- %55:vec4<f32> = construct %x_266, %x_267, %x_268, 1.0f
- ret %55
- }
- }
- %56:i32 = load_vector_element %pos, 1u
- %57:i32 = add %56, 1i
- store_vector_element %pos, 1u, %57
- continue # -> $B4
- }
- $B4: { # continuing
- next_iteration # -> $B3
- }
- }
- ret vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- }
-}
-%main_1 = func():void {
- $B9: {
- %pos_1:ptr<function, vec2<f32>, read_write> = var
- %ipos:ptr<function, vec2<i32>, read_write> = var
- %param:ptr<function, vec2<i32>, read_write> = var
- %62:vec4<f32> = load %gl_FragCoord
- %63:vec2<f32> = swizzle %62, xy
- %64:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %65:vec2<f32> = load %64
- %66:vec2<f32> = div %63, %65
- store %pos_1, %66
- %67:f32 = load_vector_element %pos_1, 0u
- %68:f32 = mul %67, 256.0f
- %69:i32 = call %tint_f32_to_i32, %68
- %71:i32 = let %69
- %72:f32 = load_vector_element %pos_1, 1u
- %73:f32 = mul %72, 256.0f
- %74:i32 = call %tint_f32_to_i32, %73
- %75:vec2<i32> = construct %71, %74
- store %ipos, %75
- %76:vec2<i32> = load %ipos
- store %param, %76
- %77:vec4<f32> = call %trace_vi2_, %param
- %x_222:vec4<f32> = let %77
- store %x_GLF_color, %x_222
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B10: {
- store %gl_FragCoord, %gl_FragCoord_param
- %81:void = call %main_1
- %82:vec4<f32> = load %x_GLF_color
- %83:main_out = construct %82
- ret %83
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B11: {
- %85:i32 = convert %value
- %86:bool = gte %value, -2147483648.0f
- %87:i32 = select -2147483648i, %85, %86
- %88:bool = lte %value, 2147483520.0f
- %89:i32 = select 2147483647i, %87, %88
- ret %89
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.ir.msl
deleted file mode 100644
index 3de98d2..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,178 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%trace_vi2_ = func(%pos:ptr<function, vec2<i32>, read_write>):vec4<f32> {
- $B2: {
- %indexable:ptr<function, array<i32, 256>, read_write> = var
- %indexable_1:ptr<function, array<i32, 256>, read_write> = var
- %p:ptr<function, f32, read_write> = var
- %indexable_2:ptr<function, array<i32, 256>, read_write> = var
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_251:ptr<function, bool, read_write> = var
- %x_252_phi:ptr<function, bool, read_write> = var
- %12:i32 = load_vector_element %pos, 1u
- %x_229:i32 = let %12
- %14:bool = neq %x_229, 256i
- if %14 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %15:i32 = load_vector_element %pos, 0u
- %x_233:i32 = let %15
- %17:i32 = load_vector_element %pos, 1u
- %x_235:i32 = let %17
- store %indexable, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %19:ptr<function, i32, read_write> = access %indexable, %x_235
- %20:i32 = load %19
- %x_237:i32 = let %20
- %22:array<i32, 256> = load %indexable
- %x_238:array<i32, 256> = let %22
- store %indexable, array<i32, 256>(0i)
- %24:i32 = load_vector_element %pos, 1u
- %x_239:i32 = let %24
- store_vector_element %pos, 1u, 0i
- store_vector_element %pos, 1u, %x_239
- store %indexable, %x_238
- %26:i32 = add %x_237, 15i
- %27:bool = lt %x_233, %26
- %x_241:bool = let %27
- store %x_252_phi, %x_241
- if %x_241 [t: $B7] { # if_2
- $B7: { # true
- %29:i32 = load_vector_element %pos, 0u
- %x_245:i32 = let %29
- %31:i32 = load_vector_element %pos, 1u
- %x_247:i32 = let %31
- store %indexable_1, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %33:ptr<function, i32, read_write> = access %indexable_1, %x_247
- %34:i32 = load %33
- %x_249:i32 = let %34
- %36:i32 = sub %x_249, 15i
- %37:bool = gt %x_245, %36
- store %x_251, %37
- %38:bool = load %x_251
- store %x_252_phi, %38
- exit_if # if_2
- }
- }
- %39:bool = load %x_252_phi
- %x_252:bool = let %39
- if %x_252 [t: $B8] { # if_3
- $B8: { # true
- %41:i32 = load_vector_element %pos, 0u
- %x_256:i32 = let %41
- %43:i32 = load_vector_element %pos, 1u
- %x_258:i32 = let %43
- store %indexable_2, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
- %45:ptr<function, i32, read_write> = access %indexable_2, %x_258
- %46:i32 = load %45
- %x_260:i32 = let %46
- %48:i32 = sub %x_256, %x_260
- %49:f32 = convert %48
- %50:f32 = abs %49
- %51:f32 = sub 15.0f, %50
- %52:f32 = div %51, 15.0f
- store %p, %52
- %53:f32 = load %p
- %x_266:f32 = let %53
- %55:f32 = load %p
- %x_267:f32 = let %55
- %57:f32 = load %p
- %x_268:f32 = let %57
- %59:vec4<f32> = construct %x_266, %x_267, %x_268, 1.0f
- ret %59
- }
- }
- %60:i32 = load_vector_element %pos, 1u
- %x_271:i32 = let %60
- %62:i32 = add %x_271, 1i
- store_vector_element %pos, 1u, %62
- continue # -> $B4
- }
- $B4: { # continuing
- next_iteration # -> $B3
- }
- }
- ret vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
- }
-}
-%main_1 = func():void {
- $B9: {
- %pos_1:ptr<function, vec2<f32>, read_write> = var
- %ipos:ptr<function, vec2<i32>, read_write> = var
- %param:ptr<function, vec2<i32>, read_write> = var
- %67:vec4<f32> = load %gl_FragCoord
- %x_207:vec4<f32> = let %67
- %69:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %70:vec2<f32> = load %69
- %x_210:vec2<f32> = let %70
- %72:f32 = access %x_207, 0u
- %73:f32 = access %x_207, 1u
- %74:vec2<f32> = construct %72, %73
- %75:vec2<f32> = div %74, %x_210
- store %pos_1, %75
- %76:f32 = load_vector_element %pos_1, 0u
- %x_213:f32 = let %76
- %78:f32 = load_vector_element %pos_1, 1u
- %x_217:f32 = let %78
- %80:f32 = mul %x_213, 256.0f
- %81:i32 = call %tint_f32_to_i32, %80
- %83:i32 = let %81
- %84:f32 = mul %x_217, 256.0f
- %85:i32 = call %tint_f32_to_i32, %84
- %86:vec2<i32> = construct %83, %85
- store %ipos, %86
- %87:vec2<i32> = load %ipos
- %x_221:vec2<i32> = let %87
- store %param, %x_221
- %89:vec4<f32> = call %trace_vi2_, %param
- %x_222:vec4<f32> = let %89
- store %x_GLF_color, %x_222
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B10: {
- store %gl_FragCoord, %gl_FragCoord_param
- %93:void = call %main_1
- %94:vec4<f32> = load %x_GLF_color
- %95:main_out = construct %94
- ret %95
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B11: {
- %97:i32 = convert %value
- %98:bool = gte %value, -2147483648.0f
- %99:i32 = select -2147483648i, %97, %98
- %100:bool = lte %value, 2147483520.0f
- %101:i32 = select 2147483647i, %99, %100
- ret %101
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 152e0da..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,435 +0,0 @@
-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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_32:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %9:i32 = load %i
- %10:ptr<private, i32, read_write> = access %obj, 0u, %9
- %11:i32 = load %10
- store %temp, %11
- %12:i32 = load %i
- %x_228:i32 = let %12
- %14:ptr<private, i32, read_write> = access %obj, 0u, %x_228
- %15:i32 = load %j
- %16:ptr<private, i32, read_write> = access %obj, 0u, %15
- %17:i32 = load %16
- store %14, %17
- %18:i32 = load %j
- %x_233:i32 = let %18
- %20:ptr<private, i32, read_write> = access %obj, 0u, %x_233
- %21:i32 = load %temp
- store %20, %21
- 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
- %32:i32 = load %h
- %33:ptr<private, i32, read_write> = access %obj, 0u, %32
- %34:i32 = load %33
- store %pivot, %34
- %35:i32 = load %l
- %36:i32 = sub %35, 1i
- store %i_1, %36
- %37:i32 = load %l
- store %j_1, %37
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %38:i32 = load %j_1
- %39:i32 = load %h
- %40:i32 = sub %39, 1i
- %41:bool = lte %38, %40
- if %41 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %42:i32 = load %j_1
- %43:ptr<private, i32, read_write> = access %obj, 0u, %42
- %44:i32 = load %43
- %45:i32 = load %pivot
- %46:bool = lte %44, %45
- if %46 [t: $B8] { # if_2
- $B8: { # true
- %47:i32 = load %i_1
- %48:i32 = add %47, 1i
- store %i_1, %48
- %49:i32 = load %i_1
- store %param, %49
- %50:i32 = load %j_1
- store %param_1, %50
- %51:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %52:i32 = load %j_1
- %53:i32 = add %52, 1i
- store %j_1, %53
- next_iteration # -> $B4
- }
- }
- %54:i32 = load %i_1
- %55:i32 = add %54, 1i
- store %i_1, %55
- %56:i32 = load %i_1
- store %param_2, %56
- %57:i32 = load %h
- store %param_3, %57
- %58:void = call %swap_i1_i1_, %param_2, %param_3
- %59:i32 = load %i_1
- %x_271:i32 = let %59
- ret %x_271
- }
-}
-%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
- %69:i32 = load %top
- %70:i32 = add %69, 1i
- %x_274:i32 = let %70
- store %top, %x_274
- %72:ptr<function, i32, read_write> = access %stack, %x_274
- %73:i32 = load %l_1
- store %72, %73
- %74:i32 = load %top
- %75:i32 = add %74, 1i
- %x_278:i32 = let %75
- store %top, %x_278
- %77:ptr<function, i32, read_write> = access %stack, %x_278
- %78:i32 = load %h_1
- store %77, %78
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %79:i32 = load %top
- %80:bool = gte %79, 0i
- if %80 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %81:i32 = load %top
- %x_288:i32 = let %81
- %83:i32 = load %top
- %84:i32 = sub %83, 1i
- store %top, %84
- %85:ptr<function, i32, read_write> = access %stack, %x_288
- %86:i32 = load %85
- store %h_1, %86
- %87:i32 = load %top
- %x_292:i32 = let %87
- %89:i32 = load %top
- %90:i32 = sub %89, 1i
- store %top, %90
- %91:ptr<function, i32, read_write> = access %stack, %x_292
- %92:i32 = load %91
- store %l_1, %92
- %93:i32 = load %l_1
- store %param_4, %93
- %94:i32 = load %h_1
- store %param_5, %94
- %95:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_298:i32 = let %95
- store %p, %x_298
- %97:i32 = load %p
- %98:i32 = sub %97, 1i
- %99:i32 = load %l_1
- %100:bool = gt %98, %99
- if %100 [t: $B14] { # if_4
- $B14: { # true
- %101:i32 = load %top
- %102:i32 = add %101, 1i
- %x_306:i32 = let %102
- store %top, %x_306
- %104:ptr<function, i32, read_write> = access %stack, %x_306
- %105:i32 = load %l_1
- store %104, %105
- %106:i32 = load %top
- %107:i32 = add %106, 1i
- %x_310:i32 = let %107
- store %top, %x_310
- %109:ptr<function, i32, read_write> = access %stack, %x_310
- %110:i32 = load %p
- %111:i32 = sub %110, 1i
- store %109, %111
- exit_if # if_4
- }
- }
- %112:i32 = load %p
- %113:i32 = add %112, 1i
- %114:i32 = load %h_1
- %115:bool = lt %113, %114
- if %115 [t: $B15] { # if_5
- $B15: { # true
- %116:i32 = load %top
- %117:i32 = add %116, 1i
- %x_321:i32 = let %117
- store %top, %x_321
- %119:ptr<function, i32, read_write> = access %stack, %x_321
- %120:i32 = load %p
- %121:i32 = add %120, 1i
- store %119, %121
- %122:i32 = load %top
- %123:i32 = add %122, 1i
- %x_326:i32 = let %123
- store %top, %x_326
- %125:ptr<function, i32, read_write> = access %stack, %x_326
- %126:i32 = load %h_1
- store %125, %126
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %131:i32 = load %i_2
- %132:bool = lt %131, 10i
- if %132 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %133:i32 = load %i_2
- %x_88:i32 = let %133
- %135:ptr<private, i32, read_write> = access %obj, 0u, %x_88
- %136:i32 = load %i_2
- %137:i32 = sub 10i, %136
- store %135, %137
- %138:i32 = load %i_2
- %x_92:i32 = let %138
- %140:ptr<private, i32, read_write> = access %obj, 0u, %x_92
- %141:i32 = load %i_2
- %142:ptr<private, i32, read_write> = access %obj, 0u, %141
- %143:i32 = load %142
- %144:i32 = load %i_2
- %145:ptr<private, i32, read_write> = access %obj, 0u, %144
- %146:i32 = load %145
- %147:i32 = mul %143, %146
- store %140, %147
- continue # -> $B18
- }
- $B18: { # continuing
- %148:i32 = load %i_2
- %149:i32 = add %148, 1i
- store %i_2, %149
- next_iteration # -> $B17
- }
- }
- %150:void = call %quicksort_
- %151:vec4<f32> = load %gl_FragCoord
- %152:vec2<f32> = swizzle %151, xy
- %153:ptr<uniform, vec2<f32>, read> = access %x_32, 0u
- %154:vec2<f32> = load %153
- %155:vec2<f32> = div %152, %154
- store %uv, %155
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %156:f32 = load_vector_element %color, 0u
- %157:f32 = let %156
- %158:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %159:i32 = load %158
- %160:f32 = convert %159
- %161:f32 = add %157, %160
- store_vector_element %color, 0u, %161
- %162:f32 = load_vector_element %uv, 0u
- %163:bool = gt %162, 0.25f
- if %163 [t: $B21] { # if_7
- $B21: { # true
- %164:f32 = load_vector_element %color, 0u
- %165:f32 = let %164
- %166:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %167:i32 = load %166
- %168:f32 = convert %167
- %169:f32 = add %165, %168
- store_vector_element %color, 0u, %169
- exit_if # if_7
- }
- }
- %170:f32 = load_vector_element %uv, 0u
- %171:bool = gt %170, 0.5f
- if %171 [t: $B22] { # if_8
- $B22: { # true
- %172:f32 = load_vector_element %color, 1u
- %173:f32 = let %172
- %174:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %175:i32 = load %174
- %176:f32 = convert %175
- %177:f32 = add %173, %176
- store_vector_element %color, 1u, %177
- exit_if # if_8
- }
- }
- %178:f32 = load_vector_element %uv, 0u
- %179:bool = gt %178, 0.75f
- if %179 [t: $B23] { # if_9
- $B23: { # true
- %180:f32 = load_vector_element %color, 2u
- %181:f32 = let %180
- %182:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %183:i32 = load %182
- %184:f32 = convert %183
- %185:f32 = add %181, %184
- store_vector_element %color, 2u, %185
- exit_if # if_9
- }
- }
- %186:f32 = load_vector_element %color, 1u
- %187:f32 = let %186
- %188:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %189:i32 = load %188
- %190:f32 = convert %189
- %191:f32 = add %187, %190
- store_vector_element %color, 1u, %191
- %192:f32 = load_vector_element %uv, 1u
- %193:bool = gt %192, 0.25f
- if %193 [t: $B24] { # if_10
- $B24: { # true
- %194:f32 = load_vector_element %color, 0u
- %195:f32 = let %194
- %196:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %197:i32 = load %196
- %198:f32 = convert %197
- %199:f32 = add %195, %198
- store_vector_element %color, 0u, %199
- exit_if # if_10
- }
- }
- %200:f32 = load_vector_element %uv, 1u
- %201:bool = gt %200, 0.5f
- if %201 [t: $B25] { # if_11
- $B25: { # true
- %202:f32 = load_vector_element %color, 1u
- %203:f32 = let %202
- %204:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %205:i32 = load %204
- %206:f32 = convert %205
- %207:f32 = add %203, %206
- store_vector_element %color, 1u, %207
- exit_if # if_11
- }
- }
- %208:f32 = load_vector_element %uv, 1u
- %209:bool = gt %208, 0.75f
- if %209 [t: $B26] { # if_12
- $B26: { # true
- %210:f32 = load_vector_element %color, 2u
- %211:f32 = let %210
- %212:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %213:i32 = load %212
- %214:f32 = convert %213
- %215:f32 = add %211, %214
- store_vector_element %color, 2u, %215
- exit_if # if_12
- }
- }
- %216:f32 = load_vector_element %color, 2u
- %217:f32 = let %216
- %218:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %219:i32 = load %218
- %220:f32 = convert %219
- %221:f32 = add %217, %220
- store_vector_element %color, 2u, %221
- %222:f32 = load_vector_element %uv, 0u
- %223:f32 = load_vector_element %uv, 1u
- %224:f32 = sub %222, %223
- %225:f32 = abs %224
- %226:bool = lt %225, 0.25f
- if %226 [t: $B27] { # if_13
- $B27: { # true
- %227:f32 = load_vector_element %color, 0u
- %228:f32 = let %227
- %229:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %230:i32 = load %229
- %231:f32 = convert %230
- %232:f32 = add %228, %231
- store_vector_element %color, 0u, %232
- exit_if # if_13
- }
- }
- %233:vec3<f32> = load %color
- %234:vec3<f32> = normalize %233
- %x_219:vec3<f32> = let %234
- %236:f32 = access %x_219, 0u
- %237:f32 = access %x_219, 1u
- %238:f32 = access %x_219, 2u
- %239:vec4<f32> = construct %236, %237, %238, 1.0f
- store %x_GLF_color, %239
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %242:void = call %main_1
- %243:vec4<f32> = load %x_GLF_color
- %244:main_out = construct %243
- ret %244
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 09a008a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,505 +0,0 @@
-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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_32:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %9:i32 = load %i
- %x_225:i32 = let %9
- %11:ptr<private, i32, read_write> = access %obj, 0u, %x_225
- %12:i32 = load %11
- %x_227:i32 = let %12
- store %temp, %x_227
- %14:i32 = load %i
- %x_228:i32 = let %14
- %16:i32 = load %j
- %x_229:i32 = let %16
- %18:ptr<private, i32, read_write> = access %obj, 0u, %x_229
- %19:i32 = load %18
- %x_231:i32 = let %19
- %21:ptr<private, i32, read_write> = access %obj, 0u, %x_228
- store %21, %x_231
- %22:i32 = load %j
- %x_233:i32 = let %22
- %24:i32 = load %temp
- %x_234:i32 = let %24
- %26:ptr<private, i32, read_write> = access %obj, 0u, %x_233
- store %26, %x_234
- 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
- %37:i32 = load %h
- %x_237:i32 = let %37
- %39:ptr<private, i32, read_write> = access %obj, 0u, %x_237
- %40:i32 = load %39
- %x_239:i32 = let %40
- store %pivot, %x_239
- %42:i32 = load %l
- %x_240:i32 = let %42
- %44:i32 = sub %x_240, 1i
- store %i_1, %44
- %45:i32 = load %l
- %x_242:i32 = let %45
- store %j_1, %x_242
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %47:i32 = load %j_1
- %x_247:i32 = let %47
- %49:i32 = load %h
- %x_248:i32 = let %49
- %51:i32 = sub %x_248, 1i
- %52:bool = lte %x_247, %51
- if %52 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %53:i32 = load %j_1
- %x_252:i32 = let %53
- %55:ptr<private, i32, read_write> = access %obj, 0u, %x_252
- %56:i32 = load %55
- %x_254:i32 = let %56
- %58:i32 = load %pivot
- %x_255:i32 = let %58
- %60:bool = lte %x_254, %x_255
- if %60 [t: $B8] { # if_2
- $B8: { # true
- %61:i32 = load %i_1
- %x_259:i32 = let %61
- %63:i32 = add %x_259, 1i
- store %i_1, %63
- %64:i32 = load %i_1
- %x_261:i32 = let %64
- store %param, %x_261
- %66:i32 = load %j_1
- %x_262:i32 = let %66
- store %param_1, %x_262
- %68:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %69:i32 = load %j_1
- %x_264:i32 = let %69
- %71:i32 = add %x_264, 1i
- store %j_1, %71
- next_iteration # -> $B4
- }
- }
- %72:i32 = load %i_1
- %x_266:i32 = let %72
- %74:i32 = add %x_266, 1i
- store %i_1, %74
- %75:i32 = load %i_1
- %x_268:i32 = let %75
- store %param_2, %x_268
- %77:i32 = load %h
- %x_269:i32 = let %77
- store %param_3, %x_269
- %79:void = call %swap_i1_i1_, %param_2, %param_3
- %80:i32 = load %i_1
- %x_271:i32 = let %80
- ret %x_271
- }
-}
-%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
- %90:i32 = load %top
- %x_273:i32 = let %90
- %92:i32 = add %x_273, 1i
- %x_274:i32 = let %92
- store %top, %x_274
- %94:i32 = load %l_1
- %x_275:i32 = let %94
- %96:ptr<function, i32, read_write> = access %stack, %x_274
- store %96, %x_275
- %97:i32 = load %top
- %x_277:i32 = let %97
- %99:i32 = add %x_277, 1i
- %x_278:i32 = let %99
- store %top, %x_278
- %101:i32 = load %h_1
- %x_279:i32 = let %101
- %103:ptr<function, i32, read_write> = access %stack, %x_278
- store %103, %x_279
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %104:i32 = load %top
- %x_285:i32 = let %104
- %106:bool = gte %x_285, 0i
- if %106 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %107:i32 = load %top
- %x_288:i32 = let %107
- %109:i32 = sub %x_288, 1i
- store %top, %109
- %110:ptr<function, i32, read_write> = access %stack, %x_288
- %111:i32 = load %110
- %x_291:i32 = let %111
- store %h_1, %x_291
- %113:i32 = load %top
- %x_292:i32 = let %113
- %115:i32 = sub %x_292, 1i
- store %top, %115
- %116:ptr<function, i32, read_write> = access %stack, %x_292
- %117:i32 = load %116
- %x_295:i32 = let %117
- store %l_1, %x_295
- %119:i32 = load %l_1
- %x_296:i32 = let %119
- store %param_4, %x_296
- %121:i32 = load %h_1
- %x_297:i32 = let %121
- store %param_5, %x_297
- %123:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_298:i32 = let %123
- store %p, %x_298
- %125:i32 = load %p
- %x_299:i32 = let %125
- %127:i32 = load %l_1
- %x_301:i32 = let %127
- %129:i32 = sub %x_299, 1i
- %130:bool = gt %129, %x_301
- if %130 [t: $B14] { # if_4
- $B14: { # true
- %131:i32 = load %top
- %x_305:i32 = let %131
- %133:i32 = add %x_305, 1i
- %x_306:i32 = let %133
- store %top, %x_306
- %135:i32 = load %l_1
- %x_307:i32 = let %135
- %137:ptr<function, i32, read_write> = access %stack, %x_306
- store %137, %x_307
- %138:i32 = load %top
- %x_309:i32 = let %138
- %140:i32 = add %x_309, 1i
- %x_310:i32 = let %140
- store %top, %x_310
- %142:i32 = load %p
- %x_311:i32 = let %142
- %144:ptr<function, i32, read_write> = access %stack, %x_310
- %145:i32 = sub %x_311, 1i
- store %144, %145
- exit_if # if_4
- }
- }
- %146:i32 = load %p
- %x_314:i32 = let %146
- %148:i32 = load %h_1
- %x_316:i32 = let %148
- %150:i32 = add %x_314, 1i
- %151:bool = lt %150, %x_316
- if %151 [t: $B15] { # if_5
- $B15: { # true
- %152:i32 = load %top
- %x_320:i32 = let %152
- %154:i32 = add %x_320, 1i
- %x_321:i32 = let %154
- store %top, %x_321
- %156:i32 = load %p
- %x_322:i32 = let %156
- %158:ptr<function, i32, read_write> = access %stack, %x_321
- %159:i32 = add %x_322, 1i
- store %158, %159
- %160:i32 = load %top
- %x_325:i32 = let %160
- %162:i32 = add %x_325, 1i
- %x_326:i32 = let %162
- store %top, %x_326
- %164:i32 = load %h_1
- %x_327:i32 = let %164
- %166:ptr<function, i32, read_write> = access %stack, %x_326
- store %166, %x_327
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %171:i32 = load %i_2
- %x_85:i32 = let %171
- %173:bool = lt %x_85, 10i
- if %173 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %174:i32 = load %i_2
- %x_88:i32 = let %174
- %176:i32 = load %i_2
- %x_89:i32 = let %176
- %178:ptr<private, i32, read_write> = access %obj, 0u, %x_88
- %179:i32 = sub 10i, %x_89
- store %178, %179
- %180:i32 = load %i_2
- %x_92:i32 = let %180
- %182:i32 = load %i_2
- %x_93:i32 = let %182
- %184:ptr<private, i32, read_write> = access %obj, 0u, %x_93
- %185:i32 = load %184
- %x_95:i32 = let %185
- %187:i32 = load %i_2
- %x_96:i32 = let %187
- %189:ptr<private, i32, read_write> = access %obj, 0u, %x_96
- %190:i32 = load %189
- %x_98:i32 = let %190
- %192:ptr<private, i32, read_write> = access %obj, 0u, %x_92
- %193:i32 = mul %x_95, %x_98
- store %192, %193
- continue # -> $B18
- }
- $B18: { # continuing
- %194:i32 = load %i_2
- %x_101:i32 = let %194
- %196:i32 = add %x_101, 1i
- store %i_2, %196
- next_iteration # -> $B17
- }
- }
- %197:void = call %quicksort_
- %198:vec4<f32> = load %gl_FragCoord
- %x_104:vec4<f32> = let %198
- %200:ptr<uniform, vec2<f32>, read> = access %x_32, 0u
- %201:vec2<f32> = load %200
- %x_107:vec2<f32> = let %201
- %203:f32 = access %x_104, 0u
- %204:f32 = access %x_104, 1u
- %205:vec2<f32> = construct %203, %204
- %206:vec2<f32> = div %205, %x_107
- store %uv, %206
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %207:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %208:i32 = load %207
- %x_110:i32 = let %208
- %210:f32 = load_vector_element %color, 0u
- %x_113:f32 = let %210
- %212:f32 = convert %x_110
- %213:f32 = add %x_113, %212
- store_vector_element %color, 0u, %213
- %214:f32 = load_vector_element %uv, 0u
- %x_117:f32 = let %214
- %216:bool = gt %x_117, 0.25f
- if %216 [t: $B21] { # if_7
- $B21: { # true
- %217:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %218:i32 = load %217
- %x_122:i32 = let %218
- %220:f32 = load_vector_element %color, 0u
- %x_125:f32 = let %220
- %222:f32 = convert %x_122
- %223:f32 = add %x_125, %222
- store_vector_element %color, 0u, %223
- exit_if # if_7
- }
- }
- %224:f32 = load_vector_element %uv, 0u
- %x_129:f32 = let %224
- %226:bool = gt %x_129, 0.5f
- if %226 [t: $B22] { # if_8
- $B22: { # true
- %227:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %228:i32 = load %227
- %x_134:i32 = let %228
- %230:f32 = load_vector_element %color, 1u
- %x_137:f32 = let %230
- %232:f32 = convert %x_134
- %233:f32 = add %x_137, %232
- store_vector_element %color, 1u, %233
- exit_if # if_8
- }
- }
- %234:f32 = load_vector_element %uv, 0u
- %x_141:f32 = let %234
- %236:bool = gt %x_141, 0.75f
- if %236 [t: $B23] { # if_9
- $B23: { # true
- %237:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %238:i32 = load %237
- %x_146:i32 = let %238
- %240:f32 = load_vector_element %color, 2u
- %x_149:f32 = let %240
- %242:f32 = convert %x_146
- %243:f32 = add %x_149, %242
- store_vector_element %color, 2u, %243
- exit_if # if_9
- }
- }
- %244:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %245:i32 = load %244
- %x_153:i32 = let %245
- %247:f32 = load_vector_element %color, 1u
- %x_156:f32 = let %247
- %249:f32 = convert %x_153
- %250:f32 = add %x_156, %249
- store_vector_element %color, 1u, %250
- %251:f32 = load_vector_element %uv, 1u
- %x_160:f32 = let %251
- %253:bool = gt %x_160, 0.25f
- if %253 [t: $B24] { # if_10
- $B24: { # true
- %254:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %255:i32 = load %254
- %x_165:i32 = let %255
- %257:f32 = load_vector_element %color, 0u
- %x_168:f32 = let %257
- %259:f32 = convert %x_165
- %260:f32 = add %x_168, %259
- store_vector_element %color, 0u, %260
- exit_if # if_10
- }
- }
- %261:f32 = load_vector_element %uv, 1u
- %x_172:f32 = let %261
- %263:bool = gt %x_172, 0.5f
- if %263 [t: $B25] { # if_11
- $B25: { # true
- %264:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %265:i32 = load %264
- %x_177:i32 = let %265
- %267:f32 = load_vector_element %color, 1u
- %x_180:f32 = let %267
- %269:f32 = convert %x_177
- %270:f32 = add %x_180, %269
- store_vector_element %color, 1u, %270
- exit_if # if_11
- }
- }
- %271:f32 = load_vector_element %uv, 1u
- %x_184:f32 = let %271
- %273:bool = gt %x_184, 0.75f
- if %273 [t: $B26] { # if_12
- $B26: { # true
- %274:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %275:i32 = load %274
- %x_189:i32 = let %275
- %277:f32 = load_vector_element %color, 2u
- %x_192:f32 = let %277
- %279:f32 = convert %x_189
- %280:f32 = add %x_192, %279
- store_vector_element %color, 2u, %280
- exit_if # if_12
- }
- }
- %281:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %282:i32 = load %281
- %x_196:i32 = let %282
- %284:f32 = load_vector_element %color, 2u
- %x_199:f32 = let %284
- %286:f32 = convert %x_196
- %287:f32 = add %x_199, %286
- store_vector_element %color, 2u, %287
- %288:f32 = load_vector_element %uv, 0u
- %x_203:f32 = let %288
- %290:f32 = load_vector_element %uv, 1u
- %x_205:f32 = let %290
- %292:f32 = sub %x_203, %x_205
- %293:f32 = abs %292
- %294:bool = lt %293, 0.25f
- if %294 [t: $B27] { # if_13
- $B27: { # true
- %295:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %296:i32 = load %295
- %x_212:i32 = let %296
- %298:f32 = load_vector_element %color, 0u
- %x_215:f32 = let %298
- %300:f32 = convert %x_212
- %301:f32 = add %x_215, %300
- store_vector_element %color, 0u, %301
- exit_if # if_13
- }
- }
- %302:vec3<f32> = load %color
- %x_218:vec3<f32> = let %302
- %304:vec3<f32> = normalize %x_218
- %x_219:vec3<f32> = let %304
- %306:f32 = access %x_219, 0u
- %307:f32 = access %x_219, 1u
- %308:f32 = access %x_219, 2u
- %309:vec4<f32> = construct %306, %307, %308, 1.0f
- store %x_GLF_color, %309
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %312:void = call %main_1
- %313:vec4<f32> = load %x_GLF_color
- %314:main_out = construct %313
- ret %314
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.ir.msl
deleted file mode 100644
index 778dc46..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,435 +0,0 @@
-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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_32:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>, %x_228:mat3x3<f32>):void {
- $B2: {
- %temp:ptr<function, i32, read_write> = var
- %10:i32 = load %i
- %11:ptr<private, i32, read_write> = access %obj, 0u, %10
- %12:i32 = load %11
- store %temp, %12
- %13:i32 = load %i
- %x_233:i32 = let %13
- %15:ptr<private, i32, read_write> = access %obj, 0u, %x_233
- %16:i32 = load %j
- %17:ptr<private, i32, read_write> = access %obj, 0u, %16
- %18:i32 = load %17
- store %15, %18
- %19:i32 = load %j
- %x_238:i32 = let %19
- %21:ptr<private, i32, read_write> = access %obj, 0u, %x_238
- %22:i32 = load %temp
- store %21, %22
- 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
- %33:i32 = load %h
- %34:ptr<private, i32, read_write> = access %obj, 0u, %33
- %35:i32 = load %34
- store %pivot, %35
- %36:i32 = load %l
- %37:i32 = sub %36, 1i
- store %i_1, %37
- %38:i32 = load %l
- store %j_1, %38
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %39:i32 = load %j_1
- %40:i32 = load %h
- %41:i32 = sub %40, 1i
- %42:bool = lte %39, %41
- if %42 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %43:i32 = load %j_1
- %44:ptr<private, i32, read_write> = access %obj, 0u, %43
- %45:i32 = load %44
- %46:i32 = load %pivot
- %47:bool = lte %45, %46
- if %47 [t: $B8] { # if_2
- $B8: { # true
- %48:i32 = load %i_1
- %49:i32 = add %48, 1i
- store %i_1, %49
- %50:i32 = load %i_1
- store %param, %50
- %51:i32 = load %j_1
- store %param_1, %51
- %52:void = call %swap_i1_i1_, %param, %param_1, mat3x3<f32>(vec3<f32>(0.0f))
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %53:i32 = load %j_1
- %54:i32 = add %53, 1i
- store %j_1, %54
- next_iteration # -> $B4
- }
- }
- %55:i32 = load %i_1
- %56:i32 = add %55, 1i
- store %i_1, %56
- %57:i32 = load %i_1
- store %param_2, %57
- %58:i32 = load %h
- store %param_3, %58
- %59:void = call %swap_i1_i1_, %param_2, %param_3, mat3x3<f32>(vec3<f32>(0.0f))
- %60:i32 = load %i_1
- %x_276:i32 = let %60
- ret %x_276
- }
-}
-%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
- %70:i32 = load %top
- %71:i32 = add %70, 1i
- %x_279:i32 = let %71
- store %top, %x_279
- %73:ptr<function, i32, read_write> = access %stack, %x_279
- %74:i32 = load %l_1
- store %73, %74
- %75:i32 = load %top
- %76:i32 = add %75, 1i
- %x_283:i32 = let %76
- store %top, %x_283
- %78:ptr<function, i32, read_write> = access %stack, %x_283
- %79:i32 = load %h_1
- store %78, %79
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %80:i32 = load %top
- %81:bool = gte %80, 0i
- if %81 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %82:i32 = load %top
- %x_293:i32 = let %82
- %84:i32 = load %top
- %85:i32 = sub %84, 1i
- store %top, %85
- %86:ptr<function, i32, read_write> = access %stack, %x_293
- %87:i32 = load %86
- store %h_1, %87
- %88:i32 = load %top
- %x_297:i32 = let %88
- %90:i32 = load %top
- %91:i32 = sub %90, 1i
- store %top, %91
- %92:ptr<function, i32, read_write> = access %stack, %x_297
- %93:i32 = load %92
- store %l_1, %93
- %94:i32 = load %l_1
- store %param_4, %94
- %95:i32 = load %h_1
- store %param_5, %95
- %96:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_303:i32 = let %96
- store %p, %x_303
- %98:i32 = load %p
- %99:i32 = sub %98, 1i
- %100:i32 = load %l_1
- %101:bool = gt %99, %100
- if %101 [t: $B14] { # if_4
- $B14: { # true
- %102:i32 = load %top
- %103:i32 = add %102, 1i
- %x_311:i32 = let %103
- store %top, %x_311
- %105:ptr<function, i32, read_write> = access %stack, %x_311
- %106:i32 = load %l_1
- store %105, %106
- %107:i32 = load %top
- %108:i32 = add %107, 1i
- %x_315:i32 = let %108
- store %top, %x_315
- %110:ptr<function, i32, read_write> = access %stack, %x_315
- %111:i32 = load %p
- %112:i32 = sub %111, 1i
- store %110, %112
- exit_if # if_4
- }
- }
- %113:i32 = load %p
- %114:i32 = add %113, 1i
- %115:i32 = load %h_1
- %116:bool = lt %114, %115
- if %116 [t: $B15] { # if_5
- $B15: { # true
- %117:i32 = load %top
- %118:i32 = add %117, 1i
- %x_326:i32 = let %118
- store %top, %x_326
- %120:ptr<function, i32, read_write> = access %stack, %x_326
- %121:i32 = load %p
- %122:i32 = add %121, 1i
- store %120, %122
- %123:i32 = load %top
- %124:i32 = add %123, 1i
- %x_331:i32 = let %124
- store %top, %x_331
- %126:ptr<function, i32, read_write> = access %stack, %x_331
- %127:i32 = load %h_1
- store %126, %127
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %132:i32 = load %i_2
- %133:bool = lt %132, 10i
- if %133 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %134:i32 = load %i_2
- %x_92:i32 = let %134
- %136:ptr<private, i32, read_write> = access %obj, 0u, %x_92
- %137:i32 = load %i_2
- %138:i32 = sub 10i, %137
- store %136, %138
- %139:i32 = load %i_2
- %x_96:i32 = let %139
- %141:ptr<private, i32, read_write> = access %obj, 0u, %x_96
- %142:i32 = load %i_2
- %143:ptr<private, i32, read_write> = access %obj, 0u, %142
- %144:i32 = load %143
- %145:i32 = load %i_2
- %146:ptr<private, i32, read_write> = access %obj, 0u, %145
- %147:i32 = load %146
- %148:i32 = mul %144, %147
- store %141, %148
- continue # -> $B18
- }
- $B18: { # continuing
- %149:i32 = load %i_2
- %150:i32 = add %149, 1i
- store %i_2, %150
- next_iteration # -> $B17
- }
- }
- %151:void = call %quicksort_
- %152:vec4<f32> = load %gl_FragCoord
- %153:vec2<f32> = swizzle %152, xy
- %154:ptr<uniform, vec2<f32>, read> = access %x_32, 0u
- %155:vec2<f32> = load %154
- %156:vec2<f32> = div %153, %155
- store %uv, %156
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %157:f32 = load_vector_element %color, 0u
- %158:f32 = let %157
- %159:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %160:i32 = load %159
- %161:f32 = convert %160
- %162:f32 = add %158, %161
- store_vector_element %color, 0u, %162
- %163:f32 = load_vector_element %uv, 0u
- %164:bool = gt %163, 0.25f
- if %164 [t: $B21] { # if_7
- $B21: { # true
- %165:f32 = load_vector_element %color, 0u
- %166:f32 = let %165
- %167:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %168:i32 = load %167
- %169:f32 = convert %168
- %170:f32 = add %166, %169
- store_vector_element %color, 0u, %170
- exit_if # if_7
- }
- }
- %171:f32 = load_vector_element %uv, 0u
- %172:bool = gt %171, 0.5f
- if %172 [t: $B22] { # if_8
- $B22: { # true
- %173:f32 = load_vector_element %color, 1u
- %174:f32 = let %173
- %175:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %176:i32 = load %175
- %177:f32 = convert %176
- %178:f32 = add %174, %177
- store_vector_element %color, 1u, %178
- exit_if # if_8
- }
- }
- %179:f32 = load_vector_element %uv, 0u
- %180:bool = gt %179, 0.75f
- if %180 [t: $B23] { # if_9
- $B23: { # true
- %181:f32 = load_vector_element %color, 2u
- %182:f32 = let %181
- %183:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %184:i32 = load %183
- %185:f32 = convert %184
- %186:f32 = add %182, %185
- store_vector_element %color, 2u, %186
- exit_if # if_9
- }
- }
- %187:f32 = load_vector_element %color, 1u
- %188:f32 = let %187
- %189:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %190:i32 = load %189
- %191:f32 = convert %190
- %192:f32 = add %188, %191
- store_vector_element %color, 1u, %192
- %193:f32 = load_vector_element %uv, 1u
- %194:bool = gt %193, 0.25f
- if %194 [t: $B24] { # if_10
- $B24: { # true
- %195:f32 = load_vector_element %color, 0u
- %196:f32 = let %195
- %197:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %198:i32 = load %197
- %199:f32 = convert %198
- %200:f32 = add %196, %199
- store_vector_element %color, 0u, %200
- exit_if # if_10
- }
- }
- %201:f32 = load_vector_element %uv, 1u
- %202:bool = gt %201, 0.5f
- if %202 [t: $B25] { # if_11
- $B25: { # true
- %203:f32 = load_vector_element %color, 1u
- %204:f32 = let %203
- %205:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %206:i32 = load %205
- %207:f32 = convert %206
- %208:f32 = add %204, %207
- store_vector_element %color, 1u, %208
- exit_if # if_11
- }
- }
- %209:f32 = load_vector_element %uv, 1u
- %210:bool = gt %209, 0.75f
- if %210 [t: $B26] { # if_12
- $B26: { # true
- %211:f32 = load_vector_element %color, 2u
- %212:f32 = let %211
- %213:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %214:i32 = load %213
- %215:f32 = convert %214
- %216:f32 = add %212, %215
- store_vector_element %color, 2u, %216
- exit_if # if_12
- }
- }
- %217:f32 = load_vector_element %color, 2u
- %218:f32 = let %217
- %219:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %220:i32 = load %219
- %221:f32 = convert %220
- %222:f32 = add %218, %221
- store_vector_element %color, 2u, %222
- %223:f32 = load_vector_element %uv, 0u
- %224:f32 = load_vector_element %uv, 1u
- %225:f32 = sub %223, %224
- %226:f32 = abs %225
- %227:bool = lt %226, 0.25f
- if %227 [t: $B27] { # if_13
- $B27: { # true
- %228:f32 = load_vector_element %color, 0u
- %229:f32 = let %228
- %230:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %231:i32 = load %230
- %232:f32 = convert %231
- %233:f32 = add %229, %232
- store_vector_element %color, 0u, %233
- exit_if # if_13
- }
- }
- %234:vec3<f32> = load %color
- %235:vec3<f32> = normalize %234
- %x_223:vec3<f32> = let %235
- %237:f32 = access %x_223, 0u
- %238:f32 = access %x_223, 1u
- %239:f32 = access %x_223, 2u
- %240:vec4<f32> = construct %237, %238, %239, 1.0f
- store %x_GLF_color, %240
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %243:void = call %main_1
- %244:vec4<f32> = load %x_GLF_color
- %245:main_out = construct %244
- ret %245
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.ir.msl
deleted file mode 100644
index 533f89b..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,505 +0,0 @@
-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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_32:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>, %x_228:mat3x3<f32>):void {
- $B2: {
- %temp:ptr<function, i32, read_write> = var
- %10:i32 = load %i
- %x_230:i32 = let %10
- %12:ptr<private, i32, read_write> = access %obj, 0u, %x_230
- %13:i32 = load %12
- %x_232:i32 = let %13
- store %temp, %x_232
- %15:i32 = load %i
- %x_233:i32 = let %15
- %17:i32 = load %j
- %x_234:i32 = let %17
- %19:ptr<private, i32, read_write> = access %obj, 0u, %x_234
- %20:i32 = load %19
- %x_236:i32 = let %20
- %22:ptr<private, i32, read_write> = access %obj, 0u, %x_233
- store %22, %x_236
- %23:i32 = load %j
- %x_238:i32 = let %23
- %25:i32 = load %temp
- %x_239:i32 = let %25
- %27:ptr<private, i32, read_write> = access %obj, 0u, %x_238
- store %27, %x_239
- 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
- %38:i32 = load %h
- %x_242:i32 = let %38
- %40:ptr<private, i32, read_write> = access %obj, 0u, %x_242
- %41:i32 = load %40
- %x_244:i32 = let %41
- store %pivot, %x_244
- %43:i32 = load %l
- %x_245:i32 = let %43
- %45:i32 = sub %x_245, 1i
- store %i_1, %45
- %46:i32 = load %l
- %x_247:i32 = let %46
- store %j_1, %x_247
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %48:i32 = load %j_1
- %x_252:i32 = let %48
- %50:i32 = load %h
- %x_253:i32 = let %50
- %52:i32 = sub %x_253, 1i
- %53:bool = lte %x_252, %52
- if %53 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %54:i32 = load %j_1
- %x_257:i32 = let %54
- %56:ptr<private, i32, read_write> = access %obj, 0u, %x_257
- %57:i32 = load %56
- %x_259:i32 = let %57
- %59:i32 = load %pivot
- %x_260:i32 = let %59
- %61:bool = lte %x_259, %x_260
- if %61 [t: $B8] { # if_2
- $B8: { # true
- %62:i32 = load %i_1
- %x_264:i32 = let %62
- %64:i32 = add %x_264, 1i
- store %i_1, %64
- %65:i32 = load %i_1
- %x_266:i32 = let %65
- store %param, %x_266
- %67:i32 = load %j_1
- %x_267:i32 = let %67
- store %param_1, %x_267
- %69:void = call %swap_i1_i1_, %param, %param_1, mat3x3<f32>(vec3<f32>(0.0f))
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %70:i32 = load %j_1
- %x_269:i32 = let %70
- %72:i32 = add %x_269, 1i
- store %j_1, %72
- next_iteration # -> $B4
- }
- }
- %73:i32 = load %i_1
- %x_271:i32 = let %73
- %75:i32 = add %x_271, 1i
- store %i_1, %75
- %76:i32 = load %i_1
- %x_273:i32 = let %76
- store %param_2, %x_273
- %78:i32 = load %h
- %x_274:i32 = let %78
- store %param_3, %x_274
- %80:void = call %swap_i1_i1_, %param_2, %param_3, mat3x3<f32>(vec3<f32>(0.0f))
- %81:i32 = load %i_1
- %x_276:i32 = let %81
- ret %x_276
- }
-}
-%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
- %91:i32 = load %top
- %x_278:i32 = let %91
- %93:i32 = add %x_278, 1i
- %x_279:i32 = let %93
- store %top, %x_279
- %95:i32 = load %l_1
- %x_280:i32 = let %95
- %97:ptr<function, i32, read_write> = access %stack, %x_279
- store %97, %x_280
- %98:i32 = load %top
- %x_282:i32 = let %98
- %100:i32 = add %x_282, 1i
- %x_283:i32 = let %100
- store %top, %x_283
- %102:i32 = load %h_1
- %x_284:i32 = let %102
- %104:ptr<function, i32, read_write> = access %stack, %x_283
- store %104, %x_284
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %105:i32 = load %top
- %x_290:i32 = let %105
- %107:bool = gte %x_290, 0i
- if %107 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %108:i32 = load %top
- %x_293:i32 = let %108
- %110:i32 = sub %x_293, 1i
- store %top, %110
- %111:ptr<function, i32, read_write> = access %stack, %x_293
- %112:i32 = load %111
- %x_296:i32 = let %112
- store %h_1, %x_296
- %114:i32 = load %top
- %x_297:i32 = let %114
- %116:i32 = sub %x_297, 1i
- store %top, %116
- %117:ptr<function, i32, read_write> = access %stack, %x_297
- %118:i32 = load %117
- %x_300:i32 = let %118
- store %l_1, %x_300
- %120:i32 = load %l_1
- %x_301:i32 = let %120
- store %param_4, %x_301
- %122:i32 = load %h_1
- %x_302:i32 = let %122
- store %param_5, %x_302
- %124:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_303:i32 = let %124
- store %p, %x_303
- %126:i32 = load %p
- %x_304:i32 = let %126
- %128:i32 = load %l_1
- %x_306:i32 = let %128
- %130:i32 = sub %x_304, 1i
- %131:bool = gt %130, %x_306
- if %131 [t: $B14] { # if_4
- $B14: { # true
- %132:i32 = load %top
- %x_310:i32 = let %132
- %134:i32 = add %x_310, 1i
- %x_311:i32 = let %134
- store %top, %x_311
- %136:i32 = load %l_1
- %x_312:i32 = let %136
- %138:ptr<function, i32, read_write> = access %stack, %x_311
- store %138, %x_312
- %139:i32 = load %top
- %x_314:i32 = let %139
- %141:i32 = add %x_314, 1i
- %x_315:i32 = let %141
- store %top, %x_315
- %143:i32 = load %p
- %x_316:i32 = let %143
- %145:ptr<function, i32, read_write> = access %stack, %x_315
- %146:i32 = sub %x_316, 1i
- store %145, %146
- exit_if # if_4
- }
- }
- %147:i32 = load %p
- %x_319:i32 = let %147
- %149:i32 = load %h_1
- %x_321:i32 = let %149
- %151:i32 = add %x_319, 1i
- %152:bool = lt %151, %x_321
- if %152 [t: $B15] { # if_5
- $B15: { # true
- %153:i32 = load %top
- %x_325:i32 = let %153
- %155:i32 = add %x_325, 1i
- %x_326:i32 = let %155
- store %top, %x_326
- %157:i32 = load %p
- %x_327:i32 = let %157
- %159:ptr<function, i32, read_write> = access %stack, %x_326
- %160:i32 = add %x_327, 1i
- store %159, %160
- %161:i32 = load %top
- %x_330:i32 = let %161
- %163:i32 = add %x_330, 1i
- %x_331:i32 = let %163
- store %top, %x_331
- %165:i32 = load %h_1
- %x_332:i32 = let %165
- %167:ptr<function, i32, read_write> = access %stack, %x_331
- store %167, %x_332
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %172:i32 = load %i_2
- %x_89:i32 = let %172
- %174:bool = lt %x_89, 10i
- if %174 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %175:i32 = load %i_2
- %x_92:i32 = let %175
- %177:i32 = load %i_2
- %x_93:i32 = let %177
- %179:ptr<private, i32, read_write> = access %obj, 0u, %x_92
- %180:i32 = sub 10i, %x_93
- store %179, %180
- %181:i32 = load %i_2
- %x_96:i32 = let %181
- %183:i32 = load %i_2
- %x_97:i32 = let %183
- %185:ptr<private, i32, read_write> = access %obj, 0u, %x_97
- %186:i32 = load %185
- %x_99:i32 = let %186
- %188:i32 = load %i_2
- %x_100:i32 = let %188
- %190:ptr<private, i32, read_write> = access %obj, 0u, %x_100
- %191:i32 = load %190
- %x_102:i32 = let %191
- %193:ptr<private, i32, read_write> = access %obj, 0u, %x_96
- %194:i32 = mul %x_99, %x_102
- store %193, %194
- continue # -> $B18
- }
- $B18: { # continuing
- %195:i32 = load %i_2
- %x_105:i32 = let %195
- %197:i32 = add %x_105, 1i
- store %i_2, %197
- next_iteration # -> $B17
- }
- }
- %198:void = call %quicksort_
- %199:vec4<f32> = load %gl_FragCoord
- %x_108:vec4<f32> = let %199
- %201:ptr<uniform, vec2<f32>, read> = access %x_32, 0u
- %202:vec2<f32> = load %201
- %x_111:vec2<f32> = let %202
- %204:f32 = access %x_108, 0u
- %205:f32 = access %x_108, 1u
- %206:vec2<f32> = construct %204, %205
- %207:vec2<f32> = div %206, %x_111
- store %uv, %207
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %208:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %209:i32 = load %208
- %x_114:i32 = let %209
- %211:f32 = load_vector_element %color, 0u
- %x_117:f32 = let %211
- %213:f32 = convert %x_114
- %214:f32 = add %x_117, %213
- store_vector_element %color, 0u, %214
- %215:f32 = load_vector_element %uv, 0u
- %x_121:f32 = let %215
- %217:bool = gt %x_121, 0.25f
- if %217 [t: $B21] { # if_7
- $B21: { # true
- %218:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %219:i32 = load %218
- %x_126:i32 = let %219
- %221:f32 = load_vector_element %color, 0u
- %x_129:f32 = let %221
- %223:f32 = convert %x_126
- %224:f32 = add %x_129, %223
- store_vector_element %color, 0u, %224
- exit_if # if_7
- }
- }
- %225:f32 = load_vector_element %uv, 0u
- %x_133:f32 = let %225
- %227:bool = gt %x_133, 0.5f
- if %227 [t: $B22] { # if_8
- $B22: { # true
- %228:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %229:i32 = load %228
- %x_138:i32 = let %229
- %231:f32 = load_vector_element %color, 1u
- %x_141:f32 = let %231
- %233:f32 = convert %x_138
- %234:f32 = add %x_141, %233
- store_vector_element %color, 1u, %234
- exit_if # if_8
- }
- }
- %235:f32 = load_vector_element %uv, 0u
- %x_145:f32 = let %235
- %237:bool = gt %x_145, 0.75f
- if %237 [t: $B23] { # if_9
- $B23: { # true
- %238:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %239:i32 = load %238
- %x_150:i32 = let %239
- %241:f32 = load_vector_element %color, 2u
- %x_153:f32 = let %241
- %243:f32 = convert %x_150
- %244:f32 = add %x_153, %243
- store_vector_element %color, 2u, %244
- exit_if # if_9
- }
- }
- %245:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %246:i32 = load %245
- %x_157:i32 = let %246
- %248:f32 = load_vector_element %color, 1u
- %x_160:f32 = let %248
- %250:f32 = convert %x_157
- %251:f32 = add %x_160, %250
- store_vector_element %color, 1u, %251
- %252:f32 = load_vector_element %uv, 1u
- %x_164:f32 = let %252
- %254:bool = gt %x_164, 0.25f
- if %254 [t: $B24] { # if_10
- $B24: { # true
- %255:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %256:i32 = load %255
- %x_169:i32 = let %256
- %258:f32 = load_vector_element %color, 0u
- %x_172:f32 = let %258
- %260:f32 = convert %x_169
- %261:f32 = add %x_172, %260
- store_vector_element %color, 0u, %261
- exit_if # if_10
- }
- }
- %262:f32 = load_vector_element %uv, 1u
- %x_176:f32 = let %262
- %264:bool = gt %x_176, 0.5f
- if %264 [t: $B25] { # if_11
- $B25: { # true
- %265:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %266:i32 = load %265
- %x_181:i32 = let %266
- %268:f32 = load_vector_element %color, 1u
- %x_184:f32 = let %268
- %270:f32 = convert %x_181
- %271:f32 = add %x_184, %270
- store_vector_element %color, 1u, %271
- exit_if # if_11
- }
- }
- %272:f32 = load_vector_element %uv, 1u
- %x_188:f32 = let %272
- %274:bool = gt %x_188, 0.75f
- if %274 [t: $B26] { # if_12
- $B26: { # true
- %275:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %276:i32 = load %275
- %x_193:i32 = let %276
- %278:f32 = load_vector_element %color, 2u
- %x_196:f32 = let %278
- %280:f32 = convert %x_193
- %281:f32 = add %x_196, %280
- store_vector_element %color, 2u, %281
- exit_if # if_12
- }
- }
- %282:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %283:i32 = load %282
- %x_200:i32 = let %283
- %285:f32 = load_vector_element %color, 2u
- %x_203:f32 = let %285
- %287:f32 = convert %x_200
- %288:f32 = add %x_203, %287
- store_vector_element %color, 2u, %288
- %289:f32 = load_vector_element %uv, 0u
- %x_207:f32 = let %289
- %291:f32 = load_vector_element %uv, 1u
- %x_209:f32 = let %291
- %293:f32 = sub %x_207, %x_209
- %294:f32 = abs %293
- %295:bool = lt %294, 0.25f
- if %295 [t: $B27] { # if_13
- $B27: { # true
- %296:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %297:i32 = load %296
- %x_216:i32 = let %297
- %299:f32 = load_vector_element %color, 0u
- %x_219:f32 = let %299
- %301:f32 = convert %x_216
- %302:f32 = add %x_219, %301
- store_vector_element %color, 0u, %302
- exit_if # if_13
- }
- }
- %303:vec3<f32> = load %color
- %x_222:vec3<f32> = let %303
- %305:vec3<f32> = normalize %x_222
- %x_223:vec3<f32> = let %305
- %307:f32 = access %x_223, 0u
- %308:f32 = access %x_223, 1u
- %309:f32 = access %x_223, 2u
- %310:vec4<f32> = construct %307, %308, %309, 1.0f
- store %x_GLF_color, %310
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B28: {
- store %gl_FragCoord, %gl_FragCoord_param
- %313:void = call %main_1
- %314:vec4<f32> = load %x_GLF_color
- %315:main_out = construct %314
- ret %315
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.ir.msl
deleted file mode 100644
index 16f1283..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,400 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @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
- %x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_9:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_54:ptr<function, f32, read_write> = var
- %x_58:ptr<function, f32, read_write> = var
- %x_61:ptr<function, i32, read_write> = var
- %x_59:ptr<function, f32, read_write> = var
- %x_91:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_93:ptr<function, bool, read_write> = var
- %x_95:ptr<function, f32, read_write> = var
- %x_135:ptr<function, f32, read_write> = var
- %x_136:ptr<function, f32, read_write> = var
- %x_139:ptr<function, f32, read_write> = var
- %x_146:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %20:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
- %21:f32 = load_vector_element %20, 0u
- %22:f32 = mul %21, 0.125f
- %23:f32 = round %22
- %x_52:f32 = let %23
- %25:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_54, %25
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_58, -0.5f
- store %x_61, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_71:ptr<function, f32, read_write> = var
- %x_79:ptr<function, f32, read_write> = var
- %x_62:ptr<function, i32, read_write> = var
- store %x_91, 0.0f
- %29:f32 = load %x_58
- store %x_92, %29
- store %x_93, false
- %30:i32 = load %x_61
- %31:bool = lt %30, 800i
- if %31 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_78:ptr<function, f32, read_write> = var
- %33:i32 = load %x_61
- %34:i32 = call %tint_mod_i32, %33, 32i
- %36:bool = eq %34, 0i
- if %36 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %37:f32 = load %x_58
- %38:f32 = add %37, 0.40000000596046447754f
- store %x_71, %38
- %39:f32 = load %x_71
- store %x_59, %39
- exit_if # if_2
- }
- $B9: { # false
- %40:f32 = load %x_58
- store %x_79, %40
- %41:i32 = load %x_61
- %42:f32 = convert %41
- %43:f32 = let %42
- %44:f32 = round %x_52
- %45:f32 = let %44
- %46:i32 = load %x_61
- %47:f32 = convert %46
- %48:f32 = let %47
- %49:f32 = round %x_52
- %50:f32 = div %48, %49
- %51:f32 = floor %50
- %52:f32 = mul %45, %51
- %53:f32 = sub %43, %52
- %54:bool = lte %53, 0.00999999977648258209f
- if %54 [t: $B10] { # if_3
- $B10: { # true
- %55:f32 = load %x_58
- %56:f32 = add %55, 100.0f
- store %x_78, %56
- %57:f32 = load %x_78
- store %x_79, %57
- exit_if # if_3
- }
- }
- %58:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %59:f32 = load_vector_element %58, 0u
- %60:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %61:f32 = load_vector_element %60, 1u
- %62:bool = gt %59, %61
- if %62 [t: $B11] { # if_4
- $B11: { # true
- store %continue_execution, false
- exit_if # if_4
- }
- }
- %63:f32 = load %x_79
- store %x_59, %63
- exit_if # if_2
- }
- }
- %64:i32 = load %x_61
- %65:f32 = convert %64
- %66:f32 = load %x_54
- %67:bool = gte %65, %66
- if %67 [t: $B12] { # if_5
- $B12: { # true
- %68:f32 = load %x_59
- store %x_91, %68
- %69:f32 = load %x_59
- store %x_92, %69
- store %x_93, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %70:i32 = load %x_61
- %71:i32 = add %70, 1i
- store %x_62, %71
- %72:f32 = load %x_59
- store %x_58, %72
- %73:i32 = load %x_62
- store %x_61, %73
- next_iteration # -> $B4
- }
- }
- %74:f32 = load %x_91
- store %x_95, %74
- %75:bool = load %x_93
- if %75 [t: $B13] { # if_6
- $B13: { # true
- exit_switch # switch_1
- }
- }
- %76:f32 = load %x_92
- store %x_95, %76
- exit_switch # switch_1
- }
- }
- %x_98:ptr<function, f32, read_write> = var
- %x_102:ptr<function, f32, read_write> = var
- %x_105:ptr<function, i32, read_write> = var
- %x_103:ptr<function, f32, read_write> = var
- %x_137:ptr<function, bool, read_write> = var
- %82:f32 = load %x_95
- store_vector_element %c, 0u, %82
- %83:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_98, %83
- switch 0u [c: (default, $B14)] { # switch_2
- $B14: { # case
- store %x_102, -0.5f
- store %x_105, 1i
- loop [b: $B15, c: $B16] { # loop_2
- $B15: { # body
- %x_115:ptr<function, f32, read_write> = var
- %x_123:ptr<function, f32, read_write> = var
- %x_106:ptr<function, i32, read_write> = var
- store %x_135, 0.0f
- %87:f32 = load %x_102
- store %x_136, %87
- store %x_137, false
- %88:i32 = load %x_105
- %89:bool = lt %88, 800i
- if %89 [t: $B17, f: $B18] { # if_7
- $B17: { # true
- exit_if # if_7
- }
- $B18: { # false
- exit_loop # loop_2
- }
- }
- %x_122:ptr<function, f32, read_write> = var
- %91:i32 = load %x_105
- %92:i32 = call %tint_mod_i32, %91, 32i
- %93:bool = eq %92, 0i
- if %93 [t: $B19, f: $B20] { # if_8
- $B19: { # true
- %94:f32 = load %x_102
- %95:f32 = add %94, 0.40000000596046447754f
- store %x_115, %95
- %96:f32 = load %x_115
- store %x_103, %96
- exit_if # if_8
- }
- $B20: { # false
- %97:f32 = load %x_102
- store %x_123, %97
- %98:i32 = load %x_105
- %99:f32 = convert %98
- %100:f32 = let %99
- %101:f32 = round %x_52
- %102:f32 = let %101
- %103:i32 = load %x_105
- %104:f32 = convert %103
- %105:f32 = let %104
- %106:f32 = round %x_52
- %107:f32 = div %105, %106
- %108:f32 = floor %107
- %109:f32 = mul %102, %108
- %110:f32 = sub %100, %109
- %111:bool = lte %110, 0.00999999977648258209f
- if %111 [t: $B21] { # if_9
- $B21: { # true
- %112:f32 = load %x_102
- %113:f32 = add %112, 100.0f
- store %x_122, %113
- %114:f32 = load %x_122
- store %x_123, %114
- exit_if # if_9
- }
- }
- %115:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %116:f32 = load_vector_element %115, 0u
- %117:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %118:f32 = load_vector_element %117, 1u
- %119:bool = gt %116, %118
- if %119 [t: $B22] { # if_10
- $B22: { # true
- store %continue_execution, false
- exit_if # if_10
- }
- }
- %120:f32 = load %x_123
- store %x_103, %120
- exit_if # if_8
- }
- }
- %121:i32 = load %x_105
- %122:f32 = convert %121
- %123:f32 = load %x_98
- %124:bool = gte %122, %123
- if %124 [t: $B23] { # if_11
- $B23: { # true
- %125:f32 = load %x_103
- store %x_135, %125
- %126:f32 = load %x_103
- store %x_136, %126
- store %x_137, true
- exit_loop # loop_2
- }
- }
- continue # -> $B16
- }
- $B16: { # continuing
- %127:i32 = load %x_105
- %128:i32 = add %127, 1i
- store %x_106, %128
- %129:f32 = load %x_103
- store %x_102, %129
- %130:i32 = load %x_106
- store %x_105, %130
- next_iteration # -> $B15
- }
- }
- %131:f32 = load %x_135
- store %x_139, %131
- %132:bool = load %x_137
- if %132 [t: $B24] { # if_12
- $B24: { # true
- exit_switch # switch_2
- }
- }
- %133:f32 = load %x_136
- store %x_139, %133
- exit_switch # switch_2
- }
- }
- %134:f32 = load %x_139
- store_vector_element %c, 1u, %134
- %135:f32 = load_vector_element %c, 0u
- %136:f32 = load_vector_element %c, 1u
- %137:f32 = add %135, %136
- store_vector_element %c, 2u, %137
- store %x_146, 0i
- loop [b: $B25, c: $B26] { # loop_3
- $B25: { # body
- %x_147:ptr<function, i32, read_write> = var
- %139:i32 = load %x_146
- %140:bool = lt %139, 3i
- if %140 [t: $B27, f: $B28] { # if_13
- $B27: { # true
- exit_if # if_13
- }
- $B28: { # false
- exit_loop # loop_3
- }
- }
- %141:i32 = load %x_146
- %142:f32 = load_vector_element %c, %141
- %143:bool = gte %142, 1.0f
- if %143 [t: $B29] { # if_14
- $B29: { # true
- %144:i32 = load %x_146
- %145:i32 = load %x_146
- %146:f32 = load_vector_element %c, %145
- %147:i32 = load %x_146
- %148:f32 = load_vector_element %c, %147
- %149:f32 = mul %146, %148
- store_vector_element %c, %144, %149
- %150:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %151:f32 = load_vector_element %150, 0u
- %152:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %153:f32 = load_vector_element %152, 1u
- %154:bool = gt %151, %153
- if %154 [t: $B30] { # if_15
- $B30: { # true
- store %continue_execution, false
- exit_if # if_15
- }
- }
- exit_if # if_14
- }
- }
- continue # -> $B26
- }
- $B26: { # continuing
- %155:i32 = load %x_146
- %156:i32 = add %155, 1i
- store %x_147, %156
- %157:i32 = load %x_147
- store %x_146, %157
- next_iteration # -> $B25
- }
- }
- %158:vec3<f32> = load %c
- %159:vec3<f32> = abs %158
- %160:vec3<f32> = normalize %159
- %x_169:vec3<f32> = let %160
- %162:f32 = access %x_169, 0u
- %163:f32 = access %x_169, 1u
- %164:f32 = access %x_169, 2u
- %165:vec4<f32> = construct %162, %163, %164, 1.0f
- store %x_GLF_color, %165
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B31: {
- store %gl_FragCoord, %gl_FragCoord_param
- %168:void = call %main_1
- %169:vec4<f32> = load %x_GLF_color
- %170:main_out = construct %169
- %171:bool = load %continue_execution
- %172:bool = eq %171, false
- if %172 [t: $B32] { # if_16
- $B32: { # true
- terminate_invocation
- }
- }
- ret %170
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B33: {
- %175:bool = eq %rhs, 0i
- %176:bool = eq %lhs, -2147483648i
- %177:bool = eq %rhs, -1i
- %178:bool = and %176, %177
- %179:bool = or %175, %178
- %180:i32 = select %rhs, 1i, %179
- %181:i32 = let %180
- %182:i32 = div %lhs, %181
- %183:i32 = mul %182, %181
- %184:i32 = sub %lhs, %183
- ret %184
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.ir.msl
deleted file mode 100644
index ddd5f32..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,435 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @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
- %x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_9:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%main_1 = func():void {
- $B2: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %x_54:ptr<function, f32, read_write> = var
- %x_58:ptr<function, f32, read_write> = var
- %x_59:ptr<function, f32, read_write> = var
- %x_91:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_135:ptr<function, f32, read_write> = var
- %x_136:ptr<function, f32, read_write> = var
- %x_58_phi:ptr<function, f32, read_write> = var
- %x_61_phi:ptr<function, i32, read_write> = var
- %x_91_phi:ptr<function, f32, read_write> = var
- %x_92_phi:ptr<function, f32, read_write> = var
- %x_93_phi:ptr<function, bool, read_write> = var
- %x_95_phi:ptr<function, f32, read_write> = var
- %x_139_phi:ptr<function, f32, read_write> = var
- %x_146_phi:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %23:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
- %24:f32 = load_vector_element %23, 0u
- %x_50:f32 = let %24
- %26:f32 = mul %x_50, 0.125f
- %27:f32 = round %26
- %x_52:f32 = let %27
- %29:f32 = load_vector_element %gl_FragCoord, 0u
- store %x_54, %29
- switch 0u [c: (default, $B3)] { # switch_1
- $B3: { # case
- store %x_58_phi, -0.5f
- store %x_61_phi, 1i
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %x_71:ptr<function, f32, read_write> = var
- %x_79:ptr<function, f32, read_write> = var
- %x_62:ptr<function, i32, read_write> = var
- %x_59_phi:ptr<function, f32, read_write> = var
- %34:f32 = load %x_58_phi
- store %x_58, %34
- %35:i32 = load %x_61_phi
- %x_61:i32 = let %35
- store %x_91_phi, 0.0f
- %37:f32 = load %x_58
- store %x_92_phi, %37
- store %x_93_phi, false
- %38:bool = lt %x_61, 800i
- if %38 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %x_78:ptr<function, f32, read_write> = var
- %x_79_phi:ptr<function, f32, read_write> = var
- %41:i32 = call %tint_mod_i32, %x_61, 32i
- %43:bool = eq %41, 0i
- if %43 [t: $B8, f: $B9] { # if_2
- $B8: { # true
- %44:f32 = load %x_58
- %45:f32 = add %44, 0.40000000596046447754f
- store %x_71, %45
- %46:f32 = load %x_71
- store %x_59_phi, %46
- exit_if # if_2
- }
- $B9: { # false
- %47:f32 = load %x_58
- store %x_79_phi, %47
- %48:f32 = convert %x_61
- %49:f32 = let %48
- %50:f32 = round %x_52
- %51:f32 = let %50
- %52:f32 = convert %x_61
- %53:f32 = let %52
- %54:f32 = round %x_52
- %55:f32 = div %53, %54
- %56:f32 = floor %55
- %57:f32 = mul %51, %56
- %58:f32 = sub %49, %57
- %59:bool = lte %58, 0.00999999977648258209f
- if %59 [t: $B10] { # if_3
- $B10: { # true
- %60:f32 = load %x_58
- %61:f32 = add %60, 100.0f
- store %x_78, %61
- %62:f32 = load %x_78
- store %x_79_phi, %62
- exit_if # if_3
- }
- }
- %63:f32 = load %x_79_phi
- store %x_79, %63
- %64:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %65:f32 = load_vector_element %64, 0u
- %x_81:f32 = let %65
- %67:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %68:f32 = load_vector_element %67, 1u
- %x_83:f32 = let %68
- %70:bool = gt %x_81, %x_83
- if %70 [t: $B11] { # if_4
- $B11: { # true
- store %continue_execution, false
- exit_if # if_4
- }
- }
- %71:f32 = load %x_79
- store %x_59_phi, %71
- exit_if # if_2
- }
- }
- %72:f32 = load %x_59_phi
- store %x_59, %72
- %73:f32 = convert %x_61
- %74:f32 = load %x_54
- %75:bool = gte %73, %74
- if %75 [t: $B12] { # if_5
- $B12: { # true
- %76:f32 = load %x_59
- store %x_91_phi, %76
- %77:f32 = load %x_59
- store %x_92_phi, %77
- store %x_93_phi, true
- exit_loop # loop_1
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %78:i32 = add %x_61, 1i
- store %x_62, %78
- %79:f32 = load %x_59
- store %x_58_phi, %79
- %80:i32 = load %x_62
- store %x_61_phi, %80
- next_iteration # -> $B4
- }
- }
- %81:f32 = load %x_91_phi
- store %x_91, %81
- %82:f32 = load %x_92_phi
- store %x_92, %82
- %83:bool = load %x_93_phi
- %x_93:bool = let %83
- %85:f32 = load %x_91
- store %x_95_phi, %85
- if %x_93 [t: $B13] { # if_6
- $B13: { # true
- exit_switch # switch_1
- }
- }
- %86:f32 = load %x_92
- store %x_95_phi, %86
- exit_switch # switch_1
- }
- }
- %x_98:ptr<function, f32, read_write> = var
- %x_102:ptr<function, f32, read_write> = var
- %x_103:ptr<function, f32, read_write> = var
- %x_102_phi:ptr<function, f32, read_write> = var
- %x_105_phi:ptr<function, i32, read_write> = var
- %x_135_phi:ptr<function, f32, read_write> = var
- %x_136_phi:ptr<function, f32, read_write> = var
- %x_137_phi:ptr<function, bool, read_write> = var
- %95:f32 = load %x_95_phi
- %x_95:f32 = let %95
- store_vector_element %c, 0u, %x_95
- %97:f32 = load_vector_element %gl_FragCoord, 1u
- store %x_98, %97
- switch 0u [c: (default, $B14)] { # switch_2
- $B14: { # case
- store %x_102_phi, -0.5f
- store %x_105_phi, 1i
- loop [b: $B15, c: $B16] { # loop_2
- $B15: { # body
- %x_115:ptr<function, f32, read_write> = var
- %x_123:ptr<function, f32, read_write> = var
- %x_106:ptr<function, i32, read_write> = var
- %x_103_phi:ptr<function, f32, read_write> = var
- %102:f32 = load %x_102_phi
- store %x_102, %102
- %103:i32 = load %x_105_phi
- %x_105:i32 = let %103
- store %x_135_phi, 0.0f
- %105:f32 = load %x_102
- store %x_136_phi, %105
- store %x_137_phi, false
- %106:bool = lt %x_105, 800i
- if %106 [t: $B17, f: $B18] { # if_7
- $B17: { # true
- exit_if # if_7
- }
- $B18: { # false
- exit_loop # loop_2
- }
- }
- %x_122:ptr<function, f32, read_write> = var
- %x_123_phi:ptr<function, f32, read_write> = var
- %109:i32 = call %tint_mod_i32, %x_105, 32i
- %110:bool = eq %109, 0i
- if %110 [t: $B19, f: $B20] { # if_8
- $B19: { # true
- %111:f32 = load %x_102
- %112:f32 = add %111, 0.40000000596046447754f
- store %x_115, %112
- %113:f32 = load %x_115
- store %x_103_phi, %113
- exit_if # if_8
- }
- $B20: { # false
- %114:f32 = load %x_102
- store %x_123_phi, %114
- %115:f32 = convert %x_105
- %116:f32 = let %115
- %117:f32 = round %x_52
- %118:f32 = let %117
- %119:f32 = convert %x_105
- %120:f32 = let %119
- %121:f32 = round %x_52
- %122:f32 = div %120, %121
- %123:f32 = floor %122
- %124:f32 = mul %118, %123
- %125:f32 = sub %116, %124
- %126:bool = lte %125, 0.00999999977648258209f
- if %126 [t: $B21] { # if_9
- $B21: { # true
- %127:f32 = load %x_102
- %128:f32 = add %127, 100.0f
- store %x_122, %128
- %129:f32 = load %x_122
- store %x_123_phi, %129
- exit_if # if_9
- }
- }
- %130:f32 = load %x_123_phi
- store %x_123, %130
- %131:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %132:f32 = load_vector_element %131, 0u
- %x_125:f32 = let %132
- %134:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %135:f32 = load_vector_element %134, 1u
- %x_127:f32 = let %135
- %137:bool = gt %x_125, %x_127
- if %137 [t: $B22] { # if_10
- $B22: { # true
- store %continue_execution, false
- exit_if # if_10
- }
- }
- %138:f32 = load %x_123
- store %x_103_phi, %138
- exit_if # if_8
- }
- }
- %139:f32 = load %x_103_phi
- store %x_103, %139
- %140:f32 = convert %x_105
- %141:f32 = load %x_98
- %142:bool = gte %140, %141
- if %142 [t: $B23] { # if_11
- $B23: { # true
- %143:f32 = load %x_103
- store %x_135_phi, %143
- %144:f32 = load %x_103
- store %x_136_phi, %144
- store %x_137_phi, true
- exit_loop # loop_2
- }
- }
- continue # -> $B16
- }
- $B16: { # continuing
- %145:i32 = add %x_105, 1i
- store %x_106, %145
- %146:f32 = load %x_103
- store %x_102_phi, %146
- %147:i32 = load %x_106
- store %x_105_phi, %147
- next_iteration # -> $B15
- }
- }
- %148:f32 = load %x_135_phi
- store %x_135, %148
- %149:f32 = load %x_136_phi
- store %x_136, %149
- %150:bool = load %x_137_phi
- %x_137:bool = let %150
- %152:f32 = load %x_135
- store %x_139_phi, %152
- if %x_137 [t: $B24] { # if_12
- $B24: { # true
- exit_switch # switch_2
- }
- }
- %153:f32 = load %x_136
- store %x_139_phi, %153
- exit_switch # switch_2
- }
- }
- %154:f32 = load %x_139_phi
- %x_139:f32 = let %154
- store_vector_element %c, 1u, %x_139
- %156:f32 = load_vector_element %c, 0u
- %x_141:f32 = let %156
- %158:f32 = load_vector_element %c, 1u
- %x_142:f32 = let %158
- %160:f32 = add %x_141, %x_142
- store_vector_element %c, 2u, %160
- store %x_146_phi, 0i
- loop [b: $B25, c: $B26] { # loop_3
- $B25: { # body
- %x_147:ptr<function, i32, read_write> = var
- %162:i32 = load %x_146_phi
- %x_146:i32 = let %162
- %164:bool = lt %x_146, 3i
- if %164 [t: $B27, f: $B28] { # if_13
- $B27: { # true
- exit_if # if_13
- }
- $B28: { # false
- exit_loop # loop_3
- }
- }
- %165:f32 = load_vector_element %c, %x_146
- %x_153:f32 = let %165
- %167:bool = gte %x_153, 1.0f
- if %167 [t: $B29] { # if_14
- $B29: { # true
- %168:f32 = load_vector_element %c, %x_146
- %x_157:f32 = let %168
- %170:f32 = load_vector_element %c, %x_146
- %x_158:f32 = let %170
- %172:f32 = mul %x_157, %x_158
- store_vector_element %c, %x_146, %172
- %173:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %174:f32 = load_vector_element %173, 0u
- %x_161:f32 = let %174
- %176:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
- %177:f32 = load_vector_element %176, 1u
- %x_163:f32 = let %177
- %179:bool = gt %x_161, %x_163
- if %179 [t: $B30] { # if_15
- $B30: { # true
- store %continue_execution, false
- exit_if # if_15
- }
- }
- exit_if # if_14
- }
- }
- continue # -> $B26
- }
- $B26: { # continuing
- %180:i32 = add %x_146, 1i
- store %x_147, %180
- %181:i32 = load %x_147
- store %x_146_phi, %181
- next_iteration # -> $B25
- }
- }
- %182:vec3<f32> = load %c
- %x_167:vec3<f32> = let %182
- %184:vec3<f32> = abs %x_167
- %185:vec3<f32> = normalize %184
- %x_169:vec3<f32> = let %185
- %187:f32 = access %x_169, 0u
- %188:f32 = access %x_169, 1u
- %189:f32 = access %x_169, 2u
- %190:vec4<f32> = construct %187, %188, %189, 1.0f
- store %x_GLF_color, %190
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B31: {
- store %gl_FragCoord, %gl_FragCoord_param
- %193:void = call %main_1
- %194:vec4<f32> = load %x_GLF_color
- %195:main_out = construct %194
- %196:bool = load %continue_execution
- %197:bool = eq %196, false
- if %197 [t: $B32] { # if_16
- $B32: { # true
- terminate_invocation
- }
- }
- ret %195
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B33: {
- %200:bool = eq %rhs, 0i
- %201:bool = eq %lhs, -2147483648i
- %202:bool = eq %rhs, -1i
- %203:bool = and %201, %202
- %204:bool = or %200, %203
- %205:i32 = select %rhs, 1i, %204
- %206:i32 = let %205
- %207:i32 = div %lhs, %206
- %208:i32 = mul %207, %206
- %209:i32 = sub %lhs, %208
- ret %209
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.ir.msl
deleted file mode 100644
index 812caff..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,212 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %9:i32 = load %i
- %10:bool = lt %9, 800i
- if %10 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %11:i32 = load %i
- %12:i32 = call %tint_mod_i32, %11, 32i
- %14:bool = eq %12, 0i
- if %14 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %15:f32 = load %result
- %16:f32 = add %15, 0.40000000596046447754f
- store %result, %16
- exit_if # if_2
- }
- $B8: { # false
- %17:f32 = load %thirty_two
- %x_124:f32 = let %17
- %19:i32 = load %i
- %20:f32 = convert %19
- %21:f32 = let %20
- %22:f32 = round %x_124
- %23:f32 = let %22
- %24:i32 = load %i
- %25:f32 = convert %24
- %26:f32 = let %25
- %27:f32 = round %x_124
- %28:f32 = div %26, %27
- %29:f32 = floor %28
- %30:f32 = mul %23, %29
- %31:f32 = sub %21, %30
- %32:bool = lte %31, 0.00999999977648258209f
- if %32 [t: $B9] { # if_3
- $B9: { # true
- %33:f32 = load %result
- %34:f32 = add %33, 100.0f
- store %result, %34
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %35:i32 = load %i
- %36:f32 = convert %35
- %37:f32 = load %limit
- %38:bool = gte %36, %37
- if %38 [t: $B10] { # if_4
- $B10: { # true
- %39:f32 = load %result
- %x_138:f32 = let %39
- ret %x_138
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %41:i32 = load %i
- %42:i32 = add %41, 1i
- store %i, %42
- next_iteration # -> $B3
- }
- }
- %43:f32 = load %result
- %x_141:f32 = let %43
- ret %x_141
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %53:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %54:f32 = load_vector_element %53, 0u
- %55:f32 = div %54, 8.0f
- %56:f32 = round %55
- store %thirty_two_1, %56
- %57:f32 = load_vector_element %gl_FragCoord, 0u
- store %param, %57
- %58:f32 = load %thirty_two_1
- store %param_1, %58
- %59:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_62:f32 = let %59
- store_vector_element %c, 0u, %x_62
- %61:f32 = load_vector_element %gl_FragCoord, 1u
- store %param_2, %61
- %62:f32 = load %thirty_two_1
- store %param_3, %62
- %63:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_67:f32 = let %63
- store_vector_element %c, 1u, %x_67
- %65:f32 = load_vector_element %c, 0u
- %66:f32 = load_vector_element %c, 1u
- %67:f32 = add %65, %66
- store_vector_element %c, 2u, %67
- store %i_1, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %68:i32 = load %i_1
- %69:bool = lt %68, 3i
- if %69 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %70:i32 = load %i_1
- %71:f32 = load_vector_element %c, %70
- %72:bool = gte %71, 1.0f
- if %72 [t: $B16] { # if_6
- $B16: { # true
- %73:i32 = load %i_1
- %x_88:i32 = let %73
- %75:i32 = load %i_1
- %76:f32 = load_vector_element %c, %75
- %77:i32 = load %i_1
- %78:f32 = load_vector_element %c, %77
- %79:f32 = mul %76, %78
- store_vector_element %c, %x_88, %79
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %80:i32 = load %i_1
- %81:i32 = add %80, 1i
- store %i_1, %81
- next_iteration # -> $B12
- }
- }
- %82:vec3<f32> = load %c
- %83:vec3<f32> = abs %82
- %84:vec3<f32> = normalize %83
- %x_101:vec3<f32> = let %84
- %86:f32 = access %x_101, 0u
- %87:f32 = access %x_101, 1u
- %88:f32 = access %x_101, 2u
- %89:vec4<f32> = construct %86, %87, %88, 1.0f
- store %x_GLF_color, %89
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B17: {
- store %gl_FragCoord, %gl_FragCoord_param
- %92:void = call %main_1
- %93:vec4<f32> = load %x_GLF_color
- %94:main_out = construct %93
- ret %94
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B18: {
- %97:bool = eq %rhs, 0i
- %98:bool = eq %lhs, -2147483648i
- %99:bool = eq %rhs, -1i
- %100:bool = and %98, %99
- %101:bool = or %97, %100
- %102:i32 = select %rhs, 1i, %101
- %103:i32 = let %102
- %104:i32 = div %lhs, %103
- %105:i32 = mul %104, %103
- %106:i32 = sub %lhs, %105
- ret %106
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.ir.msl
deleted file mode 100644
index d8bc1a5..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,235 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %9:i32 = load %i
- %x_111:i32 = let %9
- %11:bool = lt %x_111, 800i
- if %11 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %12:i32 = load %i
- %x_114:i32 = let %12
- %14:i32 = call %tint_mod_i32, %x_114, 32i
- %16:bool = eq %14, 0i
- if %16 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %17:f32 = load %result
- %x_120:f32 = let %17
- %19:f32 = add %x_120, 0.40000000596046447754f
- store %result, %19
- exit_if # if_2
- }
- $B8: { # false
- %20:i32 = load %i
- %x_122:i32 = let %20
- %22:f32 = load %thirty_two
- %x_124:f32 = let %22
- %24:f32 = convert %x_122
- %25:f32 = let %24
- %26:f32 = round %x_124
- %27:f32 = let %26
- %28:f32 = convert %x_122
- %29:f32 = let %28
- %30:f32 = round %x_124
- %31:f32 = div %29, %30
- %32:f32 = floor %31
- %33:f32 = mul %27, %32
- %34:f32 = sub %25, %33
- %35:bool = lte %34, 0.00999999977648258209f
- if %35 [t: $B9] { # if_3
- $B9: { # true
- %36:f32 = load %result
- %x_130:f32 = let %36
- %38:f32 = add %x_130, 100.0f
- store %result, %38
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %39:i32 = load %i
- %x_132:i32 = let %39
- %41:f32 = load %limit
- %x_134:f32 = let %41
- %43:f32 = convert %x_132
- %44:bool = gte %43, %x_134
- if %44 [t: $B10] { # if_4
- $B10: { # true
- %45:f32 = load %result
- %x_138:f32 = let %45
- ret %x_138
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %47:i32 = load %i
- %x_139:i32 = let %47
- %49:i32 = add %x_139, 1i
- store %i, %49
- next_iteration # -> $B3
- }
- }
- %50:f32 = load %result
- %x_141:f32 = let %50
- ret %x_141
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %60:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %61:f32 = load_vector_element %60, 0u
- %x_56:f32 = let %61
- %63:f32 = div %x_56, 8.0f
- %64:f32 = round %63
- store %thirty_two_1, %64
- %65:f32 = load_vector_element %gl_FragCoord, 0u
- %x_60:f32 = let %65
- store %param, %x_60
- %67:f32 = load %thirty_two_1
- %x_61:f32 = let %67
- store %param_1, %x_61
- %69:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_62:f32 = let %69
- store_vector_element %c, 0u, %x_62
- %71:f32 = load_vector_element %gl_FragCoord, 1u
- %x_65:f32 = let %71
- store %param_2, %x_65
- %73:f32 = load %thirty_two_1
- %x_66:f32 = let %73
- store %param_3, %x_66
- %75:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_67:f32 = let %75
- store_vector_element %c, 1u, %x_67
- %77:f32 = load_vector_element %c, 0u
- %x_70:f32 = let %77
- %79:f32 = load_vector_element %c, 1u
- %x_72:f32 = let %79
- %81:f32 = add %x_70, %x_72
- store_vector_element %c, 2u, %81
- store %i_1, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %82:i32 = load %i_1
- %x_79:i32 = let %82
- %84:bool = lt %x_79, 3i
- if %84 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %85:i32 = load %i_1
- %x_82:i32 = let %85
- %87:f32 = load_vector_element %c, %x_82
- %x_84:f32 = let %87
- %89:bool = gte %x_84, 1.0f
- if %89 [t: $B16] { # if_6
- $B16: { # true
- %90:i32 = load %i_1
- %x_88:i32 = let %90
- %92:i32 = load %i_1
- %x_89:i32 = let %92
- %94:f32 = load_vector_element %c, %x_89
- %x_91:f32 = let %94
- %96:i32 = load %i_1
- %x_92:i32 = let %96
- %98:f32 = load_vector_element %c, %x_92
- %x_94:f32 = let %98
- %100:f32 = mul %x_91, %x_94
- store_vector_element %c, %x_88, %100
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %101:i32 = load %i_1
- %x_97:i32 = let %101
- %103:i32 = add %x_97, 1i
- store %i_1, %103
- next_iteration # -> $B12
- }
- }
- %104:vec3<f32> = load %c
- %x_99:vec3<f32> = let %104
- %106:vec3<f32> = abs %x_99
- %107:vec3<f32> = normalize %106
- %x_101:vec3<f32> = let %107
- %109:f32 = access %x_101, 0u
- %110:f32 = access %x_101, 1u
- %111:f32 = access %x_101, 2u
- %112:vec4<f32> = construct %109, %110, %111, 1.0f
- store %x_GLF_color, %112
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B17: {
- store %gl_FragCoord, %gl_FragCoord_param
- %115:void = call %main_1
- %116:vec4<f32> = load %x_GLF_color
- %117:main_out = construct %116
- ret %117
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B18: {
- %120:bool = eq %rhs, 0i
- %121:bool = eq %lhs, -2147483648i
- %122:bool = eq %rhs, -1i
- %123:bool = and %121, %122
- %124:bool = or %120, %123
- %125:i32 = select %rhs, 1i, %124
- %126:i32 = let %125
- %127:i32 = div %lhs, %126
- %128:i32 = mul %127, %126
- %129:i32 = sub %lhs, %128
- ret %129
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.ir.msl
deleted file mode 100644
index db21ff1..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,235 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
- %x_20:ptr<uniform, buf1, read> = var @binding_point(0, 1)
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %10:i32 = load %i
- %11:bool = lt %10, 800i
- if %11 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %12:i32 = load %i
- %13:i32 = call %tint_mod_i32, %12, 32i
- %15:bool = eq %13, 0i
- if %15 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %16:f32 = load %result
- %17:f32 = add %16, 0.40000000596046447754f
- store %result, %17
- exit_if # if_2
- }
- $B8: { # false
- %18:f32 = load %thirty_two
- %x_138:f32 = let %18
- %20:i32 = load %i
- %21:f32 = convert %20
- %22:f32 = let %21
- %23:f32 = round %x_138
- %24:f32 = let %23
- %25:i32 = load %i
- %26:f32 = convert %25
- %27:f32 = let %26
- %28:f32 = round %x_138
- %29:f32 = div %27, %28
- %30:f32 = floor %29
- %31:f32 = mul %24, %30
- %32:f32 = sub %22, %31
- %33:bool = lte %32, 0.00999999977648258209f
- if %33 [t: $B9] { # if_3
- $B9: { # true
- %34:f32 = load %result
- %35:f32 = add %34, 100.0f
- store %result, %35
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %36:i32 = load %i
- %37:f32 = convert %36
- %38:f32 = load %limit
- %39:bool = gte %37, %38
- if %39 [t: $B10] { # if_4
- $B10: { # true
- %40:f32 = load %result
- %x_152:f32 = let %40
- ret %x_152
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %42:i32 = load %i
- %43:i32 = add %42, 1i
- store %i, %43
- next_iteration # -> $B3
- }
- }
- %44:f32 = load %result
- %x_155:f32 = let %44
- ret %x_155
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- %x_58:ptr<function, vec3<f32>, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %55:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %56:f32 = load_vector_element %55, 0u
- %57:f32 = div %56, 8.0f
- %58:f32 = round %57
- store %thirty_two_1, %58
- %59:f32 = load_vector_element %gl_FragCoord, 0u
- store %param, %59
- %60:f32 = load %thirty_two_1
- store %param_1, %60
- %61:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_66:f32 = let %61
- store_vector_element %c, 0u, %x_66
- %63:f32 = load_vector_element %gl_FragCoord, 1u
- store %param_2, %63
- %64:f32 = load %thirty_two_1
- store %param_3, %64
- %65:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_71:f32 = let %65
- store_vector_element %c, 1u, %x_71
- %67:f32 = load_vector_element %c, 0u
- %68:f32 = load_vector_element %c, 1u
- %69:f32 = add %67, %68
- store_vector_element %c, 2u, %69
- store %i_1, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %70:i32 = load %i_1
- %71:bool = lt %70, 3i
- if %71 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %72:i32 = load %i_1
- %73:f32 = load_vector_element %c, %72
- %74:bool = gte %73, 1.0f
- if %74 [t: $B16] { # if_6
- $B16: { # true
- %75:i32 = load %i_1
- %x_92:i32 = let %75
- %77:i32 = load %i_1
- %78:f32 = load_vector_element %c, %77
- %79:i32 = load %i_1
- %80:f32 = load_vector_element %c, %79
- %81:f32 = mul %78, %80
- store_vector_element %c, %x_92, %81
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %82:i32 = load %i_1
- %83:i32 = add %82, 1i
- store %i_1, %83
- next_iteration # -> $B12
- }
- }
- %84:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
- %85:f32 = load_vector_element %84, 0u
- %86:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
- %87:f32 = load_vector_element %86, 1u
- %88:bool = lt %85, %87
- if %88 [t: $B17, f: $B18] { # if_7
- $B17: { # true
- %89:vec3<f32> = load %c
- %90:vec3<f32> = abs %89
- store %x_58, %90
- exit_if # if_7
- }
- $B18: { # false
- %91:vec3<f32> = load %c
- store %x_58, %91
- exit_if # if_7
- }
- }
- %92:vec3<f32> = load %x_58
- %93:vec3<f32> = normalize %92
- %x_115:vec3<f32> = let %93
- %95:f32 = access %x_115, 0u
- %96:f32 = access %x_115, 1u
- %97:f32 = access %x_115, 2u
- %98:vec4<f32> = construct %95, %96, %97, 1.0f
- store %x_GLF_color, %98
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B19: {
- store %gl_FragCoord, %gl_FragCoord_param
- %101:void = call %main_1
- %102:vec4<f32> = load %x_GLF_color
- %103:main_out = construct %102
- ret %103
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B20: {
- %106:bool = eq %rhs, 0i
- %107:bool = eq %lhs, -2147483648i
- %108:bool = eq %rhs, -1i
- %109:bool = and %107, %108
- %110:bool = or %106, %109
- %111:i32 = select %rhs, 1i, %110
- %112:i32 = let %111
- %113:i32 = div %lhs, %112
- %114:i32 = mul %113, %112
- %115:i32 = sub %lhs, %114
- ret %115
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.ir.msl
deleted file mode 100644
index 6641a99..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,262 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
- %x_20:ptr<uniform, buf1, read> = var @binding_point(0, 1)
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %10:i32 = load %i
- %x_125:i32 = let %10
- %12:bool = lt %x_125, 800i
- if %12 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %13:i32 = load %i
- %x_128:i32 = let %13
- %15:i32 = call %tint_mod_i32, %x_128, 32i
- %17:bool = eq %15, 0i
- if %17 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %18:f32 = load %result
- %x_134:f32 = let %18
- %20:f32 = add %x_134, 0.40000000596046447754f
- store %result, %20
- exit_if # if_2
- }
- $B8: { # false
- %21:i32 = load %i
- %x_136:i32 = let %21
- %23:f32 = load %thirty_two
- %x_138:f32 = let %23
- %25:f32 = convert %x_136
- %26:f32 = let %25
- %27:f32 = round %x_138
- %28:f32 = let %27
- %29:f32 = convert %x_136
- %30:f32 = let %29
- %31:f32 = round %x_138
- %32:f32 = div %30, %31
- %33:f32 = floor %32
- %34:f32 = mul %28, %33
- %35:f32 = sub %26, %34
- %36:bool = lte %35, 0.00999999977648258209f
- if %36 [t: $B9] { # if_3
- $B9: { # true
- %37:f32 = load %result
- %x_144:f32 = let %37
- %39:f32 = add %x_144, 100.0f
- store %result, %39
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %40:i32 = load %i
- %x_146:i32 = let %40
- %42:f32 = load %limit
- %x_148:f32 = let %42
- %44:f32 = convert %x_146
- %45:bool = gte %44, %x_148
- if %45 [t: $B10] { # if_4
- $B10: { # true
- %46:f32 = load %result
- %x_152:f32 = let %46
- ret %x_152
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %48:i32 = load %i
- %x_153:i32 = let %48
- %50:i32 = add %x_153, 1i
- store %i, %50
- next_iteration # -> $B3
- }
- }
- %51:f32 = load %result
- %x_155:f32 = let %51
- ret %x_155
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- %x_58:ptr<function, vec3<f32>, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %62:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %63:f32 = load_vector_element %62, 0u
- %x_60:f32 = let %63
- %65:f32 = div %x_60, 8.0f
- %66:f32 = round %65
- store %thirty_two_1, %66
- %67:f32 = load_vector_element %gl_FragCoord, 0u
- %x_64:f32 = let %67
- store %param, %x_64
- %69:f32 = load %thirty_two_1
- %x_65:f32 = let %69
- store %param_1, %x_65
- %71:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_66:f32 = let %71
- store_vector_element %c, 0u, %x_66
- %73:f32 = load_vector_element %gl_FragCoord, 1u
- %x_69:f32 = let %73
- store %param_2, %x_69
- %75:f32 = load %thirty_two_1
- %x_70:f32 = let %75
- store %param_3, %x_70
- %77:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_71:f32 = let %77
- store_vector_element %c, 1u, %x_71
- %79:f32 = load_vector_element %c, 0u
- %x_74:f32 = let %79
- %81:f32 = load_vector_element %c, 1u
- %x_76:f32 = let %81
- %83:f32 = add %x_74, %x_76
- store_vector_element %c, 2u, %83
- store %i_1, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %84:i32 = load %i_1
- %x_83:i32 = let %84
- %86:bool = lt %x_83, 3i
- if %86 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %87:i32 = load %i_1
- %x_86:i32 = let %87
- %89:f32 = load_vector_element %c, %x_86
- %x_88:f32 = let %89
- %91:bool = gte %x_88, 1.0f
- if %91 [t: $B16] { # if_6
- $B16: { # true
- %92:i32 = load %i_1
- %x_92:i32 = let %92
- %94:i32 = load %i_1
- %x_93:i32 = let %94
- %96:f32 = load_vector_element %c, %x_93
- %x_95:f32 = let %96
- %98:i32 = load %i_1
- %x_96:i32 = let %98
- %100:f32 = load_vector_element %c, %x_96
- %x_98:f32 = let %100
- %102:f32 = mul %x_95, %x_98
- store_vector_element %c, %x_92, %102
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %103:i32 = load %i_1
- %x_101:i32 = let %103
- %105:i32 = add %x_101, 1i
- store %i_1, %105
- next_iteration # -> $B12
- }
- }
- %106:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
- %107:f32 = load_vector_element %106, 0u
- %x_104:f32 = let %107
- %109:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
- %110:f32 = load_vector_element %109, 1u
- %x_106:f32 = let %110
- %112:bool = lt %x_104, %x_106
- if %112 [t: $B17, f: $B18] { # if_7
- $B17: { # true
- %113:vec3<f32> = load %c
- %x_111:vec3<f32> = let %113
- %115:vec3<f32> = abs %x_111
- store %x_58, %115
- exit_if # if_7
- }
- $B18: { # false
- %116:vec3<f32> = load %c
- %x_113:vec3<f32> = let %116
- store %x_58, %x_113
- exit_if # if_7
- }
- }
- %118:vec3<f32> = load %x_58
- %x_114:vec3<f32> = let %118
- %120:vec3<f32> = normalize %x_114
- %x_115:vec3<f32> = let %120
- %122:f32 = access %x_115, 0u
- %123:f32 = access %x_115, 1u
- %124:f32 = access %x_115, 2u
- %125:vec4<f32> = construct %122, %123, %124, 1.0f
- store %x_GLF_color, %125
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B19: {
- store %gl_FragCoord, %gl_FragCoord_param
- %128:void = call %main_1
- %129:vec4<f32> = load %x_GLF_color
- %130:main_out = construct %129
- ret %130
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B20: {
- %133:bool = eq %rhs, 0i
- %134:bool = eq %lhs, -2147483648i
- %135:bool = eq %rhs, -1i
- %136:bool = and %134, %135
- %137:bool = or %133, %136
- %138:i32 = select %rhs, 1i, %137
- %139:i32 = let %138
- %140:i32 = div %lhs, %139
- %141:i32 = mul %140, %139
- %142:i32 = sub %lhs, %141
- ret %142
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 8bb64da..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,226 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %x_91:ptr<function, f32, read_write> = var
- %x_94:ptr<function, i32, read_write> = var
- store %x_91, -0.5f
- store %x_94, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_104:ptr<function, f32, read_write> = var
- %x_113:ptr<function, f32, read_write> = var
- %x_92:ptr<function, f32, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %13:i32 = load %x_94
- %14:bool = lt %13, 800i
- if %14 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %x_112:ptr<function, f32, read_write> = var
- %16:i32 = load %x_94
- %17:i32 = call %tint_mod_i32, %16, 32i
- %19:bool = eq %17, 0i
- if %19 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %20:f32 = load %x_91
- %21:f32 = add %20, 0.40000000596046447754f
- store %x_104, %21
- %22:f32 = load %x_104
- store %x_92, %22
- exit_if # if_2
- }
- $B8: { # false
- %23:f32 = load %thirty_two
- %x_106:f32 = let %23
- %25:f32 = load %x_91
- store %x_113, %25
- %26:i32 = load %x_94
- %27:f32 = convert %26
- %28:f32 = let %27
- %29:f32 = round %x_106
- %30:f32 = let %29
- %31:i32 = load %x_94
- %32:f32 = convert %31
- %33:f32 = let %32
- %34:f32 = round %x_106
- %35:f32 = div %33, %34
- %36:f32 = floor %35
- %37:f32 = mul %30, %36
- %38:f32 = sub %28, %37
- %39:bool = lte %38, 0.00999999977648258209f
- if %39 [t: $B9] { # if_3
- $B9: { # true
- %40:f32 = load %x_91
- %41:f32 = add %40, 100.0f
- store %x_112, %41
- %42:f32 = load %x_112
- store %x_113, %42
- exit_if # if_3
- }
- }
- %43:f32 = load %x_113
- store %x_92, %43
- exit_if # if_2
- }
- }
- %44:i32 = load %x_94
- %45:f32 = convert %44
- %46:f32 = load %limit
- %47:bool = gte %45, %46
- if %47 [t: $B10] { # if_4
- $B10: { # true
- %48:f32 = load %x_92
- ret %48
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %49:i32 = load %x_94
- %50:i32 = add %49, 1i
- store %x_95, %50
- %51:f32 = load %x_92
- store %x_91, %51
- %52:i32 = load %x_95
- store %x_94, %52
- next_iteration # -> $B3
- }
- }
- %53:f32 = load %x_91
- ret %53
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %x_68:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %61:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
- %62:f32 = load_vector_element %61, 0u
- %63:f32 = mul %62, 0.125f
- %64:f32 = round %63
- %x_54:f32 = let %64
- %66:f32 = load_vector_element %gl_FragCoord, 0u
- store %param, %66
- store %param_1, %x_54
- %67:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_57:f32 = let %67
- store_vector_element %c, 0u, %x_57
- %69:f32 = load_vector_element %gl_FragCoord, 1u
- store %param_2, %69
- store %param_3, %x_54
- %70:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_61:f32 = let %70
- store_vector_element %c, 1u, %x_61
- %72:f32 = load_vector_element %c, 0u
- %73:f32 = load_vector_element %c, 1u
- %74:f32 = add %72, %73
- store_vector_element %c, 2u, %74
- store %x_68, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %x_69:ptr<function, i32, read_write> = var
- %76:i32 = load %x_68
- %77:bool = lt %76, 3i
- if %77 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %78:i32 = load %x_68
- %79:f32 = load_vector_element %c, %78
- %80:bool = gte %79, 1.0f
- if %80 [t: $B16] { # if_6
- $B16: { # true
- %81:i32 = load %x_68
- %82:i32 = load %x_68
- %83:f32 = load_vector_element %c, %82
- %84:i32 = load %x_68
- %85:f32 = load_vector_element %c, %84
- %86:f32 = mul %83, %85
- store_vector_element %c, %81, %86
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %87:i32 = load %x_68
- %88:i32 = add %87, 1i
- store %x_69, %88
- %89:i32 = load %x_69
- store %x_68, %89
- next_iteration # -> $B12
- }
- }
- %90:vec3<f32> = load %c
- %91:vec3<f32> = abs %90
- %92:vec3<f32> = normalize %91
- %x_84:vec3<f32> = let %92
- %94:f32 = access %x_84, 0u
- %95:f32 = access %x_84, 1u
- %96:f32 = access %x_84, 2u
- %97:vec4<f32> = construct %94, %95, %96, 1.0f
- store %x_GLF_color, %97
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B17: {
- store %gl_FragCoord, %gl_FragCoord_param
- %100:void = call %main_1
- %101:vec4<f32> = load %x_GLF_color
- %102:main_out = construct %101
- ret %102
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B18: {
- %105:bool = eq %rhs, 0i
- %106:bool = eq %lhs, -2147483648i
- %107:bool = eq %rhs, -1i
- %108:bool = and %106, %107
- %109:bool = or %105, %108
- %110:i32 = select %rhs, 1i, %109
- %111:i32 = let %110
- %112:i32 = div %lhs, %111
- %113:i32 = mul %112, %111
- %114:i32 = sub %lhs, %113
- ret %114
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 9dda484..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,237 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %x_91:ptr<function, f32, read_write> = var
- %x_91_phi:ptr<function, f32, read_write> = var
- %x_94_phi:ptr<function, i32, read_write> = var
- store %x_91_phi, -0.5f
- store %x_94_phi, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_104:ptr<function, f32, read_write> = var
- %x_113:ptr<function, f32, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_92_phi:ptr<function, f32, read_write> = var
- %14:f32 = load %x_91_phi
- store %x_91, %14
- %15:i32 = load %x_94_phi
- %x_94:i32 = let %15
- %17:bool = lt %x_94, 800i
- if %17 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %x_112:ptr<function, f32, read_write> = var
- %x_113_phi:ptr<function, f32, read_write> = var
- %20:i32 = call %tint_mod_i32, %x_94, 32i
- %22:bool = eq %20, 0i
- if %22 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %23:f32 = load %x_91
- %24:f32 = add %23, 0.40000000596046447754f
- store %x_104, %24
- %25:f32 = load %x_104
- store %x_92_phi, %25
- exit_if # if_2
- }
- $B8: { # false
- %26:f32 = load %thirty_two
- %x_106:f32 = let %26
- %28:f32 = load %x_91
- store %x_113_phi, %28
- %29:f32 = convert %x_94
- %30:f32 = let %29
- %31:f32 = round %x_106
- %32:f32 = let %31
- %33:f32 = convert %x_94
- %34:f32 = let %33
- %35:f32 = round %x_106
- %36:f32 = div %34, %35
- %37:f32 = floor %36
- %38:f32 = mul %32, %37
- %39:f32 = sub %30, %38
- %40:bool = lte %39, 0.00999999977648258209f
- if %40 [t: $B9] { # if_3
- $B9: { # true
- %41:f32 = load %x_91
- %42:f32 = add %41, 100.0f
- store %x_112, %42
- %43:f32 = load %x_112
- store %x_113_phi, %43
- exit_if # if_3
- }
- }
- %44:f32 = load %x_113_phi
- store %x_113, %44
- %45:f32 = load %x_113
- store %x_92_phi, %45
- exit_if # if_2
- }
- }
- %x_92:ptr<function, f32, read_write> = var
- %47:f32 = load %x_92_phi
- store %x_92, %47
- %48:f32 = load %limit
- %x_115:f32 = let %48
- %50:f32 = convert %x_94
- %51:bool = gte %50, %x_115
- if %51 [t: $B10] { # if_4
- $B10: { # true
- %52:f32 = load %x_92
- ret %52
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %53:i32 = add %x_94, 1i
- store %x_95, %53
- %54:f32 = load %x_92
- store %x_91_phi, %54
- %55:i32 = load %x_95
- store %x_94_phi, %55
- next_iteration # -> $B3
- }
- }
- %56:f32 = load %x_91
- ret %56
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %x_68_phi:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %64:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
- %65:f32 = load_vector_element %64, 0u
- %x_52:f32 = let %65
- %67:f32 = mul %x_52, 0.125f
- %68:f32 = round %67
- %x_54:f32 = let %68
- %70:f32 = load_vector_element %gl_FragCoord, 0u
- %x_56:f32 = let %70
- store %param, %x_56
- store %param_1, %x_54
- %72:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_57:f32 = let %72
- store_vector_element %c, 0u, %x_57
- %74:f32 = load_vector_element %gl_FragCoord, 1u
- %x_60:f32 = let %74
- store %param_2, %x_60
- store %param_3, %x_54
- %76:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_61:f32 = let %76
- store_vector_element %c, 1u, %x_61
- %78:f32 = load_vector_element %c, 0u
- %x_63:f32 = let %78
- %80:f32 = load_vector_element %c, 1u
- %x_64:f32 = let %80
- %82:f32 = add %x_63, %x_64
- store_vector_element %c, 2u, %82
- store %x_68_phi, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %x_69:ptr<function, i32, read_write> = var
- %84:i32 = load %x_68_phi
- %x_68:i32 = let %84
- %86:bool = lt %x_68, 3i
- if %86 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %87:f32 = load_vector_element %c, %x_68
- %x_75:f32 = let %87
- %89:bool = gte %x_75, 1.0f
- if %89 [t: $B16] { # if_6
- $B16: { # true
- %90:f32 = load_vector_element %c, %x_68
- %x_79:f32 = let %90
- %92:f32 = load_vector_element %c, %x_68
- %x_80:f32 = let %92
- %94:f32 = mul %x_79, %x_80
- store_vector_element %c, %x_68, %94
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %95:i32 = add %x_68, 1i
- store %x_69, %95
- %96:i32 = load %x_69
- store %x_68_phi, %96
- next_iteration # -> $B12
- }
- }
- %97:vec3<f32> = load %c
- %x_82:vec3<f32> = let %97
- %99:vec3<f32> = abs %x_82
- %100:vec3<f32> = normalize %99
- %x_84:vec3<f32> = let %100
- %102:f32 = access %x_84, 0u
- %103:f32 = access %x_84, 1u
- %104:f32 = access %x_84, 2u
- %105:vec4<f32> = construct %102, %103, %104, 1.0f
- store %x_GLF_color, %105
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B17: {
- store %gl_FragCoord, %gl_FragCoord_param
- %108:void = call %main_1
- %109:vec4<f32> = load %x_GLF_color
- %110:main_out = construct %109
- ret %110
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B18: {
- %113:bool = eq %rhs, 0i
- %114:bool = eq %lhs, -2147483648i
- %115:bool = eq %rhs, -1i
- %116:bool = and %114, %115
- %117:bool = or %113, %116
- %118:i32 = select %rhs, 1i, %117
- %119:i32 = let %118
- %120:i32 = div %lhs, %119
- %121:i32 = mul %120, %119
- %122:i32 = sub %lhs, %121
- ret %122
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.ir.msl
deleted file mode 100644
index 0c551b8..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,254 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_16:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %x_104:ptr<function, f32, read_write> = var
- %x_107:ptr<function, i32, read_write> = var
- store %x_104, -0.5f
- store %x_107, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_126:ptr<function, f32, read_write> = var
- %x_125:ptr<function, f32, read_write> = var
- %x_105:ptr<function, f32, read_write> = var
- %x_108:ptr<function, i32, read_write> = var
- %15:i32 = load %x_107
- %16:bool = lt %15, 800i
- if %16 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %x_124:ptr<function, f32, read_write> = var
- %18:i32 = load %x_107
- %19:i32 = call %tint_mod_i32, %18, 32i
- %21:bool = eq %19, 0i
- if %21 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %22:f32 = load %x_104
- %23:f32 = add %22, 0.40000000596046447754f
- store %x_126, %23
- %24:f32 = load %x_126
- store %x_105, %24
- exit_if # if_2
- }
- $B8: { # false
- %25:f32 = load %thirty_two
- %x_118:f32 = let %25
- %27:f32 = load %x_104
- store %x_125, %27
- %28:i32 = load %x_107
- %29:f32 = convert %28
- %30:f32 = let %29
- %31:f32 = round %x_118
- %32:f32 = let %31
- %33:i32 = load %x_107
- %34:f32 = convert %33
- %35:f32 = let %34
- %36:f32 = round %x_118
- %37:f32 = div %35, %36
- %38:f32 = floor %37
- %39:f32 = mul %32, %38
- %40:f32 = sub %30, %39
- %41:bool = lte %40, 0.00999999977648258209f
- if %41 [t: $B9] { # if_3
- $B9: { # true
- %42:f32 = load %x_104
- %43:f32 = add %42, 100.0f
- store %x_124, %43
- %44:f32 = load %x_124
- store %x_125, %44
- exit_if # if_3
- }
- }
- %45:f32 = load %x_125
- store %x_105, %45
- exit_if # if_2
- }
- }
- %46:i32 = load %x_107
- %47:f32 = convert %46
- %48:f32 = load %limit
- %49:bool = gte %47, %48
- if %49 [t: $B10] { # if_4
- $B10: { # true
- %50:f32 = load %x_105
- ret %50
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %51:i32 = load %x_107
- %52:i32 = add %51, 1i
- store %x_108, %52
- %53:f32 = load %x_105
- store %x_104, %53
- %54:i32 = load %x_108
- store %x_107, %54
- next_iteration # -> $B3
- }
- }
- %55:f32 = load %x_104
- ret %55
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %x_54:ptr<function, vec3<f32>, read_write> = var
- %x_74:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %64:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
- %65:f32 = load_vector_element %64, 0u
- %66:f32 = mul %65, 0.125f
- %67:f32 = round %66
- %x_58:f32 = let %67
- %69:f32 = load_vector_element %gl_FragCoord, 0u
- store %param, %69
- store %param_1, %x_58
- %70:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_61:f32 = let %70
- store_vector_element %c, 0u, %x_61
- %72:f32 = load_vector_element %gl_FragCoord, 1u
- store %param_2, %72
- store %param_3, %x_58
- %73:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_65:f32 = let %73
- store_vector_element %c, 1u, %x_65
- %75:f32 = load_vector_element %c, 0u
- %x_67:f32 = let %75
- %77:vec3<f32> = load %c
- store %x_54, %77
- %78:f32 = load_vector_element %x_54, 1u
- %79:f32 = add %x_67, %78
- store_vector_element %c, 2u, %79
- store %x_74, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %x_75:ptr<function, i32, read_write> = var
- %81:i32 = load %x_74
- %82:bool = lt %81, 3i
- if %82 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %83:i32 = load %x_74
- %84:f32 = load_vector_element %c, %83
- %85:bool = gte %84, 1.0f
- if %85 [t: $B16] { # if_6
- $B16: { # true
- %86:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
- %87:f32 = load_vector_element %86, 0u
- %88:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
- %89:f32 = load_vector_element %88, 1u
- %90:bool = gt %87, %89
- if %90 [t: $B17] { # if_7
- $B17: { # true
- store %continue_execution, false
- exit_if # if_7
- }
- }
- %91:i32 = load %x_74
- %92:i32 = load %x_74
- %93:f32 = load_vector_element %c, %92
- %94:i32 = load %x_74
- %95:f32 = load_vector_element %c, %94
- %96:f32 = mul %93, %95
- store_vector_element %c, %91, %96
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %97:i32 = load %x_74
- %98:i32 = add %97, 1i
- store %x_75, %98
- %99:i32 = load %x_75
- store %x_74, %99
- next_iteration # -> $B12
- }
- }
- %100:vec3<f32> = load %c
- %101:vec3<f32> = abs %100
- %102:vec3<f32> = normalize %101
- %x_97:vec3<f32> = let %102
- %104:f32 = access %x_97, 0u
- %105:f32 = access %x_97, 1u
- %106:f32 = access %x_97, 2u
- %107:vec4<f32> = construct %104, %105, %106, 1.0f
- store %x_GLF_color, %107
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B18: {
- store %gl_FragCoord, %gl_FragCoord_param
- %110:void = call %main_1
- %111:vec4<f32> = load %x_GLF_color
- %112:main_out = construct %111
- %113:bool = load %continue_execution
- %114:bool = eq %113, false
- if %114 [t: $B19] { # if_8
- $B19: { # true
- terminate_invocation
- }
- }
- ret %112
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B20: {
- %117:bool = eq %rhs, 0i
- %118:bool = eq %lhs, -2147483648i
- %119:bool = eq %rhs, -1i
- %120:bool = and %118, %119
- %121:bool = or %117, %120
- %122:i32 = select %rhs, 1i, %121
- %123:i32 = let %122
- %124:i32 = div %lhs, %123
- %125:i32 = mul %124, %123
- %126:i32 = sub %lhs, %125
- ret %126
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.ir.msl
deleted file mode 100644
index 1c92161..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,267 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_16:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
- %continue_execution:ptr<private, bool, read_write> = var, true
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %x_104:ptr<function, f32, read_write> = var
- %x_104_phi:ptr<function, f32, read_write> = var
- %x_107_phi:ptr<function, i32, read_write> = var
- store %x_104_phi, -0.5f
- store %x_107_phi, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %x_126:ptr<function, f32, read_write> = var
- %x_125:ptr<function, f32, read_write> = var
- %x_108:ptr<function, i32, read_write> = var
- %x_105_phi:ptr<function, f32, read_write> = var
- %16:f32 = load %x_104_phi
- store %x_104, %16
- %17:i32 = load %x_107_phi
- %x_107:i32 = let %17
- %19:bool = lt %x_107, 800i
- if %19 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %x_124:ptr<function, f32, read_write> = var
- %x_125_phi:ptr<function, f32, read_write> = var
- %22:i32 = call %tint_mod_i32, %x_107, 32i
- %24:bool = eq %22, 0i
- if %24 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %25:f32 = load %x_104
- %26:f32 = add %25, 0.40000000596046447754f
- store %x_126, %26
- %27:f32 = load %x_126
- store %x_105_phi, %27
- exit_if # if_2
- }
- $B8: { # false
- %28:f32 = load %thirty_two
- %x_118:f32 = let %28
- %30:f32 = load %x_104
- store %x_125_phi, %30
- %31:f32 = convert %x_107
- %32:f32 = let %31
- %33:f32 = round %x_118
- %34:f32 = let %33
- %35:f32 = convert %x_107
- %36:f32 = let %35
- %37:f32 = round %x_118
- %38:f32 = div %36, %37
- %39:f32 = floor %38
- %40:f32 = mul %34, %39
- %41:f32 = sub %32, %40
- %42:bool = lte %41, 0.00999999977648258209f
- if %42 [t: $B9] { # if_3
- $B9: { # true
- %43:f32 = load %x_104
- %44:f32 = add %43, 100.0f
- store %x_124, %44
- %45:f32 = load %x_124
- store %x_125_phi, %45
- exit_if # if_3
- }
- }
- %46:f32 = load %x_125_phi
- store %x_125, %46
- %47:f32 = load %x_125
- store %x_105_phi, %47
- exit_if # if_2
- }
- }
- %x_105:ptr<function, f32, read_write> = var
- %49:f32 = load %x_105_phi
- store %x_105, %49
- %50:f32 = load %limit
- %x_128:f32 = let %50
- %52:f32 = convert %x_107
- %53:bool = gte %52, %x_128
- if %53 [t: $B10] { # if_4
- $B10: { # true
- %54:f32 = load %x_105
- ret %54
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %55:i32 = add %x_107, 1i
- store %x_108, %55
- %56:f32 = load %x_105
- store %x_104_phi, %56
- %57:i32 = load %x_108
- store %x_107_phi, %57
- next_iteration # -> $B3
- }
- }
- %58:f32 = load %x_104
- ret %58
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %x_54:ptr<function, vec3<f32>, read_write> = var
- %x_74_phi:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %67:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
- %68:f32 = load_vector_element %67, 0u
- %x_56:f32 = let %68
- %70:f32 = mul %x_56, 0.125f
- %71:f32 = round %70
- %x_58:f32 = let %71
- %73:f32 = load_vector_element %gl_FragCoord, 0u
- %x_60:f32 = let %73
- store %param, %x_60
- store %param_1, %x_58
- %75:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_61:f32 = let %75
- store_vector_element %c, 0u, %x_61
- %77:f32 = load_vector_element %gl_FragCoord, 1u
- %x_64:f32 = let %77
- store %param_2, %x_64
- store %param_3, %x_58
- %79:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_65:f32 = let %79
- store_vector_element %c, 1u, %x_65
- %81:f32 = load_vector_element %c, 0u
- %x_67:f32 = let %81
- %83:vec3<f32> = load %c
- %x_68:vec3<f32> = let %83
- store %x_54, %x_68
- %85:f32 = load_vector_element %x_54, 1u
- %x_70:f32 = let %85
- %87:f32 = add %x_67, %x_70
- store_vector_element %c, 2u, %87
- store %x_74_phi, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %x_75:ptr<function, i32, read_write> = var
- %89:i32 = load %x_74_phi
- %x_74:i32 = let %89
- %91:bool = lt %x_74, 3i
- if %91 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %92:f32 = load_vector_element %c, %x_74
- %x_81:f32 = let %92
- %94:bool = gte %x_81, 1.0f
- if %94 [t: $B16] { # if_6
- $B16: { # true
- %95:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
- %96:f32 = load_vector_element %95, 0u
- %x_86:f32 = let %96
- %98:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
- %99:f32 = load_vector_element %98, 1u
- %x_88:f32 = let %99
- %101:bool = gt %x_86, %x_88
- if %101 [t: $B17] { # if_7
- $B17: { # true
- store %continue_execution, false
- exit_if # if_7
- }
- }
- %102:f32 = load_vector_element %c, %x_74
- %x_92:f32 = let %102
- %104:f32 = load_vector_element %c, %x_74
- %x_93:f32 = let %104
- %106:f32 = mul %x_92, %x_93
- store_vector_element %c, %x_74, %106
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %107:i32 = add %x_74, 1i
- store %x_75, %107
- %108:i32 = load %x_75
- store %x_74_phi, %108
- next_iteration # -> $B12
- }
- }
- %109:vec3<f32> = load %c
- %x_95:vec3<f32> = let %109
- %111:vec3<f32> = abs %x_95
- %112:vec3<f32> = normalize %111
- %x_97:vec3<f32> = let %112
- %114:f32 = access %x_97, 0u
- %115:f32 = access %x_97, 1u
- %116:f32 = access %x_97, 2u
- %117:vec4<f32> = construct %114, %115, %116, 1.0f
- store %x_GLF_color, %117
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B18: {
- store %gl_FragCoord, %gl_FragCoord_param
- %120:void = call %main_1
- %121:vec4<f32> = load %x_GLF_color
- %122:main_out = construct %121
- %123:bool = load %continue_execution
- %124:bool = eq %123, false
- if %124 [t: $B19] { # if_8
- $B19: { # true
- terminate_invocation
- }
- }
- ret %122
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B20: {
- %127:bool = eq %rhs, 0i
- %128:bool = eq %lhs, -2147483648i
- %129:bool = eq %rhs, -1i
- %130:bool = and %128, %129
- %131:bool = or %127, %130
- %132:i32 = select %rhs, 1i, %131
- %133:i32 = let %132
- %134:i32 = div %lhs, %133
- %135:i32 = mul %134, %133
- %136:i32 = sub %lhs, %135
- ret %136
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.ir.msl
deleted file mode 100644
index 83eee8e..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,269 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_19:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %10:i32 = load %i
- %11:bool = lt %10, 800i
- if %11 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %12:i32 = load %i
- %13:i32 = call %tint_mod_i32, %12, 32i
- %15:bool = eq %13, 0i
- if %15 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %16:f32 = load %result
- %17:f32 = add %16, 0.40000000596046447754f
- store %result, %17
- exit_if # if_2
- }
- $B8: { # false
- %18:f32 = load %thirty_two
- %x_157:f32 = let %18
- %20:i32 = load %i
- %21:f32 = convert %20
- %22:f32 = let %21
- %23:f32 = round %x_157
- %24:f32 = let %23
- %25:i32 = load %i
- %26:f32 = convert %25
- %27:f32 = let %26
- %28:f32 = round %x_157
- %29:f32 = div %27, %28
- %30:f32 = floor %29
- %31:f32 = mul %24, %30
- %32:f32 = sub %22, %31
- %33:bool = lte %32, 0.00999999977648258209f
- if %33 [t: $B9] { # if_3
- $B9: { # true
- %34:f32 = load %result
- %35:f32 = add %34, 100.0f
- store %result, %35
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %36:i32 = load %i
- %37:f32 = convert %36
- %38:f32 = load %limit
- %39:bool = gte %37, %38
- if %39 [t: $B10] { # if_4
- $B10: { # true
- %40:f32 = load %result
- %x_171:f32 = let %40
- ret %x_171
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %42:i32 = load %i
- %43:i32 = add %42, 1i
- store %i, %43
- next_iteration # -> $B3
- }
- }
- %44:f32 = load %result
- %x_174:f32 = let %44
- ret %x_174
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %x_61:ptr<function, vec3<f32>, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- %j:ptr<function, f32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %56:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %57:f32 = load_vector_element %56, 0u
- %58:f32 = div %57, 8.0f
- %59:f32 = round %58
- store %thirty_two_1, %59
- %60:f32 = load_vector_element %gl_FragCoord, 0u
- store %param, %60
- %61:f32 = load %thirty_two_1
- store %param_1, %61
- %62:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_69:f32 = let %62
- store_vector_element %c, 0u, %x_69
- %64:f32 = load_vector_element %gl_FragCoord, 1u
- store %param_2, %64
- %65:f32 = load %thirty_two_1
- store %param_3, %65
- %66:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_74:f32 = let %66
- store_vector_element %c, 1u, %x_74
- %68:f32 = load_vector_element %c, 0u
- %x_77:f32 = let %68
- if true [t: $B12, f: $B13] { # if_5
- $B12: { # true
- %70:vec3<f32> = load %c
- store %x_61, %70
- exit_if # if_5
- }
- $B13: { # false
- %71:vec3<f32> = load %c
- %72:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %73:f32 = load_vector_element %72, 0u
- %74:vec3<f32> = mul %71, %73
- store %x_61, %74
- exit_if # if_5
- }
- }
- %75:f32 = load_vector_element %x_61, 1u
- %76:f32 = add %x_77, %75
- store_vector_element %c, 2u, %76
- store %i_1, 0i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %77:i32 = load %i_1
- %78:bool = lt %77, 3i
- if %78 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %79:i32 = load %i_1
- %80:f32 = load_vector_element %c, %79
- %81:bool = gte %80, 1.0f
- if %81 [t: $B18] { # if_7
- $B18: { # true
- %82:i32 = load %i_1
- %x_103:i32 = let %82
- %84:i32 = load %i_1
- %85:f32 = load_vector_element %c, %84
- %86:i32 = load %i_1
- %87:f32 = load_vector_element %c, %86
- %88:f32 = mul %85, %87
- store_vector_element %c, %x_103, %88
- exit_if # if_7
- }
- }
- store %j, 0.0f
- loop [b: $B19, c: $B20] { # loop_3
- $B19: { # body
- %89:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %90:f32 = load_vector_element %89, 0u
- %91:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %92:f32 = load_vector_element %91, 1u
- %93:bool = gt %90, %92
- if %93 [t: $B21, f: $B22] { # if_8
- $B21: { # true
- exit_if # if_8
- }
- $B22: { # false
- exit_loop # loop_3
- }
- }
- %94:f32 = load %j
- %95:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %96:f32 = load_vector_element %95, 0u
- %97:bool = gte %94, %96
- if %97 [t: $B23] { # if_9
- $B23: { # true
- exit_loop # loop_3
- }
- }
- %98:f32 = load %j
- %99:f32 = add %98, 1.0f
- store %j, %99
- continue # -> $B20
- }
- $B20: { # continuing
- next_iteration # -> $B19
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %100:i32 = load %i_1
- %101:i32 = add %100, 1i
- store %i_1, %101
- next_iteration # -> $B14
- }
- }
- %102:vec3<f32> = load %c
- %103:vec3<f32> = abs %102
- %104:vec3<f32> = normalize %103
- %x_134:vec3<f32> = let %104
- %106:f32 = access %x_134, 0u
- %107:f32 = access %x_134, 1u
- %108:f32 = access %x_134, 2u
- %109:vec4<f32> = construct %106, %107, %108, 1.0f
- store %x_GLF_color, %109
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B24: {
- store %gl_FragCoord, %gl_FragCoord_param
- %112:void = call %main_1
- %113:vec4<f32> = load %x_GLF_color
- %114:main_out = construct %113
- ret %114
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B25: {
- %117:bool = eq %rhs, 0i
- %118:bool = eq %lhs, -2147483648i
- %119:bool = eq %rhs, -1i
- %120:bool = and %118, %119
- %121:bool = or %117, %120
- %122:i32 = select %rhs, 1i, %121
- %123:i32 = let %122
- %124:i32 = div %lhs, %123
- %125:i32 = mul %124, %123
- %126:i32 = sub %lhs, %125
- ret %126
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.ir.msl
deleted file mode 100644
index 6d49353..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,299 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- x_GLF_color_1:vec4<f32> @offset(0), @location(0)
-}
-
-$B1: { # root
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_19:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %10:i32 = load %i
- %x_144:i32 = let %10
- %12:bool = lt %x_144, 800i
- if %12 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %13:i32 = load %i
- %x_147:i32 = let %13
- %15:i32 = call %tint_mod_i32, %x_147, 32i
- %17:bool = eq %15, 0i
- if %17 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %18:f32 = load %result
- %x_153:f32 = let %18
- %20:f32 = add %x_153, 0.40000000596046447754f
- store %result, %20
- exit_if # if_2
- }
- $B8: { # false
- %21:i32 = load %i
- %x_155:i32 = let %21
- %23:f32 = load %thirty_two
- %x_157:f32 = let %23
- %25:f32 = convert %x_155
- %26:f32 = let %25
- %27:f32 = round %x_157
- %28:f32 = let %27
- %29:f32 = convert %x_155
- %30:f32 = let %29
- %31:f32 = round %x_157
- %32:f32 = div %30, %31
- %33:f32 = floor %32
- %34:f32 = mul %28, %33
- %35:f32 = sub %26, %34
- %36:bool = lte %35, 0.00999999977648258209f
- if %36 [t: $B9] { # if_3
- $B9: { # true
- %37:f32 = load %result
- %x_163:f32 = let %37
- %39:f32 = add %x_163, 100.0f
- store %result, %39
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %40:i32 = load %i
- %x_165:i32 = let %40
- %42:f32 = load %limit
- %x_167:f32 = let %42
- %44:f32 = convert %x_165
- %45:bool = gte %44, %x_167
- if %45 [t: $B10] { # if_4
- $B10: { # true
- %46:f32 = load %result
- %x_171:f32 = let %46
- ret %x_171
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %48:i32 = load %i
- %x_172:i32 = let %48
- %50:i32 = add %x_172, 1i
- store %i, %50
- next_iteration # -> $B3
- }
- }
- %51:f32 = load %result
- %x_174:f32 = let %51
- ret %x_174
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %x_61:ptr<function, vec3<f32>, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- %j:ptr<function, f32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %63:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %64:f32 = load_vector_element %63, 0u
- %x_63:f32 = let %64
- %66:f32 = div %x_63, 8.0f
- %67:f32 = round %66
- store %thirty_two_1, %67
- %68:f32 = load_vector_element %gl_FragCoord, 0u
- %x_67:f32 = let %68
- store %param, %x_67
- %70:f32 = load %thirty_two_1
- %x_68:f32 = let %70
- store %param_1, %x_68
- %72:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_69:f32 = let %72
- store_vector_element %c, 0u, %x_69
- %74:f32 = load_vector_element %gl_FragCoord, 1u
- %x_72:f32 = let %74
- store %param_2, %x_72
- %76:f32 = load %thirty_two_1
- %x_73:f32 = let %76
- store %param_3, %x_73
- %78:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_74:f32 = let %78
- store_vector_element %c, 1u, %x_74
- %80:f32 = load_vector_element %c, 0u
- %x_77:f32 = let %80
- if true [t: $B12, f: $B13] { # if_5
- $B12: { # true
- %82:vec3<f32> = load %c
- %x_81:vec3<f32> = let %82
- store %x_61, %x_81
- exit_if # if_5
- }
- $B13: { # false
- %84:vec3<f32> = load %c
- %x_82:vec3<f32> = let %84
- %86:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %87:f32 = load_vector_element %86, 0u
- %x_84:f32 = let %87
- %89:vec3<f32> = mul %x_82, %x_84
- store %x_61, %89
- exit_if # if_5
- }
- }
- %90:f32 = load_vector_element %x_61, 1u
- %x_87:f32 = let %90
- %92:f32 = add %x_77, %x_87
- store_vector_element %c, 2u, %92
- store %i_1, 0i
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %93:i32 = load %i_1
- %x_94:i32 = let %93
- %95:bool = lt %x_94, 3i
- if %95 [t: $B16, f: $B17] { # if_6
- $B16: { # true
- exit_if # if_6
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %96:i32 = load %i_1
- %x_97:i32 = let %96
- %98:f32 = load_vector_element %c, %x_97
- %x_99:f32 = let %98
- %100:bool = gte %x_99, 1.0f
- if %100 [t: $B18] { # if_7
- $B18: { # true
- %101:i32 = load %i_1
- %x_103:i32 = let %101
- %103:i32 = load %i_1
- %x_104:i32 = let %103
- %105:f32 = load_vector_element %c, %x_104
- %x_106:f32 = let %105
- %107:i32 = load %i_1
- %x_107:i32 = let %107
- %109:f32 = load_vector_element %c, %x_107
- %x_109:f32 = let %109
- %111:f32 = mul %x_106, %x_109
- store_vector_element %c, %x_103, %111
- exit_if # if_7
- }
- }
- store %j, 0.0f
- loop [b: $B19, c: $B20] { # loop_3
- $B19: { # body
- %112:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %113:f32 = load_vector_element %112, 0u
- %x_117:f32 = let %113
- %115:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %116:f32 = load_vector_element %115, 1u
- %x_119:f32 = let %116
- %118:bool = gt %x_117, %x_119
- if %118 [t: $B21, f: $B22] { # if_8
- $B21: { # true
- exit_if # if_8
- }
- $B22: { # false
- exit_loop # loop_3
- }
- }
- %119:f32 = load %j
- %x_122:f32 = let %119
- %121:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
- %122:f32 = load_vector_element %121, 0u
- %x_124:f32 = let %122
- %124:bool = gte %x_122, %x_124
- if %124 [t: $B23] { # if_9
- $B23: { # true
- exit_loop # loop_3
- }
- }
- %125:f32 = load %j
- %x_128:f32 = let %125
- %127:f32 = add %x_128, 1.0f
- store %j, %127
- continue # -> $B20
- }
- $B20: { # continuing
- next_iteration # -> $B19
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- %128:i32 = load %i_1
- %x_130:i32 = let %128
- %130:i32 = add %x_130, 1i
- store %i_1, %130
- next_iteration # -> $B14
- }
- }
- %131:vec3<f32> = load %c
- %x_132:vec3<f32> = let %131
- %133:vec3<f32> = abs %x_132
- %134:vec3<f32> = normalize %133
- %x_134:vec3<f32> = let %134
- %136:f32 = access %x_134, 0u
- %137:f32 = access %x_134, 1u
- %138:f32 = access %x_134, 2u
- %139:vec4<f32> = construct %136, %137, %138, 1.0f
- store %x_GLF_color, %139
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B24: {
- store %gl_FragCoord, %gl_FragCoord_param
- %142:void = call %main_1
- %143:vec4<f32> = load %x_GLF_color
- %144:main_out = construct %143
- ret %144
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B25: {
- %147:bool = eq %rhs, 0i
- %148:bool = eq %lhs, -2147483648i
- %149:bool = eq %rhs, -1i
- %150:bool = and %148, %149
- %151:bool = or %147, %150
- %152:i32 = select %rhs, 1i, %151
- %153:i32 = let %152
- %154:i32 = div %lhs, %153
- %155:i32 = mul %154, %153
- %156:i32 = sub %lhs, %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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.ir.msl
deleted file mode 100644
index f0cc3fa..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,234 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %9:i32 = load %i
- %10:bool = lt %9, 800i
- if %10 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %11:i32 = load %i
- %12:i32 = call %tint_mod_i32, %11, 32i
- %14:bool = eq %12, 0i
- if %14 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %15:f32 = load %result
- %16:f32 = add %15, 0.40000000596046447754f
- store %result, %16
- exit_if # if_2
- }
- $B8: { # false
- %17:f32 = load %thirty_two
- %x_149:f32 = let %17
- %19:i32 = load %i
- %20:f32 = convert %19
- %21:f32 = let %20
- %22:f32 = round %x_149
- %23:f32 = let %22
- %24:i32 = load %i
- %25:f32 = convert %24
- %26:f32 = let %25
- %27:f32 = round %x_149
- %28:f32 = div %26, %27
- %29:f32 = floor %28
- %30:f32 = mul %23, %29
- %31:f32 = sub %21, %30
- %32:bool = lte %31, 0.00999999977648258209f
- if %32 [t: $B9] { # if_3
- $B9: { # true
- %33:f32 = load %result
- %34:f32 = add %33, 100.0f
- store %result, %34
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %35:i32 = load %i
- %36:f32 = convert %35
- %37:f32 = load %limit
- %38:bool = gte %36, %37
- if %38 [t: $B10] { # if_4
- $B10: { # true
- %39:f32 = load %result
- %x_163:f32 = let %39
- ret %x_163
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %41:i32 = load %i
- %42:i32 = add %41, 1i
- store %i, %42
- next_iteration # -> $B3
- }
- }
- %43:f32 = load %result
- %x_166:f32 = let %43
- ret %x_166
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %53:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %54:f32 = load_vector_element %53, 0u
- %55:f32 = div %54, 8.0f
- %56:f32 = round %55
- store %thirty_two_1, %56
- %57:f32 = load_vector_element %gl_FragCoord, 0u
- store %param, %57
- %58:f32 = load %thirty_two_1
- store %param_1, %58
- %59:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_69:f32 = let %59
- store_vector_element %c, 0u, %x_69
- %61:f32 = load_vector_element %gl_FragCoord, 1u
- store %param_2, %61
- %62:f32 = load %thirty_two_1
- store %param_3, %62
- %63:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_74:f32 = let %63
- store_vector_element %c, 1u, %x_74
- %65:f32 = load_vector_element %c, 0u
- %66:f32 = load_vector_element %c, 1u
- %67:vec2<f32> = construct %65, %66
- %68:vec2<f32> = let %67
- %69:f32 = load_vector_element %c, 2u
- %70:vec2<f32> = construct %69, 1.0f
- %71:mat4x2<f32> = construct %68, %70, vec2<f32>(1.0f, 0.0f), vec2<f32>(1.0f, 0.0f)
- %x_87:mat4x2<f32> = let %71
- %73:vec3<f32> = load %c
- %74:vec3<f32> = mul %73, mat3x3<f32>(vec3<f32>(1.0f, 0.0f, 0.0f), vec3<f32>(0.0f, 1.0f, 0.0f), vec3<f32>(0.0f, 0.0f, 1.0f))
- %75:f32 = access %74, 0u
- %76:f32 = let %75
- %77:f32 = access %x_87, 0u, 0u
- %78:f32 = access %x_87, 0u, 1u
- %79:f32 = access %x_87, 1u, 0u
- %80:vec3<f32> = construct %77, %78, %79
- %81:f32 = access %80, 1u
- %82:f32 = add %76, %81
- store_vector_element %c, 2u, %82
- store %i_1, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %83:i32 = load %i_1
- %84:bool = lt %83, 3i
- if %84 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %85:i32 = load %i_1
- %86:f32 = load_vector_element %c, %85
- %87:bool = gte %86, 1.0f
- if %87 [t: $B16] { # if_6
- $B16: { # true
- %88:i32 = load %i_1
- %x_108:i32 = let %88
- %90:i32 = load %i_1
- %91:f32 = load_vector_element %c, %90
- %92:i32 = load %i_1
- %93:f32 = load_vector_element %c, %92
- %94:f32 = mul %91, %93
- store_vector_element %c, %x_108, %94
- %95:f32 = load_vector_element %gl_FragCoord, 1u
- %96:bool = lt %95, 0.0f
- if %96 [t: $B17] { # if_7
- $B17: { # true
- exit_loop # loop_2
- }
- }
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %97:i32 = load %i_1
- %98:i32 = add %97, 1i
- store %i_1, %98
- next_iteration # -> $B12
- }
- }
- %99:vec3<f32> = load %c
- %100:vec3<f32> = abs %99
- %101:vec3<f32> = normalize %100
- %x_126:vec3<f32> = let %101
- %103:f32 = access %x_126, 0u
- %104:f32 = access %x_126, 1u
- %105:f32 = access %x_126, 2u
- %106:vec4<f32> = construct %103, %104, %105, 1.0f
- store %x_GLF_color, %106
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B18: {
- store %gl_FragCoord, %gl_FragCoord_param
- %109:void = call %main_1
- %110:vec4<f32> = load %x_GLF_color
- %111:main_out = construct %110
- ret %111
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B19: {
- %114:bool = eq %rhs, 0i
- %115:bool = eq %lhs, -2147483648i
- %116:bool = eq %rhs, -1i
- %117:bool = and %115, %116
- %118:bool = or %114, %117
- %119:i32 = select %rhs, 1i, %118
- %120:i32 = let %119
- %121:i32 = div %lhs, %120
- %122:i32 = mul %121, %120
- %123:i32 = sub %lhs, %122
- ret %123
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.ir.msl
deleted file mode 100644
index e193c6b..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,258 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: 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
- %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
- $B2: {
- %result:ptr<function, f32, read_write> = var
- %i:ptr<function, i32, read_write> = var
- store %result, -0.5f
- store %i, 1i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %9:i32 = load %i
- %x_136:i32 = let %9
- %11:bool = lt %x_136, 800i
- if %11 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %12:i32 = load %i
- %x_139:i32 = let %12
- %14:i32 = call %tint_mod_i32, %x_139, 32i
- %16:bool = eq %14, 0i
- if %16 [t: $B7, f: $B8] { # if_2
- $B7: { # true
- %17:f32 = load %result
- %x_145:f32 = let %17
- %19:f32 = add %x_145, 0.40000000596046447754f
- store %result, %19
- exit_if # if_2
- }
- $B8: { # false
- %20:i32 = load %i
- %x_147:i32 = let %20
- %22:f32 = load %thirty_two
- %x_149:f32 = let %22
- %24:f32 = convert %x_147
- %25:f32 = let %24
- %26:f32 = round %x_149
- %27:f32 = let %26
- %28:f32 = convert %x_147
- %29:f32 = let %28
- %30:f32 = round %x_149
- %31:f32 = div %29, %30
- %32:f32 = floor %31
- %33:f32 = mul %27, %32
- %34:f32 = sub %25, %33
- %35:bool = lte %34, 0.00999999977648258209f
- if %35 [t: $B9] { # if_3
- $B9: { # true
- %36:f32 = load %result
- %x_155:f32 = let %36
- %38:f32 = add %x_155, 100.0f
- store %result, %38
- exit_if # if_3
- }
- }
- exit_if # if_2
- }
- }
- %39:i32 = load %i
- %x_157:i32 = let %39
- %41:f32 = load %limit
- %x_159:f32 = let %41
- %43:f32 = convert %x_157
- %44:bool = gte %43, %x_159
- if %44 [t: $B10] { # if_4
- $B10: { # true
- %45:f32 = load %result
- %x_163:f32 = let %45
- ret %x_163
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %47:i32 = load %i
- %x_164:i32 = let %47
- %49:i32 = add %x_164, 1i
- store %i, %49
- next_iteration # -> $B3
- }
- }
- %50:f32 = load %result
- %x_166:f32 = let %50
- ret %x_166
- }
-}
-%main_1 = func():void {
- $B11: {
- %c:ptr<function, vec3<f32>, read_write> = var
- %thirty_two_1:ptr<function, f32, read_write> = var
- %param:ptr<function, f32, read_write> = var
- %param_1:ptr<function, f32, read_write> = var
- %param_2:ptr<function, f32, read_write> = var
- %param_3:ptr<function, f32, read_write> = var
- %i_1:ptr<function, i32, read_write> = var
- store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
- %60:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
- %61:f32 = load_vector_element %60, 0u
- %x_63:f32 = let %61
- %63:f32 = div %x_63, 8.0f
- %64:f32 = round %63
- store %thirty_two_1, %64
- %65:f32 = load_vector_element %gl_FragCoord, 0u
- %x_67:f32 = let %65
- store %param, %x_67
- %67:f32 = load %thirty_two_1
- %x_68:f32 = let %67
- store %param_1, %x_68
- %69:f32 = call %compute_value_f1_f1_, %param, %param_1
- %x_69:f32 = let %69
- store_vector_element %c, 0u, %x_69
- %71:f32 = load_vector_element %gl_FragCoord, 1u
- %x_72:f32 = let %71
- store %param_2, %x_72
- %73:f32 = load %thirty_two_1
- %x_73:f32 = let %73
- store %param_3, %x_73
- %75:f32 = call %compute_value_f1_f1_, %param_2, %param_3
- %x_74:f32 = let %75
- store_vector_element %c, 1u, %x_74
- %77:vec3<f32> = load %c
- %x_76:vec3<f32> = let %77
- %79:vec3<f32> = load %c
- %x_79:vec3<f32> = let %79
- %81:f32 = access %x_79, 0u
- %82:f32 = access %x_79, 1u
- %83:vec2<f32> = construct %81, %82
- %84:vec2<f32> = let %83
- %85:f32 = access %x_79, 2u
- %86:vec2<f32> = construct %85, 1.0f
- %87:mat4x2<f32> = construct %84, %86, vec2<f32>(1.0f, 0.0f), vec2<f32>(1.0f, 0.0f)
- %x_87:mat4x2<f32> = let %87
- %89:vec3<f32> = mul %x_76, mat3x3<f32>(vec3<f32>(1.0f, 0.0f, 0.0f), vec3<f32>(0.0f, 1.0f, 0.0f), vec3<f32>(0.0f, 0.0f, 1.0f))
- %90:f32 = access %89, 0u
- %91:f32 = access %x_87, 0u, 0u
- %92:f32 = access %x_87, 0u, 1u
- %93:f32 = access %x_87, 1u, 0u
- %94:vec3<f32> = construct %91, %92, %93
- %95:f32 = access %94, 1u
- %96:f32 = add %90, %95
- store_vector_element %c, 2u, %96
- store %i_1, 0i
- loop [b: $B12, c: $B13] { # loop_2
- $B12: { # body
- %97:i32 = load %i_1
- %x_99:i32 = let %97
- %99:bool = lt %x_99, 3i
- if %99 [t: $B14, f: $B15] { # if_5
- $B14: { # true
- exit_if # if_5
- }
- $B15: { # false
- exit_loop # loop_2
- }
- }
- %100:i32 = load %i_1
- %x_102:i32 = let %100
- %102:f32 = load_vector_element %c, %x_102
- %x_104:f32 = let %102
- %104:bool = gte %x_104, 1.0f
- if %104 [t: $B16] { # if_6
- $B16: { # true
- %105:i32 = load %i_1
- %x_108:i32 = let %105
- %107:i32 = load %i_1
- %x_109:i32 = let %107
- %109:f32 = load_vector_element %c, %x_109
- %x_111:f32 = let %109
- %111:i32 = load %i_1
- %x_112:i32 = let %111
- %113:f32 = load_vector_element %c, %x_112
- %x_114:f32 = let %113
- %115:f32 = mul %x_111, %x_114
- store_vector_element %c, %x_108, %115
- %116:f32 = load_vector_element %gl_FragCoord, 1u
- %x_118:f32 = let %116
- %118:bool = lt %x_118, 0.0f
- if %118 [t: $B17] { # if_7
- $B17: { # true
- exit_loop # loop_2
- }
- }
- exit_if # if_6
- }
- }
- continue # -> $B13
- }
- $B13: { # continuing
- %119:i32 = load %i_1
- %x_122:i32 = let %119
- %121:i32 = add %x_122, 1i
- store %i_1, %121
- next_iteration # -> $B12
- }
- }
- %122:vec3<f32> = load %c
- %x_124:vec3<f32> = let %122
- %124:vec3<f32> = abs %x_124
- %125:vec3<f32> = normalize %124
- %x_126:vec3<f32> = let %125
- %127:f32 = access %x_126, 0u
- %128:f32 = access %x_126, 1u
- %129:f32 = access %x_126, 2u
- %130:vec4<f32> = construct %127, %128, %129, 1.0f
- store %x_GLF_color, %130
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B18: {
- store %gl_FragCoord, %gl_FragCoord_param
- %133:void = call %main_1
- %134:vec4<f32> = load %x_GLF_color
- %135:main_out = construct %134
- ret %135
- }
-}
-%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B19: {
- %138:bool = eq %rhs, 0i
- %139:bool = eq %lhs, -2147483648i
- %140:bool = eq %rhs, -1i
- %141:bool = and %139, %140
- %142:bool = or %138, %141
- %143:i32 = select %rhs, 1i, %142
- %144:i32 = let %143
- %145:i32 = div %lhs, %144
- %146:i32 = mul %145, %144
- %147:i32 = sub %lhs, %146
- ret %147
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.ir.msl
deleted file mode 100644
index 49bf1c2..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,490 +0,0 @@
-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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %9:i32 = load %i
- %10:ptr<private, i32, read_write> = access %obj, 0u, %9
- %11:i32 = load %10
- store %temp, %11
- %12:i32 = load %i
- %x_233:i32 = let %12
- %14:ptr<private, i32, read_write> = access %obj, 0u, %x_233
- %15:i32 = load %j
- %16:ptr<private, i32, read_write> = access %obj, 0u, %15
- %17:i32 = load %16
- store %14, %17
- %18:i32 = load %j
- %x_238:i32 = let %18
- %20:ptr<private, i32, read_write> = access %obj, 0u, %x_238
- %21:i32 = load %temp
- store %20, %21
- 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
- %32:i32 = load %h
- %33:ptr<private, i32, read_write> = access %obj, 0u, %32
- %34:i32 = load %33
- store %pivot, %34
- %35:i32 = load %l
- %36:i32 = sub %35, 1i
- store %i_1, %36
- %37:i32 = load %l
- store %j_1, %37
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %38:i32 = load %j_1
- %39:i32 = load %h
- %40:i32 = sub %39, 1i
- %41:bool = lte %38, %40
- if %41 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %42:i32 = load %j_1
- %43:ptr<private, i32, read_write> = access %obj, 0u, %42
- %44:i32 = load %43
- %45:i32 = load %pivot
- %46:bool = lte %44, %45
- if %46 [t: $B8] { # if_2
- $B8: { # true
- %47:i32 = load %i_1
- %48:i32 = add %47, 1i
- store %i_1, %48
- %49:i32 = load %i_1
- store %param, %49
- %50:i32 = load %j_1
- store %param_1, %50
- %51:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %52:i32 = load %j_1
- %53:i32 = add %52, 1i
- store %j_1, %53
- next_iteration # -> $B4
- }
- }
- %54:i32 = load %i_1
- %55:i32 = add %54, 1i
- store %i_1, %55
- %56:i32 = load %i_1
- store %param_2, %56
- %57:i32 = load %h
- store %param_3, %57
- %58:void = call %swap_i1_i1_, %param_2, %param_3
- %59:i32 = load %i_1
- %x_276:i32 = let %59
- ret %x_276
- }
-}
-%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
- %int_a:ptr<function, i32, read_write> = var
- %x_278:ptr<function, i32, read_write> = var
- %x_279:ptr<function, i32, read_write> = var
- %clamp_a:ptr<function, i32, 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
- %73:i32 = load %top
- %74:i32 = add %73, 1i
- %x_281:i32 = let %74
- store %top, %x_281
- %76:ptr<function, i32, read_write> = access %stack, %x_281
- %77:i32 = load %l_1
- store %76, %77
- %78:f32 = load_vector_element %gl_FragCoord, 1u
- %79:bool = gte %78, 0.0f
- if %79 [t: $B10, f: $B11] { # if_3
- $B10: { # true
- %80:i32 = load %h_1
- %x_290:i32 = let %80
- if false [t: $B12, f: $B13] { # if_4
- $B12: { # true
- store %x_279, 1i
- exit_if # if_4
- }
- $B13: { # false
- %82:i32 = load %h_1
- %83:u32 = and 0u, 31u
- %84:i32 = shl %82, %83
- store %x_279, %84
- exit_if # if_4
- }
- }
- %85:i32 = load %x_279
- %86:i32 = or %x_290, %85
- store %x_278, %86
- exit_if # if_3
- }
- $B11: { # false
- store %x_278, 1i
- exit_if # if_3
- }
- }
- %87:i32 = load %x_278
- store %int_a, %87
- %88:i32 = load %h_1
- %89:i32 = load %h_1
- %90:i32 = load %int_a
- %91:i32 = let %90
- %92:i32 = max %88, %89
- %93:i32 = min %92, %91
- store %clamp_a, %93
- %94:i32 = load %top
- %95:i32 = add %94, 1i
- %x_304:i32 = let %95
- store %top, %x_304
- %97:ptr<function, i32, read_write> = access %stack, %x_304
- %98:i32 = load %clamp_a
- %99:i32 = call %tint_div_i32, %98, 1i
- store %97, %99
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %101:i32 = load %top
- %102:bool = gte %101, 0i
- if %102 [t: $B16, f: $B17] { # if_5
- $B16: { # true
- exit_if # if_5
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %103:i32 = load %top
- %x_315:i32 = let %103
- %105:i32 = load %top
- %106:i32 = sub %105, 1i
- store %top, %106
- %107:ptr<function, i32, read_write> = access %stack, %x_315
- %108:i32 = load %107
- store %h_1, %108
- %109:i32 = load %top
- %x_319:i32 = let %109
- %111:i32 = load %top
- %112:i32 = sub %111, 1i
- store %top, %112
- %113:ptr<function, i32, read_write> = access %stack, %x_319
- %114:i32 = load %113
- store %l_1, %114
- %115:i32 = load %l_1
- store %param_4, %115
- %116:i32 = load %h_1
- store %param_5, %116
- %117:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_325:i32 = let %117
- store %p, %x_325
- %119:i32 = load %p
- %120:i32 = sub %119, 1i
- %121:i32 = load %l_1
- %122:bool = gt %120, %121
- if %122 [t: $B18] { # if_6
- $B18: { # true
- %123:i32 = load %top
- %124:i32 = add %123, 1i
- %x_333:i32 = let %124
- store %top, %x_333
- %126:ptr<function, i32, read_write> = access %stack, %x_333
- %127:i32 = load %l_1
- store %126, %127
- %128:i32 = load %top
- %129:i32 = add %128, 1i
- %x_337:i32 = let %129
- store %top, %x_337
- %131:ptr<function, i32, read_write> = access %stack, %x_337
- %132:i32 = load %p
- %133:i32 = sub %132, 1i
- store %131, %133
- exit_if # if_6
- }
- }
- %134:i32 = load %p
- %135:i32 = add %134, 1i
- %136:i32 = load %h_1
- %137:bool = lt %135, %136
- if %137 [t: $B19] { # if_7
- $B19: { # true
- %138:i32 = load %top
- %139:i32 = add %138, 1i
- %x_348:i32 = let %139
- store %top, %x_348
- %141:ptr<function, i32, read_write> = access %stack, %x_348
- %142:i32 = load %p
- %143:i32 = add %142, 1i
- store %141, %143
- %144:i32 = load %top
- %145:i32 = add %144, 1i
- %x_353:i32 = let %145
- store %top, %x_353
- %147:ptr<function, i32, read_write> = access %stack, %x_353
- %148:i32 = load %h_1
- store %147, %148
- exit_if # if_7
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- next_iteration # -> $B14
- }
- }
- ret
- }
-}
-%main_1 = func():void {
- $B20: {
- %i_2:ptr<function, i32, read_write> = var
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- store %i_2, 0i
- loop [b: $B21, c: $B22] { # loop_3
- $B21: { # body
- %153:i32 = load %i_2
- %154:bool = lt %153, 10i
- if %154 [t: $B23, f: $B24] { # if_8
- $B23: { # true
- exit_if # if_8
- }
- $B24: { # false
- exit_loop # loop_3
- }
- }
- %155:i32 = load %i_2
- %x_93:i32 = let %155
- %157:ptr<private, i32, read_write> = access %obj, 0u, %x_93
- %158:i32 = load %i_2
- %159:i32 = sub 10i, %158
- store %157, %159
- %160:i32 = load %i_2
- %x_97:i32 = let %160
- %162:ptr<private, i32, read_write> = access %obj, 0u, %x_97
- %163:i32 = load %i_2
- %164:ptr<private, i32, read_write> = access %obj, 0u, %163
- %165:i32 = load %164
- %166:i32 = load %i_2
- %167:ptr<private, i32, read_write> = access %obj, 0u, %166
- %168:i32 = load %167
- %169:i32 = mul %165, %168
- store %162, %169
- continue # -> $B22
- }
- $B22: { # continuing
- %170:i32 = load %i_2
- %171:i32 = add %170, 1i
- store %i_2, %171
- next_iteration # -> $B21
- }
- }
- %172:void = call %quicksort_
- %173:vec4<f32> = load %gl_FragCoord
- %174:vec2<f32> = swizzle %173, xy
- %175:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %176:vec2<f32> = load %175
- %177:vec2<f32> = div %174, %176
- store %uv, %177
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %178:f32 = load_vector_element %color, 0u
- %179:f32 = let %178
- %180:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %181:i32 = load %180
- %182:f32 = convert %181
- %183:f32 = add %179, %182
- store_vector_element %color, 0u, %183
- %184:f32 = load_vector_element %uv, 0u
- %185:bool = gt %184, 0.25f
- if %185 [t: $B25] { # if_9
- $B25: { # true
- %186:f32 = load_vector_element %color, 0u
- %187:f32 = let %186
- %188:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %189:i32 = load %188
- %190:f32 = convert %189
- %191:f32 = add %187, %190
- store_vector_element %color, 0u, %191
- exit_if # if_9
- }
- }
- %192:f32 = load_vector_element %uv, 0u
- %193:bool = gt %192, 0.5f
- if %193 [t: $B26] { # if_10
- $B26: { # true
- %194:f32 = load_vector_element %color, 1u
- %195:f32 = let %194
- %196:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %197:i32 = load %196
- %198:f32 = convert %197
- %199:f32 = add %195, %198
- store_vector_element %color, 1u, %199
- exit_if # if_10
- }
- }
- %200:f32 = load_vector_element %uv, 0u
- %201:bool = gt %200, 0.75f
- if %201 [t: $B27] { # if_11
- $B27: { # true
- %202:f32 = load_vector_element %color, 2u
- %203:f32 = let %202
- %204:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %205:i32 = load %204
- %206:f32 = convert %205
- %207:f32 = add %203, %206
- store_vector_element %color, 2u, %207
- exit_if # if_11
- }
- }
- %208:f32 = load_vector_element %color, 1u
- %209:f32 = let %208
- %210:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %211:i32 = load %210
- %212:f32 = convert %211
- %213:f32 = add %209, %212
- store_vector_element %color, 1u, %213
- %214:f32 = load_vector_element %uv, 1u
- %215:bool = gt %214, 0.25f
- if %215 [t: $B28] { # if_12
- $B28: { # true
- %216:f32 = load_vector_element %color, 0u
- %217:f32 = let %216
- %218:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %219:i32 = load %218
- %220:f32 = convert %219
- %221:f32 = add %217, %220
- store_vector_element %color, 0u, %221
- exit_if # if_12
- }
- }
- %222:f32 = load_vector_element %uv, 1u
- %223:bool = gt %222, 0.5f
- if %223 [t: $B29] { # if_13
- $B29: { # true
- %224:f32 = load_vector_element %color, 1u
- %225:f32 = let %224
- %226:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %227:i32 = load %226
- %228:f32 = convert %227
- %229:f32 = add %225, %228
- store_vector_element %color, 1u, %229
- exit_if # if_13
- }
- }
- %230:f32 = load_vector_element %uv, 1u
- %231:bool = gt %230, 0.75f
- if %231 [t: $B30] { # if_14
- $B30: { # true
- %232:f32 = load_vector_element %color, 2u
- %233:f32 = let %232
- %234:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %235:i32 = load %234
- %236:f32 = convert %235
- %237:f32 = add %233, %236
- store_vector_element %color, 2u, %237
- exit_if # if_14
- }
- }
- %238:f32 = load_vector_element %color, 2u
- %239:f32 = let %238
- %240:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %241:i32 = load %240
- %242:f32 = convert %241
- %243:f32 = add %239, %242
- store_vector_element %color, 2u, %243
- %244:f32 = load_vector_element %uv, 0u
- %245:f32 = load_vector_element %uv, 1u
- %246:f32 = sub %244, %245
- %247:f32 = abs %246
- %248:bool = lt %247, 0.25f
- if %248 [t: $B31] { # if_15
- $B31: { # true
- %249:f32 = load_vector_element %color, 0u
- %250:f32 = let %249
- %251:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %252:i32 = load %251
- %253:f32 = convert %252
- %254:f32 = add %250, %253
- store_vector_element %color, 0u, %254
- exit_if # if_15
- }
- }
- %255:vec3<f32> = load %color
- %256:vec3<f32> = normalize %255
- %x_224:vec3<f32> = let %256
- %258:f32 = access %x_224, 0u
- %259:f32 = access %x_224, 1u
- %260:f32 = access %x_224, 2u
- %261:vec4<f32> = construct %258, %259, %260, 1.0f
- store %x_GLF_color, %261
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B32: {
- store %gl_FragCoord, %gl_FragCoord_param
- %264:void = call %main_1
- %265:vec4<f32> = load %x_GLF_color
- %266:main_out = construct %265
- ret %266
- }
-}
-%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B33: {
- %269:bool = eq %rhs, 0i
- %270:bool = eq %lhs, -2147483648i
- %271:bool = eq %rhs, -1i
- %272:bool = and %270, %271
- %273:bool = or %269, %272
- %274:i32 = select %rhs, 1i, %273
- %275:i32 = div %lhs, %274
- ret %275
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.ir.msl
deleted file mode 100644
index 04a9625..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,566 +0,0 @@
-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
- %gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_GLF_color:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %9:i32 = load %i
- %x_230:i32 = let %9
- %11:ptr<private, i32, read_write> = access %obj, 0u, %x_230
- %12:i32 = load %11
- %x_232:i32 = let %12
- store %temp, %x_232
- %14:i32 = load %i
- %x_233:i32 = let %14
- %16:i32 = load %j
- %x_234:i32 = let %16
- %18:ptr<private, i32, read_write> = access %obj, 0u, %x_234
- %19:i32 = load %18
- %x_236:i32 = let %19
- %21:ptr<private, i32, read_write> = access %obj, 0u, %x_233
- store %21, %x_236
- %22:i32 = load %j
- %x_238:i32 = let %22
- %24:i32 = load %temp
- %x_239:i32 = let %24
- %26:ptr<private, i32, read_write> = access %obj, 0u, %x_238
- store %26, %x_239
- 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
- %37:i32 = load %h
- %x_242:i32 = let %37
- %39:ptr<private, i32, read_write> = access %obj, 0u, %x_242
- %40:i32 = load %39
- %x_244:i32 = let %40
- store %pivot, %x_244
- %42:i32 = load %l
- %x_245:i32 = let %42
- %44:i32 = sub %x_245, 1i
- store %i_1, %44
- %45:i32 = load %l
- %x_247:i32 = let %45
- store %j_1, %x_247
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %47:i32 = load %j_1
- %x_252:i32 = let %47
- %49:i32 = load %h
- %x_253:i32 = let %49
- %51:i32 = sub %x_253, 1i
- %52:bool = lte %x_252, %51
- if %52 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %53:i32 = load %j_1
- %x_257:i32 = let %53
- %55:ptr<private, i32, read_write> = access %obj, 0u, %x_257
- %56:i32 = load %55
- %x_259:i32 = let %56
- %58:i32 = load %pivot
- %x_260:i32 = let %58
- %60:bool = lte %x_259, %x_260
- if %60 [t: $B8] { # if_2
- $B8: { # true
- %61:i32 = load %i_1
- %x_264:i32 = let %61
- %63:i32 = add %x_264, 1i
- store %i_1, %63
- %64:i32 = load %i_1
- %x_266:i32 = let %64
- store %param, %x_266
- %66:i32 = load %j_1
- %x_267:i32 = let %66
- store %param_1, %x_267
- %68:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %69:i32 = load %j_1
- %x_269:i32 = let %69
- %71:i32 = add %x_269, 1i
- store %j_1, %71
- next_iteration # -> $B4
- }
- }
- %72:i32 = load %i_1
- %x_271:i32 = let %72
- %74:i32 = add %x_271, 1i
- store %i_1, %74
- %75:i32 = load %i_1
- %x_273:i32 = let %75
- store %param_2, %x_273
- %77:i32 = load %h
- %x_274:i32 = let %77
- store %param_3, %x_274
- %79:void = call %swap_i1_i1_, %param_2, %param_3
- %80:i32 = load %i_1
- %x_276:i32 = let %80
- ret %x_276
- }
-}
-%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
- %int_a:ptr<function, i32, read_write> = var
- %x_278:ptr<function, i32, read_write> = var
- %x_279:ptr<function, i32, read_write> = var
- %clamp_a:ptr<function, i32, 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
- %94:i32 = load %top
- %x_280:i32 = let %94
- %96:i32 = add %x_280, 1i
- %x_281:i32 = let %96
- store %top, %x_281
- %98:i32 = load %l_1
- %x_282:i32 = let %98
- %100:ptr<function, i32, read_write> = access %stack, %x_281
- store %100, %x_282
- %101:f32 = load_vector_element %gl_FragCoord, 1u
- %x_285:f32 = let %101
- %103:bool = gte %x_285, 0.0f
- if %103 [t: $B10, f: $B11] { # if_3
- $B10: { # true
- %104:i32 = load %h_1
- %x_290:i32 = let %104
- if false [t: $B12, f: $B13] { # if_4
- $B12: { # true
- store %x_279, 1i
- exit_if # if_4
- }
- $B13: { # false
- %106:i32 = load %h_1
- %x_294:i32 = let %106
- %108:u32 = and 0u, 31u
- %109:i32 = shl %x_294, %108
- store %x_279, %109
- exit_if # if_4
- }
- }
- %110:i32 = load %x_279
- %x_296:i32 = let %110
- %112:i32 = or %x_290, %x_296
- store %x_278, %112
- exit_if # if_3
- }
- $B11: { # false
- store %x_278, 1i
- exit_if # if_3
- }
- }
- %113:i32 = load %x_278
- %x_298:i32 = let %113
- store %int_a, %x_298
- %115:i32 = load %h_1
- %x_299:i32 = let %115
- %117:i32 = load %h_1
- %x_300:i32 = let %117
- %119:i32 = load %int_a
- %x_301:i32 = let %119
- %121:i32 = max %x_299, %x_300
- %122:i32 = min %121, %x_301
- store %clamp_a, %122
- %123:i32 = load %top
- %x_303:i32 = let %123
- %125:i32 = add %x_303, 1i
- %x_304:i32 = let %125
- store %top, %x_304
- %127:i32 = load %clamp_a
- %x_305:i32 = let %127
- %129:ptr<function, i32, read_write> = access %stack, %x_304
- %130:i32 = call %tint_div_i32, %x_305, 1i
- store %129, %130
- loop [b: $B14, c: $B15] { # loop_2
- $B14: { # body
- %132:i32 = load %top
- %x_312:i32 = let %132
- %134:bool = gte %x_312, 0i
- if %134 [t: $B16, f: $B17] { # if_5
- $B16: { # true
- exit_if # if_5
- }
- $B17: { # false
- exit_loop # loop_2
- }
- }
- %135:i32 = load %top
- %x_315:i32 = let %135
- %137:i32 = sub %x_315, 1i
- store %top, %137
- %138:ptr<function, i32, read_write> = access %stack, %x_315
- %139:i32 = load %138
- %x_318:i32 = let %139
- store %h_1, %x_318
- %141:i32 = load %top
- %x_319:i32 = let %141
- %143:i32 = sub %x_319, 1i
- store %top, %143
- %144:ptr<function, i32, read_write> = access %stack, %x_319
- %145:i32 = load %144
- %x_322:i32 = let %145
- store %l_1, %x_322
- %147:i32 = load %l_1
- %x_323:i32 = let %147
- store %param_4, %x_323
- %149:i32 = load %h_1
- %x_324:i32 = let %149
- store %param_5, %x_324
- %151:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_325:i32 = let %151
- store %p, %x_325
- %153:i32 = load %p
- %x_326:i32 = let %153
- %155:i32 = load %l_1
- %x_328:i32 = let %155
- %157:i32 = sub %x_326, 1i
- %158:bool = gt %157, %x_328
- if %158 [t: $B18] { # if_6
- $B18: { # true
- %159:i32 = load %top
- %x_332:i32 = let %159
- %161:i32 = add %x_332, 1i
- %x_333:i32 = let %161
- store %top, %x_333
- %163:i32 = load %l_1
- %x_334:i32 = let %163
- %165:ptr<function, i32, read_write> = access %stack, %x_333
- store %165, %x_334
- %166:i32 = load %top
- %x_336:i32 = let %166
- %168:i32 = add %x_336, 1i
- %x_337:i32 = let %168
- store %top, %x_337
- %170:i32 = load %p
- %x_338:i32 = let %170
- %172:ptr<function, i32, read_write> = access %stack, %x_337
- %173:i32 = sub %x_338, 1i
- store %172, %173
- exit_if # if_6
- }
- }
- %174:i32 = load %p
- %x_341:i32 = let %174
- %176:i32 = load %h_1
- %x_343:i32 = let %176
- %178:i32 = add %x_341, 1i
- %179:bool = lt %178, %x_343
- if %179 [t: $B19] { # if_7
- $B19: { # true
- %180:i32 = load %top
- %x_347:i32 = let %180
- %182:i32 = add %x_347, 1i
- %x_348:i32 = let %182
- store %top, %x_348
- %184:i32 = load %p
- %x_349:i32 = let %184
- %186:ptr<function, i32, read_write> = access %stack, %x_348
- %187:i32 = add %x_349, 1i
- store %186, %187
- %188:i32 = load %top
- %x_352:i32 = let %188
- %190:i32 = add %x_352, 1i
- %x_353:i32 = let %190
- store %top, %x_353
- %192:i32 = load %h_1
- %x_354:i32 = let %192
- %194:ptr<function, i32, read_write> = access %stack, %x_353
- store %194, %x_354
- exit_if # if_7
- }
- }
- continue # -> $B15
- }
- $B15: { # continuing
- next_iteration # -> $B14
- }
- }
- ret
- }
-}
-%main_1 = func():void {
- $B20: {
- %i_2:ptr<function, i32, read_write> = var
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- store %i_2, 0i
- loop [b: $B21, c: $B22] { # loop_3
- $B21: { # body
- %199:i32 = load %i_2
- %x_90:i32 = let %199
- %201:bool = lt %x_90, 10i
- if %201 [t: $B23, f: $B24] { # if_8
- $B23: { # true
- exit_if # if_8
- }
- $B24: { # false
- exit_loop # loop_3
- }
- }
- %202:i32 = load %i_2
- %x_93:i32 = let %202
- %204:i32 = load %i_2
- %x_94:i32 = let %204
- %206:ptr<private, i32, read_write> = access %obj, 0u, %x_93
- %207:i32 = sub 10i, %x_94
- store %206, %207
- %208:i32 = load %i_2
- %x_97:i32 = let %208
- %210:i32 = load %i_2
- %x_98:i32 = let %210
- %212:ptr<private, i32, read_write> = access %obj, 0u, %x_98
- %213:i32 = load %212
- %x_100:i32 = let %213
- %215:i32 = load %i_2
- %x_101:i32 = let %215
- %217:ptr<private, i32, read_write> = access %obj, 0u, %x_101
- %218:i32 = load %217
- %x_103:i32 = let %218
- %220:ptr<private, i32, read_write> = access %obj, 0u, %x_97
- %221:i32 = mul %x_100, %x_103
- store %220, %221
- continue # -> $B22
- }
- $B22: { # continuing
- %222:i32 = load %i_2
- %x_106:i32 = let %222
- %224:i32 = add %x_106, 1i
- store %i_2, %224
- next_iteration # -> $B21
- }
- }
- %225:void = call %quicksort_
- %226:vec4<f32> = load %gl_FragCoord
- %x_109:vec4<f32> = let %226
- %228:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %229:vec2<f32> = load %228
- %x_112:vec2<f32> = let %229
- %231:f32 = access %x_109, 0u
- %232:f32 = access %x_109, 1u
- %233:vec2<f32> = construct %231, %232
- %234:vec2<f32> = div %233, %x_112
- store %uv, %234
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %235:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %236:i32 = load %235
- %x_115:i32 = let %236
- %238:f32 = load_vector_element %color, 0u
- %x_118:f32 = let %238
- %240:f32 = convert %x_115
- %241:f32 = add %x_118, %240
- store_vector_element %color, 0u, %241
- %242:f32 = load_vector_element %uv, 0u
- %x_122:f32 = let %242
- %244:bool = gt %x_122, 0.25f
- if %244 [t: $B25] { # if_9
- $B25: { # true
- %245:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %246:i32 = load %245
- %x_127:i32 = let %246
- %248:f32 = load_vector_element %color, 0u
- %x_130:f32 = let %248
- %250:f32 = convert %x_127
- %251:f32 = add %x_130, %250
- store_vector_element %color, 0u, %251
- exit_if # if_9
- }
- }
- %252:f32 = load_vector_element %uv, 0u
- %x_134:f32 = let %252
- %254:bool = gt %x_134, 0.5f
- if %254 [t: $B26] { # if_10
- $B26: { # true
- %255:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %256:i32 = load %255
- %x_139:i32 = let %256
- %258:f32 = load_vector_element %color, 1u
- %x_142:f32 = let %258
- %260:f32 = convert %x_139
- %261:f32 = add %x_142, %260
- store_vector_element %color, 1u, %261
- exit_if # if_10
- }
- }
- %262:f32 = load_vector_element %uv, 0u
- %x_146:f32 = let %262
- %264:bool = gt %x_146, 0.75f
- if %264 [t: $B27] { # if_11
- $B27: { # true
- %265:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %266:i32 = load %265
- %x_151:i32 = let %266
- %268:f32 = load_vector_element %color, 2u
- %x_154:f32 = let %268
- %270:f32 = convert %x_151
- %271:f32 = add %x_154, %270
- store_vector_element %color, 2u, %271
- exit_if # if_11
- }
- }
- %272:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %273:i32 = load %272
- %x_158:i32 = let %273
- %275:f32 = load_vector_element %color, 1u
- %x_161:f32 = let %275
- %277:f32 = convert %x_158
- %278:f32 = add %x_161, %277
- store_vector_element %color, 1u, %278
- %279:f32 = load_vector_element %uv, 1u
- %x_165:f32 = let %279
- %281:bool = gt %x_165, 0.25f
- if %281 [t: $B28] { # if_12
- $B28: { # true
- %282:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %283:i32 = load %282
- %x_170:i32 = let %283
- %285:f32 = load_vector_element %color, 0u
- %x_173:f32 = let %285
- %287:f32 = convert %x_170
- %288:f32 = add %x_173, %287
- store_vector_element %color, 0u, %288
- exit_if # if_12
- }
- }
- %289:f32 = load_vector_element %uv, 1u
- %x_177:f32 = let %289
- %291:bool = gt %x_177, 0.5f
- if %291 [t: $B29] { # if_13
- $B29: { # true
- %292:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %293:i32 = load %292
- %x_182:i32 = let %293
- %295:f32 = load_vector_element %color, 1u
- %x_185:f32 = let %295
- %297:f32 = convert %x_182
- %298:f32 = add %x_185, %297
- store_vector_element %color, 1u, %298
- exit_if # if_13
- }
- }
- %299:f32 = load_vector_element %uv, 1u
- %x_189:f32 = let %299
- %301:bool = gt %x_189, 0.75f
- if %301 [t: $B30] { # if_14
- $B30: { # true
- %302:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %303:i32 = load %302
- %x_194:i32 = let %303
- %305:f32 = load_vector_element %color, 2u
- %x_197:f32 = let %305
- %307:f32 = convert %x_194
- %308:f32 = add %x_197, %307
- store_vector_element %color, 2u, %308
- exit_if # if_14
- }
- }
- %309:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %310:i32 = load %309
- %x_201:i32 = let %310
- %312:f32 = load_vector_element %color, 2u
- %x_204:f32 = let %312
- %314:f32 = convert %x_201
- %315:f32 = add %x_204, %314
- store_vector_element %color, 2u, %315
- %316:f32 = load_vector_element %uv, 0u
- %x_208:f32 = let %316
- %318:f32 = load_vector_element %uv, 1u
- %x_210:f32 = let %318
- %320:f32 = sub %x_208, %x_210
- %321:f32 = abs %320
- %322:bool = lt %321, 0.25f
- if %322 [t: $B31] { # if_15
- $B31: { # true
- %323:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %324:i32 = load %323
- %x_217:i32 = let %324
- %326:f32 = load_vector_element %color, 0u
- %x_220:f32 = let %326
- %328:f32 = convert %x_217
- %329:f32 = add %x_220, %328
- store_vector_element %color, 0u, %329
- exit_if # if_15
- }
- }
- %330:vec3<f32> = load %color
- %x_223:vec3<f32> = let %330
- %332:vec3<f32> = normalize %x_223
- %x_224:vec3<f32> = let %332
- %334:f32 = access %x_224, 0u
- %335:f32 = access %x_224, 1u
- %336:f32 = access %x_224, 2u
- %337:vec4<f32> = construct %334, %335, %336, 1.0f
- store %x_GLF_color, %337
- ret
- }
-}
-%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
- $B32: {
- store %gl_FragCoord, %gl_FragCoord_param
- %340:void = call %main_1
- %341:vec4<f32> = load %x_GLF_color
- %342:main_out = construct %341
- ret %342
- }
-}
-%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
- $B33: {
- %345:bool = eq %rhs, 0i
- %346:bool = eq %lhs, -2147483648i
- %347:bool = eq %rhs, -1i
- %348:bool = and %346, %347
- %349:bool = or %345, %348
- %350:i32 = select %rhs, 1i, %349
- %351:i32 = div %lhs, %350
- ret %351
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 734c88a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,444 +0,0 @@
-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) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %11:i32 = load %i
- %12:ptr<private, i32, read_write> = access %obj, 0u, %11
- %13:i32 = load %12
- store %temp, %13
- %14:i32 = load %i
- %x_242:i32 = let %14
- %16:ptr<private, i32, read_write> = access %obj, 0u, %x_242
- %17:i32 = load %j
- %18:ptr<private, i32, read_write> = access %obj, 0u, %17
- %19:i32 = load %18
- store %16, %19
- %20:i32 = load %j
- %x_247:i32 = let %20
- %22:ptr<private, i32, read_write> = access %obj, 0u, %x_247
- %23:i32 = load %temp
- store %22, %23
- 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
- %34:i32 = load %h
- %35:ptr<private, i32, read_write> = access %obj, 0u, %34
- %36:i32 = load %35
- store %pivot, %36
- %37:i32 = load %l
- %38:i32 = sub %37, 1i
- store %i_1, %38
- %39:i32 = load %l
- store %j_1, %39
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %40:i32 = load %j_1
- %41:i32 = load %h
- %42:i32 = sub %41, 1i
- %43:bool = lte %40, %42
- if %43 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %44:i32 = load %j_1
- %45:ptr<private, i32, read_write> = access %obj, 0u, %44
- %46:i32 = load %45
- %47:i32 = load %pivot
- %48:bool = lte %46, %47
- if %48 [t: $B8] { # if_2
- $B8: { # true
- %49:i32 = load %i_1
- %50:i32 = add %49, 1i
- store %i_1, %50
- %51:i32 = load %i_1
- store %param, %51
- %52:i32 = load %j_1
- store %param_1, %52
- %53:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %54:i32 = load %j_1
- %55:i32 = add %54, 1i
- store %j_1, %55
- next_iteration # -> $B4
- }
- }
- %56:i32 = load %i_1
- %57:i32 = add %56, 1i
- store %param_2, %57
- %58:i32 = load %h
- store %param_3, %58
- %59:void = call %swap_i1_i1_, %param_2, %param_3
- %60:i32 = load %i_1
- %x_284:i32 = let %60
- %62:i32 = add %x_284, 1i
- ret %62
- }
-}
-%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
- %71:i32 = load %top
- %72:i32 = add %71, 1i
- %x_288:i32 = let %72
- store %top, %x_288
- %74:ptr<function, i32, read_write> = access %stack, %x_288
- %75:i32 = load %l_1
- store %74, %75
- %76:i32 = load %top
- %77:i32 = add %76, 1i
- %x_292:i32 = let %77
- store %top, %x_292
- %79:ptr<function, i32, read_write> = access %stack, %x_292
- %80:i32 = load %h_1
- store %79, %80
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %81:i32 = load %top
- %82:bool = gte %81, 0i
- if %82 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %83:i32 = load %top
- %x_302:i32 = let %83
- %85:i32 = load %top
- %86:i32 = sub %85, 1i
- store %top, %86
- %87:ptr<function, i32, read_write> = access %stack, %x_302
- %88:i32 = load %87
- store %h_1, %88
- %89:i32 = load %top
- %x_306:i32 = let %89
- %91:i32 = load %top
- %92:i32 = sub %91, 1i
- store %top, %92
- %93:ptr<function, i32, read_write> = access %stack, %x_306
- %94:i32 = load %93
- store %l_1, %94
- %95:i32 = load %l_1
- store %param_4, %95
- %96:i32 = load %h_1
- store %param_5, %96
- %97:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_312:i32 = let %97
- store %p, %x_312
- %99:i32 = load %p
- %100:i32 = sub %99, 1i
- %101:i32 = load %l_1
- %102:bool = gt %100, %101
- if %102 [t: $B14] { # if_4
- $B14: { # true
- %103:i32 = load %top
- %104:i32 = add %103, 1i
- %x_320:i32 = let %104
- store %top, %x_320
- %106:ptr<function, i32, read_write> = access %stack, %x_320
- %107:i32 = load %l_1
- store %106, %107
- %108:i32 = load %top
- %109:i32 = add %108, 1i
- %x_324:i32 = let %109
- store %top, %x_324
- %111:ptr<function, i32, read_write> = access %stack, %x_324
- %112:i32 = load %p
- %113:i32 = sub %112, 1i
- store %111, %113
- exit_if # if_4
- }
- }
- %114:i32 = load %p
- %115:i32 = add %114, 1i
- %116:i32 = load %h_1
- %117:bool = lt %115, %116
- if %117 [t: $B15] { # if_5
- $B15: { # true
- %118:i32 = load %top
- %119:i32 = add %118, 1i
- %x_335:i32 = let %119
- store %top, %x_335
- %121:ptr<function, i32, read_write> = access %stack, %x_335
- %122:i32 = load %p
- %123:i32 = add %122, 1i
- store %121, %123
- %124:i32 = load %top
- %125:i32 = add %124, 1i
- %x_340:i32 = let %125
- store %top, %x_340
- %127:ptr<function, i32, read_write> = access %stack, %x_340
- %128:i32 = load %h_1
- store %127, %128
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %133:vec4<f32> = load %x_GLF_pos
- %134:vec4<f32> = add %133, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %135:vec4<f32> = mul %134, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %135
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %136:i32 = load %i_2
- %137:bool = lt %136, 10i
- if %137 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %138:i32 = load %i_2
- %x_100:i32 = let %138
- %140:ptr<private, i32, read_write> = access %obj, 0u, %x_100
- %141:i32 = load %i_2
- %142:i32 = sub 10i, %141
- store %140, %142
- %143:i32 = load %i_2
- %x_104:i32 = let %143
- %145:ptr<private, i32, read_write> = access %obj, 0u, %x_104
- %146:i32 = load %i_2
- %147:ptr<private, i32, read_write> = access %obj, 0u, %146
- %148:i32 = load %147
- %149:i32 = load %i_2
- %150:ptr<private, i32, read_write> = access %obj, 0u, %149
- %151:i32 = load %150
- %152:i32 = mul %148, %151
- store %145, %152
- continue # -> $B18
- }
- $B18: { # continuing
- %153:i32 = load %i_2
- %154:i32 = add %153, 1i
- store %i_2, %154
- next_iteration # -> $B17
- }
- }
- %155:void = call %quicksort_
- %156:vec4<f32> = load %x_GLF_FragCoord
- %157:vec2<f32> = swizzle %156, xy
- %158:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %159:vec2<f32> = load %158
- %160:vec2<f32> = div %157, %159
- store %uv, %160
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %161:f32 = load_vector_element %color, 0u
- %162:f32 = let %161
- %163:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %164:i32 = load %163
- %165:f32 = convert %164
- %166:f32 = add %162, %165
- store_vector_element %color, 0u, %166
- %167:f32 = load_vector_element %uv, 0u
- %168:bool = gt %167, 0.25f
- if %168 [t: $B21] { # if_7
- $B21: { # true
- %169:f32 = load_vector_element %color, 0u
- %170:f32 = let %169
- %171:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %172:i32 = load %171
- %173:f32 = convert %172
- %174:f32 = add %170, %173
- store_vector_element %color, 0u, %174
- exit_if # if_7
- }
- }
- %175:f32 = load_vector_element %uv, 0u
- %176:bool = gt %175, 0.5f
- if %176 [t: $B22] { # if_8
- $B22: { # true
- %177:f32 = load_vector_element %color, 1u
- %178:f32 = let %177
- %179:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %180:i32 = load %179
- %181:f32 = convert %180
- %182:f32 = add %178, %181
- store_vector_element %color, 1u, %182
- exit_if # if_8
- }
- }
- %183:f32 = load_vector_element %uv, 0u
- %184:bool = gt %183, 0.75f
- if %184 [t: $B23] { # if_9
- $B23: { # true
- %185:f32 = load_vector_element %color, 2u
- %186:f32 = let %185
- %187:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %188:i32 = load %187
- %189:f32 = convert %188
- %190:f32 = add %186, %189
- store_vector_element %color, 2u, %190
- exit_if # if_9
- }
- }
- %191:f32 = load_vector_element %color, 1u
- %192:f32 = let %191
- %193:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %194:i32 = load %193
- %195:f32 = convert %194
- %196:f32 = add %192, %195
- store_vector_element %color, 1u, %196
- %197:f32 = load_vector_element %uv, 1u
- %198:bool = gt %197, 0.25f
- if %198 [t: $B24] { # if_10
- $B24: { # true
- %199:f32 = load_vector_element %color, 0u
- %200:f32 = let %199
- %201:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %202:i32 = load %201
- %203:f32 = convert %202
- %204:f32 = add %200, %203
- store_vector_element %color, 0u, %204
- exit_if # if_10
- }
- }
- %205:f32 = load_vector_element %uv, 1u
- %206:bool = gt %205, 0.5f
- if %206 [t: $B25] { # if_11
- $B25: { # true
- %207:f32 = load_vector_element %color, 1u
- %208:f32 = let %207
- %209:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %210:i32 = load %209
- %211:f32 = convert %210
- %212:f32 = add %208, %211
- store_vector_element %color, 1u, %212
- exit_if # if_11
- }
- }
- %213:f32 = load_vector_element %uv, 1u
- %214:bool = gt %213, 0.75f
- if %214 [t: $B26] { # if_12
- $B26: { # true
- %215:f32 = load_vector_element %color, 2u
- %216:f32 = let %215
- %217:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %218:i32 = load %217
- %219:f32 = convert %218
- %220:f32 = add %216, %219
- store_vector_element %color, 2u, %220
- exit_if # if_12
- }
- }
- %221:f32 = load_vector_element %color, 2u
- %222:f32 = let %221
- %223:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %224:i32 = load %223
- %225:f32 = convert %224
- %226:f32 = add %222, %225
- store_vector_element %color, 2u, %226
- %227:f32 = load_vector_element %uv, 0u
- %228:f32 = load_vector_element %uv, 1u
- %229:f32 = sub %227, %228
- %230:f32 = abs %229
- %231:bool = lt %230, 0.25f
- if %231 [t: $B27] { # if_13
- $B27: { # true
- %232:f32 = load_vector_element %color, 0u
- %233:f32 = let %232
- %234:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %235:i32 = load %234
- %236:f32 = convert %235
- %237:f32 = add %233, %236
- store_vector_element %color, 0u, %237
- exit_if # if_13
- }
- }
- %238:vec3<f32> = load %color
- %239:vec3<f32> = normalize %238
- %x_231:vec3<f32> = let %239
- %241:f32 = access %x_231, 0u
- %242:f32 = access %x_231, 1u
- %243:f32 = access %x_231, 2u
- %244:vec4<f32> = construct %241, %242, %243, 1.0f
- store %frag_color, %244
- %245:vec4<f32> = load %x_GLF_pos
- store %gl_Position, %245
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B28: {
- store %x_GLF_pos, %x_GLF_pos_param
- %248:void = call %main_1
- %249:vec4<f32> = load %frag_color
- %250:vec4<f32> = load %gl_Position
- %251:main_out = construct %249, %250
- ret %251
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 8111d47..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,515 +0,0 @@
-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) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %11:i32 = load %i
- %x_239:i32 = let %11
- %13:ptr<private, i32, read_write> = access %obj, 0u, %x_239
- %14:i32 = load %13
- %x_241:i32 = let %14
- store %temp, %x_241
- %16:i32 = load %i
- %x_242:i32 = let %16
- %18:i32 = load %j
- %x_243:i32 = let %18
- %20:ptr<private, i32, read_write> = access %obj, 0u, %x_243
- %21:i32 = load %20
- %x_245:i32 = let %21
- %23:ptr<private, i32, read_write> = access %obj, 0u, %x_242
- store %23, %x_245
- %24:i32 = load %j
- %x_247:i32 = let %24
- %26:i32 = load %temp
- %x_248:i32 = let %26
- %28:ptr<private, i32, read_write> = access %obj, 0u, %x_247
- store %28, %x_248
- 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
- %39:i32 = load %h
- %x_251:i32 = let %39
- %41:ptr<private, i32, read_write> = access %obj, 0u, %x_251
- %42:i32 = load %41
- %x_253:i32 = let %42
- store %pivot, %x_253
- %44:i32 = load %l
- %x_254:i32 = let %44
- %46:i32 = sub %x_254, 1i
- store %i_1, %46
- %47:i32 = load %l
- %x_256:i32 = let %47
- store %j_1, %x_256
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %49:i32 = load %j_1
- %x_261:i32 = let %49
- %51:i32 = load %h
- %x_262:i32 = let %51
- %53:i32 = sub %x_262, 1i
- %54:bool = lte %x_261, %53
- if %54 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %55:i32 = load %j_1
- %x_266:i32 = let %55
- %57:ptr<private, i32, read_write> = access %obj, 0u, %x_266
- %58:i32 = load %57
- %x_268:i32 = let %58
- %60:i32 = load %pivot
- %x_269:i32 = let %60
- %62:bool = lte %x_268, %x_269
- if %62 [t: $B8] { # if_2
- $B8: { # true
- %63:i32 = load %i_1
- %x_273:i32 = let %63
- %65:i32 = add %x_273, 1i
- store %i_1, %65
- %66:i32 = load %i_1
- %x_275:i32 = let %66
- store %param, %x_275
- %68:i32 = load %j_1
- %x_276:i32 = let %68
- store %param_1, %x_276
- %70:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %71:i32 = load %j_1
- %x_278:i32 = let %71
- %73:i32 = add %x_278, 1i
- store %j_1, %73
- next_iteration # -> $B4
- }
- }
- %74:i32 = load %i_1
- %x_280:i32 = let %74
- %76:i32 = add %x_280, 1i
- store %param_2, %76
- %77:i32 = load %h
- %x_282:i32 = let %77
- store %param_3, %x_282
- %79:void = call %swap_i1_i1_, %param_2, %param_3
- %80:i32 = load %i_1
- %x_284:i32 = let %80
- %82:i32 = add %x_284, 1i
- ret %82
- }
-}
-%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
- %91:i32 = load %top
- %x_287:i32 = let %91
- %93:i32 = add %x_287, 1i
- %x_288:i32 = let %93
- store %top, %x_288
- %95:i32 = load %l_1
- %x_289:i32 = let %95
- %97:ptr<function, i32, read_write> = access %stack, %x_288
- store %97, %x_289
- %98:i32 = load %top
- %x_291:i32 = let %98
- %100:i32 = add %x_291, 1i
- %x_292:i32 = let %100
- store %top, %x_292
- %102:i32 = load %h_1
- %x_293:i32 = let %102
- %104:ptr<function, i32, read_write> = access %stack, %x_292
- store %104, %x_293
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %105:i32 = load %top
- %x_299:i32 = let %105
- %107:bool = gte %x_299, 0i
- if %107 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %108:i32 = load %top
- %x_302:i32 = let %108
- %110:i32 = sub %x_302, 1i
- store %top, %110
- %111:ptr<function, i32, read_write> = access %stack, %x_302
- %112:i32 = load %111
- %x_305:i32 = let %112
- store %h_1, %x_305
- %114:i32 = load %top
- %x_306:i32 = let %114
- %116:i32 = sub %x_306, 1i
- store %top, %116
- %117:ptr<function, i32, read_write> = access %stack, %x_306
- %118:i32 = load %117
- %x_309:i32 = let %118
- store %l_1, %x_309
- %120:i32 = load %l_1
- %x_310:i32 = let %120
- store %param_4, %x_310
- %122:i32 = load %h_1
- %x_311:i32 = let %122
- store %param_5, %x_311
- %124:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_312:i32 = let %124
- store %p, %x_312
- %126:i32 = load %p
- %x_313:i32 = let %126
- %128:i32 = load %l_1
- %x_315:i32 = let %128
- %130:i32 = sub %x_313, 1i
- %131:bool = gt %130, %x_315
- if %131 [t: $B14] { # if_4
- $B14: { # true
- %132:i32 = load %top
- %x_319:i32 = let %132
- %134:i32 = add %x_319, 1i
- %x_320:i32 = let %134
- store %top, %x_320
- %136:i32 = load %l_1
- %x_321:i32 = let %136
- %138:ptr<function, i32, read_write> = access %stack, %x_320
- store %138, %x_321
- %139:i32 = load %top
- %x_323:i32 = let %139
- %141:i32 = add %x_323, 1i
- %x_324:i32 = let %141
- store %top, %x_324
- %143:i32 = load %p
- %x_325:i32 = let %143
- %145:ptr<function, i32, read_write> = access %stack, %x_324
- %146:i32 = sub %x_325, 1i
- store %145, %146
- exit_if # if_4
- }
- }
- %147:i32 = load %p
- %x_328:i32 = let %147
- %149:i32 = load %h_1
- %x_330:i32 = let %149
- %151:i32 = add %x_328, 1i
- %152:bool = lt %151, %x_330
- if %152 [t: $B15] { # if_5
- $B15: { # true
- %153:i32 = load %top
- %x_334:i32 = let %153
- %155:i32 = add %x_334, 1i
- %x_335:i32 = let %155
- store %top, %x_335
- %157:i32 = load %p
- %x_336:i32 = let %157
- %159:ptr<function, i32, read_write> = access %stack, %x_335
- %160:i32 = add %x_336, 1i
- store %159, %160
- %161:i32 = load %top
- %x_339:i32 = let %161
- %163:i32 = add %x_339, 1i
- %x_340:i32 = let %163
- store %top, %x_340
- %165:i32 = load %h_1
- %x_341:i32 = let %165
- %167:ptr<function, i32, read_write> = access %stack, %x_340
- store %167, %x_341
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %172:vec4<f32> = load %x_GLF_pos
- %x_90:vec4<f32> = let %172
- %174:vec4<f32> = add %x_90, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %175:vec4<f32> = mul %174, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %175
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %176:i32 = load %i_2
- %x_97:i32 = let %176
- %178:bool = lt %x_97, 10i
- if %178 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %179:i32 = load %i_2
- %x_100:i32 = let %179
- %181:i32 = load %i_2
- %x_101:i32 = let %181
- %183:ptr<private, i32, read_write> = access %obj, 0u, %x_100
- %184:i32 = sub 10i, %x_101
- store %183, %184
- %185:i32 = load %i_2
- %x_104:i32 = let %185
- %187:i32 = load %i_2
- %x_105:i32 = let %187
- %189:ptr<private, i32, read_write> = access %obj, 0u, %x_105
- %190:i32 = load %189
- %x_107:i32 = let %190
- %192:i32 = load %i_2
- %x_108:i32 = let %192
- %194:ptr<private, i32, read_write> = access %obj, 0u, %x_108
- %195:i32 = load %194
- %x_110:i32 = let %195
- %197:ptr<private, i32, read_write> = access %obj, 0u, %x_104
- %198:i32 = mul %x_107, %x_110
- store %197, %198
- continue # -> $B18
- }
- $B18: { # continuing
- %199:i32 = load %i_2
- %x_113:i32 = let %199
- %201:i32 = add %x_113, 1i
- store %i_2, %201
- next_iteration # -> $B17
- }
- }
- %202:void = call %quicksort_
- %203:vec4<f32> = load %x_GLF_FragCoord
- %x_116:vec4<f32> = let %203
- %205:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %206:vec2<f32> = load %205
- %x_119:vec2<f32> = let %206
- %208:f32 = access %x_116, 0u
- %209:f32 = access %x_116, 1u
- %210:vec2<f32> = construct %208, %209
- %211:vec2<f32> = div %210, %x_119
- store %uv, %211
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %212:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %213:i32 = load %212
- %x_122:i32 = let %213
- %215:f32 = load_vector_element %color, 0u
- %x_125:f32 = let %215
- %217:f32 = convert %x_122
- %218:f32 = add %x_125, %217
- store_vector_element %color, 0u, %218
- %219:f32 = load_vector_element %uv, 0u
- %x_129:f32 = let %219
- %221:bool = gt %x_129, 0.25f
- if %221 [t: $B21] { # if_7
- $B21: { # true
- %222:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %223:i32 = load %222
- %x_134:i32 = let %223
- %225:f32 = load_vector_element %color, 0u
- %x_137:f32 = let %225
- %227:f32 = convert %x_134
- %228:f32 = add %x_137, %227
- store_vector_element %color, 0u, %228
- exit_if # if_7
- }
- }
- %229:f32 = load_vector_element %uv, 0u
- %x_141:f32 = let %229
- %231:bool = gt %x_141, 0.5f
- if %231 [t: $B22] { # if_8
- $B22: { # true
- %232:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %233:i32 = load %232
- %x_146:i32 = let %233
- %235:f32 = load_vector_element %color, 1u
- %x_149:f32 = let %235
- %237:f32 = convert %x_146
- %238:f32 = add %x_149, %237
- store_vector_element %color, 1u, %238
- exit_if # if_8
- }
- }
- %239:f32 = load_vector_element %uv, 0u
- %x_153:f32 = let %239
- %241:bool = gt %x_153, 0.75f
- if %241 [t: $B23] { # if_9
- $B23: { # true
- %242:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %243:i32 = load %242
- %x_158:i32 = let %243
- %245:f32 = load_vector_element %color, 2u
- %x_161:f32 = let %245
- %247:f32 = convert %x_158
- %248:f32 = add %x_161, %247
- store_vector_element %color, 2u, %248
- exit_if # if_9
- }
- }
- %249:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %250:i32 = load %249
- %x_165:i32 = let %250
- %252:f32 = load_vector_element %color, 1u
- %x_168:f32 = let %252
- %254:f32 = convert %x_165
- %255:f32 = add %x_168, %254
- store_vector_element %color, 1u, %255
- %256:f32 = load_vector_element %uv, 1u
- %x_172:f32 = let %256
- %258:bool = gt %x_172, 0.25f
- if %258 [t: $B24] { # if_10
- $B24: { # true
- %259:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %260:i32 = load %259
- %x_177:i32 = let %260
- %262:f32 = load_vector_element %color, 0u
- %x_180:f32 = let %262
- %264:f32 = convert %x_177
- %265:f32 = add %x_180, %264
- store_vector_element %color, 0u, %265
- exit_if # if_10
- }
- }
- %266:f32 = load_vector_element %uv, 1u
- %x_184:f32 = let %266
- %268:bool = gt %x_184, 0.5f
- if %268 [t: $B25] { # if_11
- $B25: { # true
- %269:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %270:i32 = load %269
- %x_189:i32 = let %270
- %272:f32 = load_vector_element %color, 1u
- %x_192:f32 = let %272
- %274:f32 = convert %x_189
- %275:f32 = add %x_192, %274
- store_vector_element %color, 1u, %275
- exit_if # if_11
- }
- }
- %276:f32 = load_vector_element %uv, 1u
- %x_196:f32 = let %276
- %278:bool = gt %x_196, 0.75f
- if %278 [t: $B26] { # if_12
- $B26: { # true
- %279:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %280:i32 = load %279
- %x_201:i32 = let %280
- %282:f32 = load_vector_element %color, 2u
- %x_204:f32 = let %282
- %284:f32 = convert %x_201
- %285:f32 = add %x_204, %284
- store_vector_element %color, 2u, %285
- exit_if # if_12
- }
- }
- %286:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %287:i32 = load %286
- %x_208:i32 = let %287
- %289:f32 = load_vector_element %color, 2u
- %x_211:f32 = let %289
- %291:f32 = convert %x_208
- %292:f32 = add %x_211, %291
- store_vector_element %color, 2u, %292
- %293:f32 = load_vector_element %uv, 0u
- %x_215:f32 = let %293
- %295:f32 = load_vector_element %uv, 1u
- %x_217:f32 = let %295
- %297:f32 = sub %x_215, %x_217
- %298:f32 = abs %297
- %299:bool = lt %298, 0.25f
- if %299 [t: $B27] { # if_13
- $B27: { # true
- %300:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %301:i32 = load %300
- %x_224:i32 = let %301
- %303:f32 = load_vector_element %color, 0u
- %x_227:f32 = let %303
- %305:f32 = convert %x_224
- %306:f32 = add %x_227, %305
- store_vector_element %color, 0u, %306
- exit_if # if_13
- }
- }
- %307:vec3<f32> = load %color
- %x_230:vec3<f32> = let %307
- %309:vec3<f32> = normalize %x_230
- %x_231:vec3<f32> = let %309
- %311:f32 = access %x_231, 0u
- %312:f32 = access %x_231, 1u
- %313:f32 = access %x_231, 2u
- %314:vec4<f32> = construct %311, %312, %313, 1.0f
- store %frag_color, %314
- %315:vec4<f32> = load %x_GLF_pos
- %x_236:vec4<f32> = let %315
- store %gl_Position, %x_236
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B28: {
- store %x_GLF_pos, %x_GLF_pos_param
- %319:void = call %main_1
- %320:vec4<f32> = load %frag_color
- %321:vec4<f32> = load %gl_Position
- %322:main_out = construct %320, %321
- ret %322
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 23566bb..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,459 +0,0 @@
-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) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_33:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_36:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %12:i32 = load %i
- %13:ptr<private, i32, read_write> = access %obj, 0u, %12
- %14:i32 = load %13
- store %temp, %14
- %15:i32 = load %i
- %x_253:i32 = let %15
- %17:ptr<private, i32, read_write> = access %obj, 0u, %x_253
- %18:i32 = load %j
- %19:ptr<private, i32, read_write> = access %obj, 0u, %18
- %20:i32 = load %19
- store %17, %20
- %21:i32 = load %j
- %x_258:i32 = let %21
- %23:ptr<private, i32, read_write> = access %obj, 0u, %x_258
- %24:i32 = load %temp
- store %23, %24
- 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
- %35:i32 = load %h
- %36:ptr<private, i32, read_write> = access %obj, 0u, %35
- %37:i32 = load %36
- store %pivot, %37
- %38:i32 = load %l
- %39:i32 = sub %38, 1i
- store %i_1, %39
- %40:i32 = load %l
- store %j_1, %40
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %41:i32 = load %j_1
- %42:i32 = load %h
- %43:i32 = sub %42, 1i
- %44:bool = lte %41, %43
- if %44 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %45:i32 = load %j_1
- %46:ptr<private, i32, read_write> = access %obj, 0u, %45
- %47:i32 = load %46
- %48:i32 = load %pivot
- %49:bool = lte %47, %48
- if %49 [t: $B8] { # if_2
- $B8: { # true
- %50:i32 = load %i_1
- %51:i32 = add %50, 1i
- store %i_1, %51
- %52:i32 = load %i_1
- store %param, %52
- %53:i32 = load %j_1
- store %param_1, %53
- %54:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %55:i32 = load %j_1
- %56:i32 = add %55, 1i
- store %j_1, %56
- next_iteration # -> $B4
- }
- }
- %57:i32 = load %i_1
- %58:i32 = add %57, 1i
- store %param_2, %58
- %59:i32 = load %h
- store %param_3, %59
- %60:void = call %swap_i1_i1_, %param_2, %param_3
- %61:i32 = load %i_1
- %x_295:i32 = let %61
- %63:i32 = add %x_295, 1i
- ret %63
- }
-}
-%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
- %72:i32 = load %top
- %73:i32 = add %72, 1i
- %x_299:i32 = let %73
- store %top, %x_299
- %75:ptr<function, i32, read_write> = access %stack, %x_299
- %76:i32 = load %l_1
- store %75, %76
- %77:i32 = load %top
- %78:i32 = add %77, 1i
- %x_303:i32 = let %78
- store %top, %x_303
- %80:ptr<function, i32, read_write> = access %stack, %x_303
- %81:i32 = load %h_1
- store %80, %81
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %82:i32 = load %top
- %83:bool = gte %82, 0i
- if %83 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %84:i32 = load %top
- %x_313:i32 = let %84
- %86:i32 = load %top
- %87:i32 = sub %86, 1i
- store %top, %87
- %88:ptr<function, i32, read_write> = access %stack, %x_313
- %89:i32 = load %88
- store %h_1, %89
- %90:i32 = load %top
- %x_317:i32 = let %90
- %92:i32 = load %top
- %93:i32 = sub %92, 1i
- store %top, %93
- %94:ptr<function, i32, read_write> = access %stack, %x_317
- %95:i32 = load %94
- store %l_1, %95
- %96:i32 = load %l_1
- store %param_4, %96
- %97:i32 = load %h_1
- store %param_5, %97
- %98:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_323:i32 = let %98
- store %p, %x_323
- %100:i32 = load %p
- %101:i32 = sub %100, 1i
- %102:i32 = load %l_1
- %103:bool = gt %101, %102
- if %103 [t: $B14] { # if_4
- $B14: { # true
- %104:i32 = load %top
- %105:i32 = add %104, 1i
- %x_331:i32 = let %105
- store %top, %x_331
- %107:ptr<function, i32, read_write> = access %stack, %x_331
- %108:i32 = load %l_1
- store %107, %108
- %109:i32 = load %top
- %110:i32 = add %109, 1i
- %x_335:i32 = let %110
- store %top, %x_335
- %112:ptr<function, i32, read_write> = access %stack, %x_335
- %113:i32 = load %p
- %114:i32 = sub %113, 1i
- store %112, %114
- exit_if # if_4
- }
- }
- %115:i32 = load %p
- %116:i32 = add %115, 1i
- %117:i32 = load %h_1
- %118:bool = lt %116, %117
- if %118 [t: $B15] { # if_5
- $B15: { # true
- %119:i32 = load %top
- %120:i32 = add %119, 1i
- %x_346:i32 = let %120
- store %top, %x_346
- %122:ptr<function, i32, read_write> = access %stack, %x_346
- %123:i32 = load %p
- %124:i32 = add %123, 1i
- store %122, %124
- %125:i32 = load %top
- %126:i32 = add %125, 1i
- %x_351:i32 = let %126
- store %top, %x_351
- %128:ptr<function, i32, read_write> = access %stack, %x_351
- %129:i32 = load %h_1
- store %128, %129
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %134:vec4<f32> = load %x_GLF_pos
- %135:vec4<f32> = add %134, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %136:vec4<f32> = mul %135, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %136
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %137:i32 = load %i_2
- %138:bool = lt %137, 10i
- if %138 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %139:i32 = load %i_2
- %x_104:i32 = let %139
- %141:ptr<private, i32, read_write> = access %obj, 0u, %x_104
- %142:i32 = load %i_2
- %143:i32 = sub 10i, %142
- store %141, %143
- %144:ptr<uniform, vec2<f32>, read> = access %x_33, 0u
- %145:f32 = load_vector_element %144, 0u
- %146:ptr<uniform, vec2<f32>, read> = access %x_33, 0u
- %147:f32 = load_vector_element %146, 1u
- %148:bool = gt %145, %147
- if %148 [t: $B21] { # if_7
- $B21: { # true
- exit_loop # loop_3
- }
- }
- %149:i32 = load %i_2
- %x_115:i32 = let %149
- %151:ptr<private, i32, read_write> = access %obj, 0u, %x_115
- %152:i32 = load %i_2
- %153:ptr<private, i32, read_write> = access %obj, 0u, %152
- %154:i32 = load %153
- %155:i32 = load %i_2
- %156:ptr<private, i32, read_write> = access %obj, 0u, %155
- %157:i32 = load %156
- %158:i32 = mul %154, %157
- store %151, %158
- continue # -> $B18
- }
- $B18: { # continuing
- %159:i32 = load %i_2
- %160:i32 = add %159, 1i
- store %i_2, %160
- next_iteration # -> $B17
- }
- }
- %161:void = call %quicksort_
- %162:vec4<f32> = load %x_GLF_FragCoord
- %163:vec2<f32> = swizzle %162, xy
- %164:ptr<uniform, vec2<f32>, read> = access %x_36, 0u
- %165:vec2<f32> = load %164
- %166:vec2<f32> = div %163, %165
- store %uv, %166
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %167:f32 = load_vector_element %color, 0u
- %168:f32 = let %167
- %169:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %170:i32 = load %169
- %171:f32 = convert %170
- %172:f32 = add %168, %171
- store_vector_element %color, 0u, %172
- %173:f32 = load_vector_element %uv, 0u
- %174:bool = gt %173, 0.25f
- if %174 [t: $B22] { # if_8
- $B22: { # true
- %175:f32 = load_vector_element %color, 0u
- %176:f32 = let %175
- %177:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %178:i32 = load %177
- %179:f32 = convert %178
- %180:f32 = add %176, %179
- store_vector_element %color, 0u, %180
- exit_if # if_8
- }
- }
- %181:f32 = load_vector_element %uv, 0u
- %182:bool = gt %181, 0.5f
- if %182 [t: $B23] { # if_9
- $B23: { # true
- %183:f32 = load_vector_element %color, 1u
- %184:f32 = let %183
- %185:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %186:i32 = load %185
- %187:f32 = convert %186
- %188:f32 = add %184, %187
- store_vector_element %color, 1u, %188
- exit_if # if_9
- }
- }
- %189:f32 = load_vector_element %uv, 0u
- %190:bool = gt %189, 0.75f
- if %190 [t: $B24] { # if_10
- $B24: { # true
- %191:f32 = load_vector_element %color, 2u
- %192:f32 = let %191
- %193:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %194:i32 = load %193
- %195:f32 = convert %194
- %196:f32 = add %192, %195
- store_vector_element %color, 2u, %196
- exit_if # if_10
- }
- }
- %197:f32 = load_vector_element %color, 1u
- %198:f32 = let %197
- %199:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %200:i32 = load %199
- %201:f32 = convert %200
- %202:f32 = add %198, %201
- store_vector_element %color, 1u, %202
- %203:f32 = load_vector_element %uv, 1u
- %204:bool = gt %203, 0.25f
- if %204 [t: $B25] { # if_11
- $B25: { # true
- %205:f32 = load_vector_element %color, 0u
- %206:f32 = let %205
- %207:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %208:i32 = load %207
- %209:f32 = convert %208
- %210:f32 = add %206, %209
- store_vector_element %color, 0u, %210
- exit_if # if_11
- }
- }
- %211:f32 = load_vector_element %uv, 1u
- %212:bool = gt %211, 0.5f
- if %212 [t: $B26] { # if_12
- $B26: { # true
- %213:f32 = load_vector_element %color, 1u
- %214:f32 = let %213
- %215:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %216:i32 = load %215
- %217:f32 = convert %216
- %218:f32 = add %214, %217
- store_vector_element %color, 1u, %218
- exit_if # if_12
- }
- }
- %219:f32 = load_vector_element %uv, 1u
- %220:bool = gt %219, 0.75f
- if %220 [t: $B27] { # if_13
- $B27: { # true
- %221:f32 = load_vector_element %color, 2u
- %222:f32 = let %221
- %223:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %224:i32 = load %223
- %225:f32 = convert %224
- %226:f32 = add %222, %225
- store_vector_element %color, 2u, %226
- exit_if # if_13
- }
- }
- %227:f32 = load_vector_element %color, 2u
- %228:f32 = let %227
- %229:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %230:i32 = load %229
- %231:f32 = convert %230
- %232:f32 = add %228, %231
- store_vector_element %color, 2u, %232
- %233:f32 = load_vector_element %uv, 0u
- %234:f32 = load_vector_element %uv, 1u
- %235:f32 = sub %233, %234
- %236:f32 = abs %235
- %237:bool = lt %236, 0.25f
- if %237 [t: $B28] { # if_14
- $B28: { # true
- %238:f32 = load_vector_element %color, 0u
- %239:f32 = let %238
- %240:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %241:i32 = load %240
- %242:f32 = convert %241
- %243:f32 = add %239, %242
- store_vector_element %color, 0u, %243
- exit_if # if_14
- }
- }
- %244:vec3<f32> = load %color
- %245:vec3<f32> = normalize %244
- %x_242:vec3<f32> = let %245
- %247:f32 = access %x_242, 0u
- %248:f32 = access %x_242, 1u
- %249:f32 = access %x_242, 2u
- %250:vec4<f32> = construct %247, %248, %249, 1.0f
- store %frag_color, %250
- %251:vec4<f32> = load %x_GLF_pos
- store %gl_Position, %251
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B29: {
- store %x_GLF_pos, %x_GLF_pos_param
- %254:void = call %main_1
- %255:vec4<f32> = load %frag_color
- %256:vec4<f32> = load %gl_Position
- %257:main_out = construct %255, %256
- ret %257
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.ir.msl
deleted file mode 100644
index 19cae19..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,532 +0,0 @@
-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) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-buf1 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_33:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %x_36:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %12:i32 = load %i
- %x_250:i32 = let %12
- %14:ptr<private, i32, read_write> = access %obj, 0u, %x_250
- %15:i32 = load %14
- %x_252:i32 = let %15
- store %temp, %x_252
- %17:i32 = load %i
- %x_253:i32 = let %17
- %19:i32 = load %j
- %x_254:i32 = let %19
- %21:ptr<private, i32, read_write> = access %obj, 0u, %x_254
- %22:i32 = load %21
- %x_256:i32 = let %22
- %24:ptr<private, i32, read_write> = access %obj, 0u, %x_253
- store %24, %x_256
- %25:i32 = load %j
- %x_258:i32 = let %25
- %27:i32 = load %temp
- %x_259:i32 = let %27
- %29:ptr<private, i32, read_write> = access %obj, 0u, %x_258
- store %29, %x_259
- 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
- %40:i32 = load %h
- %x_262:i32 = let %40
- %42:ptr<private, i32, read_write> = access %obj, 0u, %x_262
- %43:i32 = load %42
- %x_264:i32 = let %43
- store %pivot, %x_264
- %45:i32 = load %l
- %x_265:i32 = let %45
- %47:i32 = sub %x_265, 1i
- store %i_1, %47
- %48:i32 = load %l
- %x_267:i32 = let %48
- store %j_1, %x_267
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %50:i32 = load %j_1
- %x_272:i32 = let %50
- %52:i32 = load %h
- %x_273:i32 = let %52
- %54:i32 = sub %x_273, 1i
- %55:bool = lte %x_272, %54
- if %55 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %56:i32 = load %j_1
- %x_277:i32 = let %56
- %58:ptr<private, i32, read_write> = access %obj, 0u, %x_277
- %59:i32 = load %58
- %x_279:i32 = let %59
- %61:i32 = load %pivot
- %x_280:i32 = let %61
- %63:bool = lte %x_279, %x_280
- if %63 [t: $B8] { # if_2
- $B8: { # true
- %64:i32 = load %i_1
- %x_284:i32 = let %64
- %66:i32 = add %x_284, 1i
- store %i_1, %66
- %67:i32 = load %i_1
- %x_286:i32 = let %67
- store %param, %x_286
- %69:i32 = load %j_1
- %x_287:i32 = let %69
- store %param_1, %x_287
- %71:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %72:i32 = load %j_1
- %x_289:i32 = let %72
- %74:i32 = add %x_289, 1i
- store %j_1, %74
- next_iteration # -> $B4
- }
- }
- %75:i32 = load %i_1
- %x_291:i32 = let %75
- %77:i32 = add %x_291, 1i
- store %param_2, %77
- %78:i32 = load %h
- %x_293:i32 = let %78
- store %param_3, %x_293
- %80:void = call %swap_i1_i1_, %param_2, %param_3
- %81:i32 = load %i_1
- %x_295:i32 = let %81
- %83:i32 = add %x_295, 1i
- ret %83
- }
-}
-%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
- %92:i32 = load %top
- %x_298:i32 = let %92
- %94:i32 = add %x_298, 1i
- %x_299:i32 = let %94
- store %top, %x_299
- %96:i32 = load %l_1
- %x_300:i32 = let %96
- %98:ptr<function, i32, read_write> = access %stack, %x_299
- store %98, %x_300
- %99:i32 = load %top
- %x_302:i32 = let %99
- %101:i32 = add %x_302, 1i
- %x_303:i32 = let %101
- store %top, %x_303
- %103:i32 = load %h_1
- %x_304:i32 = let %103
- %105:ptr<function, i32, read_write> = access %stack, %x_303
- store %105, %x_304
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %106:i32 = load %top
- %x_310:i32 = let %106
- %108:bool = gte %x_310, 0i
- if %108 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %109:i32 = load %top
- %x_313:i32 = let %109
- %111:i32 = sub %x_313, 1i
- store %top, %111
- %112:ptr<function, i32, read_write> = access %stack, %x_313
- %113:i32 = load %112
- %x_316:i32 = let %113
- store %h_1, %x_316
- %115:i32 = load %top
- %x_317:i32 = let %115
- %117:i32 = sub %x_317, 1i
- store %top, %117
- %118:ptr<function, i32, read_write> = access %stack, %x_317
- %119:i32 = load %118
- %x_320:i32 = let %119
- store %l_1, %x_320
- %121:i32 = load %l_1
- %x_321:i32 = let %121
- store %param_4, %x_321
- %123:i32 = load %h_1
- %x_322:i32 = let %123
- store %param_5, %x_322
- %125:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_323:i32 = let %125
- store %p, %x_323
- %127:i32 = load %p
- %x_324:i32 = let %127
- %129:i32 = load %l_1
- %x_326:i32 = let %129
- %131:i32 = sub %x_324, 1i
- %132:bool = gt %131, %x_326
- if %132 [t: $B14] { # if_4
- $B14: { # true
- %133:i32 = load %top
- %x_330:i32 = let %133
- %135:i32 = add %x_330, 1i
- %x_331:i32 = let %135
- store %top, %x_331
- %137:i32 = load %l_1
- %x_332:i32 = let %137
- %139:ptr<function, i32, read_write> = access %stack, %x_331
- store %139, %x_332
- %140:i32 = load %top
- %x_334:i32 = let %140
- %142:i32 = add %x_334, 1i
- %x_335:i32 = let %142
- store %top, %x_335
- %144:i32 = load %p
- %x_336:i32 = let %144
- %146:ptr<function, i32, read_write> = access %stack, %x_335
- %147:i32 = sub %x_336, 1i
- store %146, %147
- exit_if # if_4
- }
- }
- %148:i32 = load %p
- %x_339:i32 = let %148
- %150:i32 = load %h_1
- %x_341:i32 = let %150
- %152:i32 = add %x_339, 1i
- %153:bool = lt %152, %x_341
- if %153 [t: $B15] { # if_5
- $B15: { # true
- %154:i32 = load %top
- %x_345:i32 = let %154
- %156:i32 = add %x_345, 1i
- %x_346:i32 = let %156
- store %top, %x_346
- %158:i32 = load %p
- %x_347:i32 = let %158
- %160:ptr<function, i32, read_write> = access %stack, %x_346
- %161:i32 = add %x_347, 1i
- store %160, %161
- %162:i32 = load %top
- %x_350:i32 = let %162
- %164:i32 = add %x_350, 1i
- %x_351:i32 = let %164
- store %top, %x_351
- %166:i32 = load %h_1
- %x_352:i32 = let %166
- %168:ptr<function, i32, read_write> = access %stack, %x_351
- store %168, %x_352
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %173:vec4<f32> = load %x_GLF_pos
- %x_94:vec4<f32> = let %173
- %175:vec4<f32> = add %x_94, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %176:vec4<f32> = mul %175, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %176
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %177:i32 = load %i_2
- %x_101:i32 = let %177
- %179:bool = lt %x_101, 10i
- if %179 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %180:i32 = load %i_2
- %x_104:i32 = let %180
- %182:i32 = load %i_2
- %x_105:i32 = let %182
- %184:ptr<private, i32, read_write> = access %obj, 0u, %x_104
- %185:i32 = sub 10i, %x_105
- store %184, %185
- %186:ptr<uniform, vec2<f32>, read> = access %x_33, 0u
- %187:f32 = load_vector_element %186, 0u
- %x_109:f32 = let %187
- %189:ptr<uniform, vec2<f32>, read> = access %x_33, 0u
- %190:f32 = load_vector_element %189, 1u
- %x_111:f32 = let %190
- %192:bool = gt %x_109, %x_111
- if %192 [t: $B21] { # if_7
- $B21: { # true
- exit_loop # loop_3
- }
- }
- %193:i32 = load %i_2
- %x_115:i32 = let %193
- %195:i32 = load %i_2
- %x_116:i32 = let %195
- %197:ptr<private, i32, read_write> = access %obj, 0u, %x_116
- %198:i32 = load %197
- %x_118:i32 = let %198
- %200:i32 = load %i_2
- %x_119:i32 = let %200
- %202:ptr<private, i32, read_write> = access %obj, 0u, %x_119
- %203:i32 = load %202
- %x_121:i32 = let %203
- %205:ptr<private, i32, read_write> = access %obj, 0u, %x_115
- %206:i32 = mul %x_118, %x_121
- store %205, %206
- continue # -> $B18
- }
- $B18: { # continuing
- %207:i32 = load %i_2
- %x_124:i32 = let %207
- %209:i32 = add %x_124, 1i
- store %i_2, %209
- next_iteration # -> $B17
- }
- }
- %210:void = call %quicksort_
- %211:vec4<f32> = load %x_GLF_FragCoord
- %x_127:vec4<f32> = let %211
- %213:ptr<uniform, vec2<f32>, read> = access %x_36, 0u
- %214:vec2<f32> = load %213
- %x_130:vec2<f32> = let %214
- %216:f32 = access %x_127, 0u
- %217:f32 = access %x_127, 1u
- %218:vec2<f32> = construct %216, %217
- %219:vec2<f32> = div %218, %x_130
- store %uv, %219
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %220:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %221:i32 = load %220
- %x_133:i32 = let %221
- %223:f32 = load_vector_element %color, 0u
- %x_136:f32 = let %223
- %225:f32 = convert %x_133
- %226:f32 = add %x_136, %225
- store_vector_element %color, 0u, %226
- %227:f32 = load_vector_element %uv, 0u
- %x_140:f32 = let %227
- %229:bool = gt %x_140, 0.25f
- if %229 [t: $B22] { # if_8
- $B22: { # true
- %230:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %231:i32 = load %230
- %x_145:i32 = let %231
- %233:f32 = load_vector_element %color, 0u
- %x_148:f32 = let %233
- %235:f32 = convert %x_145
- %236:f32 = add %x_148, %235
- store_vector_element %color, 0u, %236
- exit_if # if_8
- }
- }
- %237:f32 = load_vector_element %uv, 0u
- %x_152:f32 = let %237
- %239:bool = gt %x_152, 0.5f
- if %239 [t: $B23] { # if_9
- $B23: { # true
- %240:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %241:i32 = load %240
- %x_157:i32 = let %241
- %243:f32 = load_vector_element %color, 1u
- %x_160:f32 = let %243
- %245:f32 = convert %x_157
- %246:f32 = add %x_160, %245
- store_vector_element %color, 1u, %246
- exit_if # if_9
- }
- }
- %247:f32 = load_vector_element %uv, 0u
- %x_164:f32 = let %247
- %249:bool = gt %x_164, 0.75f
- if %249 [t: $B24] { # if_10
- $B24: { # true
- %250:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %251:i32 = load %250
- %x_169:i32 = let %251
- %253:f32 = load_vector_element %color, 2u
- %x_172:f32 = let %253
- %255:f32 = convert %x_169
- %256:f32 = add %x_172, %255
- store_vector_element %color, 2u, %256
- exit_if # if_10
- }
- }
- %257:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %258:i32 = load %257
- %x_176:i32 = let %258
- %260:f32 = load_vector_element %color, 1u
- %x_179:f32 = let %260
- %262:f32 = convert %x_176
- %263:f32 = add %x_179, %262
- store_vector_element %color, 1u, %263
- %264:f32 = load_vector_element %uv, 1u
- %x_183:f32 = let %264
- %266:bool = gt %x_183, 0.25f
- if %266 [t: $B25] { # if_11
- $B25: { # true
- %267:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %268:i32 = load %267
- %x_188:i32 = let %268
- %270:f32 = load_vector_element %color, 0u
- %x_191:f32 = let %270
- %272:f32 = convert %x_188
- %273:f32 = add %x_191, %272
- store_vector_element %color, 0u, %273
- exit_if # if_11
- }
- }
- %274:f32 = load_vector_element %uv, 1u
- %x_195:f32 = let %274
- %276:bool = gt %x_195, 0.5f
- if %276 [t: $B26] { # if_12
- $B26: { # true
- %277:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %278:i32 = load %277
- %x_200:i32 = let %278
- %280:f32 = load_vector_element %color, 1u
- %x_203:f32 = let %280
- %282:f32 = convert %x_200
- %283:f32 = add %x_203, %282
- store_vector_element %color, 1u, %283
- exit_if # if_12
- }
- }
- %284:f32 = load_vector_element %uv, 1u
- %x_207:f32 = let %284
- %286:bool = gt %x_207, 0.75f
- if %286 [t: $B27] { # if_13
- $B27: { # true
- %287:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %288:i32 = load %287
- %x_212:i32 = let %288
- %290:f32 = load_vector_element %color, 2u
- %x_215:f32 = let %290
- %292:f32 = convert %x_212
- %293:f32 = add %x_215, %292
- store_vector_element %color, 2u, %293
- exit_if # if_13
- }
- }
- %294:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %295:i32 = load %294
- %x_219:i32 = let %295
- %297:f32 = load_vector_element %color, 2u
- %x_222:f32 = let %297
- %299:f32 = convert %x_219
- %300:f32 = add %x_222, %299
- store_vector_element %color, 2u, %300
- %301:f32 = load_vector_element %uv, 0u
- %x_226:f32 = let %301
- %303:f32 = load_vector_element %uv, 1u
- %x_228:f32 = let %303
- %305:f32 = sub %x_226, %x_228
- %306:f32 = abs %305
- %307:bool = lt %306, 0.25f
- if %307 [t: $B28] { # if_14
- $B28: { # true
- %308:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %309:i32 = load %308
- %x_235:i32 = let %309
- %311:f32 = load_vector_element %color, 0u
- %x_238:f32 = let %311
- %313:f32 = convert %x_235
- %314:f32 = add %x_238, %313
- store_vector_element %color, 0u, %314
- exit_if # if_14
- }
- }
- %315:vec3<f32> = load %color
- %x_241:vec3<f32> = let %315
- %317:vec3<f32> = normalize %x_241
- %x_242:vec3<f32> = let %317
- %319:f32 = access %x_242, 0u
- %320:f32 = access %x_242, 1u
- %321:f32 = access %x_242, 2u
- %322:vec4<f32> = construct %319, %320, %321, 1.0f
- store %frag_color, %322
- %323:vec4<f32> = load %x_GLF_pos
- %x_247:vec4<f32> = let %323
- store %gl_Position, %x_247
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B29: {
- store %x_GLF_pos, %x_GLF_pos_param
- %327:void = call %main_1
- %328:vec4<f32> = load %frag_color
- %329:vec4<f32> = load %gl_Position
- %330:main_out = construct %328, %329
- ret %330
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.ir.msl
deleted file mode 100644
index ac518cd..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,654 +0,0 @@
-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) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_90:ptr<function, i32, read_write> = var
- %x_91:ptr<function, i32, read_write> = var
- %x_92:ptr<function, i32, read_write> = var
- %x_93:ptr<function, i32, read_write> = var
- %x_94:ptr<function, i32, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- %x_97:ptr<function, i32, read_write> = var
- %x_98:ptr<function, i32, read_write> = var
- %x_99:ptr<function, i32, read_write> = var
- %x_100:ptr<function, i32, read_write> = var
- %x_101:ptr<function, i32, read_write> = var
- %x_102:ptr<function, i32, read_write> = var
- %x_103:ptr<function, array<i32, 10>, read_write> = var
- %x_104:ptr<function, i32, read_write> = var
- %x_105:ptr<function, i32, read_write> = var
- %x_106:ptr<function, i32, read_write> = var
- %i_2:ptr<function, i32, read_write> = var
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %28:vec4<f32> = load %x_GLF_pos
- %29:vec4<f32> = add %28, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %30:vec4<f32> = mul %29, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %30
- store %i_2, 0i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %31:i32 = load %i_2
- %32:bool = lt %31, 10i
- if %32 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %33:i32 = load %i_2
- %x_117:i32 = let %33
- %35:ptr<private, i32, read_write> = access %obj, 0u, %x_117
- %36:i32 = load %i_2
- %37:i32 = sub 10i, %36
- store %35, %37
- %38:i32 = load %i_2
- %x_121:i32 = let %38
- %40:ptr<private, i32, read_write> = access %obj, 0u, %x_121
- %41:i32 = load %i_2
- %42:ptr<private, i32, read_write> = access %obj, 0u, %41
- %43:i32 = load %42
- %44:i32 = load %i_2
- %45:ptr<private, i32, read_write> = access %obj, 0u, %44
- %46:i32 = load %45
- %47:i32 = mul %43, %46
- store %40, %47
- continue # -> $B4
- }
- $B4: { # continuing
- %48:i32 = load %i_2
- %49:i32 = add %48, 1i
- store %i_2, %49
- next_iteration # -> $B3
- }
- }
- store %x_100, 0i
- store %x_101, 9i
- store %x_102, -1i
- %50:i32 = load %x_102
- %51:i32 = add %50, 1i
- %x_133:i32 = let %51
- store %x_102, %x_133
- %53:ptr<function, i32, read_write> = access %x_103, %x_133
- %54:i32 = load %x_100
- store %53, %54
- %55:i32 = load %x_102
- %56:i32 = add %55, 1i
- %x_137:i32 = let %56
- store %x_102, %x_137
- %58:ptr<function, i32, read_write> = access %x_103, %x_137
- %59:i32 = load %x_101
- store %58, %59
- loop [b: $B7, c: $B8] { # loop_2
- $B7: { # body
- %60:i32 = load %x_102
- %61:bool = gte %60, 0i
- if %61 [t: $B9, f: $B10] { # if_2
- $B9: { # true
- exit_if # if_2
- }
- $B10: { # false
- exit_loop # loop_2
- }
- }
- %62:i32 = load %x_102
- %x_147:i32 = let %62
- %64:i32 = load %x_102
- %65:i32 = sub %64, 1i
- store %x_102, %65
- %66:ptr<function, i32, read_write> = access %x_103, %x_147
- %67:i32 = load %66
- store %x_101, %67
- %68:i32 = load %x_102
- %x_151:i32 = let %68
- %70:i32 = load %x_102
- %71:i32 = sub %70, 1i
- store %x_102, %71
- %72:ptr<function, i32, read_write> = access %x_103, %x_151
- %73:i32 = load %72
- store %x_100, %73
- %74:i32 = load %x_100
- store %x_105, %74
- %75:i32 = load %x_101
- store %x_106, %75
- %76:i32 = load %x_106
- %77:ptr<private, i32, read_write> = access %obj, 0u, %76
- %78:i32 = load %77
- store %x_92, %78
- %79:i32 = load %x_105
- %80:i32 = sub %79, 1i
- store %x_93, %80
- %81:i32 = load %x_105
- store %x_94, %81
- loop [b: $B11, c: $B12] { # loop_3
- $B11: { # body
- %82:i32 = load %x_94
- %83:i32 = load %x_106
- %84:i32 = sub %83, 1i
- %85:bool = lte %82, %84
- if %85 [t: $B13, f: $B14] { # if_3
- $B13: { # true
- exit_if # if_3
- }
- $B14: { # false
- exit_loop # loop_3
- }
- }
- %86:i32 = load %x_94
- %87:ptr<private, i32, read_write> = access %obj, 0u, %86
- %88:i32 = load %87
- %89:i32 = load %x_92
- %90:bool = lte %88, %89
- if %90 [t: $B15] { # if_4
- $B15: { # true
- %91:i32 = load %x_93
- %92:i32 = add %91, 1i
- store %x_93, %92
- %93:i32 = load %x_93
- store %x_95, %93
- %94:i32 = load %x_94
- store %x_96, %94
- %95:i32 = load %x_95
- %96:ptr<private, i32, read_write> = access %obj, 0u, %95
- %97:i32 = load %96
- store %x_91, %97
- %98:i32 = load %x_95
- %x_186:i32 = let %98
- %100:ptr<private, i32, read_write> = access %obj, 0u, %x_186
- %101:i32 = load %x_96
- %102:ptr<private, i32, read_write> = access %obj, 0u, %101
- %103:i32 = load %102
- store %100, %103
- %104:i32 = load %x_96
- %x_191:i32 = let %104
- %106:ptr<private, i32, read_write> = access %obj, 0u, %x_191
- %107:i32 = load %x_91
- store %106, %107
- exit_if # if_4
- }
- }
- continue # -> $B12
- }
- $B12: { # continuing
- %108:i32 = load %x_94
- %109:i32 = add %108, 1i
- store %x_94, %109
- next_iteration # -> $B11
- }
- }
- %110:i32 = load %x_93
- %111:i32 = add %110, 1i
- store %x_97, %111
- %112:i32 = load %x_106
- store %x_98, %112
- %113:i32 = load %x_97
- %114:ptr<private, i32, read_write> = access %obj, 0u, %113
- %115:i32 = load %114
- store %x_90, %115
- %116:i32 = load %x_97
- %x_202:i32 = let %116
- %118:ptr<private, i32, read_write> = access %obj, 0u, %x_202
- %119:i32 = load %x_98
- %120:ptr<private, i32, read_write> = access %obj, 0u, %119
- %121:i32 = load %120
- store %118, %121
- %122:i32 = load %x_98
- %x_207:i32 = let %122
- %124:ptr<private, i32, read_write> = access %obj, 0u, %x_207
- %125:i32 = load %x_90
- store %124, %125
- %126:i32 = load %x_93
- %127:i32 = add %126, 1i
- store %x_99, %127
- %128:i32 = load %x_99
- store %x_104, %128
- %129:i32 = load %x_104
- %130:i32 = sub %129, 1i
- %131:i32 = load %x_100
- %132:bool = gt %130, %131
- if %132 [t: $B16] { # if_5
- $B16: { # true
- %133:i32 = load %x_102
- %134:i32 = add %133, 1i
- %x_220:i32 = let %134
- store %x_102, %x_220
- %136:ptr<function, i32, read_write> = access %x_103, %x_220
- %137:i32 = load %x_100
- store %136, %137
- %138:i32 = load %x_102
- %139:i32 = add %138, 1i
- %x_224:i32 = let %139
- store %x_102, %x_224
- %141:ptr<function, i32, read_write> = access %x_103, %x_224
- %142:i32 = load %x_104
- %143:i32 = sub %142, 1i
- store %141, %143
- exit_if # if_5
- }
- }
- %144:i32 = load %x_104
- %145:i32 = add %144, 1i
- %146:i32 = load %x_101
- %147:bool = lt %145, %146
- if %147 [t: $B17] { # if_6
- $B17: { # true
- %148:i32 = load %x_102
- %149:i32 = add %148, 1i
- %x_235:i32 = let %149
- store %x_102, %x_235
- %151:ptr<function, i32, read_write> = access %x_103, %x_235
- %152:i32 = load %x_104
- %153:i32 = add %152, 1i
- store %151, %153
- %154:i32 = load %x_102
- %155:i32 = add %154, 1i
- %x_240:i32 = let %155
- store %x_102, %x_240
- %157:ptr<function, i32, read_write> = access %x_103, %x_240
- %158:i32 = load %x_101
- store %157, %158
- exit_if # if_6
- }
- }
- continue # -> $B8
- }
- $B8: { # continuing
- next_iteration # -> $B7
- }
- }
- %159:vec4<f32> = load %x_GLF_FragCoord
- %160:vec2<f32> = swizzle %159, xy
- %161:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %162:vec2<f32> = load %161
- %163:vec2<f32> = div %160, %162
- store %uv, %163
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %164:f32 = load_vector_element %color, 0u
- %165:f32 = let %164
- %166:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %167:i32 = load %166
- %168:f32 = convert %167
- %169:f32 = add %165, %168
- store_vector_element %color, 0u, %169
- %170:f32 = load_vector_element %uv, 0u
- %171:bool = gt %170, 0.25f
- if %171 [t: $B18] { # if_7
- $B18: { # true
- %172:f32 = load_vector_element %color, 0u
- %173:f32 = let %172
- %174:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %175:i32 = load %174
- %176:f32 = convert %175
- %177:f32 = add %173, %176
- store_vector_element %color, 0u, %177
- exit_if # if_7
- }
- }
- %178:f32 = load_vector_element %uv, 0u
- %179:bool = gt %178, 0.5f
- if %179 [t: $B19] { # if_8
- $B19: { # true
- %180:f32 = load_vector_element %color, 1u
- %181:f32 = let %180
- %182:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %183:i32 = load %182
- %184:f32 = convert %183
- %185:f32 = add %181, %184
- store_vector_element %color, 1u, %185
- exit_if # if_8
- }
- }
- %186:f32 = load_vector_element %uv, 0u
- %187:bool = gt %186, 0.75f
- if %187 [t: $B20] { # if_9
- $B20: { # true
- %188:f32 = load_vector_element %color, 2u
- %189:f32 = let %188
- %190:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %191:i32 = load %190
- %192:f32 = convert %191
- %193:f32 = add %189, %192
- store_vector_element %color, 2u, %193
- exit_if # if_9
- }
- }
- %194:f32 = load_vector_element %color, 1u
- %195:f32 = let %194
- %196:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %197:i32 = load %196
- %198:f32 = convert %197
- %199:f32 = add %195, %198
- store_vector_element %color, 1u, %199
- %200:f32 = load_vector_element %uv, 1u
- %201:bool = gt %200, 0.25f
- if %201 [t: $B21] { # if_10
- $B21: { # true
- %202:f32 = load_vector_element %color, 0u
- %203:f32 = let %202
- %204:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %205:i32 = load %204
- %206:f32 = convert %205
- %207:f32 = add %203, %206
- store_vector_element %color, 0u, %207
- exit_if # if_10
- }
- }
- %208:f32 = load_vector_element %uv, 1u
- %209:bool = gt %208, 0.5f
- if %209 [t: $B22] { # if_11
- $B22: { # true
- %210:f32 = load_vector_element %color, 1u
- %211:f32 = let %210
- %212:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %213:i32 = load %212
- %214:f32 = convert %213
- %215:f32 = add %211, %214
- store_vector_element %color, 1u, %215
- exit_if # if_11
- }
- }
- %216:f32 = load_vector_element %uv, 1u
- %217:bool = gt %216, 0.75f
- if %217 [t: $B23] { # if_12
- $B23: { # true
- %218:f32 = load_vector_element %color, 2u
- %219:f32 = let %218
- %220:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %221:i32 = load %220
- %222:f32 = convert %221
- %223:f32 = add %219, %222
- store_vector_element %color, 2u, %223
- exit_if # if_12
- }
- }
- %224:f32 = load_vector_element %color, 2u
- %225:f32 = let %224
- %226:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %227:i32 = load %226
- %228:f32 = convert %227
- %229:f32 = add %225, %228
- store_vector_element %color, 2u, %229
- %230:f32 = load_vector_element %uv, 0u
- %231:f32 = load_vector_element %uv, 1u
- %232:f32 = sub %230, %231
- %233:f32 = abs %232
- %234:bool = lt %233, 0.25f
- if %234 [t: $B24] { # if_13
- $B24: { # true
- %235:f32 = load_vector_element %color, 0u
- %236:f32 = let %235
- %237:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %238:i32 = load %237
- %239:f32 = convert %238
- %240:f32 = add %236, %239
- store_vector_element %color, 0u, %240
- exit_if # if_13
- }
- }
- %241:vec3<f32> = load %color
- %242:vec3<f32> = normalize %241
- %x_358:vec3<f32> = let %242
- %244:f32 = access %x_358, 0u
- %245:f32 = access %x_358, 1u
- %246:f32 = access %x_358, 2u
- %247:vec4<f32> = construct %244, %245, %246, 1.0f
- store %frag_color, %247
- %248:vec4<f32> = load %x_GLF_pos
- store %gl_Position, %248
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B25: {
- store %x_GLF_pos, %x_GLF_pos_param
- %251:void = call %main_1
- %252:vec4<f32> = load %frag_color
- %253:vec4<f32> = load %gl_Position
- %254:main_out = construct %252, %253
- ret %254
- }
-}
-%swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>):void {
- $B26: {
- %temp:ptr<function, i32, read_write> = var
- %259:i32 = load %i
- %260:ptr<private, i32, read_write> = access %obj, 0u, %259
- %261:i32 = load %260
- store %temp, %261
- %262:i32 = load %i
- %x_369:i32 = let %262
- %264:ptr<private, i32, read_write> = access %obj, 0u, %x_369
- %265:i32 = load %j
- %266:ptr<private, i32, read_write> = access %obj, 0u, %265
- %267:i32 = load %266
- store %264, %267
- %268:i32 = load %j
- %x_374:i32 = let %268
- %270:ptr<private, i32, read_write> = access %obj, 0u, %x_374
- %271:i32 = load %temp
- store %270, %271
- ret
- }
-}
-%performPartition_i1_i1_ = func(%l:ptr<function, i32, read_write>, %h:ptr<function, i32, read_write>):i32 {
- $B27: {
- %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
- %282:i32 = load %h
- %283:ptr<private, i32, read_write> = access %obj, 0u, %282
- %284:i32 = load %283
- store %pivot, %284
- %285:i32 = load %l
- %286:i32 = sub %285, 1i
- store %i_1, %286
- %287:i32 = load %l
- store %j_1, %287
- loop [b: $B28, c: $B29] { # loop_4
- $B28: { # body
- %288:i32 = load %j_1
- %289:i32 = load %h
- %290:i32 = sub %289, 1i
- %291:bool = lte %288, %290
- if %291 [t: $B30, f: $B31] { # if_14
- $B30: { # true
- exit_if # if_14
- }
- $B31: { # false
- exit_loop # loop_4
- }
- }
- %292:i32 = load %j_1
- %293:ptr<private, i32, read_write> = access %obj, 0u, %292
- %294:i32 = load %293
- %295:i32 = load %pivot
- %296:bool = lte %294, %295
- if %296 [t: $B32] { # if_15
- $B32: { # true
- %297:i32 = load %i_1
- %298:i32 = add %297, 1i
- store %i_1, %298
- %299:i32 = load %i_1
- store %param, %299
- %300:i32 = load %j_1
- store %param_1, %300
- %301:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_15
- }
- }
- continue # -> $B29
- }
- $B29: { # continuing
- %302:i32 = load %j_1
- %303:i32 = add %302, 1i
- store %j_1, %303
- next_iteration # -> $B28
- }
- }
- %304:i32 = load %i_1
- %305:i32 = add %304, 1i
- store %param_2, %305
- %306:i32 = load %h
- store %param_3, %306
- %307:void = call %swap_i1_i1_, %param_2, %param_3
- %308:i32 = load %i_1
- %x_411:i32 = let %308
- %310:i32 = add %x_411, 1i
- ret %310
- }
-}
-%quicksort_ = func():void {
- $B33: {
- %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
- %319:i32 = load %top
- %320:i32 = add %319, 1i
- %x_415:i32 = let %320
- store %top, %x_415
- %322:ptr<function, i32, read_write> = access %stack, %x_415
- %323:i32 = load %l_1
- store %322, %323
- %324:i32 = load %top
- %325:i32 = add %324, 1i
- %x_419:i32 = let %325
- store %top, %x_419
- %327:ptr<function, i32, read_write> = access %stack, %x_419
- %328:i32 = load %h_1
- store %327, %328
- loop [b: $B34, c: $B35] { # loop_5
- $B34: { # body
- %329:i32 = load %top
- %330:bool = gte %329, 0i
- if %330 [t: $B36, f: $B37] { # if_16
- $B36: { # true
- exit_if # if_16
- }
- $B37: { # false
- exit_loop # loop_5
- }
- }
- %331:i32 = load %top
- %x_429:i32 = let %331
- %333:i32 = load %top
- %334:i32 = sub %333, 1i
- store %top, %334
- %335:ptr<function, i32, read_write> = access %stack, %x_429
- %336:i32 = load %335
- store %h_1, %336
- %337:i32 = load %top
- %x_433:i32 = let %337
- %339:i32 = load %top
- %340:i32 = sub %339, 1i
- store %top, %340
- %341:ptr<function, i32, read_write> = access %stack, %x_433
- %342:i32 = load %341
- store %l_1, %342
- %343:i32 = load %l_1
- store %param_4, %343
- %344:i32 = load %h_1
- store %param_5, %344
- %345:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_439:i32 = let %345
- store %p, %x_439
- %347:i32 = load %p
- %348:i32 = sub %347, 1i
- %349:i32 = load %l_1
- %350:bool = gt %348, %349
- if %350 [t: $B38] { # if_17
- $B38: { # true
- %351:i32 = load %top
- %352:i32 = add %351, 1i
- %x_447:i32 = let %352
- store %top, %x_447
- %354:ptr<function, i32, read_write> = access %stack, %x_447
- %355:i32 = load %l_1
- store %354, %355
- %356:i32 = load %top
- %357:i32 = add %356, 1i
- %x_451:i32 = let %357
- store %top, %x_451
- %359:ptr<function, i32, read_write> = access %stack, %x_451
- %360:i32 = load %p
- %361:i32 = sub %360, 1i
- store %359, %361
- exit_if # if_17
- }
- }
- %362:i32 = load %p
- %363:i32 = add %362, 1i
- %364:i32 = load %h_1
- %365:bool = lt %363, %364
- if %365 [t: $B39] { # if_18
- $B39: { # true
- %366:i32 = load %top
- %367:i32 = add %366, 1i
- %x_462:i32 = let %367
- store %top, %x_462
- %369:ptr<function, i32, read_write> = access %stack, %x_462
- %370:i32 = load %p
- %371:i32 = add %370, 1i
- store %369, %371
- %372:i32 = load %top
- %373:i32 = add %372, 1i
- %x_467:i32 = let %373
- store %top, %x_467
- %375:ptr<function, i32, read_write> = access %stack, %x_467
- %376:i32 = load %h_1
- store %375, %376
- exit_if # if_18
- }
- }
- continue # -> $B35
- }
- $B35: { # continuing
- next_iteration # -> $B34
- }
- }
- ret
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.ir.msl
deleted file mode 100644
index 096187bd..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,771 +0,0 @@
-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) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%main_1 = func():void {
- $B2: {
- %x_90:ptr<function, i32, read_write> = var
- %x_91:ptr<function, i32, read_write> = var
- %x_92:ptr<function, i32, read_write> = var
- %x_93:ptr<function, i32, read_write> = var
- %x_94:ptr<function, i32, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- %x_97:ptr<function, i32, read_write> = var
- %x_98:ptr<function, i32, read_write> = var
- %x_99:ptr<function, i32, read_write> = var
- %x_100:ptr<function, i32, read_write> = var
- %x_101:ptr<function, i32, read_write> = var
- %x_102:ptr<function, i32, read_write> = var
- %x_103:ptr<function, array<i32, 10>, read_write> = var
- %x_104:ptr<function, i32, read_write> = var
- %x_105:ptr<function, i32, read_write> = var
- %x_106:ptr<function, i32, read_write> = var
- %i_2:ptr<function, i32, read_write> = var
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %28:vec4<f32> = load %x_GLF_pos
- %x_107:vec4<f32> = let %28
- %30:vec4<f32> = add %x_107, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %31:vec4<f32> = mul %30, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %31
- store %i_2, 0i
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %32:i32 = load %i_2
- %x_114:i32 = let %32
- %34:bool = lt %x_114, 10i
- if %34 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %35:i32 = load %i_2
- %x_117:i32 = let %35
- %37:i32 = load %i_2
- %x_118:i32 = let %37
- %39:ptr<private, i32, read_write> = access %obj, 0u, %x_117
- %40:i32 = sub 10i, %x_118
- store %39, %40
- %41:i32 = load %i_2
- %x_121:i32 = let %41
- %43:i32 = load %i_2
- %x_122:i32 = let %43
- %45:ptr<private, i32, read_write> = access %obj, 0u, %x_122
- %46:i32 = load %45
- %x_124:i32 = let %46
- %48:i32 = load %i_2
- %x_125:i32 = let %48
- %50:ptr<private, i32, read_write> = access %obj, 0u, %x_125
- %51:i32 = load %50
- %x_127:i32 = let %51
- %53:ptr<private, i32, read_write> = access %obj, 0u, %x_121
- %54:i32 = mul %x_124, %x_127
- store %53, %54
- continue # -> $B4
- }
- $B4: { # continuing
- %55:i32 = load %i_2
- %x_130:i32 = let %55
- %57:i32 = add %x_130, 1i
- store %i_2, %57
- next_iteration # -> $B3
- }
- }
- store %x_100, 0i
- store %x_101, 9i
- store %x_102, -1i
- %58:i32 = load %x_102
- %x_132:i32 = let %58
- %60:i32 = add %x_132, 1i
- %x_133:i32 = let %60
- store %x_102, %x_133
- %62:i32 = load %x_100
- %x_134:i32 = let %62
- %64:ptr<function, i32, read_write> = access %x_103, %x_133
- store %64, %x_134
- %65:i32 = load %x_102
- %x_136:i32 = let %65
- %67:i32 = add %x_136, 1i
- %x_137:i32 = let %67
- store %x_102, %x_137
- %69:i32 = load %x_101
- %x_138:i32 = let %69
- %71:ptr<function, i32, read_write> = access %x_103, %x_137
- store %71, %x_138
- loop [b: $B7, c: $B8] { # loop_2
- $B7: { # body
- %72:i32 = load %x_102
- %x_144:i32 = let %72
- %74:bool = gte %x_144, 0i
- if %74 [t: $B9, f: $B10] { # if_2
- $B9: { # true
- exit_if # if_2
- }
- $B10: { # false
- exit_loop # loop_2
- }
- }
- %75:i32 = load %x_102
- %x_147:i32 = let %75
- %77:i32 = sub %x_147, 1i
- store %x_102, %77
- %78:ptr<function, i32, read_write> = access %x_103, %x_147
- %79:i32 = load %78
- %x_150:i32 = let %79
- store %x_101, %x_150
- %81:i32 = load %x_102
- %x_151:i32 = let %81
- %83:i32 = sub %x_151, 1i
- store %x_102, %83
- %84:ptr<function, i32, read_write> = access %x_103, %x_151
- %85:i32 = load %84
- %x_154:i32 = let %85
- store %x_100, %x_154
- %87:i32 = load %x_100
- %x_155:i32 = let %87
- store %x_105, %x_155
- %89:i32 = load %x_101
- %x_156:i32 = let %89
- store %x_106, %x_156
- %91:i32 = load %x_106
- %x_157:i32 = let %91
- %93:ptr<private, i32, read_write> = access %obj, 0u, %x_157
- %94:i32 = load %93
- %x_159:i32 = let %94
- store %x_92, %x_159
- %96:i32 = load %x_105
- %x_160:i32 = let %96
- %98:i32 = sub %x_160, 1i
- store %x_93, %98
- %99:i32 = load %x_105
- %x_162:i32 = let %99
- store %x_94, %x_162
- loop [b: $B11, c: $B12] { # loop_3
- $B11: { # body
- %101:i32 = load %x_94
- %x_167:i32 = let %101
- %103:i32 = load %x_106
- %x_168:i32 = let %103
- %105:i32 = sub %x_168, 1i
- %106:bool = lte %x_167, %105
- if %106 [t: $B13, f: $B14] { # if_3
- $B13: { # true
- exit_if # if_3
- }
- $B14: { # false
- exit_loop # loop_3
- }
- }
- %107:i32 = load %x_94
- %x_172:i32 = let %107
- %109:ptr<private, i32, read_write> = access %obj, 0u, %x_172
- %110:i32 = load %109
- %x_174:i32 = let %110
- %112:i32 = load %x_92
- %x_175:i32 = let %112
- %114:bool = lte %x_174, %x_175
- if %114 [t: $B15] { # if_4
- $B15: { # true
- %115:i32 = load %x_93
- %x_179:i32 = let %115
- %117:i32 = add %x_179, 1i
- store %x_93, %117
- %118:i32 = load %x_93
- %x_181:i32 = let %118
- store %x_95, %x_181
- %120:i32 = load %x_94
- %x_182:i32 = let %120
- store %x_96, %x_182
- %122:i32 = load %x_95
- %x_183:i32 = let %122
- %124:ptr<private, i32, read_write> = access %obj, 0u, %x_183
- %125:i32 = load %124
- %x_185:i32 = let %125
- store %x_91, %x_185
- %127:i32 = load %x_95
- %x_186:i32 = let %127
- %129:i32 = load %x_96
- %x_187:i32 = let %129
- %131:ptr<private, i32, read_write> = access %obj, 0u, %x_187
- %132:i32 = load %131
- %x_189:i32 = let %132
- %134:ptr<private, i32, read_write> = access %obj, 0u, %x_186
- store %134, %x_189
- %135:i32 = load %x_96
- %x_191:i32 = let %135
- %137:i32 = load %x_91
- %x_192:i32 = let %137
- %139:ptr<private, i32, read_write> = access %obj, 0u, %x_191
- store %139, %x_192
- exit_if # if_4
- }
- }
- continue # -> $B12
- }
- $B12: { # continuing
- %140:i32 = load %x_94
- %x_194:i32 = let %140
- %142:i32 = add %x_194, 1i
- store %x_94, %142
- next_iteration # -> $B11
- }
- }
- %143:i32 = load %x_93
- %x_196:i32 = let %143
- %145:i32 = add %x_196, 1i
- store %x_97, %145
- %146:i32 = load %x_106
- %x_198:i32 = let %146
- store %x_98, %x_198
- %148:i32 = load %x_97
- %x_199:i32 = let %148
- %150:ptr<private, i32, read_write> = access %obj, 0u, %x_199
- %151:i32 = load %150
- %x_201:i32 = let %151
- store %x_90, %x_201
- %153:i32 = load %x_97
- %x_202:i32 = let %153
- %155:i32 = load %x_98
- %x_203:i32 = let %155
- %157:ptr<private, i32, read_write> = access %obj, 0u, %x_203
- %158:i32 = load %157
- %x_205:i32 = let %158
- %160:ptr<private, i32, read_write> = access %obj, 0u, %x_202
- store %160, %x_205
- %161:i32 = load %x_98
- %x_207:i32 = let %161
- %163:i32 = load %x_90
- %x_208:i32 = let %163
- %165:ptr<private, i32, read_write> = access %obj, 0u, %x_207
- store %165, %x_208
- %166:i32 = load %x_93
- %x_210:i32 = let %166
- %168:i32 = add %x_210, 1i
- store %x_99, %168
- %169:i32 = load %x_99
- %x_212:i32 = let %169
- store %x_104, %x_212
- %171:i32 = load %x_104
- %x_213:i32 = let %171
- %173:i32 = load %x_100
- %x_215:i32 = let %173
- %175:i32 = sub %x_213, 1i
- %176:bool = gt %175, %x_215
- if %176 [t: $B16] { # if_5
- $B16: { # true
- %177:i32 = load %x_102
- %x_219:i32 = let %177
- %179:i32 = add %x_219, 1i
- %x_220:i32 = let %179
- store %x_102, %x_220
- %181:i32 = load %x_100
- %x_221:i32 = let %181
- %183:ptr<function, i32, read_write> = access %x_103, %x_220
- store %183, %x_221
- %184:i32 = load %x_102
- %x_223:i32 = let %184
- %186:i32 = add %x_223, 1i
- %x_224:i32 = let %186
- store %x_102, %x_224
- %188:i32 = load %x_104
- %x_225:i32 = let %188
- %190:ptr<function, i32, read_write> = access %x_103, %x_224
- %191:i32 = sub %x_225, 1i
- store %190, %191
- exit_if # if_5
- }
- }
- %192:i32 = load %x_104
- %x_228:i32 = let %192
- %194:i32 = load %x_101
- %x_230:i32 = let %194
- %196:i32 = add %x_228, 1i
- %197:bool = lt %196, %x_230
- if %197 [t: $B17] { # if_6
- $B17: { # true
- %198:i32 = load %x_102
- %x_234:i32 = let %198
- %200:i32 = add %x_234, 1i
- %x_235:i32 = let %200
- store %x_102, %x_235
- %202:i32 = load %x_104
- %x_236:i32 = let %202
- %204:ptr<function, i32, read_write> = access %x_103, %x_235
- %205:i32 = add %x_236, 1i
- store %204, %205
- %206:i32 = load %x_102
- %x_239:i32 = let %206
- %208:i32 = add %x_239, 1i
- %x_240:i32 = let %208
- store %x_102, %x_240
- %210:i32 = load %x_101
- %x_241:i32 = let %210
- %212:ptr<function, i32, read_write> = access %x_103, %x_240
- store %212, %x_241
- exit_if # if_6
- }
- }
- continue # -> $B8
- }
- $B8: { # continuing
- next_iteration # -> $B7
- }
- }
- %213:vec4<f32> = load %x_GLF_FragCoord
- %x_243:vec4<f32> = let %213
- %215:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %216:vec2<f32> = load %215
- %x_246:vec2<f32> = let %216
- %218:f32 = access %x_243, 0u
- %219:f32 = access %x_243, 1u
- %220:vec2<f32> = construct %218, %219
- %221:vec2<f32> = div %220, %x_246
- store %uv, %221
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %222:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %223:i32 = load %222
- %x_249:i32 = let %223
- %225:f32 = load_vector_element %color, 0u
- %x_252:f32 = let %225
- %227:f32 = convert %x_249
- %228:f32 = add %x_252, %227
- store_vector_element %color, 0u, %228
- %229:f32 = load_vector_element %uv, 0u
- %x_256:f32 = let %229
- %231:bool = gt %x_256, 0.25f
- if %231 [t: $B18] { # if_7
- $B18: { # true
- %232:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %233:i32 = load %232
- %x_261:i32 = let %233
- %235:f32 = load_vector_element %color, 0u
- %x_264:f32 = let %235
- %237:f32 = convert %x_261
- %238:f32 = add %x_264, %237
- store_vector_element %color, 0u, %238
- exit_if # if_7
- }
- }
- %239:f32 = load_vector_element %uv, 0u
- %x_268:f32 = let %239
- %241:bool = gt %x_268, 0.5f
- if %241 [t: $B19] { # if_8
- $B19: { # true
- %242:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %243:i32 = load %242
- %x_273:i32 = let %243
- %245:f32 = load_vector_element %color, 1u
- %x_276:f32 = let %245
- %247:f32 = convert %x_273
- %248:f32 = add %x_276, %247
- store_vector_element %color, 1u, %248
- exit_if # if_8
- }
- }
- %249:f32 = load_vector_element %uv, 0u
- %x_280:f32 = let %249
- %251:bool = gt %x_280, 0.75f
- if %251 [t: $B20] { # if_9
- $B20: { # true
- %252:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %253:i32 = load %252
- %x_285:i32 = let %253
- %255:f32 = load_vector_element %color, 2u
- %x_288:f32 = let %255
- %257:f32 = convert %x_285
- %258:f32 = add %x_288, %257
- store_vector_element %color, 2u, %258
- exit_if # if_9
- }
- }
- %259:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %260:i32 = load %259
- %x_292:i32 = let %260
- %262:f32 = load_vector_element %color, 1u
- %x_295:f32 = let %262
- %264:f32 = convert %x_292
- %265:f32 = add %x_295, %264
- store_vector_element %color, 1u, %265
- %266:f32 = load_vector_element %uv, 1u
- %x_299:f32 = let %266
- %268:bool = gt %x_299, 0.25f
- if %268 [t: $B21] { # if_10
- $B21: { # true
- %269:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %270:i32 = load %269
- %x_304:i32 = let %270
- %272:f32 = load_vector_element %color, 0u
- %x_307:f32 = let %272
- %274:f32 = convert %x_304
- %275:f32 = add %x_307, %274
- store_vector_element %color, 0u, %275
- exit_if # if_10
- }
- }
- %276:f32 = load_vector_element %uv, 1u
- %x_311:f32 = let %276
- %278:bool = gt %x_311, 0.5f
- if %278 [t: $B22] { # if_11
- $B22: { # true
- %279:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %280:i32 = load %279
- %x_316:i32 = let %280
- %282:f32 = load_vector_element %color, 1u
- %x_319:f32 = let %282
- %284:f32 = convert %x_316
- %285:f32 = add %x_319, %284
- store_vector_element %color, 1u, %285
- exit_if # if_11
- }
- }
- %286:f32 = load_vector_element %uv, 1u
- %x_323:f32 = let %286
- %288:bool = gt %x_323, 0.75f
- if %288 [t: $B23] { # if_12
- $B23: { # true
- %289:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %290:i32 = load %289
- %x_328:i32 = let %290
- %292:f32 = load_vector_element %color, 2u
- %x_331:f32 = let %292
- %294:f32 = convert %x_328
- %295:f32 = add %x_331, %294
- store_vector_element %color, 2u, %295
- exit_if # if_12
- }
- }
- %296:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %297:i32 = load %296
- %x_335:i32 = let %297
- %299:f32 = load_vector_element %color, 2u
- %x_338:f32 = let %299
- %301:f32 = convert %x_335
- %302:f32 = add %x_338, %301
- store_vector_element %color, 2u, %302
- %303:f32 = load_vector_element %uv, 0u
- %x_342:f32 = let %303
- %305:f32 = load_vector_element %uv, 1u
- %x_344:f32 = let %305
- %307:f32 = sub %x_342, %x_344
- %308:f32 = abs %307
- %309:bool = lt %308, 0.25f
- if %309 [t: $B24] { # if_13
- $B24: { # true
- %310:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %311:i32 = load %310
- %x_351:i32 = let %311
- %313:f32 = load_vector_element %color, 0u
- %x_354:f32 = let %313
- %315:f32 = convert %x_351
- %316:f32 = add %x_354, %315
- store_vector_element %color, 0u, %316
- exit_if # if_13
- }
- }
- %317:vec3<f32> = load %color
- %x_357:vec3<f32> = let %317
- %319:vec3<f32> = normalize %x_357
- %x_358:vec3<f32> = let %319
- %321:f32 = access %x_358, 0u
- %322:f32 = access %x_358, 1u
- %323:f32 = access %x_358, 2u
- %324:vec4<f32> = construct %321, %322, %323, 1.0f
- store %frag_color, %324
- %325:vec4<f32> = load %x_GLF_pos
- %x_363:vec4<f32> = let %325
- store %gl_Position, %x_363
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B25: {
- store %x_GLF_pos, %x_GLF_pos_param
- %329:void = call %main_1
- %330:vec4<f32> = load %frag_color
- %331:vec4<f32> = load %gl_Position
- %332:main_out = construct %330, %331
- ret %332
- }
-}
-%swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>):void {
- $B26: {
- %temp:ptr<function, i32, read_write> = var
- %337:i32 = load %i
- %x_366:i32 = let %337
- %339:ptr<private, i32, read_write> = access %obj, 0u, %x_366
- %340:i32 = load %339
- %x_368:i32 = let %340
- store %temp, %x_368
- %342:i32 = load %i
- %x_369:i32 = let %342
- %344:i32 = load %j
- %x_370:i32 = let %344
- %346:ptr<private, i32, read_write> = access %obj, 0u, %x_370
- %347:i32 = load %346
- %x_372:i32 = let %347
- %349:ptr<private, i32, read_write> = access %obj, 0u, %x_369
- store %349, %x_372
- %350:i32 = load %j
- %x_374:i32 = let %350
- %352:i32 = load %temp
- %x_375:i32 = let %352
- %354:ptr<private, i32, read_write> = access %obj, 0u, %x_374
- store %354, %x_375
- ret
- }
-}
-%performPartition_i1_i1_ = func(%l:ptr<function, i32, read_write>, %h:ptr<function, i32, read_write>):i32 {
- $B27: {
- %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
- %365:i32 = load %h
- %x_378:i32 = let %365
- %367:ptr<private, i32, read_write> = access %obj, 0u, %x_378
- %368:i32 = load %367
- %x_380:i32 = let %368
- store %pivot, %x_380
- %370:i32 = load %l
- %x_381:i32 = let %370
- %372:i32 = sub %x_381, 1i
- store %i_1, %372
- %373:i32 = load %l
- %x_383:i32 = let %373
- store %j_1, %x_383
- loop [b: $B28, c: $B29] { # loop_4
- $B28: { # body
- %375:i32 = load %j_1
- %x_388:i32 = let %375
- %377:i32 = load %h
- %x_389:i32 = let %377
- %379:i32 = sub %x_389, 1i
- %380:bool = lte %x_388, %379
- if %380 [t: $B30, f: $B31] { # if_14
- $B30: { # true
- exit_if # if_14
- }
- $B31: { # false
- exit_loop # loop_4
- }
- }
- %381:i32 = load %j_1
- %x_393:i32 = let %381
- %383:ptr<private, i32, read_write> = access %obj, 0u, %x_393
- %384:i32 = load %383
- %x_395:i32 = let %384
- %386:i32 = load %pivot
- %x_396:i32 = let %386
- %388:bool = lte %x_395, %x_396
- if %388 [t: $B32] { # if_15
- $B32: { # true
- %389:i32 = load %i_1
- %x_400:i32 = let %389
- %391:i32 = add %x_400, 1i
- store %i_1, %391
- %392:i32 = load %i_1
- %x_402:i32 = let %392
- store %param, %x_402
- %394:i32 = load %j_1
- %x_403:i32 = let %394
- store %param_1, %x_403
- %396:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_15
- }
- }
- continue # -> $B29
- }
- $B29: { # continuing
- %397:i32 = load %j_1
- %x_405:i32 = let %397
- %399:i32 = add %x_405, 1i
- store %j_1, %399
- next_iteration # -> $B28
- }
- }
- %400:i32 = load %i_1
- %x_407:i32 = let %400
- %402:i32 = add %x_407, 1i
- store %param_2, %402
- %403:i32 = load %h
- %x_409:i32 = let %403
- store %param_3, %x_409
- %405:void = call %swap_i1_i1_, %param_2, %param_3
- %406:i32 = load %i_1
- %x_411:i32 = let %406
- %408:i32 = add %x_411, 1i
- ret %408
- }
-}
-%quicksort_ = func():void {
- $B33: {
- %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
- %417:i32 = load %top
- %x_414:i32 = let %417
- %419:i32 = add %x_414, 1i
- %x_415:i32 = let %419
- store %top, %x_415
- %421:i32 = load %l_1
- %x_416:i32 = let %421
- %423:ptr<function, i32, read_write> = access %stack, %x_415
- store %423, %x_416
- %424:i32 = load %top
- %x_418:i32 = let %424
- %426:i32 = add %x_418, 1i
- %x_419:i32 = let %426
- store %top, %x_419
- %428:i32 = load %h_1
- %x_420:i32 = let %428
- %430:ptr<function, i32, read_write> = access %stack, %x_419
- store %430, %x_420
- loop [b: $B34, c: $B35] { # loop_5
- $B34: { # body
- %431:i32 = load %top
- %x_426:i32 = let %431
- %433:bool = gte %x_426, 0i
- if %433 [t: $B36, f: $B37] { # if_16
- $B36: { # true
- exit_if # if_16
- }
- $B37: { # false
- exit_loop # loop_5
- }
- }
- %434:i32 = load %top
- %x_429:i32 = let %434
- %436:i32 = sub %x_429, 1i
- store %top, %436
- %437:ptr<function, i32, read_write> = access %stack, %x_429
- %438:i32 = load %437
- %x_432:i32 = let %438
- store %h_1, %x_432
- %440:i32 = load %top
- %x_433:i32 = let %440
- %442:i32 = sub %x_433, 1i
- store %top, %442
- %443:ptr<function, i32, read_write> = access %stack, %x_433
- %444:i32 = load %443
- %x_436:i32 = let %444
- store %l_1, %x_436
- %446:i32 = load %l_1
- %x_437:i32 = let %446
- store %param_4, %x_437
- %448:i32 = load %h_1
- %x_438:i32 = let %448
- store %param_5, %x_438
- %450:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_439:i32 = let %450
- store %p, %x_439
- %452:i32 = load %p
- %x_440:i32 = let %452
- %454:i32 = load %l_1
- %x_442:i32 = let %454
- %456:i32 = sub %x_440, 1i
- %457:bool = gt %456, %x_442
- if %457 [t: $B38] { # if_17
- $B38: { # true
- %458:i32 = load %top
- %x_446:i32 = let %458
- %460:i32 = add %x_446, 1i
- %x_447:i32 = let %460
- store %top, %x_447
- %462:i32 = load %l_1
- %x_448:i32 = let %462
- %464:ptr<function, i32, read_write> = access %stack, %x_447
- store %464, %x_448
- %465:i32 = load %top
- %x_450:i32 = let %465
- %467:i32 = add %x_450, 1i
- %x_451:i32 = let %467
- store %top, %x_451
- %469:i32 = load %p
- %x_452:i32 = let %469
- %471:ptr<function, i32, read_write> = access %stack, %x_451
- %472:i32 = sub %x_452, 1i
- store %471, %472
- exit_if # if_17
- }
- }
- %473:i32 = load %p
- %x_455:i32 = let %473
- %475:i32 = load %h_1
- %x_457:i32 = let %475
- %477:i32 = add %x_455, 1i
- %478:bool = lt %477, %x_457
- if %478 [t: $B39] { # if_18
- $B39: { # true
- %479:i32 = load %top
- %x_461:i32 = let %479
- %481:i32 = add %x_461, 1i
- %x_462:i32 = let %481
- store %top, %x_462
- %483:i32 = load %p
- %x_463:i32 = let %483
- %485:ptr<function, i32, read_write> = access %stack, %x_462
- %486:i32 = add %x_463, 1i
- store %485, %486
- %487:i32 = load %top
- %x_466:i32 = let %487
- %489:i32 = add %x_466, 1i
- %x_467:i32 = let %489
- store %top, %x_467
- %491:i32 = load %h_1
- %x_468:i32 = let %491
- %493:ptr<function, i32, read_write> = access %stack, %x_467
- store %493, %x_468
- exit_if # if_18
- }
- }
- continue # -> $B35
- }
- $B35: { # continuing
- next_iteration # -> $B34
- }
- }
- ret
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.ir.msl
deleted file mode 100644
index df43f6a..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,596 +0,0 @@
-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) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%performPartition_i1_i1_ = func(%l:ptr<function, i32, read_write>, %h:ptr<function, i32, read_write>):i32 {
- $B2: {
- %x_314:ptr<function, i32, read_write> = var
- %x_315:ptr<function, i32, read_write> = var
- %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
- %19:i32 = load %h
- %20:ptr<private, i32, read_write> = access %obj, 0u, %19
- %21:i32 = load %20
- store %pivot, %21
- %22:i32 = load %l
- %23:i32 = sub %22, 1i
- store %i_1, %23
- %24:i32 = load %l
- store %j_1, %24
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %25:i32 = load %j_1
- %26:i32 = load %h
- %27:i32 = sub %26, 1i
- %28:bool = lte %25, %27
- if %28 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %29:i32 = load %j_1
- %30:ptr<private, i32, read_write> = access %obj, 0u, %29
- %31:i32 = load %30
- %32:i32 = load %pivot
- %33:bool = lte %31, %32
- if %33 [t: $B7] { # if_2
- $B7: { # true
- %34:i32 = load %i_1
- %35:i32 = add %34, 1i
- store %i_1, %35
- %36:i32 = load %i_1
- store %param, %36
- %37:i32 = load %j_1
- store %param_1, %37
- %38:i32 = load %param
- %39:ptr<private, i32, read_write> = access %obj, 0u, %38
- %40:i32 = load %39
- store %x_315, %40
- %41:i32 = load %param
- %x_345:i32 = let %41
- %43:ptr<private, i32, read_write> = access %obj, 0u, %x_345
- %44:i32 = load %param_1
- %45:ptr<private, i32, read_write> = access %obj, 0u, %44
- %46:i32 = load %45
- store %43, %46
- %47:i32 = load %param_1
- %x_350:i32 = let %47
- %49:ptr<private, i32, read_write> = access %obj, 0u, %x_350
- %50:i32 = load %x_315
- store %49, %50
- exit_if # if_2
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %51:i32 = load %j_1
- %52:i32 = add %51, 1i
- store %j_1, %52
- next_iteration # -> $B3
- }
- }
- %53:i32 = load %i_1
- %54:i32 = add %53, 1i
- store %param_2, %54
- %55:i32 = load %h
- store %param_3, %55
- %56:i32 = load %param_2
- %57:ptr<private, i32, read_write> = access %obj, 0u, %56
- %58:i32 = load %57
- store %x_314, %58
- %59:i32 = load %param_2
- %x_361:i32 = let %59
- %61:ptr<private, i32, read_write> = access %obj, 0u, %x_361
- %62:i32 = load %param_3
- %63:ptr<private, i32, read_write> = access %obj, 0u, %62
- %64:i32 = load %63
- store %61, %64
- %65:i32 = load %param_3
- %x_366:i32 = let %65
- %67:ptr<private, i32, read_write> = access %obj, 0u, %x_366
- %68:i32 = load %x_314
- store %67, %68
- if false [t: $B8, f: $B9] { # if_3
- $B8: { # true
- exit_if # if_3
- }
- $B9: { # false
- %69:i32 = load %i_1
- %x_372:i32 = let %69
- %71:i32 = add %x_372, 1i
- ret %71
- }
- }
- ret 0i
- }
-}
-%main_1 = func():void {
- $B10: {
- %x_91:ptr<function, i32, read_write> = var
- %x_92:ptr<function, i32, read_write> = var
- %x_93:ptr<function, i32, read_write> = var
- %x_94:ptr<function, array<i32, 10>, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- %x_97:ptr<function, i32, read_write> = var
- %i_2:ptr<function, i32, read_write> = var
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %83:vec4<f32> = load %x_GLF_pos
- %84:vec4<f32> = add %83, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %85:vec4<f32> = mul %84, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %85
- store %i_2, 0i
- loop [b: $B11, c: $B12] { # loop_2
- $B11: { # body
- %86:i32 = load %i_2
- %87:bool = lt %86, 10i
- if %87 [t: $B13, f: $B14] { # if_4
- $B13: { # true
- exit_if # if_4
- }
- $B14: { # false
- exit_loop # loop_2
- }
- }
- %88:i32 = load %i_2
- %x_108:i32 = let %88
- %90:ptr<private, i32, read_write> = access %obj, 0u, %x_108
- %91:i32 = load %i_2
- %92:i32 = sub 10i, %91
- store %90, %92
- %93:i32 = load %i_2
- %x_112:i32 = let %93
- %95:ptr<private, i32, read_write> = access %obj, 0u, %x_112
- %96:i32 = load %i_2
- %97:ptr<private, i32, read_write> = access %obj, 0u, %96
- %98:i32 = load %97
- %99:i32 = load %i_2
- %100:ptr<private, i32, read_write> = access %obj, 0u, %99
- %101:i32 = load %100
- %102:i32 = mul %98, %101
- store %95, %102
- continue # -> $B12
- }
- $B12: { # continuing
- %103:i32 = load %i_2
- %104:i32 = add %103, 1i
- store %i_2, %104
- next_iteration # -> $B11
- }
- }
- store %x_91, 0i
- store %x_92, 9i
- store %x_93, -1i
- %105:i32 = load %x_93
- %106:i32 = add %105, 1i
- %x_124:i32 = let %106
- store %x_93, %x_124
- %108:ptr<function, i32, read_write> = access %x_94, %x_124
- %109:i32 = load %x_91
- store %108, %109
- %110:i32 = load %x_93
- %111:i32 = add %110, 1i
- %x_128:i32 = let %111
- store %x_93, %x_128
- %113:ptr<function, i32, read_write> = access %x_94, %x_128
- %114:i32 = load %x_92
- store %113, %114
- loop [b: $B15, c: $B16] { # loop_3
- $B15: { # body
- %115:i32 = load %x_93
- %116:bool = gte %115, 0i
- if %116 [t: $B17, f: $B18] { # if_5
- $B17: { # true
- exit_if # if_5
- }
- $B18: { # false
- exit_loop # loop_3
- }
- }
- %117:i32 = load %x_93
- %x_138:i32 = let %117
- %119:i32 = load %x_93
- %120:i32 = sub %119, 1i
- store %x_93, %120
- %121:ptr<function, i32, read_write> = access %x_94, %x_138
- %122:i32 = load %121
- store %x_92, %122
- %123:i32 = load %x_93
- %x_142:i32 = let %123
- %125:i32 = load %x_93
- %126:i32 = sub %125, 1i
- store %x_93, %126
- %127:ptr<function, i32, read_write> = access %x_94, %x_142
- %128:i32 = load %127
- store %x_91, %128
- %129:i32 = load %x_91
- store %x_96, %129
- %130:i32 = load %x_92
- store %x_97, %130
- %131:i32 = call %performPartition_i1_i1_, %x_96, %x_97
- %x_148:i32 = let %131
- store %x_95, %x_148
- %133:i32 = load %x_95
- %134:i32 = sub %133, 1i
- %135:i32 = load %x_91
- %136:bool = gt %134, %135
- if %136 [t: $B19] { # if_6
- $B19: { # true
- %137:i32 = load %x_93
- %138:i32 = add %137, 1i
- %x_156:i32 = let %138
- store %x_93, %x_156
- %140:ptr<function, i32, read_write> = access %x_94, %x_156
- %141:i32 = load %x_91
- store %140, %141
- %142:i32 = load %x_93
- %143:i32 = add %142, 1i
- %x_160:i32 = let %143
- store %x_93, %x_160
- %145:ptr<function, i32, read_write> = access %x_94, %x_160
- %146:i32 = load %x_95
- %147:i32 = sub %146, 1i
- store %145, %147
- exit_if # if_6
- }
- }
- %148:i32 = load %x_95
- %149:i32 = add %148, 1i
- %150:i32 = load %x_92
- %151:bool = lt %149, %150
- if %151 [t: $B20] { # if_7
- $B20: { # true
- %152:i32 = load %x_93
- %153:i32 = add %152, 1i
- %x_171:i32 = let %153
- store %x_93, %x_171
- %155:ptr<function, i32, read_write> = access %x_94, %x_171
- %156:i32 = load %x_95
- %157:i32 = add %156, 1i
- store %155, %157
- %158:i32 = load %x_93
- %159:i32 = add %158, 1i
- %x_176:i32 = let %159
- store %x_93, %x_176
- %161:ptr<function, i32, read_write> = access %x_94, %x_176
- %162:i32 = load %x_92
- store %161, %162
- exit_if # if_7
- }
- }
- continue # -> $B16
- }
- $B16: { # continuing
- next_iteration # -> $B15
- }
- }
- %163:vec4<f32> = load %x_GLF_FragCoord
- %164:vec2<f32> = swizzle %163, xy
- %165:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %166:vec2<f32> = load %165
- %167:vec2<f32> = div %164, %166
- store %uv, %167
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %168:f32 = load_vector_element %color, 0u
- %169:f32 = let %168
- %170:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %171:i32 = load %170
- %172:f32 = convert %171
- %173:f32 = add %169, %172
- store_vector_element %color, 0u, %173
- %174:f32 = load_vector_element %uv, 0u
- %175:bool = gt %174, 0.25f
- if %175 [t: $B21] { # if_8
- $B21: { # true
- %176:f32 = load_vector_element %color, 0u
- %177:f32 = let %176
- %178:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %179:i32 = load %178
- %180:f32 = convert %179
- %181:f32 = add %177, %180
- store_vector_element %color, 0u, %181
- exit_if # if_8
- }
- }
- %182:f32 = load_vector_element %uv, 0u
- %183:bool = gt %182, 0.5f
- if %183 [t: $B22] { # if_9
- $B22: { # true
- %184:f32 = load_vector_element %color, 1u
- %185:f32 = let %184
- %186:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %187:i32 = load %186
- %188:f32 = convert %187
- %189:f32 = add %185, %188
- store_vector_element %color, 1u, %189
- exit_if # if_9
- }
- }
- %190:f32 = load_vector_element %uv, 0u
- %191:bool = gt %190, 0.75f
- if %191 [t: $B23] { # if_10
- $B23: { # true
- %192:f32 = load_vector_element %color, 2u
- %193:f32 = let %192
- %194:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %195:i32 = load %194
- %196:f32 = convert %195
- %197:f32 = add %193, %196
- store_vector_element %color, 2u, %197
- exit_if # if_10
- }
- }
- %198:f32 = load_vector_element %color, 1u
- %199:f32 = let %198
- %200:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %201:i32 = load %200
- %202:f32 = convert %201
- %203:f32 = add %199, %202
- store_vector_element %color, 1u, %203
- %204:f32 = load_vector_element %uv, 1u
- %205:bool = gt %204, 0.25f
- if %205 [t: $B24] { # if_11
- $B24: { # true
- %206:f32 = load_vector_element %color, 0u
- %207:f32 = let %206
- %208:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %209:i32 = load %208
- %210:f32 = convert %209
- %211:f32 = add %207, %210
- store_vector_element %color, 0u, %211
- exit_if # if_11
- }
- }
- %212:f32 = load_vector_element %uv, 1u
- %213:bool = gt %212, 0.5f
- if %213 [t: $B25] { # if_12
- $B25: { # true
- %214:f32 = load_vector_element %color, 1u
- %215:f32 = let %214
- %216:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %217:i32 = load %216
- %218:f32 = convert %217
- %219:f32 = add %215, %218
- store_vector_element %color, 1u, %219
- exit_if # if_12
- }
- }
- %220:f32 = load_vector_element %uv, 1u
- %221:bool = gt %220, 0.75f
- if %221 [t: $B26] { # if_13
- $B26: { # true
- %222:f32 = load_vector_element %color, 2u
- %223:f32 = let %222
- %224:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %225:i32 = load %224
- %226:f32 = convert %225
- %227:f32 = add %223, %226
- store_vector_element %color, 2u, %227
- exit_if # if_13
- }
- }
- %228:f32 = load_vector_element %color, 2u
- %229:f32 = let %228
- %230:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %231:i32 = load %230
- %232:f32 = convert %231
- %233:f32 = add %229, %232
- store_vector_element %color, 2u, %233
- %234:f32 = load_vector_element %uv, 0u
- %235:f32 = load_vector_element %uv, 1u
- %236:f32 = sub %234, %235
- %237:f32 = abs %236
- %238:bool = lt %237, 0.25f
- if %238 [t: $B27] { # if_14
- $B27: { # true
- %239:f32 = load_vector_element %color, 0u
- %240:f32 = let %239
- %241:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %242:i32 = load %241
- %243:f32 = convert %242
- %244:f32 = add %240, %243
- store_vector_element %color, 0u, %244
- exit_if # if_14
- }
- }
- %245:vec3<f32> = load %color
- %246:vec3<f32> = normalize %245
- %x_294:vec3<f32> = let %246
- %248:f32 = access %x_294, 0u
- %249:f32 = access %x_294, 1u
- %250:f32 = access %x_294, 2u
- %251:vec4<f32> = construct %248, %249, %250, 1.0f
- store %frag_color, %251
- %252:vec4<f32> = load %x_GLF_pos
- store %gl_Position, %252
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B28: {
- store %x_GLF_pos, %x_GLF_pos_param
- %255:void = call %main_1
- %256:vec4<f32> = load %frag_color
- %257:vec4<f32> = load %gl_Position
- %258:main_out = construct %256, %257
- ret %258
- }
-}
-%swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>):void {
- $B29: {
- %temp:ptr<function, i32, read_write> = var
- %263:i32 = load %i
- %264:ptr<private, i32, read_write> = access %obj, 0u, %263
- %265:i32 = load %264
- store %temp, %265
- %266:i32 = load %i
- %x_305:i32 = let %266
- %268:ptr<private, i32, read_write> = access %obj, 0u, %x_305
- %269:i32 = load %j
- %270:ptr<private, i32, read_write> = access %obj, 0u, %269
- %271:i32 = load %270
- store %268, %271
- %272:i32 = load %j
- %x_310:i32 = let %272
- %274:ptr<private, i32, read_write> = access %obj, 0u, %x_310
- %275:i32 = load %temp
- store %274, %275
- ret
- }
-}
-%quicksort_ = func():void {
- $B30: {
- %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
- %284:i32 = load %top
- %285:i32 = add %284, 1i
- %x_377:i32 = let %285
- store %top, %x_377
- %287:ptr<function, i32, read_write> = access %stack, %x_377
- %288:i32 = load %l_1
- store %287, %288
- %289:i32 = load %top
- %290:i32 = add %289, 1i
- %x_381:i32 = let %290
- store %top, %x_381
- %292:ptr<function, i32, read_write> = access %stack, %x_381
- %293:i32 = load %h_1
- store %292, %293
- loop [b: $B31, c: $B32] { # loop_4
- $B31: { # body
- %294:i32 = load %top
- %295:bool = gte %294, 0i
- if %295 [t: $B33, f: $B34] { # if_15
- $B33: { # true
- exit_if # if_15
- }
- $B34: { # false
- exit_loop # loop_4
- }
- }
- %296:i32 = load %top
- %x_391:i32 = let %296
- %298:i32 = load %top
- %299:i32 = sub %298, 1i
- store %top, %299
- %300:ptr<function, i32, read_write> = access %stack, %x_391
- %301:i32 = load %300
- store %h_1, %301
- %302:i32 = load %top
- %x_395:i32 = let %302
- %304:i32 = load %top
- %305:i32 = sub %304, 1i
- store %top, %305
- %306:ptr<function, i32, read_write> = access %stack, %x_395
- %307:i32 = load %306
- store %l_1, %307
- %308:i32 = load %l_1
- store %param_4, %308
- %309:i32 = load %h_1
- store %param_5, %309
- %310:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_401:i32 = let %310
- store %p, %x_401
- %312:i32 = load %p
- %313:i32 = sub %312, 1i
- %314:i32 = load %l_1
- %315:bool = gt %313, %314
- if %315 [t: $B35] { # if_16
- $B35: { # true
- %316:i32 = load %top
- %317:i32 = add %316, 1i
- %x_409:i32 = let %317
- store %top, %x_409
- %319:ptr<function, i32, read_write> = access %stack, %x_409
- %320:i32 = load %l_1
- store %319, %320
- %321:i32 = load %top
- %322:i32 = add %321, 1i
- %x_413:i32 = let %322
- store %top, %x_413
- %324:ptr<function, i32, read_write> = access %stack, %x_413
- %325:i32 = load %p
- %326:i32 = sub %325, 1i
- store %324, %326
- exit_if # if_16
- }
- }
- %327:i32 = load %p
- %328:i32 = add %327, 1i
- %329:i32 = load %h_1
- %330:bool = lt %328, %329
- if %330 [t: $B36] { # if_17
- $B36: { # true
- %331:i32 = load %top
- %332:i32 = add %331, 1i
- %x_424:i32 = let %332
- store %top, %x_424
- %334:ptr<function, i32, read_write> = access %stack, %x_424
- %335:i32 = load %p
- %336:i32 = add %335, 1i
- store %334, %336
- %337:i32 = load %top
- %338:i32 = add %337, 1i
- %x_429:i32 = let %338
- store %top, %x_429
- %340:ptr<function, i32, read_write> = access %stack, %x_429
- %341:i32 = load %h_1
- store %340, %341
- exit_if # if_17
- }
- }
- continue # -> $B32
- }
- $B32: { # continuing
- next_iteration # -> $B31
- }
- }
- ret
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.ir.msl
deleted file mode 100644
index 44ad617..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,696 +0,0 @@
-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) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%performPartition_i1_i1_ = func(%l:ptr<function, i32, read_write>, %h:ptr<function, i32, read_write>):i32 {
- $B2: {
- %x_314:ptr<function, i32, read_write> = var
- %x_315:ptr<function, i32, read_write> = var
- %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
- %19:i32 = load %h
- %x_316:i32 = let %19
- %21:ptr<private, i32, read_write> = access %obj, 0u, %x_316
- %22:i32 = load %21
- %x_318:i32 = let %22
- store %pivot, %x_318
- %24:i32 = load %l
- %x_319:i32 = let %24
- %26:i32 = sub %x_319, 1i
- store %i_1, %26
- %27:i32 = load %l
- %x_321:i32 = let %27
- store %j_1, %x_321
- loop [b: $B3, c: $B4] { # loop_1
- $B3: { # body
- %29:i32 = load %j_1
- %x_326:i32 = let %29
- %31:i32 = load %h
- %x_327:i32 = let %31
- %33:i32 = sub %x_327, 1i
- %34:bool = lte %x_326, %33
- if %34 [t: $B5, f: $B6] { # if_1
- $B5: { # true
- exit_if # if_1
- }
- $B6: { # false
- exit_loop # loop_1
- }
- }
- %35:i32 = load %j_1
- %x_331:i32 = let %35
- %37:ptr<private, i32, read_write> = access %obj, 0u, %x_331
- %38:i32 = load %37
- %x_333:i32 = let %38
- %40:i32 = load %pivot
- %x_334:i32 = let %40
- %42:bool = lte %x_333, %x_334
- if %42 [t: $B7] { # if_2
- $B7: { # true
- %43:i32 = load %i_1
- %x_338:i32 = let %43
- %45:i32 = add %x_338, 1i
- store %i_1, %45
- %46:i32 = load %i_1
- %x_340:i32 = let %46
- store %param, %x_340
- %48:i32 = load %j_1
- %x_341:i32 = let %48
- store %param_1, %x_341
- %50:i32 = load %param
- %x_342:i32 = let %50
- %52:ptr<private, i32, read_write> = access %obj, 0u, %x_342
- %53:i32 = load %52
- %x_344:i32 = let %53
- store %x_315, %x_344
- %55:i32 = load %param
- %x_345:i32 = let %55
- %57:i32 = load %param_1
- %x_346:i32 = let %57
- %59:ptr<private, i32, read_write> = access %obj, 0u, %x_346
- %60:i32 = load %59
- %x_348:i32 = let %60
- %62:ptr<private, i32, read_write> = access %obj, 0u, %x_345
- store %62, %x_348
- %63:i32 = load %param_1
- %x_350:i32 = let %63
- %65:i32 = load %x_315
- %x_351:i32 = let %65
- %67:ptr<private, i32, read_write> = access %obj, 0u, %x_350
- store %67, %x_351
- exit_if # if_2
- }
- }
- continue # -> $B4
- }
- $B4: { # continuing
- %68:i32 = load %j_1
- %x_353:i32 = let %68
- %70:i32 = add %x_353, 1i
- store %j_1, %70
- next_iteration # -> $B3
- }
- }
- %71:i32 = load %i_1
- %x_355:i32 = let %71
- %73:i32 = add %x_355, 1i
- store %param_2, %73
- %74:i32 = load %h
- %x_357:i32 = let %74
- store %param_3, %x_357
- %76:i32 = load %param_2
- %x_358:i32 = let %76
- %78:ptr<private, i32, read_write> = access %obj, 0u, %x_358
- %79:i32 = load %78
- %x_360:i32 = let %79
- store %x_314, %x_360
- %81:i32 = load %param_2
- %x_361:i32 = let %81
- %83:i32 = load %param_3
- %x_362:i32 = let %83
- %85:ptr<private, i32, read_write> = access %obj, 0u, %x_362
- %86:i32 = load %85
- %x_364:i32 = let %86
- %88:ptr<private, i32, read_write> = access %obj, 0u, %x_361
- store %88, %x_364
- %89:i32 = load %param_3
- %x_366:i32 = let %89
- %91:i32 = load %x_314
- %x_367:i32 = let %91
- %93:ptr<private, i32, read_write> = access %obj, 0u, %x_366
- store %93, %x_367
- if false [t: $B8, f: $B9] { # if_3
- $B8: { # true
- exit_if # if_3
- }
- $B9: { # false
- %94:i32 = load %i_1
- %x_372:i32 = let %94
- %96:i32 = add %x_372, 1i
- ret %96
- }
- }
- ret 0i
- }
-}
-%main_1 = func():void {
- $B10: {
- %x_91:ptr<function, i32, read_write> = var
- %x_92:ptr<function, i32, read_write> = var
- %x_93:ptr<function, i32, read_write> = var
- %x_94:ptr<function, array<i32, 10>, read_write> = var
- %x_95:ptr<function, i32, read_write> = var
- %x_96:ptr<function, i32, read_write> = var
- %x_97:ptr<function, i32, read_write> = var
- %i_2:ptr<function, i32, read_write> = var
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %108:vec4<f32> = load %x_GLF_pos
- %x_98:vec4<f32> = let %108
- %110:vec4<f32> = add %x_98, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %111:vec4<f32> = mul %110, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %111
- store %i_2, 0i
- loop [b: $B11, c: $B12] { # loop_2
- $B11: { # body
- %112:i32 = load %i_2
- %x_105:i32 = let %112
- %114:bool = lt %x_105, 10i
- if %114 [t: $B13, f: $B14] { # if_4
- $B13: { # true
- exit_if # if_4
- }
- $B14: { # false
- exit_loop # loop_2
- }
- }
- %115:i32 = load %i_2
- %x_108:i32 = let %115
- %117:i32 = load %i_2
- %x_109:i32 = let %117
- %119:ptr<private, i32, read_write> = access %obj, 0u, %x_108
- %120:i32 = sub 10i, %x_109
- store %119, %120
- %121:i32 = load %i_2
- %x_112:i32 = let %121
- %123:i32 = load %i_2
- %x_113:i32 = let %123
- %125:ptr<private, i32, read_write> = access %obj, 0u, %x_113
- %126:i32 = load %125
- %x_115:i32 = let %126
- %128:i32 = load %i_2
- %x_116:i32 = let %128
- %130:ptr<private, i32, read_write> = access %obj, 0u, %x_116
- %131:i32 = load %130
- %x_118:i32 = let %131
- %133:ptr<private, i32, read_write> = access %obj, 0u, %x_112
- %134:i32 = mul %x_115, %x_118
- store %133, %134
- continue # -> $B12
- }
- $B12: { # continuing
- %135:i32 = load %i_2
- %x_121:i32 = let %135
- %137:i32 = add %x_121, 1i
- store %i_2, %137
- next_iteration # -> $B11
- }
- }
- store %x_91, 0i
- store %x_92, 9i
- store %x_93, -1i
- %138:i32 = load %x_93
- %x_123:i32 = let %138
- %140:i32 = add %x_123, 1i
- %x_124:i32 = let %140
- store %x_93, %x_124
- %142:i32 = load %x_91
- %x_125:i32 = let %142
- %144:ptr<function, i32, read_write> = access %x_94, %x_124
- store %144, %x_125
- %145:i32 = load %x_93
- %x_127:i32 = let %145
- %147:i32 = add %x_127, 1i
- %x_128:i32 = let %147
- store %x_93, %x_128
- %149:i32 = load %x_92
- %x_129:i32 = let %149
- %151:ptr<function, i32, read_write> = access %x_94, %x_128
- store %151, %x_129
- loop [b: $B15, c: $B16] { # loop_3
- $B15: { # body
- %152:i32 = load %x_93
- %x_135:i32 = let %152
- %154:bool = gte %x_135, 0i
- if %154 [t: $B17, f: $B18] { # if_5
- $B17: { # true
- exit_if # if_5
- }
- $B18: { # false
- exit_loop # loop_3
- }
- }
- %155:i32 = load %x_93
- %x_138:i32 = let %155
- %157:i32 = sub %x_138, 1i
- store %x_93, %157
- %158:ptr<function, i32, read_write> = access %x_94, %x_138
- %159:i32 = load %158
- %x_141:i32 = let %159
- store %x_92, %x_141
- %161:i32 = load %x_93
- %x_142:i32 = let %161
- %163:i32 = sub %x_142, 1i
- store %x_93, %163
- %164:ptr<function, i32, read_write> = access %x_94, %x_142
- %165:i32 = load %164
- %x_145:i32 = let %165
- store %x_91, %x_145
- %167:i32 = load %x_91
- %x_146:i32 = let %167
- store %x_96, %x_146
- %169:i32 = load %x_92
- %x_147:i32 = let %169
- store %x_97, %x_147
- %171:i32 = call %performPartition_i1_i1_, %x_96, %x_97
- %x_148:i32 = let %171
- store %x_95, %x_148
- %173:i32 = load %x_95
- %x_149:i32 = let %173
- %175:i32 = load %x_91
- %x_151:i32 = let %175
- %177:i32 = sub %x_149, 1i
- %178:bool = gt %177, %x_151
- if %178 [t: $B19] { # if_6
- $B19: { # true
- %179:i32 = load %x_93
- %x_155:i32 = let %179
- %181:i32 = add %x_155, 1i
- %x_156:i32 = let %181
- store %x_93, %x_156
- %183:i32 = load %x_91
- %x_157:i32 = let %183
- %185:ptr<function, i32, read_write> = access %x_94, %x_156
- store %185, %x_157
- %186:i32 = load %x_93
- %x_159:i32 = let %186
- %188:i32 = add %x_159, 1i
- %x_160:i32 = let %188
- store %x_93, %x_160
- %190:i32 = load %x_95
- %x_161:i32 = let %190
- %192:ptr<function, i32, read_write> = access %x_94, %x_160
- %193:i32 = sub %x_161, 1i
- store %192, %193
- exit_if # if_6
- }
- }
- %194:i32 = load %x_95
- %x_164:i32 = let %194
- %196:i32 = load %x_92
- %x_166:i32 = let %196
- %198:i32 = add %x_164, 1i
- %199:bool = lt %198, %x_166
- if %199 [t: $B20] { # if_7
- $B20: { # true
- %200:i32 = load %x_93
- %x_170:i32 = let %200
- %202:i32 = add %x_170, 1i
- %x_171:i32 = let %202
- store %x_93, %x_171
- %204:i32 = load %x_95
- %x_172:i32 = let %204
- %206:ptr<function, i32, read_write> = access %x_94, %x_171
- %207:i32 = add %x_172, 1i
- store %206, %207
- %208:i32 = load %x_93
- %x_175:i32 = let %208
- %210:i32 = add %x_175, 1i
- %x_176:i32 = let %210
- store %x_93, %x_176
- %212:i32 = load %x_92
- %x_177:i32 = let %212
- %214:ptr<function, i32, read_write> = access %x_94, %x_176
- store %214, %x_177
- exit_if # if_7
- }
- }
- continue # -> $B16
- }
- $B16: { # continuing
- next_iteration # -> $B15
- }
- }
- %215:vec4<f32> = load %x_GLF_FragCoord
- %x_179:vec4<f32> = let %215
- %217:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %218:vec2<f32> = load %217
- %x_182:vec2<f32> = let %218
- %220:f32 = access %x_179, 0u
- %221:f32 = access %x_179, 1u
- %222:vec2<f32> = construct %220, %221
- %223:vec2<f32> = div %222, %x_182
- store %uv, %223
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %224:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %225:i32 = load %224
- %x_185:i32 = let %225
- %227:f32 = load_vector_element %color, 0u
- %x_188:f32 = let %227
- %229:f32 = convert %x_185
- %230:f32 = add %x_188, %229
- store_vector_element %color, 0u, %230
- %231:f32 = load_vector_element %uv, 0u
- %x_192:f32 = let %231
- %233:bool = gt %x_192, 0.25f
- if %233 [t: $B21] { # if_8
- $B21: { # true
- %234:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %235:i32 = load %234
- %x_197:i32 = let %235
- %237:f32 = load_vector_element %color, 0u
- %x_200:f32 = let %237
- %239:f32 = convert %x_197
- %240:f32 = add %x_200, %239
- store_vector_element %color, 0u, %240
- exit_if # if_8
- }
- }
- %241:f32 = load_vector_element %uv, 0u
- %x_204:f32 = let %241
- %243:bool = gt %x_204, 0.5f
- if %243 [t: $B22] { # if_9
- $B22: { # true
- %244:ptr<private, i32, read_write> = access %obj, 0u, 2i
- %245:i32 = load %244
- %x_209:i32 = let %245
- %247:f32 = load_vector_element %color, 1u
- %x_212:f32 = let %247
- %249:f32 = convert %x_209
- %250:f32 = add %x_212, %249
- store_vector_element %color, 1u, %250
- exit_if # if_9
- }
- }
- %251:f32 = load_vector_element %uv, 0u
- %x_216:f32 = let %251
- %253:bool = gt %x_216, 0.75f
- if %253 [t: $B23] { # if_10
- $B23: { # true
- %254:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %255:i32 = load %254
- %x_221:i32 = let %255
- %257:f32 = load_vector_element %color, 2u
- %x_224:f32 = let %257
- %259:f32 = convert %x_221
- %260:f32 = add %x_224, %259
- store_vector_element %color, 2u, %260
- exit_if # if_10
- }
- }
- %261:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %262:i32 = load %261
- %x_228:i32 = let %262
- %264:f32 = load_vector_element %color, 1u
- %x_231:f32 = let %264
- %266:f32 = convert %x_228
- %267:f32 = add %x_231, %266
- store_vector_element %color, 1u, %267
- %268:f32 = load_vector_element %uv, 1u
- %x_235:f32 = let %268
- %270:bool = gt %x_235, 0.25f
- if %270 [t: $B24] { # if_11
- $B24: { # true
- %271:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %272:i32 = load %271
- %x_240:i32 = let %272
- %274:f32 = load_vector_element %color, 0u
- %x_243:f32 = let %274
- %276:f32 = convert %x_240
- %277:f32 = add %x_243, %276
- store_vector_element %color, 0u, %277
- exit_if # if_11
- }
- }
- %278:f32 = load_vector_element %uv, 1u
- %x_247:f32 = let %278
- %280:bool = gt %x_247, 0.5f
- if %280 [t: $B25] { # if_12
- $B25: { # true
- %281:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %282:i32 = load %281
- %x_252:i32 = let %282
- %284:f32 = load_vector_element %color, 1u
- %x_255:f32 = let %284
- %286:f32 = convert %x_252
- %287:f32 = add %x_255, %286
- store_vector_element %color, 1u, %287
- exit_if # if_12
- }
- }
- %288:f32 = load_vector_element %uv, 1u
- %x_259:f32 = let %288
- %290:bool = gt %x_259, 0.75f
- if %290 [t: $B26] { # if_13
- $B26: { # true
- %291:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %292:i32 = load %291
- %x_264:i32 = let %292
- %294:f32 = load_vector_element %color, 2u
- %x_267:f32 = let %294
- %296:f32 = convert %x_264
- %297:f32 = add %x_267, %296
- store_vector_element %color, 2u, %297
- exit_if # if_13
- }
- }
- %298:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %299:i32 = load %298
- %x_271:i32 = let %299
- %301:f32 = load_vector_element %color, 2u
- %x_274:f32 = let %301
- %303:f32 = convert %x_271
- %304:f32 = add %x_274, %303
- store_vector_element %color, 2u, %304
- %305:f32 = load_vector_element %uv, 0u
- %x_278:f32 = let %305
- %307:f32 = load_vector_element %uv, 1u
- %x_280:f32 = let %307
- %309:f32 = sub %x_278, %x_280
- %310:f32 = abs %309
- %311:bool = lt %310, 0.25f
- if %311 [t: $B27] { # if_14
- $B27: { # true
- %312:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %313:i32 = load %312
- %x_287:i32 = let %313
- %315:f32 = load_vector_element %color, 0u
- %x_290:f32 = let %315
- %317:f32 = convert %x_287
- %318:f32 = add %x_290, %317
- store_vector_element %color, 0u, %318
- exit_if # if_14
- }
- }
- %319:vec3<f32> = load %color
- %x_293:vec3<f32> = let %319
- %321:vec3<f32> = normalize %x_293
- %x_294:vec3<f32> = let %321
- %323:f32 = access %x_294, 0u
- %324:f32 = access %x_294, 1u
- %325:f32 = access %x_294, 2u
- %326:vec4<f32> = construct %323, %324, %325, 1.0f
- store %frag_color, %326
- %327:vec4<f32> = load %x_GLF_pos
- %x_299:vec4<f32> = let %327
- store %gl_Position, %x_299
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B28: {
- store %x_GLF_pos, %x_GLF_pos_param
- %331:void = call %main_1
- %332:vec4<f32> = load %frag_color
- %333:vec4<f32> = load %gl_Position
- %334:main_out = construct %332, %333
- ret %334
- }
-}
-%swap_i1_i1_ = func(%i:ptr<function, i32, read_write>, %j:ptr<function, i32, read_write>):void {
- $B29: {
- %temp:ptr<function, i32, read_write> = var
- %339:i32 = load %i
- %x_302:i32 = let %339
- %341:ptr<private, i32, read_write> = access %obj, 0u, %x_302
- %342:i32 = load %341
- %x_304:i32 = let %342
- store %temp, %x_304
- %344:i32 = load %i
- %x_305:i32 = let %344
- %346:i32 = load %j
- %x_306:i32 = let %346
- %348:ptr<private, i32, read_write> = access %obj, 0u, %x_306
- %349:i32 = load %348
- %x_308:i32 = let %349
- %351:ptr<private, i32, read_write> = access %obj, 0u, %x_305
- store %351, %x_308
- %352:i32 = load %j
- %x_310:i32 = let %352
- %354:i32 = load %temp
- %x_311:i32 = let %354
- %356:ptr<private, i32, read_write> = access %obj, 0u, %x_310
- store %356, %x_311
- ret
- }
-}
-%quicksort_ = func():void {
- $B30: {
- %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
- %365:i32 = load %top
- %x_376:i32 = let %365
- %367:i32 = add %x_376, 1i
- %x_377:i32 = let %367
- store %top, %x_377
- %369:i32 = load %l_1
- %x_378:i32 = let %369
- %371:ptr<function, i32, read_write> = access %stack, %x_377
- store %371, %x_378
- %372:i32 = load %top
- %x_380:i32 = let %372
- %374:i32 = add %x_380, 1i
- %x_381:i32 = let %374
- store %top, %x_381
- %376:i32 = load %h_1
- %x_382:i32 = let %376
- %378:ptr<function, i32, read_write> = access %stack, %x_381
- store %378, %x_382
- loop [b: $B31, c: $B32] { # loop_4
- $B31: { # body
- %379:i32 = load %top
- %x_388:i32 = let %379
- %381:bool = gte %x_388, 0i
- if %381 [t: $B33, f: $B34] { # if_15
- $B33: { # true
- exit_if # if_15
- }
- $B34: { # false
- exit_loop # loop_4
- }
- }
- %382:i32 = load %top
- %x_391:i32 = let %382
- %384:i32 = sub %x_391, 1i
- store %top, %384
- %385:ptr<function, i32, read_write> = access %stack, %x_391
- %386:i32 = load %385
- %x_394:i32 = let %386
- store %h_1, %x_394
- %388:i32 = load %top
- %x_395:i32 = let %388
- %390:i32 = sub %x_395, 1i
- store %top, %390
- %391:ptr<function, i32, read_write> = access %stack, %x_395
- %392:i32 = load %391
- %x_398:i32 = let %392
- store %l_1, %x_398
- %394:i32 = load %l_1
- %x_399:i32 = let %394
- store %param_4, %x_399
- %396:i32 = load %h_1
- %x_400:i32 = let %396
- store %param_5, %x_400
- %398:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_401:i32 = let %398
- store %p, %x_401
- %400:i32 = load %p
- %x_402:i32 = let %400
- %402:i32 = load %l_1
- %x_404:i32 = let %402
- %404:i32 = sub %x_402, 1i
- %405:bool = gt %404, %x_404
- if %405 [t: $B35] { # if_16
- $B35: { # true
- %406:i32 = load %top
- %x_408:i32 = let %406
- %408:i32 = add %x_408, 1i
- %x_409:i32 = let %408
- store %top, %x_409
- %410:i32 = load %l_1
- %x_410:i32 = let %410
- %412:ptr<function, i32, read_write> = access %stack, %x_409
- store %412, %x_410
- %413:i32 = load %top
- %x_412:i32 = let %413
- %415:i32 = add %x_412, 1i
- %x_413:i32 = let %415
- store %top, %x_413
- %417:i32 = load %p
- %x_414:i32 = let %417
- %419:ptr<function, i32, read_write> = access %stack, %x_413
- %420:i32 = sub %x_414, 1i
- store %419, %420
- exit_if # if_16
- }
- }
- %421:i32 = load %p
- %x_417:i32 = let %421
- %423:i32 = load %h_1
- %x_419:i32 = let %423
- %425:i32 = add %x_417, 1i
- %426:bool = lt %425, %x_419
- if %426 [t: $B36] { # if_17
- $B36: { # true
- %427:i32 = load %top
- %x_423:i32 = let %427
- %429:i32 = add %x_423, 1i
- %x_424:i32 = let %429
- store %top, %x_424
- %431:i32 = load %p
- %x_425:i32 = let %431
- %433:ptr<function, i32, read_write> = access %stack, %x_424
- %434:i32 = add %x_425, 1i
- store %433, %434
- %435:i32 = load %top
- %x_428:i32 = let %435
- %437:i32 = add %x_428, 1i
- %x_429:i32 = let %437
- store %top, %x_429
- %439:i32 = load %h_1
- %x_430:i32 = let %439
- %441:ptr<function, i32, read_write> = access %stack, %x_429
- store %441, %x_430
- exit_if # if_17
- }
- }
- continue # -> $B32
- }
- $B32: { # continuing
- next_iteration # -> $B31
- }
- }
- ret
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.ir.msl
deleted file mode 100644
index eedc2e5..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,474 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: QuicksortObject = struct @align(4) {
- numbers:array<i32, 10> @offset(0)
-}
-
-buf1 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf0 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_37:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %12:i32 = load %i
- %13:ptr<private, i32, read_write> = access %obj, 0u, %12
- %14:i32 = load %13
- store %temp, %14
- %15:i32 = load %i
- %x_260:i32 = let %15
- %17:ptr<private, i32, read_write> = access %obj, 0u, %x_260
- %18:i32 = load %j
- %19:ptr<private, i32, read_write> = access %obj, 0u, %18
- %20:i32 = load %19
- store %17, %20
- %21:i32 = load %j
- %x_265:i32 = let %21
- %23:ptr<private, i32, read_write> = access %obj, 0u, %x_265
- %24:i32 = load %temp
- store %23, %24
- 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
- %35:i32 = load %h
- %36:ptr<private, i32, read_write> = access %obj, 0u, %35
- %37:i32 = load %36
- store %pivot, %37
- %38:i32 = load %l
- %39:i32 = sub %38, 1i
- store %i_1, %39
- %40:i32 = load %l
- store %j_1, %40
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %41:i32 = load %j_1
- %42:i32 = load %h
- %43:i32 = sub %42, 1i
- %44:bool = lte %41, %43
- if %44 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %45:i32 = load %j_1
- %46:ptr<private, i32, read_write> = access %obj, 0u, %45
- %47:i32 = load %46
- %48:i32 = load %pivot
- %49:bool = lte %47, %48
- if %49 [t: $B8] { # if_2
- $B8: { # true
- %50:i32 = load %i_1
- %51:i32 = add %50, 1i
- store %i_1, %51
- %52:i32 = load %i_1
- store %param, %52
- %53:i32 = load %j_1
- store %param_1, %53
- %54:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %55:i32 = load %j_1
- %56:i32 = add %55, 1i
- store %j_1, %56
- next_iteration # -> $B4
- }
- }
- %57:i32 = load %i_1
- %58:i32 = add %57, 1i
- store %param_2, %58
- %59:i32 = load %h
- store %param_3, %59
- %60:void = call %swap_i1_i1_, %param_2, %param_3
- %61:i32 = load %i_1
- %x_302:i32 = let %61
- %63:i32 = add %x_302, 1i
- ret %63
- }
-}
-%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
- %72:i32 = load %top
- %73:i32 = add %72, 1i
- %x_306:i32 = let %73
- store %top, %x_306
- %75:ptr<function, i32, read_write> = access %stack, %x_306
- %76:i32 = load %l_1
- store %75, %76
- %77:i32 = load %top
- %78:i32 = add %77, 1i
- %x_310:i32 = let %78
- store %top, %x_310
- %80:ptr<function, i32, read_write> = access %stack, %x_310
- %81:i32 = load %h_1
- store %80, %81
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %82:i32 = load %top
- %83:bool = gte %82, 0i
- if %83 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %84:i32 = load %top
- %x_320:i32 = let %84
- %86:i32 = load %top
- %87:i32 = sub %86, 1i
- store %top, %87
- %88:ptr<function, i32, read_write> = access %stack, %x_320
- %89:i32 = load %88
- store %h_1, %89
- %90:i32 = load %top
- %x_324:i32 = let %90
- %92:i32 = load %top
- %93:i32 = sub %92, 1i
- store %top, %93
- %94:ptr<function, i32, read_write> = access %stack, %x_324
- %95:i32 = load %94
- store %l_1, %95
- %96:i32 = load %l_1
- store %param_4, %96
- %97:i32 = load %h_1
- store %param_5, %97
- %98:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_330:i32 = let %98
- store %p, %x_330
- %100:i32 = load %p
- %101:i32 = sub %100, 1i
- %102:i32 = load %l_1
- %103:bool = gt %101, %102
- if %103 [t: $B14] { # if_4
- $B14: { # true
- %104:i32 = load %top
- %105:i32 = add %104, 1i
- %x_338:i32 = let %105
- store %top, %x_338
- %107:ptr<function, i32, read_write> = access %stack, %x_338
- %108:i32 = load %l_1
- store %107, %108
- %109:i32 = load %top
- %110:i32 = add %109, 1i
- %x_342:i32 = let %110
- store %top, %x_342
- %112:ptr<function, i32, read_write> = access %stack, %x_342
- %113:i32 = load %p
- %114:i32 = sub %113, 1i
- store %112, %114
- exit_if # if_4
- }
- }
- %115:i32 = load %p
- %116:i32 = add %115, 1i
- %117:i32 = load %h_1
- %118:bool = lt %116, %117
- if %118 [t: $B15] { # if_5
- $B15: { # true
- %119:i32 = load %top
- %120:i32 = add %119, 1i
- %x_353:i32 = let %120
- store %top, %x_353
- %122:ptr<function, i32, read_write> = access %stack, %x_353
- %123:i32 = load %p
- %124:i32 = add %123, 1i
- store %122, %124
- %125:i32 = load %top
- %126:i32 = add %125, 1i
- %x_358:i32 = let %126
- store %top, %x_358
- %128:ptr<function, i32, read_write> = access %stack, %x_358
- %129:i32 = load %h_1
- store %128, %129
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %134:vec4<f32> = load %x_GLF_pos
- %135:vec4<f32> = add %134, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %136:vec4<f32> = mul %135, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %136
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %137:i32 = load %i_2
- %138:bool = lt %137, 10i
- if %138 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %139:i32 = load %i_2
- %x_104:i32 = let %139
- %141:ptr<private, i32, read_write> = access %obj, 0u, %x_104
- %142:i32 = load %i_2
- %143:i32 = sub 10i, %142
- store %141, %143
- %144:i32 = load %i_2
- %x_108:i32 = let %144
- %146:ptr<private, i32, read_write> = access %obj, 0u, %x_108
- %147:i32 = load %i_2
- %148:ptr<private, i32, read_write> = access %obj, 0u, %147
- %149:i32 = load %148
- %150:i32 = load %i_2
- %151:ptr<private, i32, read_write> = access %obj, 0u, %150
- %152:i32 = load %151
- %153:i32 = mul %149, %152
- store %146, %153
- continue # -> $B18
- }
- $B18: { # continuing
- %154:i32 = load %i_2
- %155:i32 = add %154, 1i
- store %i_2, %155
- next_iteration # -> $B17
- }
- }
- %156:void = call %quicksort_
- %157:vec4<f32> = load %x_GLF_FragCoord
- %158:vec2<f32> = swizzle %157, xy
- %159:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %160:vec2<f32> = load %159
- %161:vec2<f32> = div %158, %160
- store %uv, %161
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %162:f32 = load_vector_element %color, 0u
- %163:f32 = let %162
- %164:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %165:i32 = load %164
- %166:f32 = convert %165
- %167:f32 = add %163, %166
- store_vector_element %color, 0u, %167
- %168:f32 = load_vector_element %uv, 0u
- %169:bool = gt %168, 0.25f
- if %169 [t: $B21] { # if_7
- $B21: { # true
- %170:f32 = load_vector_element %color, 0u
- %171:f32 = let %170
- %172:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %173:i32 = load %172
- %174:f32 = convert %173
- %175:f32 = add %171, %174
- store_vector_element %color, 0u, %175
- exit_if # if_7
- }
- }
- %176:f32 = load_vector_element %uv, 0u
- %177:bool = gt %176, 0.5f
- if %177 [t: $B22] { # if_8
- $B22: { # true
- %178:f32 = load_vector_element %color, 1u
- %179:f32 = let %178
- %180:ptr<uniform, vec2<f32>, read> = access %x_37, 0u
- %181:f32 = load_vector_element %180, 1u
- %182:i32 = call %tint_f32_to_i32, %181
- %184:i32 = mul 2i, %182
- %185:i32 = max %184, 2i
- %186:ptr<private, i32, read_write> = access %obj, 0u, %185
- %187:i32 = load %186
- %188:f32 = convert %187
- %189:f32 = let %188
- %190:ptr<uniform, vec2<f32>, read> = access %x_37, 0u
- %191:f32 = load_vector_element %190, 1u
- %192:i32 = call %tint_f32_to_i32, %191
- %193:i32 = mul 2i, %192
- %194:i32 = max %193, 2i
- %195:ptr<private, i32, read_write> = access %obj, 0u, %194
- %196:i32 = load %195
- %197:f32 = convert %196
- %198:f32 = max %189, %197
- %199:f32 = add %179, %198
- store_vector_element %color, 1u, %199
- exit_if # if_8
- }
- }
- %200:f32 = load_vector_element %uv, 0u
- %201:bool = gt %200, 0.75f
- if %201 [t: $B23] { # if_9
- $B23: { # true
- %202:f32 = load_vector_element %color, 2u
- %203:f32 = let %202
- %204:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %205:i32 = load %204
- %206:f32 = convert %205
- %207:f32 = add %203, %206
- store_vector_element %color, 2u, %207
- exit_if # if_9
- }
- }
- %208:f32 = load_vector_element %color, 1u
- %209:f32 = let %208
- %210:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %211:i32 = load %210
- %212:f32 = convert %211
- %213:f32 = add %209, %212
- store_vector_element %color, 1u, %213
- %214:f32 = load_vector_element %uv, 1u
- %215:bool = gt %214, 0.25f
- if %215 [t: $B24] { # if_10
- $B24: { # true
- %216:f32 = load_vector_element %color, 0u
- %217:f32 = let %216
- %218:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %219:i32 = load %218
- %220:f32 = convert %219
- %221:f32 = add %217, %220
- store_vector_element %color, 0u, %221
- exit_if # if_10
- }
- }
- %222:f32 = load_vector_element %uv, 1u
- %223:bool = gt %222, 0.5f
- if %223 [t: $B25] { # if_11
- $B25: { # true
- %224:f32 = load_vector_element %color, 1u
- %225:f32 = let %224
- %226:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %227:i32 = load %226
- %228:f32 = convert %227
- %229:f32 = add %225, %228
- store_vector_element %color, 1u, %229
- exit_if # if_11
- }
- }
- %230:f32 = load_vector_element %uv, 1u
- %231:bool = gt %230, 0.75f
- if %231 [t: $B26] { # if_12
- $B26: { # true
- %232:f32 = load_vector_element %color, 2u
- %233:f32 = let %232
- %234:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %235:i32 = load %234
- %236:f32 = convert %235
- %237:f32 = add %233, %236
- store_vector_element %color, 2u, %237
- exit_if # if_12
- }
- }
- %238:f32 = load_vector_element %color, 2u
- %239:f32 = let %238
- %240:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %241:i32 = load %240
- %242:f32 = convert %241
- %243:f32 = add %239, %242
- store_vector_element %color, 2u, %243
- %244:f32 = load_vector_element %uv, 0u
- %245:f32 = load_vector_element %uv, 1u
- %246:f32 = sub %244, %245
- %247:f32 = abs %246
- %248:bool = lt %247, 0.25f
- if %248 [t: $B27] { # if_13
- $B27: { # true
- %249:f32 = load_vector_element %color, 0u
- %250:f32 = let %249
- %251:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %252:i32 = load %251
- %253:f32 = convert %252
- %254:f32 = add %250, %253
- store_vector_element %color, 0u, %254
- exit_if # if_13
- }
- }
- %255:vec3<f32> = load %color
- %256:vec3<f32> = normalize %255
- %x_249:vec3<f32> = let %256
- %258:f32 = access %x_249, 0u
- %259:f32 = access %x_249, 1u
- %260:f32 = access %x_249, 2u
- %261:vec4<f32> = construct %258, %259, %260, 1.0f
- store %frag_color, %261
- %262:vec4<f32> = load %x_GLF_pos
- store %gl_Position, %262
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B28: {
- store %x_GLF_pos, %x_GLF_pos_param
- %265:void = call %main_1
- %266:vec4<f32> = load %frag_color
- %267:vec4<f32> = load %gl_Position
- %268:main_out = construct %266, %267
- ret %268
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B29: {
- %270:i32 = convert %value
- %271:bool = gte %value, -2147483648.0f
- %272:i32 = select -2147483648i, %270, %271
- %273:bool = lte %value, 2147483520.0f
- %274:i32 = select 2147483647i, %272, %273
- ret %274
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.ir.msl
deleted file mode 100644
index f2251ed..0000000
--- a/test/tint/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,548 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: QuicksortObject = struct @align(4) {
- numbers:array<i32, 10> @offset(0)
-}
-
-buf1 = struct @align(8) {
- resolution:vec2<f32> @offset(0)
-}
-
-buf0 = struct @align(8) {
- injectionSwitch:vec2<f32> @offset(0)
-}
-
-main_out = struct @align(16) {
- frag_color_1:vec4<f32> @offset(0), @location(0)
- gl_Position:vec4<f32> @offset(16), @builtin(position)
-}
-
-$B1: { # root
- %obj:ptr<private, QuicksortObject, read_write> = var
- %x_GLF_FragCoord:ptr<private, vec4<f32>, read_write> = var
- %x_GLF_pos:ptr<private, vec4<f32>, read_write> = var
- %x_34:ptr<uniform, buf1, read> = var @binding_point(0, 1)
- %x_37:ptr<uniform, buf0, read> = var @binding_point(0, 0)
- %frag_color:ptr<private, vec4<f32>, read_write> = var
- %gl_Position:ptr<private, vec4<f32>, read_write> = var
-}
-
-%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
- %12:i32 = load %i
- %x_257:i32 = let %12
- %14:ptr<private, i32, read_write> = access %obj, 0u, %x_257
- %15:i32 = load %14
- %x_259:i32 = let %15
- store %temp, %x_259
- %17:i32 = load %i
- %x_260:i32 = let %17
- %19:i32 = load %j
- %x_261:i32 = let %19
- %21:ptr<private, i32, read_write> = access %obj, 0u, %x_261
- %22:i32 = load %21
- %x_263:i32 = let %22
- %24:ptr<private, i32, read_write> = access %obj, 0u, %x_260
- store %24, %x_263
- %25:i32 = load %j
- %x_265:i32 = let %25
- %27:i32 = load %temp
- %x_266:i32 = let %27
- %29:ptr<private, i32, read_write> = access %obj, 0u, %x_265
- store %29, %x_266
- 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
- %40:i32 = load %h
- %x_269:i32 = let %40
- %42:ptr<private, i32, read_write> = access %obj, 0u, %x_269
- %43:i32 = load %42
- %x_271:i32 = let %43
- store %pivot, %x_271
- %45:i32 = load %l
- %x_272:i32 = let %45
- %47:i32 = sub %x_272, 1i
- store %i_1, %47
- %48:i32 = load %l
- %x_274:i32 = let %48
- store %j_1, %x_274
- loop [b: $B4, c: $B5] { # loop_1
- $B4: { # body
- %50:i32 = load %j_1
- %x_279:i32 = let %50
- %52:i32 = load %h
- %x_280:i32 = let %52
- %54:i32 = sub %x_280, 1i
- %55:bool = lte %x_279, %54
- if %55 [t: $B6, f: $B7] { # if_1
- $B6: { # true
- exit_if # if_1
- }
- $B7: { # false
- exit_loop # loop_1
- }
- }
- %56:i32 = load %j_1
- %x_284:i32 = let %56
- %58:ptr<private, i32, read_write> = access %obj, 0u, %x_284
- %59:i32 = load %58
- %x_286:i32 = let %59
- %61:i32 = load %pivot
- %x_287:i32 = let %61
- %63:bool = lte %x_286, %x_287
- if %63 [t: $B8] { # if_2
- $B8: { # true
- %64:i32 = load %i_1
- %x_291:i32 = let %64
- %66:i32 = add %x_291, 1i
- store %i_1, %66
- %67:i32 = load %i_1
- %x_293:i32 = let %67
- store %param, %x_293
- %69:i32 = load %j_1
- %x_294:i32 = let %69
- store %param_1, %x_294
- %71:void = call %swap_i1_i1_, %param, %param_1
- exit_if # if_2
- }
- }
- continue # -> $B5
- }
- $B5: { # continuing
- %72:i32 = load %j_1
- %x_296:i32 = let %72
- %74:i32 = add %x_296, 1i
- store %j_1, %74
- next_iteration # -> $B4
- }
- }
- %75:i32 = load %i_1
- %x_298:i32 = let %75
- %77:i32 = add %x_298, 1i
- store %param_2, %77
- %78:i32 = load %h
- %x_300:i32 = let %78
- store %param_3, %x_300
- %80:void = call %swap_i1_i1_, %param_2, %param_3
- %81:i32 = load %i_1
- %x_302:i32 = let %81
- %83:i32 = add %x_302, 1i
- ret %83
- }
-}
-%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
- %92:i32 = load %top
- %x_305:i32 = let %92
- %94:i32 = add %x_305, 1i
- %x_306:i32 = let %94
- store %top, %x_306
- %96:i32 = load %l_1
- %x_307:i32 = let %96
- %98:ptr<function, i32, read_write> = access %stack, %x_306
- store %98, %x_307
- %99:i32 = load %top
- %x_309:i32 = let %99
- %101:i32 = add %x_309, 1i
- %x_310:i32 = let %101
- store %top, %x_310
- %103:i32 = load %h_1
- %x_311:i32 = let %103
- %105:ptr<function, i32, read_write> = access %stack, %x_310
- store %105, %x_311
- loop [b: $B10, c: $B11] { # loop_2
- $B10: { # body
- %106:i32 = load %top
- %x_317:i32 = let %106
- %108:bool = gte %x_317, 0i
- if %108 [t: $B12, f: $B13] { # if_3
- $B12: { # true
- exit_if # if_3
- }
- $B13: { # false
- exit_loop # loop_2
- }
- }
- %109:i32 = load %top
- %x_320:i32 = let %109
- %111:i32 = sub %x_320, 1i
- store %top, %111
- %112:ptr<function, i32, read_write> = access %stack, %x_320
- %113:i32 = load %112
- %x_323:i32 = let %113
- store %h_1, %x_323
- %115:i32 = load %top
- %x_324:i32 = let %115
- %117:i32 = sub %x_324, 1i
- store %top, %117
- %118:ptr<function, i32, read_write> = access %stack, %x_324
- %119:i32 = load %118
- %x_327:i32 = let %119
- store %l_1, %x_327
- %121:i32 = load %l_1
- %x_328:i32 = let %121
- store %param_4, %x_328
- %123:i32 = load %h_1
- %x_329:i32 = let %123
- store %param_5, %x_329
- %125:i32 = call %performPartition_i1_i1_, %param_4, %param_5
- %x_330:i32 = let %125
- store %p, %x_330
- %127:i32 = load %p
- %x_331:i32 = let %127
- %129:i32 = load %l_1
- %x_333:i32 = let %129
- %131:i32 = sub %x_331, 1i
- %132:bool = gt %131, %x_333
- if %132 [t: $B14] { # if_4
- $B14: { # true
- %133:i32 = load %top
- %x_337:i32 = let %133
- %135:i32 = add %x_337, 1i
- %x_338:i32 = let %135
- store %top, %x_338
- %137:i32 = load %l_1
- %x_339:i32 = let %137
- %139:ptr<function, i32, read_write> = access %stack, %x_338
- store %139, %x_339
- %140:i32 = load %top
- %x_341:i32 = let %140
- %142:i32 = add %x_341, 1i
- %x_342:i32 = let %142
- store %top, %x_342
- %144:i32 = load %p
- %x_343:i32 = let %144
- %146:ptr<function, i32, read_write> = access %stack, %x_342
- %147:i32 = sub %x_343, 1i
- store %146, %147
- exit_if # if_4
- }
- }
- %148:i32 = load %p
- %x_346:i32 = let %148
- %150:i32 = load %h_1
- %x_348:i32 = let %150
- %152:i32 = add %x_346, 1i
- %153:bool = lt %152, %x_348
- if %153 [t: $B15] { # if_5
- $B15: { # true
- %154:i32 = load %top
- %x_352:i32 = let %154
- %156:i32 = add %x_352, 1i
- %x_353:i32 = let %156
- store %top, %x_353
- %158:i32 = load %p
- %x_354:i32 = let %158
- %160:ptr<function, i32, read_write> = access %stack, %x_353
- %161:i32 = add %x_354, 1i
- store %160, %161
- %162:i32 = load %top
- %x_357:i32 = let %162
- %164:i32 = add %x_357, 1i
- %x_358:i32 = let %164
- store %top, %x_358
- %166:i32 = load %h_1
- %x_359:i32 = let %166
- %168:ptr<function, i32, read_write> = access %stack, %x_358
- store %168, %x_359
- 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
- %uv:ptr<function, vec2<f32>, read_write> = var
- %color:ptr<function, vec3<f32>, read_write> = var
- %173:vec4<f32> = load %x_GLF_pos
- %x_94:vec4<f32> = let %173
- %175:vec4<f32> = add %x_94, vec4<f32>(1.0f, 1.0f, 0.0f, 0.0f)
- %176:vec4<f32> = mul %175, vec4<f32>(128.0f, 128.0f, 1.0f, 1.0f)
- store %x_GLF_FragCoord, %176
- store %i_2, 0i
- loop [b: $B17, c: $B18] { # loop_3
- $B17: { # body
- %177:i32 = load %i_2
- %x_101:i32 = let %177
- %179:bool = lt %x_101, 10i
- if %179 [t: $B19, f: $B20] { # if_6
- $B19: { # true
- exit_if # if_6
- }
- $B20: { # false
- exit_loop # loop_3
- }
- }
- %180:i32 = load %i_2
- %x_104:i32 = let %180
- %182:i32 = load %i_2
- %x_105:i32 = let %182
- %184:ptr<private, i32, read_write> = access %obj, 0u, %x_104
- %185:i32 = sub 10i, %x_105
- store %184, %185
- %186:i32 = load %i_2
- %x_108:i32 = let %186
- %188:i32 = load %i_2
- %x_109:i32 = let %188
- %190:ptr<private, i32, read_write> = access %obj, 0u, %x_109
- %191:i32 = load %190
- %x_111:i32 = let %191
- %193:i32 = load %i_2
- %x_112:i32 = let %193
- %195:ptr<private, i32, read_write> = access %obj, 0u, %x_112
- %196:i32 = load %195
- %x_114:i32 = let %196
- %198:ptr<private, i32, read_write> = access %obj, 0u, %x_108
- %199:i32 = mul %x_111, %x_114
- store %198, %199
- continue # -> $B18
- }
- $B18: { # continuing
- %200:i32 = load %i_2
- %x_117:i32 = let %200
- %202:i32 = add %x_117, 1i
- store %i_2, %202
- next_iteration # -> $B17
- }
- }
- %203:void = call %quicksort_
- %204:vec4<f32> = load %x_GLF_FragCoord
- %x_120:vec4<f32> = let %204
- %206:ptr<uniform, vec2<f32>, read> = access %x_34, 0u
- %207:vec2<f32> = load %206
- %x_123:vec2<f32> = let %207
- %209:f32 = access %x_120, 0u
- %210:f32 = access %x_120, 1u
- %211:vec2<f32> = construct %209, %210
- %212:vec2<f32> = div %211, %x_123
- store %uv, %212
- store %color, vec3<f32>(1.0f, 2.0f, 3.0f)
- %213:ptr<private, i32, read_write> = access %obj, 0u, 0i
- %214:i32 = load %213
- %x_126:i32 = let %214
- %216:f32 = load_vector_element %color, 0u
- %x_129:f32 = let %216
- %218:f32 = convert %x_126
- %219:f32 = add %x_129, %218
- store_vector_element %color, 0u, %219
- %220:f32 = load_vector_element %uv, 0u
- %x_133:f32 = let %220
- %222:bool = gt %x_133, 0.25f
- if %222 [t: $B21] { # if_7
- $B21: { # true
- %223:ptr<private, i32, read_write> = access %obj, 0u, 1i
- %224:i32 = load %223
- %x_138:i32 = let %224
- %226:f32 = load_vector_element %color, 0u
- %x_141:f32 = let %226
- %228:f32 = convert %x_138
- %229:f32 = add %x_141, %228
- store_vector_element %color, 0u, %229
- exit_if # if_7
- }
- }
- %230:f32 = load_vector_element %uv, 0u
- %x_145:f32 = let %230
- %232:bool = gt %x_145, 0.5f
- if %232 [t: $B22] { # if_8
- $B22: { # true
- %233:ptr<uniform, vec2<f32>, read> = access %x_37, 0u
- %234:f32 = load_vector_element %233, 1u
- %x_150:f32 = let %234
- %236:i32 = call %tint_f32_to_i32, %x_150
- %238:i32 = mul 2i, %236
- %239:i32 = max %238, 2i
- %240:ptr<private, i32, read_write> = access %obj, 0u, %239
- %241:i32 = load %240
- %x_155:i32 = let %241
- %243:ptr<uniform, vec2<f32>, read> = access %x_37, 0u
- %244:f32 = load_vector_element %243, 1u
- %x_158:f32 = let %244
- %246:i32 = call %tint_f32_to_i32, %x_158
- %247:i32 = mul 2i, %246
- %248:i32 = max %247, 2i
- %249:ptr<private, i32, read_write> = access %obj, 0u, %248
- %250:i32 = load %249
- %x_163:i32 = let %250
- %252:f32 = load_vector_element %color, 1u
- %x_167:f32 = let %252
- %254:f32 = convert %x_155
- %255:f32 = let %254
- %256:f32 = convert %x_163
- %257:f32 = max %255, %256
- %258:f32 = add %x_167, %257
- store_vector_element %color, 1u, %258
- exit_if # if_8
- }
- }
- %259:f32 = load_vector_element %uv, 0u
- %x_171:f32 = let %259
- %261:bool = gt %x_171, 0.75f
- if %261 [t: $B23] { # if_9
- $B23: { # true
- %262:ptr<private, i32, read_write> = access %obj, 0u, 3i
- %263:i32 = load %262
- %x_176:i32 = let %263
- %265:f32 = load_vector_element %color, 2u
- %x_179:f32 = let %265
- %267:f32 = convert %x_176
- %268:f32 = add %x_179, %267
- store_vector_element %color, 2u, %268
- exit_if # if_9
- }
- }
- %269:ptr<private, i32, read_write> = access %obj, 0u, 4i
- %270:i32 = load %269
- %x_183:i32 = let %270
- %272:f32 = load_vector_element %color, 1u
- %x_186:f32 = let %272
- %274:f32 = convert %x_183
- %275:f32 = add %x_186, %274
- store_vector_element %color, 1u, %275
- %276:f32 = load_vector_element %uv, 1u
- %x_190:f32 = let %276
- %278:bool = gt %x_190, 0.25f
- if %278 [t: $B24] { # if_10
- $B24: { # true
- %279:ptr<private, i32, read_write> = access %obj, 0u, 5i
- %280:i32 = load %279
- %x_195:i32 = let %280
- %282:f32 = load_vector_element %color, 0u
- %x_198:f32 = let %282
- %284:f32 = convert %x_195
- %285:f32 = add %x_198, %284
- store_vector_element %color, 0u, %285
- exit_if # if_10
- }
- }
- %286:f32 = load_vector_element %uv, 1u
- %x_202:f32 = let %286
- %288:bool = gt %x_202, 0.5f
- if %288 [t: $B25] { # if_11
- $B25: { # true
- %289:ptr<private, i32, read_write> = access %obj, 0u, 6i
- %290:i32 = load %289
- %x_207:i32 = let %290
- %292:f32 = load_vector_element %color, 1u
- %x_210:f32 = let %292
- %294:f32 = convert %x_207
- %295:f32 = add %x_210, %294
- store_vector_element %color, 1u, %295
- exit_if # if_11
- }
- }
- %296:f32 = load_vector_element %uv, 1u
- %x_214:f32 = let %296
- %298:bool = gt %x_214, 0.75f
- if %298 [t: $B26] { # if_12
- $B26: { # true
- %299:ptr<private, i32, read_write> = access %obj, 0u, 7i
- %300:i32 = load %299
- %x_219:i32 = let %300
- %302:f32 = load_vector_element %color, 2u
- %x_222:f32 = let %302
- %304:f32 = convert %x_219
- %305:f32 = add %x_222, %304
- store_vector_element %color, 2u, %305
- exit_if # if_12
- }
- }
- %306:ptr<private, i32, read_write> = access %obj, 0u, 8i
- %307:i32 = load %306
- %x_226:i32 = let %307
- %309:f32 = load_vector_element %color, 2u
- %x_229:f32 = let %309
- %311:f32 = convert %x_226
- %312:f32 = add %x_229, %311
- store_vector_element %color, 2u, %312
- %313:f32 = load_vector_element %uv, 0u
- %x_233:f32 = let %313
- %315:f32 = load_vector_element %uv, 1u
- %x_235:f32 = let %315
- %317:f32 = sub %x_233, %x_235
- %318:f32 = abs %317
- %319:bool = lt %318, 0.25f
- if %319 [t: $B27] { # if_13
- $B27: { # true
- %320:ptr<private, i32, read_write> = access %obj, 0u, 9i
- %321:i32 = load %320
- %x_242:i32 = let %321
- %323:f32 = load_vector_element %color, 0u
- %x_245:f32 = let %323
- %325:f32 = convert %x_242
- %326:f32 = add %x_245, %325
- store_vector_element %color, 0u, %326
- exit_if # if_13
- }
- }
- %327:vec3<f32> = load %color
- %x_248:vec3<f32> = let %327
- %329:vec3<f32> = normalize %x_248
- %x_249:vec3<f32> = let %329
- %331:f32 = access %x_249, 0u
- %332:f32 = access %x_249, 1u
- %333:f32 = access %x_249, 2u
- %334:vec4<f32> = construct %331, %332, %333, 1.0f
- store %frag_color, %334
- %335:vec4<f32> = load %x_GLF_pos
- %x_254:vec4<f32> = let %335
- store %gl_Position, %x_254
- ret
- }
-}
-%tint_symbol = @vertex func(%x_GLF_pos_param:vec4<f32> [@location(0)]):main_out {
- $B28: {
- store %x_GLF_pos, %x_GLF_pos_param
- %339:void = call %main_1
- %340:vec4<f32> = load %frag_color
- %341:vec4<f32> = load %gl_Position
- %342:main_out = construct %340, %341
- ret %342
- }
-}
-%tint_f32_to_i32 = func(%value:f32):i32 {
- $B29: {
- %344:i32 = convert %value
- %345:bool = gte %value, -2147483648.0f
- %346:i32 = select -2147483648i, %344, %345
- %347:bool = lte %value, 2147483520.0f
- %348:i32 = select 2147483647i, %346, %347
- ret %348
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.ir.msl
deleted file mode 100644
index 14bad00..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.spvasm.expected.ir.msl
+++ /dev/null
@@ -1,41 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_3:ptr<private, vec3<u32>, read_write> = var
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %5:u32 = load_vector_element %x_3, 0u
- %x_21:u32 = let %5
- %7:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %8:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %9:u32 = load %8
- %10:i32 = bitcast %9
- %11:i32 = abs %10
- %12:u32 = bitcast %11
- store %7, %12
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_3_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_3, %x_3_param
- %15:void = call %main_1
- ret
- }
-}
-
-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. *
-********************************************************************
diff --git a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.ir.msl b/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.ir.msl
deleted file mode 100644
index ae12524..0000000
--- a/test/tint/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/glsl_uint_sabs/0-opt.wgsl.expected.ir.msl
+++ /dev/null
@@ -1,42 +0,0 @@
-SKIP: FAILED
-
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: S = struct @align(4) {
- field0:array<u32> @offset(0)
-}
-
-$B1: { # root
- %x_3:ptr<private, vec3<u32>, read_write> = var
- %x_6:ptr<storage, S, read_write> = var @binding_point(0, 0)
- %x_7:ptr<storage, S, read_write> = var @binding_point(0, 1)
-}
-
-%main_1 = func():void {
- $B2: {
- %5:u32 = load_vector_element %x_3, 0u
- %x_21:u32 = let %5
- %7:ptr<storage, u32, read_write> = access %x_6, 0u, %x_21
- %8:u32 = load %7
- %x_23:u32 = let %8
- %10:ptr<storage, u32, read_write> = access %x_7, 0u, %x_21
- %11:i32 = bitcast %x_23
- %12:i32 = abs %11
- %13:u32 = bitcast %12
- store %10, %13
- ret
- }
-}
-%tint_symbol = @compute @workgroup_size(1, 1, 1) func(%x_3_param:vec3<u32> [@global_invocation_id]):void {
- $B3: {
- store %x_3, %x_3_param
- %16:void = call %main_1
- ret
- }
-}
-
-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. *
-********************************************************************