diff --git a/src/front/wgsl/construction.rs b/src/front/wgsl/construction.rs index 281116d3f..f675b12e1 100644 --- a/src/front/wgsl/construction.rs +++ b/src/front/wgsl/construction.rs @@ -363,6 +363,25 @@ pub(super) fn parse_construction<'a>( convert: Some(dst_width), }, + // Vector conversion (vector -> vector) - partial + ( + Components::One { + component, + ty: + &TypeInner::Vector { + size: src_size, + kind: src_kind, + .. + }, + .. + }, + ConstructorType::PartialVector { size: dst_size }, + ) if dst_size == src_size => Expression::As { + expr: component, + kind: src_kind, + convert: None, + }, + // Matrix conversion (matrix -> matrix) ( Components::One { @@ -386,6 +405,28 @@ pub(super) fn parse_construction<'a>( convert: Some(dst_width), }, + // Matrix conversion (matrix -> matrix) - partial + ( + Components::One { + component, + ty: + &TypeInner::Matrix { + columns: src_columns, + rows: src_rows, + .. + }, + .. + }, + ConstructorType::PartialMatrix { + columns: dst_columns, + rows: dst_rows, + }, + ) if dst_columns == src_columns && dst_rows == src_rows => Expression::As { + expr: component, + kind: ScalarKind::Float, + convert: None, + }, + // Vector constructor (splat) - infer type ( Components::One { diff --git a/tests/in/operators.wgsl b/tests/in/operators.wgsl index 385b424a9..6cee25f2c 100644 --- a/tests/in/operators.wgsl +++ b/tests/in/operators.wgsl @@ -75,6 +75,8 @@ fn constructors() -> f32 { _ = f32(f32()); _ = vec2(vec2()); _ = mat2x3(mat2x3()); + _ = vec2(vec2()); + _ = mat2x3(mat2x3()); return foo.a.x; } diff --git a/tests/out/glsl/operators.main.Compute.glsl b/tests/out/glsl/operators.main.Compute.glsl index 85f9e16c8..ab232d553 100644 --- a/tests/out/glsl/operators.main.Compute.glsl +++ b/tests/out/glsl/operators.main.Compute.glsl @@ -47,157 +47,159 @@ float constructors() { float unnamed_6 = float(0.0); uvec2 unnamed_7 = uvec2(uvec2(0u, 0u)); mat2x3 unnamed_8 = mat2x3(mat2x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); - float _e71 = foo.a.x; - return _e71; + uvec2 unnamed_9 = uvec2(0u, 0u); + mat2x3 unnamed_10 = mat2x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)); + float _e75 = foo.a.x; + return _e75; } void logical() { - bool unnamed_9 = (!true); - bvec2 unnamed_10 = not(bvec2(true)); - bool unnamed_11 = (true || false); - bool unnamed_12 = (true && false); + bool unnamed_11 = (!true); + bvec2 unnamed_12 = not(bvec2(true)); bool unnamed_13 = (true || false); - bvec3 unnamed_14 = bvec3(bvec3(true).x || bvec3(false).x, bvec3(true).y || bvec3(false).y, bvec3(true).z || bvec3(false).z); - bool unnamed_15 = (true && false); - bvec4 unnamed_16 = bvec4(bvec4(true).x && bvec4(false).x, bvec4(true).y && bvec4(false).y, bvec4(true).z && bvec4(false).z, bvec4(true).w && bvec4(false).w); + bool unnamed_14 = (true && false); + bool unnamed_15 = (true || false); + bvec3 unnamed_16 = bvec3(bvec3(true).x || bvec3(false).x, bvec3(true).y || bvec3(false).y, bvec3(true).z || bvec3(false).z); + bool unnamed_17 = (true && false); + bvec4 unnamed_18 = bvec4(bvec4(true).x && bvec4(false).x, bvec4(true).y && bvec4(false).y, bvec4(true).z && bvec4(false).z, bvec4(true).w && bvec4(false).w); } void arithmetic() { - ivec2 unnamed_17 = (-ivec2(1)); - vec2 unnamed_18 = (-vec2(1.0)); - int unnamed_19 = (2 + 1); - uint unnamed_20 = (2u + 1u); - float unnamed_21 = (2.0 + 1.0); - ivec2 unnamed_22 = (ivec2(2) + ivec2(1)); - uvec3 unnamed_23 = (uvec3(2u) + uvec3(1u)); - vec4 unnamed_24 = (vec4(2.0) + vec4(1.0)); - int unnamed_25 = (2 - 1); - uint unnamed_26 = (2u - 1u); - float unnamed_27 = (2.0 - 1.0); - ivec2 unnamed_28 = (ivec2(2) - ivec2(1)); - uvec3 unnamed_29 = (uvec3(2u) - uvec3(1u)); - vec4 unnamed_30 = (vec4(2.0) - vec4(1.0)); - int unnamed_31 = (2 * 1); - uint unnamed_32 = (2u * 1u); - float unnamed_33 = (2.0 * 1.0); - ivec2 unnamed_34 = (ivec2(2) * ivec2(1)); - uvec3 unnamed_35 = (uvec3(2u) * uvec3(1u)); - vec4 unnamed_36 = (vec4(2.0) * vec4(1.0)); - int unnamed_37 = (2 / 1); - uint unnamed_38 = (2u / 1u); - float unnamed_39 = (2.0 / 1.0); - ivec2 unnamed_40 = (ivec2(2) / ivec2(1)); - uvec3 unnamed_41 = (uvec3(2u) / uvec3(1u)); - vec4 unnamed_42 = (vec4(2.0) / vec4(1.0)); - int unnamed_43 = (2 % 1); - uint unnamed_44 = (2u % 1u); - float unnamed_45 = (2.0 - 1.0 * trunc(2.0 / 1.0)); - ivec2 unnamed_46 = (ivec2(2) % ivec2(1)); - uvec3 unnamed_47 = (uvec3(2u) % uvec3(1u)); - vec4 unnamed_48 = (vec4(2.0) - vec4(1.0) * trunc(vec4(2.0) / vec4(1.0))); - ivec2 unnamed_49 = (ivec2(2) + ivec2(1)); - ivec2 unnamed_50 = (ivec2(2) + ivec2(1)); - uvec2 unnamed_51 = (uvec2(2u) + uvec2(1u)); - uvec2 unnamed_52 = (uvec2(2u) + uvec2(1u)); - vec2 unnamed_53 = (vec2(2.0) + vec2(1.0)); - vec2 unnamed_54 = (vec2(2.0) + vec2(1.0)); - ivec2 unnamed_55 = (ivec2(2) - ivec2(1)); - ivec2 unnamed_56 = (ivec2(2) - ivec2(1)); - uvec2 unnamed_57 = (uvec2(2u) - uvec2(1u)); - uvec2 unnamed_58 = (uvec2(2u) - uvec2(1u)); - vec2 unnamed_59 = (vec2(2.0) - vec2(1.0)); - vec2 unnamed_60 = (vec2(2.0) - vec2(1.0)); - ivec2 unnamed_61 = (ivec2(2) * 1); - ivec2 unnamed_62 = (2 * ivec2(1)); - uvec2 unnamed_63 = (uvec2(2u) * 1u); - uvec2 unnamed_64 = (2u * uvec2(1u)); - vec2 unnamed_65 = (vec2(2.0) * 1.0); - vec2 unnamed_66 = (2.0 * vec2(1.0)); - ivec2 unnamed_67 = (ivec2(2) / ivec2(1)); - ivec2 unnamed_68 = (ivec2(2) / ivec2(1)); - uvec2 unnamed_69 = (uvec2(2u) / uvec2(1u)); - uvec2 unnamed_70 = (uvec2(2u) / uvec2(1u)); - vec2 unnamed_71 = (vec2(2.0) / vec2(1.0)); - vec2 unnamed_72 = (vec2(2.0) / vec2(1.0)); - ivec2 unnamed_73 = (ivec2(2) % ivec2(1)); - ivec2 unnamed_74 = (ivec2(2) % ivec2(1)); - uvec2 unnamed_75 = (uvec2(2u) % uvec2(1u)); - uvec2 unnamed_76 = (uvec2(2u) % uvec2(1u)); - vec2 unnamed_77 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0))); - vec2 unnamed_78 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0))); - mat3x3 unnamed_79 = (mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) + mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); - mat3x3 unnamed_80 = (mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) - mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); - mat3x3 unnamed_81 = (mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) * 1.0); - mat3x3 unnamed_82 = (2.0 * mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); - vec3 unnamed_83 = (mat4x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) * vec4(1.0)); - vec4 unnamed_84 = (vec3(2.0) * mat4x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); - mat3x3 unnamed_85 = (mat4x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) * mat3x4(vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0))); + ivec2 unnamed_19 = (-ivec2(1)); + vec2 unnamed_20 = (-vec2(1.0)); + int unnamed_21 = (2 + 1); + uint unnamed_22 = (2u + 1u); + float unnamed_23 = (2.0 + 1.0); + ivec2 unnamed_24 = (ivec2(2) + ivec2(1)); + uvec3 unnamed_25 = (uvec3(2u) + uvec3(1u)); + vec4 unnamed_26 = (vec4(2.0) + vec4(1.0)); + int unnamed_27 = (2 - 1); + uint unnamed_28 = (2u - 1u); + float unnamed_29 = (2.0 - 1.0); + ivec2 unnamed_30 = (ivec2(2) - ivec2(1)); + uvec3 unnamed_31 = (uvec3(2u) - uvec3(1u)); + vec4 unnamed_32 = (vec4(2.0) - vec4(1.0)); + int unnamed_33 = (2 * 1); + uint unnamed_34 = (2u * 1u); + float unnamed_35 = (2.0 * 1.0); + ivec2 unnamed_36 = (ivec2(2) * ivec2(1)); + uvec3 unnamed_37 = (uvec3(2u) * uvec3(1u)); + vec4 unnamed_38 = (vec4(2.0) * vec4(1.0)); + int unnamed_39 = (2 / 1); + uint unnamed_40 = (2u / 1u); + float unnamed_41 = (2.0 / 1.0); + ivec2 unnamed_42 = (ivec2(2) / ivec2(1)); + uvec3 unnamed_43 = (uvec3(2u) / uvec3(1u)); + vec4 unnamed_44 = (vec4(2.0) / vec4(1.0)); + int unnamed_45 = (2 % 1); + uint unnamed_46 = (2u % 1u); + float unnamed_47 = (2.0 - 1.0 * trunc(2.0 / 1.0)); + ivec2 unnamed_48 = (ivec2(2) % ivec2(1)); + uvec3 unnamed_49 = (uvec3(2u) % uvec3(1u)); + vec4 unnamed_50 = (vec4(2.0) - vec4(1.0) * trunc(vec4(2.0) / vec4(1.0))); + ivec2 unnamed_51 = (ivec2(2) + ivec2(1)); + ivec2 unnamed_52 = (ivec2(2) + ivec2(1)); + uvec2 unnamed_53 = (uvec2(2u) + uvec2(1u)); + uvec2 unnamed_54 = (uvec2(2u) + uvec2(1u)); + vec2 unnamed_55 = (vec2(2.0) + vec2(1.0)); + vec2 unnamed_56 = (vec2(2.0) + vec2(1.0)); + ivec2 unnamed_57 = (ivec2(2) - ivec2(1)); + ivec2 unnamed_58 = (ivec2(2) - ivec2(1)); + uvec2 unnamed_59 = (uvec2(2u) - uvec2(1u)); + uvec2 unnamed_60 = (uvec2(2u) - uvec2(1u)); + vec2 unnamed_61 = (vec2(2.0) - vec2(1.0)); + vec2 unnamed_62 = (vec2(2.0) - vec2(1.0)); + ivec2 unnamed_63 = (ivec2(2) * 1); + ivec2 unnamed_64 = (2 * ivec2(1)); + uvec2 unnamed_65 = (uvec2(2u) * 1u); + uvec2 unnamed_66 = (2u * uvec2(1u)); + vec2 unnamed_67 = (vec2(2.0) * 1.0); + vec2 unnamed_68 = (2.0 * vec2(1.0)); + ivec2 unnamed_69 = (ivec2(2) / ivec2(1)); + ivec2 unnamed_70 = (ivec2(2) / ivec2(1)); + uvec2 unnamed_71 = (uvec2(2u) / uvec2(1u)); + uvec2 unnamed_72 = (uvec2(2u) / uvec2(1u)); + vec2 unnamed_73 = (vec2(2.0) / vec2(1.0)); + vec2 unnamed_74 = (vec2(2.0) / vec2(1.0)); + ivec2 unnamed_75 = (ivec2(2) % ivec2(1)); + ivec2 unnamed_76 = (ivec2(2) % ivec2(1)); + uvec2 unnamed_77 = (uvec2(2u) % uvec2(1u)); + uvec2 unnamed_78 = (uvec2(2u) % uvec2(1u)); + vec2 unnamed_79 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0))); + vec2 unnamed_80 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0))); + mat3x3 unnamed_81 = (mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) + mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); + mat3x3 unnamed_82 = (mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) - mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); + mat3x3 unnamed_83 = (mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) * 1.0); + mat3x3 unnamed_84 = (2.0 * mat3x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); + vec3 unnamed_85 = (mat4x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) * vec4(1.0)); + vec4 unnamed_86 = (vec3(2.0) * mat4x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); + mat3x3 unnamed_87 = (mat4x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0)) * mat3x4(vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0), vec4(0.0, 0.0, 0.0, 0.0))); } void bit() { - int unnamed_86 = (~1); - uint unnamed_87 = (~1u); - ivec2 unnamed_88 = (~ivec2(1)); - uvec3 unnamed_89 = (~uvec3(1u)); - int unnamed_90 = (2 | 1); - uint unnamed_91 = (2u | 1u); - ivec2 unnamed_92 = (ivec2(2) | ivec2(1)); - uvec3 unnamed_93 = (uvec3(2u) | uvec3(1u)); - int unnamed_94 = (2 & 1); - uint unnamed_95 = (2u & 1u); - ivec2 unnamed_96 = (ivec2(2) & ivec2(1)); - uvec3 unnamed_97 = (uvec3(2u) & uvec3(1u)); - int unnamed_98 = (2 ^ 1); - uint unnamed_99 = (2u ^ 1u); - ivec2 unnamed_100 = (ivec2(2) ^ ivec2(1)); - uvec3 unnamed_101 = (uvec3(2u) ^ uvec3(1u)); - int unnamed_102 = (2 << 1u); - uint unnamed_103 = (2u << 1u); - ivec2 unnamed_104 = (ivec2(2) << uvec2(1u)); - uvec3 unnamed_105 = (uvec3(2u) << uvec3(1u)); - int unnamed_106 = (2 >> 1u); - uint unnamed_107 = (2u >> 1u); - ivec2 unnamed_108 = (ivec2(2) >> uvec2(1u)); - uvec3 unnamed_109 = (uvec3(2u) >> uvec3(1u)); + int unnamed_88 = (~1); + uint unnamed_89 = (~1u); + ivec2 unnamed_90 = (~ivec2(1)); + uvec3 unnamed_91 = (~uvec3(1u)); + int unnamed_92 = (2 | 1); + uint unnamed_93 = (2u | 1u); + ivec2 unnamed_94 = (ivec2(2) | ivec2(1)); + uvec3 unnamed_95 = (uvec3(2u) | uvec3(1u)); + int unnamed_96 = (2 & 1); + uint unnamed_97 = (2u & 1u); + ivec2 unnamed_98 = (ivec2(2) & ivec2(1)); + uvec3 unnamed_99 = (uvec3(2u) & uvec3(1u)); + int unnamed_100 = (2 ^ 1); + uint unnamed_101 = (2u ^ 1u); + ivec2 unnamed_102 = (ivec2(2) ^ ivec2(1)); + uvec3 unnamed_103 = (uvec3(2u) ^ uvec3(1u)); + int unnamed_104 = (2 << 1u); + uint unnamed_105 = (2u << 1u); + ivec2 unnamed_106 = (ivec2(2) << uvec2(1u)); + uvec3 unnamed_107 = (uvec3(2u) << uvec3(1u)); + int unnamed_108 = (2 >> 1u); + uint unnamed_109 = (2u >> 1u); + ivec2 unnamed_110 = (ivec2(2) >> uvec2(1u)); + uvec3 unnamed_111 = (uvec3(2u) >> uvec3(1u)); } void comparison() { - bool unnamed_110 = (2 == 1); - bool unnamed_111 = (2u == 1u); - bool unnamed_112 = (2.0 == 1.0); - bvec2 unnamed_113 = equal(ivec2(2), ivec2(1)); - bvec3 unnamed_114 = equal(uvec3(2u), uvec3(1u)); - bvec4 unnamed_115 = equal(vec4(2.0), vec4(1.0)); - bool unnamed_116 = (2 != 1); - bool unnamed_117 = (2u != 1u); - bool unnamed_118 = (2.0 != 1.0); - bvec2 unnamed_119 = notEqual(ivec2(2), ivec2(1)); - bvec3 unnamed_120 = notEqual(uvec3(2u), uvec3(1u)); - bvec4 unnamed_121 = notEqual(vec4(2.0), vec4(1.0)); - bool unnamed_122 = (2 < 1); - bool unnamed_123 = (2u < 1u); - bool unnamed_124 = (2.0 < 1.0); - bvec2 unnamed_125 = lessThan(ivec2(2), ivec2(1)); - bvec3 unnamed_126 = lessThan(uvec3(2u), uvec3(1u)); - bvec4 unnamed_127 = lessThan(vec4(2.0), vec4(1.0)); - bool unnamed_128 = (2 <= 1); - bool unnamed_129 = (2u <= 1u); - bool unnamed_130 = (2.0 <= 1.0); - bvec2 unnamed_131 = lessThanEqual(ivec2(2), ivec2(1)); - bvec3 unnamed_132 = lessThanEqual(uvec3(2u), uvec3(1u)); - bvec4 unnamed_133 = lessThanEqual(vec4(2.0), vec4(1.0)); - bool unnamed_134 = (2 > 1); - bool unnamed_135 = (2u > 1u); - bool unnamed_136 = (2.0 > 1.0); - bvec2 unnamed_137 = greaterThan(ivec2(2), ivec2(1)); - bvec3 unnamed_138 = greaterThan(uvec3(2u), uvec3(1u)); - bvec4 unnamed_139 = greaterThan(vec4(2.0), vec4(1.0)); - bool unnamed_140 = (2 >= 1); - bool unnamed_141 = (2u >= 1u); - bool unnamed_142 = (2.0 >= 1.0); - bvec2 unnamed_143 = greaterThanEqual(ivec2(2), ivec2(1)); - bvec3 unnamed_144 = greaterThanEqual(uvec3(2u), uvec3(1u)); - bvec4 unnamed_145 = greaterThanEqual(vec4(2.0), vec4(1.0)); + bool unnamed_112 = (2 == 1); + bool unnamed_113 = (2u == 1u); + bool unnamed_114 = (2.0 == 1.0); + bvec2 unnamed_115 = equal(ivec2(2), ivec2(1)); + bvec3 unnamed_116 = equal(uvec3(2u), uvec3(1u)); + bvec4 unnamed_117 = equal(vec4(2.0), vec4(1.0)); + bool unnamed_118 = (2 != 1); + bool unnamed_119 = (2u != 1u); + bool unnamed_120 = (2.0 != 1.0); + bvec2 unnamed_121 = notEqual(ivec2(2), ivec2(1)); + bvec3 unnamed_122 = notEqual(uvec3(2u), uvec3(1u)); + bvec4 unnamed_123 = notEqual(vec4(2.0), vec4(1.0)); + bool unnamed_124 = (2 < 1); + bool unnamed_125 = (2u < 1u); + bool unnamed_126 = (2.0 < 1.0); + bvec2 unnamed_127 = lessThan(ivec2(2), ivec2(1)); + bvec3 unnamed_128 = lessThan(uvec3(2u), uvec3(1u)); + bvec4 unnamed_129 = lessThan(vec4(2.0), vec4(1.0)); + bool unnamed_130 = (2 <= 1); + bool unnamed_131 = (2u <= 1u); + bool unnamed_132 = (2.0 <= 1.0); + bvec2 unnamed_133 = lessThanEqual(ivec2(2), ivec2(1)); + bvec3 unnamed_134 = lessThanEqual(uvec3(2u), uvec3(1u)); + bvec4 unnamed_135 = lessThanEqual(vec4(2.0), vec4(1.0)); + bool unnamed_136 = (2 > 1); + bool unnamed_137 = (2u > 1u); + bool unnamed_138 = (2.0 > 1.0); + bvec2 unnamed_139 = greaterThan(ivec2(2), ivec2(1)); + bvec3 unnamed_140 = greaterThan(uvec3(2u), uvec3(1u)); + bvec4 unnamed_141 = greaterThan(vec4(2.0), vec4(1.0)); + bool unnamed_142 = (2 >= 1); + bool unnamed_143 = (2u >= 1u); + bool unnamed_144 = (2.0 >= 1.0); + bvec2 unnamed_145 = greaterThanEqual(ivec2(2), ivec2(1)); + bvec3 unnamed_146 = greaterThanEqual(uvec3(2u), uvec3(1u)); + bvec4 unnamed_147 = greaterThanEqual(vec4(2.0), vec4(1.0)); } void assignment() { diff --git a/tests/out/hlsl/operators.hlsl b/tests/out/hlsl/operators.hlsl index 672dcc303..e1e0335f8 100644 --- a/tests/out/hlsl/operators.hlsl +++ b/tests/out/hlsl/operators.hlsl @@ -70,161 +70,163 @@ float constructors() float unnamed_6 = float(0.0); uint2 unnamed_7 = uint2(uint2(0u, 0u)); float2x3 unnamed_8 = float2x3(float2x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); - float _expr71 = foo.a.x; - return _expr71; + uint2 unnamed_9 = uint2(uint2(0u, 0u)); + float2x3 unnamed_10 = float2x3(float2x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); + float _expr75 = foo.a.x; + return _expr75; } void logical() { - bool unnamed_9 = !true; - bool2 unnamed_10 = !(true).xx; - bool unnamed_11 = (true || false); - bool unnamed_12 = (true && false); - bool unnamed_13 = (true | false); - bool3 unnamed_14 = ((true).xxx | (false).xxx); - bool unnamed_15 = (true & false); - bool4 unnamed_16 = ((true).xxxx & (false).xxxx); + bool unnamed_11 = !true; + bool2 unnamed_12 = !(true).xx; + bool unnamed_13 = (true || false); + bool unnamed_14 = (true && false); + bool unnamed_15 = (true | false); + bool3 unnamed_16 = ((true).xxx | (false).xxx); + bool unnamed_17 = (true & false); + bool4 unnamed_18 = ((true).xxxx & (false).xxxx); } void arithmetic() { - int2 unnamed_17 = -(1).xx; - float2 unnamed_18 = -(1.0).xx; - int unnamed_19 = (2 + 1); - uint unnamed_20 = (2u + 1u); - float unnamed_21 = (2.0 + 1.0); - int2 unnamed_22 = ((2).xx + (1).xx); - uint3 unnamed_23 = ((2u).xxx + (1u).xxx); - float4 unnamed_24 = ((2.0).xxxx + (1.0).xxxx); - int unnamed_25 = (2 - 1); - uint unnamed_26 = (2u - 1u); - float unnamed_27 = (2.0 - 1.0); - int2 unnamed_28 = ((2).xx - (1).xx); - uint3 unnamed_29 = ((2u).xxx - (1u).xxx); - float4 unnamed_30 = ((2.0).xxxx - (1.0).xxxx); - int unnamed_31 = (2 * 1); - uint unnamed_32 = (2u * 1u); - float unnamed_33 = (2.0 * 1.0); - int2 unnamed_34 = ((2).xx * (1).xx); - uint3 unnamed_35 = ((2u).xxx * (1u).xxx); - float4 unnamed_36 = ((2.0).xxxx * (1.0).xxxx); - int unnamed_37 = (2 / 1); - uint unnamed_38 = (2u / 1u); - float unnamed_39 = (2.0 / 1.0); - int2 unnamed_40 = ((2).xx / (1).xx); - uint3 unnamed_41 = ((2u).xxx / (1u).xxx); - float4 unnamed_42 = ((2.0).xxxx / (1.0).xxxx); - int unnamed_43 = (2 % 1); - uint unnamed_44 = (2u % 1u); - float unnamed_45 = fmod(2.0, 1.0); - int2 unnamed_46 = ((2).xx % (1).xx); - uint3 unnamed_47 = ((2u).xxx % (1u).xxx); - float4 unnamed_48 = fmod((2.0).xxxx, (1.0).xxxx); - int2 unnamed_49 = ((2).xx + (1).xx); - int2 unnamed_50 = ((2).xx + (1).xx); - uint2 unnamed_51 = ((2u).xx + (1u).xx); - uint2 unnamed_52 = ((2u).xx + (1u).xx); - float2 unnamed_53 = ((2.0).xx + (1.0).xx); - float2 unnamed_54 = ((2.0).xx + (1.0).xx); - int2 unnamed_55 = ((2).xx - (1).xx); - int2 unnamed_56 = ((2).xx - (1).xx); - uint2 unnamed_57 = ((2u).xx - (1u).xx); - uint2 unnamed_58 = ((2u).xx - (1u).xx); - float2 unnamed_59 = ((2.0).xx - (1.0).xx); - float2 unnamed_60 = ((2.0).xx - (1.0).xx); - int2 unnamed_61 = ((2).xx * 1); - int2 unnamed_62 = (2 * (1).xx); - uint2 unnamed_63 = ((2u).xx * 1u); - uint2 unnamed_64 = (2u * (1u).xx); - float2 unnamed_65 = ((2.0).xx * 1.0); - float2 unnamed_66 = (2.0 * (1.0).xx); - int2 unnamed_67 = ((2).xx / (1).xx); - int2 unnamed_68 = ((2).xx / (1).xx); - uint2 unnamed_69 = ((2u).xx / (1u).xx); - uint2 unnamed_70 = ((2u).xx / (1u).xx); - float2 unnamed_71 = ((2.0).xx / (1.0).xx); - float2 unnamed_72 = ((2.0).xx / (1.0).xx); - int2 unnamed_73 = ((2).xx % (1).xx); - int2 unnamed_74 = ((2).xx % (1).xx); - uint2 unnamed_75 = ((2u).xx % (1u).xx); - uint2 unnamed_76 = ((2u).xx % (1u).xx); - float2 unnamed_77 = fmod((2.0).xx, (1.0).xx); - float2 unnamed_78 = fmod((2.0).xx, (1.0).xx); - float3x3 unnamed_79 = (float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)) + float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); - float3x3 unnamed_80 = (float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)) - float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); - float3x3 unnamed_81 = mul(1.0, float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); - float3x3 unnamed_82 = mul(float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)), 2.0); - float3 unnamed_83 = mul((1.0).xxxx, float4x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); - float4 unnamed_84 = mul(float4x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)), (2.0).xxx); - float3x3 unnamed_85 = mul(float3x4(float4(0.0, 0.0, 0.0, 0.0), float4(0.0, 0.0, 0.0, 0.0), float4(0.0, 0.0, 0.0, 0.0)), float4x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); + int2 unnamed_19 = -(1).xx; + float2 unnamed_20 = -(1.0).xx; + int unnamed_21 = (2 + 1); + uint unnamed_22 = (2u + 1u); + float unnamed_23 = (2.0 + 1.0); + int2 unnamed_24 = ((2).xx + (1).xx); + uint3 unnamed_25 = ((2u).xxx + (1u).xxx); + float4 unnamed_26 = ((2.0).xxxx + (1.0).xxxx); + int unnamed_27 = (2 - 1); + uint unnamed_28 = (2u - 1u); + float unnamed_29 = (2.0 - 1.0); + int2 unnamed_30 = ((2).xx - (1).xx); + uint3 unnamed_31 = ((2u).xxx - (1u).xxx); + float4 unnamed_32 = ((2.0).xxxx - (1.0).xxxx); + int unnamed_33 = (2 * 1); + uint unnamed_34 = (2u * 1u); + float unnamed_35 = (2.0 * 1.0); + int2 unnamed_36 = ((2).xx * (1).xx); + uint3 unnamed_37 = ((2u).xxx * (1u).xxx); + float4 unnamed_38 = ((2.0).xxxx * (1.0).xxxx); + int unnamed_39 = (2 / 1); + uint unnamed_40 = (2u / 1u); + float unnamed_41 = (2.0 / 1.0); + int2 unnamed_42 = ((2).xx / (1).xx); + uint3 unnamed_43 = ((2u).xxx / (1u).xxx); + float4 unnamed_44 = ((2.0).xxxx / (1.0).xxxx); + int unnamed_45 = (2 % 1); + uint unnamed_46 = (2u % 1u); + float unnamed_47 = fmod(2.0, 1.0); + int2 unnamed_48 = ((2).xx % (1).xx); + uint3 unnamed_49 = ((2u).xxx % (1u).xxx); + float4 unnamed_50 = fmod((2.0).xxxx, (1.0).xxxx); + int2 unnamed_51 = ((2).xx + (1).xx); + int2 unnamed_52 = ((2).xx + (1).xx); + uint2 unnamed_53 = ((2u).xx + (1u).xx); + uint2 unnamed_54 = ((2u).xx + (1u).xx); + float2 unnamed_55 = ((2.0).xx + (1.0).xx); + float2 unnamed_56 = ((2.0).xx + (1.0).xx); + int2 unnamed_57 = ((2).xx - (1).xx); + int2 unnamed_58 = ((2).xx - (1).xx); + uint2 unnamed_59 = ((2u).xx - (1u).xx); + uint2 unnamed_60 = ((2u).xx - (1u).xx); + float2 unnamed_61 = ((2.0).xx - (1.0).xx); + float2 unnamed_62 = ((2.0).xx - (1.0).xx); + int2 unnamed_63 = ((2).xx * 1); + int2 unnamed_64 = (2 * (1).xx); + uint2 unnamed_65 = ((2u).xx * 1u); + uint2 unnamed_66 = (2u * (1u).xx); + float2 unnamed_67 = ((2.0).xx * 1.0); + float2 unnamed_68 = (2.0 * (1.0).xx); + int2 unnamed_69 = ((2).xx / (1).xx); + int2 unnamed_70 = ((2).xx / (1).xx); + uint2 unnamed_71 = ((2u).xx / (1u).xx); + uint2 unnamed_72 = ((2u).xx / (1u).xx); + float2 unnamed_73 = ((2.0).xx / (1.0).xx); + float2 unnamed_74 = ((2.0).xx / (1.0).xx); + int2 unnamed_75 = ((2).xx % (1).xx); + int2 unnamed_76 = ((2).xx % (1).xx); + uint2 unnamed_77 = ((2u).xx % (1u).xx); + uint2 unnamed_78 = ((2u).xx % (1u).xx); + float2 unnamed_79 = fmod((2.0).xx, (1.0).xx); + float2 unnamed_80 = fmod((2.0).xx, (1.0).xx); + float3x3 unnamed_81 = (float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)) + float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); + float3x3 unnamed_82 = (float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)) - float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); + float3x3 unnamed_83 = mul(1.0, float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); + float3x3 unnamed_84 = mul(float3x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)), 2.0); + float3 unnamed_85 = mul((1.0).xxxx, float4x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); + float4 unnamed_86 = mul(float4x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0)), (2.0).xxx); + float3x3 unnamed_87 = mul(float3x4(float4(0.0, 0.0, 0.0, 0.0), float4(0.0, 0.0, 0.0, 0.0), float4(0.0, 0.0, 0.0, 0.0)), float4x3(float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0), float3(0.0, 0.0, 0.0))); } void bit() { - int unnamed_86 = ~1; - uint unnamed_87 = ~1u; - int2 unnamed_88 = ~(1).xx; - uint3 unnamed_89 = ~(1u).xxx; - int unnamed_90 = (2 | 1); - uint unnamed_91 = (2u | 1u); - int2 unnamed_92 = ((2).xx | (1).xx); - uint3 unnamed_93 = ((2u).xxx | (1u).xxx); - int unnamed_94 = (2 & 1); - uint unnamed_95 = (2u & 1u); - int2 unnamed_96 = ((2).xx & (1).xx); - uint3 unnamed_97 = ((2u).xxx & (1u).xxx); - int unnamed_98 = (2 ^ 1); - uint unnamed_99 = (2u ^ 1u); - int2 unnamed_100 = ((2).xx ^ (1).xx); - uint3 unnamed_101 = ((2u).xxx ^ (1u).xxx); - int unnamed_102 = (2 << 1u); - uint unnamed_103 = (2u << 1u); - int2 unnamed_104 = ((2).xx << (1u).xx); - uint3 unnamed_105 = ((2u).xxx << (1u).xxx); - int unnamed_106 = (2 >> 1u); - uint unnamed_107 = (2u >> 1u); - int2 unnamed_108 = ((2).xx >> (1u).xx); - uint3 unnamed_109 = ((2u).xxx >> (1u).xxx); + int unnamed_88 = ~1; + uint unnamed_89 = ~1u; + int2 unnamed_90 = ~(1).xx; + uint3 unnamed_91 = ~(1u).xxx; + int unnamed_92 = (2 | 1); + uint unnamed_93 = (2u | 1u); + int2 unnamed_94 = ((2).xx | (1).xx); + uint3 unnamed_95 = ((2u).xxx | (1u).xxx); + int unnamed_96 = (2 & 1); + uint unnamed_97 = (2u & 1u); + int2 unnamed_98 = ((2).xx & (1).xx); + uint3 unnamed_99 = ((2u).xxx & (1u).xxx); + int unnamed_100 = (2 ^ 1); + uint unnamed_101 = (2u ^ 1u); + int2 unnamed_102 = ((2).xx ^ (1).xx); + uint3 unnamed_103 = ((2u).xxx ^ (1u).xxx); + int unnamed_104 = (2 << 1u); + uint unnamed_105 = (2u << 1u); + int2 unnamed_106 = ((2).xx << (1u).xx); + uint3 unnamed_107 = ((2u).xxx << (1u).xxx); + int unnamed_108 = (2 >> 1u); + uint unnamed_109 = (2u >> 1u); + int2 unnamed_110 = ((2).xx >> (1u).xx); + uint3 unnamed_111 = ((2u).xxx >> (1u).xxx); } void comparison() { - bool unnamed_110 = (2 == 1); - bool unnamed_111 = (2u == 1u); - bool unnamed_112 = (2.0 == 1.0); - bool2 unnamed_113 = ((2).xx == (1).xx); - bool3 unnamed_114 = ((2u).xxx == (1u).xxx); - bool4 unnamed_115 = ((2.0).xxxx == (1.0).xxxx); - bool unnamed_116 = (2 != 1); - bool unnamed_117 = (2u != 1u); - bool unnamed_118 = (2.0 != 1.0); - bool2 unnamed_119 = ((2).xx != (1).xx); - bool3 unnamed_120 = ((2u).xxx != (1u).xxx); - bool4 unnamed_121 = ((2.0).xxxx != (1.0).xxxx); - bool unnamed_122 = (2 < 1); - bool unnamed_123 = (2u < 1u); - bool unnamed_124 = (2.0 < 1.0); - bool2 unnamed_125 = ((2).xx < (1).xx); - bool3 unnamed_126 = ((2u).xxx < (1u).xxx); - bool4 unnamed_127 = ((2.0).xxxx < (1.0).xxxx); - bool unnamed_128 = (2 <= 1); - bool unnamed_129 = (2u <= 1u); - bool unnamed_130 = (2.0 <= 1.0); - bool2 unnamed_131 = ((2).xx <= (1).xx); - bool3 unnamed_132 = ((2u).xxx <= (1u).xxx); - bool4 unnamed_133 = ((2.0).xxxx <= (1.0).xxxx); - bool unnamed_134 = (2 > 1); - bool unnamed_135 = (2u > 1u); - bool unnamed_136 = (2.0 > 1.0); - bool2 unnamed_137 = ((2).xx > (1).xx); - bool3 unnamed_138 = ((2u).xxx > (1u).xxx); - bool4 unnamed_139 = ((2.0).xxxx > (1.0).xxxx); - bool unnamed_140 = (2 >= 1); - bool unnamed_141 = (2u >= 1u); - bool unnamed_142 = (2.0 >= 1.0); - bool2 unnamed_143 = ((2).xx >= (1).xx); - bool3 unnamed_144 = ((2u).xxx >= (1u).xxx); - bool4 unnamed_145 = ((2.0).xxxx >= (1.0).xxxx); + bool unnamed_112 = (2 == 1); + bool unnamed_113 = (2u == 1u); + bool unnamed_114 = (2.0 == 1.0); + bool2 unnamed_115 = ((2).xx == (1).xx); + bool3 unnamed_116 = ((2u).xxx == (1u).xxx); + bool4 unnamed_117 = ((2.0).xxxx == (1.0).xxxx); + bool unnamed_118 = (2 != 1); + bool unnamed_119 = (2u != 1u); + bool unnamed_120 = (2.0 != 1.0); + bool2 unnamed_121 = ((2).xx != (1).xx); + bool3 unnamed_122 = ((2u).xxx != (1u).xxx); + bool4 unnamed_123 = ((2.0).xxxx != (1.0).xxxx); + bool unnamed_124 = (2 < 1); + bool unnamed_125 = (2u < 1u); + bool unnamed_126 = (2.0 < 1.0); + bool2 unnamed_127 = ((2).xx < (1).xx); + bool3 unnamed_128 = ((2u).xxx < (1u).xxx); + bool4 unnamed_129 = ((2.0).xxxx < (1.0).xxxx); + bool unnamed_130 = (2 <= 1); + bool unnamed_131 = (2u <= 1u); + bool unnamed_132 = (2.0 <= 1.0); + bool2 unnamed_133 = ((2).xx <= (1).xx); + bool3 unnamed_134 = ((2u).xxx <= (1u).xxx); + bool4 unnamed_135 = ((2.0).xxxx <= (1.0).xxxx); + bool unnamed_136 = (2 > 1); + bool unnamed_137 = (2u > 1u); + bool unnamed_138 = (2.0 > 1.0); + bool2 unnamed_139 = ((2).xx > (1).xx); + bool3 unnamed_140 = ((2u).xxx > (1u).xxx); + bool4 unnamed_141 = ((2.0).xxxx > (1.0).xxxx); + bool unnamed_142 = (2 >= 1); + bool unnamed_143 = (2u >= 1u); + bool unnamed_144 = (2.0 >= 1.0); + bool2 unnamed_145 = ((2).xx >= (1).xx); + bool3 unnamed_146 = ((2u).xxx >= (1u).xxx); + bool4 unnamed_147 = ((2.0).xxxx >= (1.0).xxxx); } void assignment() diff --git a/tests/out/msl/operators.msl b/tests/out/msl/operators.msl index 03b176113..d3665d35a 100644 --- a/tests/out/msl/operators.msl +++ b/tests/out/msl/operators.msl @@ -73,161 +73,163 @@ float constructors( float unnamed_6 = static_cast(0.0); metal::uint2 unnamed_7 = static_cast(const_type_11_); metal::float2x3 unnamed_8 = static_cast(const_type_14_); - float _e71 = foo.a.x; - return _e71; + metal::uint2 unnamed_9 = as_type(const_type_11_); + metal::float2x3 unnamed_10 = as_type(const_type_14_); + float _e75 = foo.a.x; + return _e75; } void logical( ) { - bool unnamed_9 = !true; - metal::bool2 unnamed_10 = !metal::bool2(true); - bool unnamed_11 = true || false; - bool unnamed_12 = true && false; - bool unnamed_13 = true | false; - metal::bool3 unnamed_14 = metal::bool3(true) | metal::bool3(false); - bool unnamed_15 = true & false; - metal::bool4 unnamed_16 = metal::bool4(true) & metal::bool4(false); + bool unnamed_11 = !true; + metal::bool2 unnamed_12 = !metal::bool2(true); + bool unnamed_13 = true || false; + bool unnamed_14 = true && false; + bool unnamed_15 = true | false; + metal::bool3 unnamed_16 = metal::bool3(true) | metal::bool3(false); + bool unnamed_17 = true & false; + metal::bool4 unnamed_18 = metal::bool4(true) & metal::bool4(false); } void arithmetic( ) { - metal::int2 unnamed_17 = -metal::int2(1); - metal::float2 unnamed_18 = -metal::float2(1.0); - int unnamed_19 = 2 + 1; - uint unnamed_20 = 2u + 1u; - float unnamed_21 = 2.0 + 1.0; - metal::int2 unnamed_22 = metal::int2(2) + metal::int2(1); - metal::uint3 unnamed_23 = metal::uint3(2u) + metal::uint3(1u); - metal::float4 unnamed_24 = metal::float4(2.0) + metal::float4(1.0); - int unnamed_25 = 2 - 1; - uint unnamed_26 = 2u - 1u; - float unnamed_27 = 2.0 - 1.0; - metal::int2 unnamed_28 = metal::int2(2) - metal::int2(1); - metal::uint3 unnamed_29 = metal::uint3(2u) - metal::uint3(1u); - metal::float4 unnamed_30 = metal::float4(2.0) - metal::float4(1.0); - int unnamed_31 = 2 * 1; - uint unnamed_32 = 2u * 1u; - float unnamed_33 = 2.0 * 1.0; - metal::int2 unnamed_34 = metal::int2(2) * metal::int2(1); - metal::uint3 unnamed_35 = metal::uint3(2u) * metal::uint3(1u); - metal::float4 unnamed_36 = metal::float4(2.0) * metal::float4(1.0); - int unnamed_37 = 2 / 1; - uint unnamed_38 = 2u / 1u; - float unnamed_39 = 2.0 / 1.0; - metal::int2 unnamed_40 = metal::int2(2) / metal::int2(1); - metal::uint3 unnamed_41 = metal::uint3(2u) / metal::uint3(1u); - metal::float4 unnamed_42 = metal::float4(2.0) / metal::float4(1.0); - int unnamed_43 = 2 % 1; - uint unnamed_44 = 2u % 1u; - float unnamed_45 = metal::fmod(2.0, 1.0); - metal::int2 unnamed_46 = metal::int2(2) % metal::int2(1); - metal::uint3 unnamed_47 = metal::uint3(2u) % metal::uint3(1u); - metal::float4 unnamed_48 = metal::fmod(metal::float4(2.0), metal::float4(1.0)); - metal::int2 unnamed_49 = metal::int2(2) + metal::int2(1); - metal::int2 unnamed_50 = metal::int2(2) + metal::int2(1); - metal::uint2 unnamed_51 = metal::uint2(2u) + metal::uint2(1u); - metal::uint2 unnamed_52 = metal::uint2(2u) + metal::uint2(1u); - metal::float2 unnamed_53 = metal::float2(2.0) + metal::float2(1.0); - metal::float2 unnamed_54 = metal::float2(2.0) + metal::float2(1.0); - metal::int2 unnamed_55 = metal::int2(2) - metal::int2(1); - metal::int2 unnamed_56 = metal::int2(2) - metal::int2(1); - metal::uint2 unnamed_57 = metal::uint2(2u) - metal::uint2(1u); - metal::uint2 unnamed_58 = metal::uint2(2u) - metal::uint2(1u); - metal::float2 unnamed_59 = metal::float2(2.0) - metal::float2(1.0); - metal::float2 unnamed_60 = metal::float2(2.0) - metal::float2(1.0); - metal::int2 unnamed_61 = metal::int2(2) * 1; - metal::int2 unnamed_62 = 2 * metal::int2(1); - metal::uint2 unnamed_63 = metal::uint2(2u) * 1u; - metal::uint2 unnamed_64 = 2u * metal::uint2(1u); - metal::float2 unnamed_65 = metal::float2(2.0) * 1.0; - metal::float2 unnamed_66 = 2.0 * metal::float2(1.0); - metal::int2 unnamed_67 = metal::int2(2) / metal::int2(1); - metal::int2 unnamed_68 = metal::int2(2) / metal::int2(1); - metal::uint2 unnamed_69 = metal::uint2(2u) / metal::uint2(1u); - metal::uint2 unnamed_70 = metal::uint2(2u) / metal::uint2(1u); - metal::float2 unnamed_71 = metal::float2(2.0) / metal::float2(1.0); - metal::float2 unnamed_72 = metal::float2(2.0) / metal::float2(1.0); - metal::int2 unnamed_73 = metal::int2(2) % metal::int2(1); - metal::int2 unnamed_74 = metal::int2(2) % metal::int2(1); - metal::uint2 unnamed_75 = metal::uint2(2u) % metal::uint2(1u); - metal::uint2 unnamed_76 = metal::uint2(2u) % metal::uint2(1u); - metal::float2 unnamed_77 = metal::fmod(metal::float2(2.0), metal::float2(1.0)); - metal::float2 unnamed_78 = metal::fmod(metal::float2(2.0), metal::float2(1.0)); - metal::float3x3 unnamed_79 = const_type_15_ + const_type_15_; - metal::float3x3 unnamed_80 = const_type_15_ - const_type_15_; - metal::float3x3 unnamed_81 = const_type_15_ * 1.0; - metal::float3x3 unnamed_82 = 2.0 * const_type_15_; - metal::float3 unnamed_83 = const_type_16_ * metal::float4(1.0); - metal::float4 unnamed_84 = metal::float3(2.0) * const_type_16_; - metal::float3x3 unnamed_85 = const_type_16_ * const_type_17_; + metal::int2 unnamed_19 = -metal::int2(1); + metal::float2 unnamed_20 = -metal::float2(1.0); + int unnamed_21 = 2 + 1; + uint unnamed_22 = 2u + 1u; + float unnamed_23 = 2.0 + 1.0; + metal::int2 unnamed_24 = metal::int2(2) + metal::int2(1); + metal::uint3 unnamed_25 = metal::uint3(2u) + metal::uint3(1u); + metal::float4 unnamed_26 = metal::float4(2.0) + metal::float4(1.0); + int unnamed_27 = 2 - 1; + uint unnamed_28 = 2u - 1u; + float unnamed_29 = 2.0 - 1.0; + metal::int2 unnamed_30 = metal::int2(2) - metal::int2(1); + metal::uint3 unnamed_31 = metal::uint3(2u) - metal::uint3(1u); + metal::float4 unnamed_32 = metal::float4(2.0) - metal::float4(1.0); + int unnamed_33 = 2 * 1; + uint unnamed_34 = 2u * 1u; + float unnamed_35 = 2.0 * 1.0; + metal::int2 unnamed_36 = metal::int2(2) * metal::int2(1); + metal::uint3 unnamed_37 = metal::uint3(2u) * metal::uint3(1u); + metal::float4 unnamed_38 = metal::float4(2.0) * metal::float4(1.0); + int unnamed_39 = 2 / 1; + uint unnamed_40 = 2u / 1u; + float unnamed_41 = 2.0 / 1.0; + metal::int2 unnamed_42 = metal::int2(2) / metal::int2(1); + metal::uint3 unnamed_43 = metal::uint3(2u) / metal::uint3(1u); + metal::float4 unnamed_44 = metal::float4(2.0) / metal::float4(1.0); + int unnamed_45 = 2 % 1; + uint unnamed_46 = 2u % 1u; + float unnamed_47 = metal::fmod(2.0, 1.0); + metal::int2 unnamed_48 = metal::int2(2) % metal::int2(1); + metal::uint3 unnamed_49 = metal::uint3(2u) % metal::uint3(1u); + metal::float4 unnamed_50 = metal::fmod(metal::float4(2.0), metal::float4(1.0)); + metal::int2 unnamed_51 = metal::int2(2) + metal::int2(1); + metal::int2 unnamed_52 = metal::int2(2) + metal::int2(1); + metal::uint2 unnamed_53 = metal::uint2(2u) + metal::uint2(1u); + metal::uint2 unnamed_54 = metal::uint2(2u) + metal::uint2(1u); + metal::float2 unnamed_55 = metal::float2(2.0) + metal::float2(1.0); + metal::float2 unnamed_56 = metal::float2(2.0) + metal::float2(1.0); + metal::int2 unnamed_57 = metal::int2(2) - metal::int2(1); + metal::int2 unnamed_58 = metal::int2(2) - metal::int2(1); + metal::uint2 unnamed_59 = metal::uint2(2u) - metal::uint2(1u); + metal::uint2 unnamed_60 = metal::uint2(2u) - metal::uint2(1u); + metal::float2 unnamed_61 = metal::float2(2.0) - metal::float2(1.0); + metal::float2 unnamed_62 = metal::float2(2.0) - metal::float2(1.0); + metal::int2 unnamed_63 = metal::int2(2) * 1; + metal::int2 unnamed_64 = 2 * metal::int2(1); + metal::uint2 unnamed_65 = metal::uint2(2u) * 1u; + metal::uint2 unnamed_66 = 2u * metal::uint2(1u); + metal::float2 unnamed_67 = metal::float2(2.0) * 1.0; + metal::float2 unnamed_68 = 2.0 * metal::float2(1.0); + metal::int2 unnamed_69 = metal::int2(2) / metal::int2(1); + metal::int2 unnamed_70 = metal::int2(2) / metal::int2(1); + metal::uint2 unnamed_71 = metal::uint2(2u) / metal::uint2(1u); + metal::uint2 unnamed_72 = metal::uint2(2u) / metal::uint2(1u); + metal::float2 unnamed_73 = metal::float2(2.0) / metal::float2(1.0); + metal::float2 unnamed_74 = metal::float2(2.0) / metal::float2(1.0); + metal::int2 unnamed_75 = metal::int2(2) % metal::int2(1); + metal::int2 unnamed_76 = metal::int2(2) % metal::int2(1); + metal::uint2 unnamed_77 = metal::uint2(2u) % metal::uint2(1u); + metal::uint2 unnamed_78 = metal::uint2(2u) % metal::uint2(1u); + metal::float2 unnamed_79 = metal::fmod(metal::float2(2.0), metal::float2(1.0)); + metal::float2 unnamed_80 = metal::fmod(metal::float2(2.0), metal::float2(1.0)); + metal::float3x3 unnamed_81 = const_type_15_ + const_type_15_; + metal::float3x3 unnamed_82 = const_type_15_ - const_type_15_; + metal::float3x3 unnamed_83 = const_type_15_ * 1.0; + metal::float3x3 unnamed_84 = 2.0 * const_type_15_; + metal::float3 unnamed_85 = const_type_16_ * metal::float4(1.0); + metal::float4 unnamed_86 = metal::float3(2.0) * const_type_16_; + metal::float3x3 unnamed_87 = const_type_16_ * const_type_17_; } void bit( ) { - int unnamed_86 = ~1; - uint unnamed_87 = ~1u; - metal::int2 unnamed_88 = ~metal::int2(1); - metal::uint3 unnamed_89 = ~metal::uint3(1u); - int unnamed_90 = 2 | 1; - uint unnamed_91 = 2u | 1u; - metal::int2 unnamed_92 = metal::int2(2) | metal::int2(1); - metal::uint3 unnamed_93 = metal::uint3(2u) | metal::uint3(1u); - int unnamed_94 = 2 & 1; - uint unnamed_95 = 2u & 1u; - metal::int2 unnamed_96 = metal::int2(2) & metal::int2(1); - metal::uint3 unnamed_97 = metal::uint3(2u) & metal::uint3(1u); - int unnamed_98 = 2 ^ 1; - uint unnamed_99 = 2u ^ 1u; - metal::int2 unnamed_100 = metal::int2(2) ^ metal::int2(1); - metal::uint3 unnamed_101 = metal::uint3(2u) ^ metal::uint3(1u); - int unnamed_102 = 2 << 1u; - uint unnamed_103 = 2u << 1u; - metal::int2 unnamed_104 = metal::int2(2) << metal::uint2(1u); - metal::uint3 unnamed_105 = metal::uint3(2u) << metal::uint3(1u); - int unnamed_106 = 2 >> 1u; - uint unnamed_107 = 2u >> 1u; - metal::int2 unnamed_108 = metal::int2(2) >> metal::uint2(1u); - metal::uint3 unnamed_109 = metal::uint3(2u) >> metal::uint3(1u); + int unnamed_88 = ~1; + uint unnamed_89 = ~1u; + metal::int2 unnamed_90 = ~metal::int2(1); + metal::uint3 unnamed_91 = ~metal::uint3(1u); + int unnamed_92 = 2 | 1; + uint unnamed_93 = 2u | 1u; + metal::int2 unnamed_94 = metal::int2(2) | metal::int2(1); + metal::uint3 unnamed_95 = metal::uint3(2u) | metal::uint3(1u); + int unnamed_96 = 2 & 1; + uint unnamed_97 = 2u & 1u; + metal::int2 unnamed_98 = metal::int2(2) & metal::int2(1); + metal::uint3 unnamed_99 = metal::uint3(2u) & metal::uint3(1u); + int unnamed_100 = 2 ^ 1; + uint unnamed_101 = 2u ^ 1u; + metal::int2 unnamed_102 = metal::int2(2) ^ metal::int2(1); + metal::uint3 unnamed_103 = metal::uint3(2u) ^ metal::uint3(1u); + int unnamed_104 = 2 << 1u; + uint unnamed_105 = 2u << 1u; + metal::int2 unnamed_106 = metal::int2(2) << metal::uint2(1u); + metal::uint3 unnamed_107 = metal::uint3(2u) << metal::uint3(1u); + int unnamed_108 = 2 >> 1u; + uint unnamed_109 = 2u >> 1u; + metal::int2 unnamed_110 = metal::int2(2) >> metal::uint2(1u); + metal::uint3 unnamed_111 = metal::uint3(2u) >> metal::uint3(1u); } void comparison( ) { - bool unnamed_110 = 2 == 1; - bool unnamed_111 = 2u == 1u; - bool unnamed_112 = 2.0 == 1.0; - metal::bool2 unnamed_113 = metal::int2(2) == metal::int2(1); - metal::bool3 unnamed_114 = metal::uint3(2u) == metal::uint3(1u); - metal::bool4 unnamed_115 = metal::float4(2.0) == metal::float4(1.0); - bool unnamed_116 = 2 != 1; - bool unnamed_117 = 2u != 1u; - bool unnamed_118 = 2.0 != 1.0; - metal::bool2 unnamed_119 = metal::int2(2) != metal::int2(1); - metal::bool3 unnamed_120 = metal::uint3(2u) != metal::uint3(1u); - metal::bool4 unnamed_121 = metal::float4(2.0) != metal::float4(1.0); - bool unnamed_122 = 2 < 1; - bool unnamed_123 = 2u < 1u; - bool unnamed_124 = 2.0 < 1.0; - metal::bool2 unnamed_125 = metal::int2(2) < metal::int2(1); - metal::bool3 unnamed_126 = metal::uint3(2u) < metal::uint3(1u); - metal::bool4 unnamed_127 = metal::float4(2.0) < metal::float4(1.0); - bool unnamed_128 = 2 <= 1; - bool unnamed_129 = 2u <= 1u; - bool unnamed_130 = 2.0 <= 1.0; - metal::bool2 unnamed_131 = metal::int2(2) <= metal::int2(1); - metal::bool3 unnamed_132 = metal::uint3(2u) <= metal::uint3(1u); - metal::bool4 unnamed_133 = metal::float4(2.0) <= metal::float4(1.0); - bool unnamed_134 = 2 > 1; - bool unnamed_135 = 2u > 1u; - bool unnamed_136 = 2.0 > 1.0; - metal::bool2 unnamed_137 = metal::int2(2) > metal::int2(1); - metal::bool3 unnamed_138 = metal::uint3(2u) > metal::uint3(1u); - metal::bool4 unnamed_139 = metal::float4(2.0) > metal::float4(1.0); - bool unnamed_140 = 2 >= 1; - bool unnamed_141 = 2u >= 1u; - bool unnamed_142 = 2.0 >= 1.0; - metal::bool2 unnamed_143 = metal::int2(2) >= metal::int2(1); - metal::bool3 unnamed_144 = metal::uint3(2u) >= metal::uint3(1u); - metal::bool4 unnamed_145 = metal::float4(2.0) >= metal::float4(1.0); + bool unnamed_112 = 2 == 1; + bool unnamed_113 = 2u == 1u; + bool unnamed_114 = 2.0 == 1.0; + metal::bool2 unnamed_115 = metal::int2(2) == metal::int2(1); + metal::bool3 unnamed_116 = metal::uint3(2u) == metal::uint3(1u); + metal::bool4 unnamed_117 = metal::float4(2.0) == metal::float4(1.0); + bool unnamed_118 = 2 != 1; + bool unnamed_119 = 2u != 1u; + bool unnamed_120 = 2.0 != 1.0; + metal::bool2 unnamed_121 = metal::int2(2) != metal::int2(1); + metal::bool3 unnamed_122 = metal::uint3(2u) != metal::uint3(1u); + metal::bool4 unnamed_123 = metal::float4(2.0) != metal::float4(1.0); + bool unnamed_124 = 2 < 1; + bool unnamed_125 = 2u < 1u; + bool unnamed_126 = 2.0 < 1.0; + metal::bool2 unnamed_127 = metal::int2(2) < metal::int2(1); + metal::bool3 unnamed_128 = metal::uint3(2u) < metal::uint3(1u); + metal::bool4 unnamed_129 = metal::float4(2.0) < metal::float4(1.0); + bool unnamed_130 = 2 <= 1; + bool unnamed_131 = 2u <= 1u; + bool unnamed_132 = 2.0 <= 1.0; + metal::bool2 unnamed_133 = metal::int2(2) <= metal::int2(1); + metal::bool3 unnamed_134 = metal::uint3(2u) <= metal::uint3(1u); + metal::bool4 unnamed_135 = metal::float4(2.0) <= metal::float4(1.0); + bool unnamed_136 = 2 > 1; + bool unnamed_137 = 2u > 1u; + bool unnamed_138 = 2.0 > 1.0; + metal::bool2 unnamed_139 = metal::int2(2) > metal::int2(1); + metal::bool3 unnamed_140 = metal::uint3(2u) > metal::uint3(1u); + metal::bool4 unnamed_141 = metal::float4(2.0) > metal::float4(1.0); + bool unnamed_142 = 2 >= 1; + bool unnamed_143 = 2u >= 1u; + bool unnamed_144 = 2.0 >= 1.0; + metal::bool2 unnamed_145 = metal::int2(2) >= metal::int2(1); + metal::bool3 unnamed_146 = metal::uint3(2u) >= metal::uint3(1u); + metal::bool4 unnamed_147 = metal::float4(2.0) >= metal::float4(1.0); } void assignment( diff --git a/tests/out/spv/operators.spvasm b/tests/out/spv/operators.spvasm index 657ad2e33..2e7cc3139 100644 --- a/tests/out/spv/operators.spvasm +++ b/tests/out/spv/operators.spvasm @@ -1,12 +1,12 @@ ; SPIR-V ; Version: 1.1 ; Generator: rspirv -; Bound: 523 +; Bound: 525 OpCapability Shader %1 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 -OpEntryPoint GLCompute %511 "main" -OpExecutionMode %511 LocalSize 1 1 1 +OpEntryPoint GLCompute %513 "main" +OpExecutionMode %513 LocalSize 1 1 1 OpMemberDecorate %30 0 Offset 0 OpMemberDecorate %30 1 Offset 16 OpDecorate %35 ArrayStride 32 @@ -73,15 +73,15 @@ OpDecorate %36 ArrayStride 4 %111 = OpTypePointer Function %30 %112 = OpConstantNull %30 %115 = OpTypeFunction %4 -%138 = OpTypePointer Function %26 -%139 = OpTypePointer Function %4 -%144 = OpTypeFunction %2 -%147 = OpTypeVector %10 2 -%163 = OpTypeVector %8 2 -%174 = OpTypeVector %20 3 -%469 = OpTypePointer Function %8 -%471 = OpTypePointer Function %41 -%501 = OpTypePointer Function %8 +%140 = OpTypePointer Function %26 +%141 = OpTypePointer Function %4 +%146 = OpTypeFunction %2 +%149 = OpTypeVector %10 2 +%165 = OpTypeVector %8 2 +%176 = OpTypeVector %20 3 +%471 = OpTypePointer Function %8 +%473 = OpTypePointer Function %41 +%503 = OpTypePointer Function %8 %59 = OpFunction %26 None %60 %58 = OpLabel OpBranch %61 @@ -167,413 +167,415 @@ OpStore %110 %118 %135 = OpBitcast %4 %5 %136 = OpBitcast %34 %46 %137 = OpCopyObject %37 %53 -%140 = OpAccessChain %139 %110 %19 %19 -%141 = OpLoad %4 %140 -OpReturnValue %141 +%138 = OpBitcast %34 %46 +%139 = OpCopyObject %37 %53 +%142 = OpAccessChain %141 %110 %19 %19 +%143 = OpLoad %4 %142 +OpReturnValue %143 OpFunctionEnd -%143 = OpFunction %2 None %144 -%142 = OpLabel -OpBranch %145 -%145 = OpLabel -%146 = OpLogicalNot %10 %9 -%148 = OpCompositeConstruct %147 %9 %9 -%149 = OpLogicalNot %147 %148 -%150 = OpLogicalOr %10 %9 %12 -%151 = OpLogicalAnd %10 %9 %12 +%145 = OpFunction %2 None %146 +%144 = OpLabel +OpBranch %147 +%147 = OpLabel +%148 = OpLogicalNot %10 %9 +%150 = OpCompositeConstruct %149 %9 %9 +%151 = OpLogicalNot %149 %150 %152 = OpLogicalOr %10 %9 %12 -%153 = OpCompositeConstruct %104 %9 %9 %9 -%154 = OpCompositeConstruct %104 %12 %12 %12 -%155 = OpLogicalOr %104 %153 %154 -%156 = OpLogicalAnd %10 %9 %12 -%157 = OpCompositeConstruct %28 %9 %9 %9 %9 -%158 = OpCompositeConstruct %28 %12 %12 %12 %12 -%159 = OpLogicalAnd %28 %157 %158 +%153 = OpLogicalAnd %10 %9 %12 +%154 = OpLogicalOr %10 %9 %12 +%155 = OpCompositeConstruct %104 %9 %9 %9 +%156 = OpCompositeConstruct %104 %12 %12 %12 +%157 = OpLogicalOr %104 %155 %156 +%158 = OpLogicalAnd %10 %9 %12 +%159 = OpCompositeConstruct %28 %9 %9 %9 %9 +%160 = OpCompositeConstruct %28 %12 %12 %12 %12 +%161 = OpLogicalAnd %28 %159 %160 OpReturn OpFunctionEnd -%161 = OpFunction %2 None %144 -%160 = OpLabel -OpBranch %162 +%163 = OpFunction %2 None %146 %162 = OpLabel -%164 = OpCompositeConstruct %163 %7 %7 -%165 = OpSNegate %163 %164 -%166 = OpCompositeConstruct %31 %3 %3 -%167 = OpFNegate %31 %166 -%168 = OpIAdd %8 %18 %7 -%169 = OpIAdd %20 %24 %25 -%170 = OpFAdd %4 %14 %3 -%171 = OpCompositeConstruct %163 %18 %18 -%172 = OpCompositeConstruct %163 %7 %7 -%173 = OpIAdd %163 %171 %172 -%175 = OpCompositeConstruct %174 %24 %24 %24 -%176 = OpCompositeConstruct %174 %25 %25 %25 -%177 = OpIAdd %174 %175 %176 -%178 = OpCompositeConstruct %26 %14 %14 %14 %14 -%179 = OpCompositeConstruct %26 %3 %3 %3 %3 -%180 = OpFAdd %26 %178 %179 -%181 = OpISub %8 %18 %7 -%182 = OpISub %20 %24 %25 -%183 = OpFSub %4 %14 %3 -%184 = OpCompositeConstruct %163 %18 %18 -%185 = OpCompositeConstruct %163 %7 %7 -%186 = OpISub %163 %184 %185 -%187 = OpCompositeConstruct %174 %24 %24 %24 -%188 = OpCompositeConstruct %174 %25 %25 %25 -%189 = OpISub %174 %187 %188 -%190 = OpCompositeConstruct %26 %14 %14 %14 %14 -%191 = OpCompositeConstruct %26 %3 %3 %3 %3 -%192 = OpFSub %26 %190 %191 -%193 = OpIMul %8 %18 %7 -%194 = OpIMul %20 %24 %25 -%195 = OpFMul %4 %14 %3 -%196 = OpCompositeConstruct %163 %18 %18 -%197 = OpCompositeConstruct %163 %7 %7 -%198 = OpIMul %163 %196 %197 -%199 = OpCompositeConstruct %174 %24 %24 %24 -%200 = OpCompositeConstruct %174 %25 %25 %25 -%201 = OpIMul %174 %199 %200 -%202 = OpCompositeConstruct %26 %14 %14 %14 %14 -%203 = OpCompositeConstruct %26 %3 %3 %3 %3 -%204 = OpFMul %26 %202 %203 -%205 = OpSDiv %8 %18 %7 -%206 = OpUDiv %20 %24 %25 -%207 = OpFDiv %4 %14 %3 -%208 = OpCompositeConstruct %163 %18 %18 -%209 = OpCompositeConstruct %163 %7 %7 -%210 = OpSDiv %163 %208 %209 -%211 = OpCompositeConstruct %174 %24 %24 %24 -%212 = OpCompositeConstruct %174 %25 %25 %25 -%213 = OpUDiv %174 %211 %212 -%214 = OpCompositeConstruct %26 %14 %14 %14 %14 -%215 = OpCompositeConstruct %26 %3 %3 %3 %3 -%216 = OpFDiv %26 %214 %215 -%217 = OpSRem %8 %18 %7 -%218 = OpUMod %20 %24 %25 -%219 = OpFRem %4 %14 %3 -%220 = OpCompositeConstruct %163 %18 %18 -%221 = OpCompositeConstruct %163 %7 %7 -%222 = OpSRem %163 %220 %221 -%223 = OpCompositeConstruct %174 %24 %24 %24 -%224 = OpCompositeConstruct %174 %25 %25 %25 -%225 = OpUMod %174 %223 %224 -%226 = OpCompositeConstruct %26 %14 %14 %14 %14 -%227 = OpCompositeConstruct %26 %3 %3 %3 %3 -%228 = OpFRem %26 %226 %227 -%229 = OpCompositeConstruct %163 %18 %18 -%230 = OpCompositeConstruct %163 %7 %7 -%231 = OpIAdd %163 %229 %230 -%232 = OpCompositeConstruct %163 %7 %7 -%233 = OpCompositeConstruct %163 %18 %18 -%234 = OpIAdd %163 %233 %232 -%235 = OpCompositeConstruct %34 %24 %24 -%236 = OpCompositeConstruct %34 %25 %25 -%237 = OpIAdd %34 %235 %236 +OpBranch %164 +%164 = OpLabel +%166 = OpCompositeConstruct %165 %7 %7 +%167 = OpSNegate %165 %166 +%168 = OpCompositeConstruct %31 %3 %3 +%169 = OpFNegate %31 %168 +%170 = OpIAdd %8 %18 %7 +%171 = OpIAdd %20 %24 %25 +%172 = OpFAdd %4 %14 %3 +%173 = OpCompositeConstruct %165 %18 %18 +%174 = OpCompositeConstruct %165 %7 %7 +%175 = OpIAdd %165 %173 %174 +%177 = OpCompositeConstruct %176 %24 %24 %24 +%178 = OpCompositeConstruct %176 %25 %25 %25 +%179 = OpIAdd %176 %177 %178 +%180 = OpCompositeConstruct %26 %14 %14 %14 %14 +%181 = OpCompositeConstruct %26 %3 %3 %3 %3 +%182 = OpFAdd %26 %180 %181 +%183 = OpISub %8 %18 %7 +%184 = OpISub %20 %24 %25 +%185 = OpFSub %4 %14 %3 +%186 = OpCompositeConstruct %165 %18 %18 +%187 = OpCompositeConstruct %165 %7 %7 +%188 = OpISub %165 %186 %187 +%189 = OpCompositeConstruct %176 %24 %24 %24 +%190 = OpCompositeConstruct %176 %25 %25 %25 +%191 = OpISub %176 %189 %190 +%192 = OpCompositeConstruct %26 %14 %14 %14 %14 +%193 = OpCompositeConstruct %26 %3 %3 %3 %3 +%194 = OpFSub %26 %192 %193 +%195 = OpIMul %8 %18 %7 +%196 = OpIMul %20 %24 %25 +%197 = OpFMul %4 %14 %3 +%198 = OpCompositeConstruct %165 %18 %18 +%199 = OpCompositeConstruct %165 %7 %7 +%200 = OpIMul %165 %198 %199 +%201 = OpCompositeConstruct %176 %24 %24 %24 +%202 = OpCompositeConstruct %176 %25 %25 %25 +%203 = OpIMul %176 %201 %202 +%204 = OpCompositeConstruct %26 %14 %14 %14 %14 +%205 = OpCompositeConstruct %26 %3 %3 %3 %3 +%206 = OpFMul %26 %204 %205 +%207 = OpSDiv %8 %18 %7 +%208 = OpUDiv %20 %24 %25 +%209 = OpFDiv %4 %14 %3 +%210 = OpCompositeConstruct %165 %18 %18 +%211 = OpCompositeConstruct %165 %7 %7 +%212 = OpSDiv %165 %210 %211 +%213 = OpCompositeConstruct %176 %24 %24 %24 +%214 = OpCompositeConstruct %176 %25 %25 %25 +%215 = OpUDiv %176 %213 %214 +%216 = OpCompositeConstruct %26 %14 %14 %14 %14 +%217 = OpCompositeConstruct %26 %3 %3 %3 %3 +%218 = OpFDiv %26 %216 %217 +%219 = OpSRem %8 %18 %7 +%220 = OpUMod %20 %24 %25 +%221 = OpFRem %4 %14 %3 +%222 = OpCompositeConstruct %165 %18 %18 +%223 = OpCompositeConstruct %165 %7 %7 +%224 = OpSRem %165 %222 %223 +%225 = OpCompositeConstruct %176 %24 %24 %24 +%226 = OpCompositeConstruct %176 %25 %25 %25 +%227 = OpUMod %176 %225 %226 +%228 = OpCompositeConstruct %26 %14 %14 %14 %14 +%229 = OpCompositeConstruct %26 %3 %3 %3 %3 +%230 = OpFRem %26 %228 %229 +%231 = OpCompositeConstruct %165 %18 %18 +%232 = OpCompositeConstruct %165 %7 %7 +%233 = OpIAdd %165 %231 %232 +%234 = OpCompositeConstruct %165 %7 %7 +%235 = OpCompositeConstruct %165 %18 %18 +%236 = OpIAdd %165 %235 %234 +%237 = OpCompositeConstruct %34 %24 %24 %238 = OpCompositeConstruct %34 %25 %25 -%239 = OpCompositeConstruct %34 %24 %24 -%240 = OpIAdd %34 %239 %238 -%241 = OpCompositeConstruct %31 %14 %14 -%242 = OpCompositeConstruct %31 %3 %3 -%243 = OpFAdd %31 %241 %242 +%239 = OpIAdd %34 %237 %238 +%240 = OpCompositeConstruct %34 %25 %25 +%241 = OpCompositeConstruct %34 %24 %24 +%242 = OpIAdd %34 %241 %240 +%243 = OpCompositeConstruct %31 %14 %14 %244 = OpCompositeConstruct %31 %3 %3 -%245 = OpCompositeConstruct %31 %14 %14 -%246 = OpFAdd %31 %245 %244 -%247 = OpCompositeConstruct %163 %18 %18 -%248 = OpCompositeConstruct %163 %7 %7 -%249 = OpISub %163 %247 %248 -%250 = OpCompositeConstruct %163 %7 %7 -%251 = OpCompositeConstruct %163 %18 %18 -%252 = OpISub %163 %251 %250 -%253 = OpCompositeConstruct %34 %24 %24 -%254 = OpCompositeConstruct %34 %25 %25 -%255 = OpISub %34 %253 %254 +%245 = OpFAdd %31 %243 %244 +%246 = OpCompositeConstruct %31 %3 %3 +%247 = OpCompositeConstruct %31 %14 %14 +%248 = OpFAdd %31 %247 %246 +%249 = OpCompositeConstruct %165 %18 %18 +%250 = OpCompositeConstruct %165 %7 %7 +%251 = OpISub %165 %249 %250 +%252 = OpCompositeConstruct %165 %7 %7 +%253 = OpCompositeConstruct %165 %18 %18 +%254 = OpISub %165 %253 %252 +%255 = OpCompositeConstruct %34 %24 %24 %256 = OpCompositeConstruct %34 %25 %25 -%257 = OpCompositeConstruct %34 %24 %24 -%258 = OpISub %34 %257 %256 -%259 = OpCompositeConstruct %31 %14 %14 -%260 = OpCompositeConstruct %31 %3 %3 -%261 = OpFSub %31 %259 %260 +%257 = OpISub %34 %255 %256 +%258 = OpCompositeConstruct %34 %25 %25 +%259 = OpCompositeConstruct %34 %24 %24 +%260 = OpISub %34 %259 %258 +%261 = OpCompositeConstruct %31 %14 %14 %262 = OpCompositeConstruct %31 %3 %3 -%263 = OpCompositeConstruct %31 %14 %14 -%264 = OpFSub %31 %263 %262 -%265 = OpCompositeConstruct %163 %18 %18 -%267 = OpCompositeConstruct %163 %7 %7 -%266 = OpIMul %163 %265 %267 -%268 = OpCompositeConstruct %163 %7 %7 -%270 = OpCompositeConstruct %163 %18 %18 -%269 = OpIMul %163 %268 %270 -%271 = OpCompositeConstruct %34 %24 %24 -%273 = OpCompositeConstruct %34 %25 %25 -%272 = OpIMul %34 %271 %273 -%274 = OpCompositeConstruct %34 %25 %25 -%276 = OpCompositeConstruct %34 %24 %24 -%275 = OpIMul %34 %274 %276 -%277 = OpCompositeConstruct %31 %14 %14 -%278 = OpVectorTimesScalar %31 %277 %3 -%279 = OpCompositeConstruct %31 %3 %3 -%280 = OpVectorTimesScalar %31 %279 %14 -%281 = OpCompositeConstruct %163 %18 %18 -%282 = OpCompositeConstruct %163 %7 %7 -%283 = OpSDiv %163 %281 %282 -%284 = OpCompositeConstruct %163 %7 %7 -%285 = OpCompositeConstruct %163 %18 %18 -%286 = OpSDiv %163 %285 %284 -%287 = OpCompositeConstruct %34 %24 %24 -%288 = OpCompositeConstruct %34 %25 %25 -%289 = OpUDiv %34 %287 %288 +%263 = OpFSub %31 %261 %262 +%264 = OpCompositeConstruct %31 %3 %3 +%265 = OpCompositeConstruct %31 %14 %14 +%266 = OpFSub %31 %265 %264 +%267 = OpCompositeConstruct %165 %18 %18 +%269 = OpCompositeConstruct %165 %7 %7 +%268 = OpIMul %165 %267 %269 +%270 = OpCompositeConstruct %165 %7 %7 +%272 = OpCompositeConstruct %165 %18 %18 +%271 = OpIMul %165 %270 %272 +%273 = OpCompositeConstruct %34 %24 %24 +%275 = OpCompositeConstruct %34 %25 %25 +%274 = OpIMul %34 %273 %275 +%276 = OpCompositeConstruct %34 %25 %25 +%278 = OpCompositeConstruct %34 %24 %24 +%277 = OpIMul %34 %276 %278 +%279 = OpCompositeConstruct %31 %14 %14 +%280 = OpVectorTimesScalar %31 %279 %3 +%281 = OpCompositeConstruct %31 %3 %3 +%282 = OpVectorTimesScalar %31 %281 %14 +%283 = OpCompositeConstruct %165 %18 %18 +%284 = OpCompositeConstruct %165 %7 %7 +%285 = OpSDiv %165 %283 %284 +%286 = OpCompositeConstruct %165 %7 %7 +%287 = OpCompositeConstruct %165 %18 %18 +%288 = OpSDiv %165 %287 %286 +%289 = OpCompositeConstruct %34 %24 %24 %290 = OpCompositeConstruct %34 %25 %25 -%291 = OpCompositeConstruct %34 %24 %24 -%292 = OpUDiv %34 %291 %290 -%293 = OpCompositeConstruct %31 %14 %14 -%294 = OpCompositeConstruct %31 %3 %3 -%295 = OpFDiv %31 %293 %294 +%291 = OpUDiv %34 %289 %290 +%292 = OpCompositeConstruct %34 %25 %25 +%293 = OpCompositeConstruct %34 %24 %24 +%294 = OpUDiv %34 %293 %292 +%295 = OpCompositeConstruct %31 %14 %14 %296 = OpCompositeConstruct %31 %3 %3 -%297 = OpCompositeConstruct %31 %14 %14 -%298 = OpFDiv %31 %297 %296 -%299 = OpCompositeConstruct %163 %18 %18 -%300 = OpCompositeConstruct %163 %7 %7 -%301 = OpSRem %163 %299 %300 -%302 = OpCompositeConstruct %163 %7 %7 -%303 = OpCompositeConstruct %163 %18 %18 -%304 = OpSRem %163 %303 %302 -%305 = OpCompositeConstruct %34 %24 %24 -%306 = OpCompositeConstruct %34 %25 %25 -%307 = OpUMod %34 %305 %306 +%297 = OpFDiv %31 %295 %296 +%298 = OpCompositeConstruct %31 %3 %3 +%299 = OpCompositeConstruct %31 %14 %14 +%300 = OpFDiv %31 %299 %298 +%301 = OpCompositeConstruct %165 %18 %18 +%302 = OpCompositeConstruct %165 %7 %7 +%303 = OpSRem %165 %301 %302 +%304 = OpCompositeConstruct %165 %7 %7 +%305 = OpCompositeConstruct %165 %18 %18 +%306 = OpSRem %165 %305 %304 +%307 = OpCompositeConstruct %34 %24 %24 %308 = OpCompositeConstruct %34 %25 %25 -%309 = OpCompositeConstruct %34 %24 %24 -%310 = OpUMod %34 %309 %308 -%311 = OpCompositeConstruct %31 %14 %14 -%312 = OpCompositeConstruct %31 %3 %3 -%313 = OpFRem %31 %311 %312 +%309 = OpUMod %34 %307 %308 +%310 = OpCompositeConstruct %34 %25 %25 +%311 = OpCompositeConstruct %34 %24 %24 +%312 = OpUMod %34 %311 %310 +%313 = OpCompositeConstruct %31 %14 %14 %314 = OpCompositeConstruct %31 %3 %3 -%315 = OpCompositeConstruct %31 %14 %14 -%316 = OpFRem %31 %315 %314 -%318 = OpCompositeExtract %29 %54 0 -%319 = OpCompositeExtract %29 %54 0 -%320 = OpFAdd %29 %318 %319 -%321 = OpCompositeExtract %29 %54 1 -%322 = OpCompositeExtract %29 %54 1 -%323 = OpFAdd %29 %321 %322 -%324 = OpCompositeExtract %29 %54 2 -%325 = OpCompositeExtract %29 %54 2 -%326 = OpFAdd %29 %324 %325 -%317 = OpCompositeConstruct %38 %320 %323 %326 -%328 = OpCompositeExtract %29 %54 0 -%329 = OpCompositeExtract %29 %54 0 -%330 = OpFSub %29 %328 %329 -%331 = OpCompositeExtract %29 %54 1 -%332 = OpCompositeExtract %29 %54 1 -%333 = OpFSub %29 %331 %332 -%334 = OpCompositeExtract %29 %54 2 -%335 = OpCompositeExtract %29 %54 2 -%336 = OpFSub %29 %334 %335 -%327 = OpCompositeConstruct %38 %330 %333 %336 -%337 = OpMatrixTimesScalar %38 %54 %3 -%338 = OpMatrixTimesScalar %38 %54 %14 -%339 = OpCompositeConstruct %26 %3 %3 %3 %3 -%340 = OpMatrixTimesVector %29 %55 %339 -%341 = OpCompositeConstruct %29 %14 %14 %14 -%342 = OpVectorTimesMatrix %26 %341 %55 -%343 = OpMatrixTimesMatrix %38 %55 %56 +%315 = OpFRem %31 %313 %314 +%316 = OpCompositeConstruct %31 %3 %3 +%317 = OpCompositeConstruct %31 %14 %14 +%318 = OpFRem %31 %317 %316 +%320 = OpCompositeExtract %29 %54 0 +%321 = OpCompositeExtract %29 %54 0 +%322 = OpFAdd %29 %320 %321 +%323 = OpCompositeExtract %29 %54 1 +%324 = OpCompositeExtract %29 %54 1 +%325 = OpFAdd %29 %323 %324 +%326 = OpCompositeExtract %29 %54 2 +%327 = OpCompositeExtract %29 %54 2 +%328 = OpFAdd %29 %326 %327 +%319 = OpCompositeConstruct %38 %322 %325 %328 +%330 = OpCompositeExtract %29 %54 0 +%331 = OpCompositeExtract %29 %54 0 +%332 = OpFSub %29 %330 %331 +%333 = OpCompositeExtract %29 %54 1 +%334 = OpCompositeExtract %29 %54 1 +%335 = OpFSub %29 %333 %334 +%336 = OpCompositeExtract %29 %54 2 +%337 = OpCompositeExtract %29 %54 2 +%338 = OpFSub %29 %336 %337 +%329 = OpCompositeConstruct %38 %332 %335 %338 +%339 = OpMatrixTimesScalar %38 %54 %3 +%340 = OpMatrixTimesScalar %38 %54 %14 +%341 = OpCompositeConstruct %26 %3 %3 %3 %3 +%342 = OpMatrixTimesVector %29 %55 %341 +%343 = OpCompositeConstruct %29 %14 %14 %14 +%344 = OpVectorTimesMatrix %26 %343 %55 +%345 = OpMatrixTimesMatrix %38 %55 %56 OpReturn OpFunctionEnd -%345 = OpFunction %2 None %144 -%344 = OpLabel -OpBranch %346 +%347 = OpFunction %2 None %146 %346 = OpLabel -%347 = OpNot %8 %7 -%348 = OpNot %20 %25 -%349 = OpCompositeConstruct %163 %7 %7 -%350 = OpNot %163 %349 -%351 = OpCompositeConstruct %174 %25 %25 %25 -%352 = OpNot %174 %351 -%353 = OpBitwiseOr %8 %18 %7 -%354 = OpBitwiseOr %20 %24 %25 -%355 = OpCompositeConstruct %163 %18 %18 -%356 = OpCompositeConstruct %163 %7 %7 -%357 = OpBitwiseOr %163 %355 %356 -%358 = OpCompositeConstruct %174 %24 %24 %24 -%359 = OpCompositeConstruct %174 %25 %25 %25 -%360 = OpBitwiseOr %174 %358 %359 -%361 = OpBitwiseAnd %8 %18 %7 -%362 = OpBitwiseAnd %20 %24 %25 -%363 = OpCompositeConstruct %163 %18 %18 -%364 = OpCompositeConstruct %163 %7 %7 -%365 = OpBitwiseAnd %163 %363 %364 -%366 = OpCompositeConstruct %174 %24 %24 %24 -%367 = OpCompositeConstruct %174 %25 %25 %25 -%368 = OpBitwiseAnd %174 %366 %367 -%369 = OpBitwiseXor %8 %18 %7 -%370 = OpBitwiseXor %20 %24 %25 -%371 = OpCompositeConstruct %163 %18 %18 -%372 = OpCompositeConstruct %163 %7 %7 -%373 = OpBitwiseXor %163 %371 %372 -%374 = OpCompositeConstruct %174 %24 %24 %24 -%375 = OpCompositeConstruct %174 %25 %25 %25 -%376 = OpBitwiseXor %174 %374 %375 -%377 = OpShiftLeftLogical %8 %18 %25 -%378 = OpShiftLeftLogical %20 %24 %25 -%379 = OpCompositeConstruct %163 %18 %18 -%380 = OpCompositeConstruct %34 %25 %25 -%381 = OpShiftLeftLogical %163 %379 %380 -%382 = OpCompositeConstruct %174 %24 %24 %24 -%383 = OpCompositeConstruct %174 %25 %25 %25 -%384 = OpShiftLeftLogical %174 %382 %383 -%385 = OpShiftRightArithmetic %8 %18 %25 -%386 = OpShiftRightLogical %20 %24 %25 -%387 = OpCompositeConstruct %163 %18 %18 -%388 = OpCompositeConstruct %34 %25 %25 -%389 = OpShiftRightArithmetic %163 %387 %388 -%390 = OpCompositeConstruct %174 %24 %24 %24 -%391 = OpCompositeConstruct %174 %25 %25 %25 -%392 = OpShiftRightLogical %174 %390 %391 +OpBranch %348 +%348 = OpLabel +%349 = OpNot %8 %7 +%350 = OpNot %20 %25 +%351 = OpCompositeConstruct %165 %7 %7 +%352 = OpNot %165 %351 +%353 = OpCompositeConstruct %176 %25 %25 %25 +%354 = OpNot %176 %353 +%355 = OpBitwiseOr %8 %18 %7 +%356 = OpBitwiseOr %20 %24 %25 +%357 = OpCompositeConstruct %165 %18 %18 +%358 = OpCompositeConstruct %165 %7 %7 +%359 = OpBitwiseOr %165 %357 %358 +%360 = OpCompositeConstruct %176 %24 %24 %24 +%361 = OpCompositeConstruct %176 %25 %25 %25 +%362 = OpBitwiseOr %176 %360 %361 +%363 = OpBitwiseAnd %8 %18 %7 +%364 = OpBitwiseAnd %20 %24 %25 +%365 = OpCompositeConstruct %165 %18 %18 +%366 = OpCompositeConstruct %165 %7 %7 +%367 = OpBitwiseAnd %165 %365 %366 +%368 = OpCompositeConstruct %176 %24 %24 %24 +%369 = OpCompositeConstruct %176 %25 %25 %25 +%370 = OpBitwiseAnd %176 %368 %369 +%371 = OpBitwiseXor %8 %18 %7 +%372 = OpBitwiseXor %20 %24 %25 +%373 = OpCompositeConstruct %165 %18 %18 +%374 = OpCompositeConstruct %165 %7 %7 +%375 = OpBitwiseXor %165 %373 %374 +%376 = OpCompositeConstruct %176 %24 %24 %24 +%377 = OpCompositeConstruct %176 %25 %25 %25 +%378 = OpBitwiseXor %176 %376 %377 +%379 = OpShiftLeftLogical %8 %18 %25 +%380 = OpShiftLeftLogical %20 %24 %25 +%381 = OpCompositeConstruct %165 %18 %18 +%382 = OpCompositeConstruct %34 %25 %25 +%383 = OpShiftLeftLogical %165 %381 %382 +%384 = OpCompositeConstruct %176 %24 %24 %24 +%385 = OpCompositeConstruct %176 %25 %25 %25 +%386 = OpShiftLeftLogical %176 %384 %385 +%387 = OpShiftRightArithmetic %8 %18 %25 +%388 = OpShiftRightLogical %20 %24 %25 +%389 = OpCompositeConstruct %165 %18 %18 +%390 = OpCompositeConstruct %34 %25 %25 +%391 = OpShiftRightArithmetic %165 %389 %390 +%392 = OpCompositeConstruct %176 %24 %24 %24 +%393 = OpCompositeConstruct %176 %25 %25 %25 +%394 = OpShiftRightLogical %176 %392 %393 OpReturn OpFunctionEnd -%394 = OpFunction %2 None %144 -%393 = OpLabel -OpBranch %395 +%396 = OpFunction %2 None %146 %395 = OpLabel -%396 = OpIEqual %10 %18 %7 -%397 = OpIEqual %10 %24 %25 -%398 = OpFOrdEqual %10 %14 %3 -%399 = OpCompositeConstruct %163 %18 %18 -%400 = OpCompositeConstruct %163 %7 %7 -%401 = OpIEqual %147 %399 %400 -%402 = OpCompositeConstruct %174 %24 %24 %24 -%403 = OpCompositeConstruct %174 %25 %25 %25 -%404 = OpIEqual %104 %402 %403 -%405 = OpCompositeConstruct %26 %14 %14 %14 %14 -%406 = OpCompositeConstruct %26 %3 %3 %3 %3 -%407 = OpFOrdEqual %28 %405 %406 -%408 = OpINotEqual %10 %18 %7 -%409 = OpINotEqual %10 %24 %25 -%410 = OpFOrdNotEqual %10 %14 %3 -%411 = OpCompositeConstruct %163 %18 %18 -%412 = OpCompositeConstruct %163 %7 %7 -%413 = OpINotEqual %147 %411 %412 -%414 = OpCompositeConstruct %174 %24 %24 %24 -%415 = OpCompositeConstruct %174 %25 %25 %25 -%416 = OpINotEqual %104 %414 %415 -%417 = OpCompositeConstruct %26 %14 %14 %14 %14 -%418 = OpCompositeConstruct %26 %3 %3 %3 %3 -%419 = OpFOrdNotEqual %28 %417 %418 -%420 = OpSLessThan %10 %18 %7 -%421 = OpULessThan %10 %24 %25 -%422 = OpFOrdLessThan %10 %14 %3 -%423 = OpCompositeConstruct %163 %18 %18 -%424 = OpCompositeConstruct %163 %7 %7 -%425 = OpSLessThan %147 %423 %424 -%426 = OpCompositeConstruct %174 %24 %24 %24 -%427 = OpCompositeConstruct %174 %25 %25 %25 -%428 = OpULessThan %104 %426 %427 -%429 = OpCompositeConstruct %26 %14 %14 %14 %14 -%430 = OpCompositeConstruct %26 %3 %3 %3 %3 -%431 = OpFOrdLessThan %28 %429 %430 -%432 = OpSLessThanEqual %10 %18 %7 -%433 = OpULessThanEqual %10 %24 %25 -%434 = OpFOrdLessThanEqual %10 %14 %3 -%435 = OpCompositeConstruct %163 %18 %18 -%436 = OpCompositeConstruct %163 %7 %7 -%437 = OpSLessThanEqual %147 %435 %436 -%438 = OpCompositeConstruct %174 %24 %24 %24 -%439 = OpCompositeConstruct %174 %25 %25 %25 -%440 = OpULessThanEqual %104 %438 %439 -%441 = OpCompositeConstruct %26 %14 %14 %14 %14 -%442 = OpCompositeConstruct %26 %3 %3 %3 %3 -%443 = OpFOrdLessThanEqual %28 %441 %442 -%444 = OpSGreaterThan %10 %18 %7 -%445 = OpUGreaterThan %10 %24 %25 -%446 = OpFOrdGreaterThan %10 %14 %3 -%447 = OpCompositeConstruct %163 %18 %18 -%448 = OpCompositeConstruct %163 %7 %7 -%449 = OpSGreaterThan %147 %447 %448 -%450 = OpCompositeConstruct %174 %24 %24 %24 -%451 = OpCompositeConstruct %174 %25 %25 %25 -%452 = OpUGreaterThan %104 %450 %451 -%453 = OpCompositeConstruct %26 %14 %14 %14 %14 -%454 = OpCompositeConstruct %26 %3 %3 %3 %3 -%455 = OpFOrdGreaterThan %28 %453 %454 -%456 = OpSGreaterThanEqual %10 %18 %7 -%457 = OpUGreaterThanEqual %10 %24 %25 -%458 = OpFOrdGreaterThanEqual %10 %14 %3 -%459 = OpCompositeConstruct %163 %18 %18 -%460 = OpCompositeConstruct %163 %7 %7 -%461 = OpSGreaterThanEqual %147 %459 %460 -%462 = OpCompositeConstruct %174 %24 %24 %24 -%463 = OpCompositeConstruct %174 %25 %25 %25 -%464 = OpUGreaterThanEqual %104 %462 %463 -%465 = OpCompositeConstruct %26 %14 %14 %14 %14 -%466 = OpCompositeConstruct %26 %3 %3 %3 %3 -%467 = OpFOrdGreaterThanEqual %28 %465 %466 +OpBranch %397 +%397 = OpLabel +%398 = OpIEqual %10 %18 %7 +%399 = OpIEqual %10 %24 %25 +%400 = OpFOrdEqual %10 %14 %3 +%401 = OpCompositeConstruct %165 %18 %18 +%402 = OpCompositeConstruct %165 %7 %7 +%403 = OpIEqual %149 %401 %402 +%404 = OpCompositeConstruct %176 %24 %24 %24 +%405 = OpCompositeConstruct %176 %25 %25 %25 +%406 = OpIEqual %104 %404 %405 +%407 = OpCompositeConstruct %26 %14 %14 %14 %14 +%408 = OpCompositeConstruct %26 %3 %3 %3 %3 +%409 = OpFOrdEqual %28 %407 %408 +%410 = OpINotEqual %10 %18 %7 +%411 = OpINotEqual %10 %24 %25 +%412 = OpFOrdNotEqual %10 %14 %3 +%413 = OpCompositeConstruct %165 %18 %18 +%414 = OpCompositeConstruct %165 %7 %7 +%415 = OpINotEqual %149 %413 %414 +%416 = OpCompositeConstruct %176 %24 %24 %24 +%417 = OpCompositeConstruct %176 %25 %25 %25 +%418 = OpINotEqual %104 %416 %417 +%419 = OpCompositeConstruct %26 %14 %14 %14 %14 +%420 = OpCompositeConstruct %26 %3 %3 %3 %3 +%421 = OpFOrdNotEqual %28 %419 %420 +%422 = OpSLessThan %10 %18 %7 +%423 = OpULessThan %10 %24 %25 +%424 = OpFOrdLessThan %10 %14 %3 +%425 = OpCompositeConstruct %165 %18 %18 +%426 = OpCompositeConstruct %165 %7 %7 +%427 = OpSLessThan %149 %425 %426 +%428 = OpCompositeConstruct %176 %24 %24 %24 +%429 = OpCompositeConstruct %176 %25 %25 %25 +%430 = OpULessThan %104 %428 %429 +%431 = OpCompositeConstruct %26 %14 %14 %14 %14 +%432 = OpCompositeConstruct %26 %3 %3 %3 %3 +%433 = OpFOrdLessThan %28 %431 %432 +%434 = OpSLessThanEqual %10 %18 %7 +%435 = OpULessThanEqual %10 %24 %25 +%436 = OpFOrdLessThanEqual %10 %14 %3 +%437 = OpCompositeConstruct %165 %18 %18 +%438 = OpCompositeConstruct %165 %7 %7 +%439 = OpSLessThanEqual %149 %437 %438 +%440 = OpCompositeConstruct %176 %24 %24 %24 +%441 = OpCompositeConstruct %176 %25 %25 %25 +%442 = OpULessThanEqual %104 %440 %441 +%443 = OpCompositeConstruct %26 %14 %14 %14 %14 +%444 = OpCompositeConstruct %26 %3 %3 %3 %3 +%445 = OpFOrdLessThanEqual %28 %443 %444 +%446 = OpSGreaterThan %10 %18 %7 +%447 = OpUGreaterThan %10 %24 %25 +%448 = OpFOrdGreaterThan %10 %14 %3 +%449 = OpCompositeConstruct %165 %18 %18 +%450 = OpCompositeConstruct %165 %7 %7 +%451 = OpSGreaterThan %149 %449 %450 +%452 = OpCompositeConstruct %176 %24 %24 %24 +%453 = OpCompositeConstruct %176 %25 %25 %25 +%454 = OpUGreaterThan %104 %452 %453 +%455 = OpCompositeConstruct %26 %14 %14 %14 %14 +%456 = OpCompositeConstruct %26 %3 %3 %3 %3 +%457 = OpFOrdGreaterThan %28 %455 %456 +%458 = OpSGreaterThanEqual %10 %18 %7 +%459 = OpUGreaterThanEqual %10 %24 %25 +%460 = OpFOrdGreaterThanEqual %10 %14 %3 +%461 = OpCompositeConstruct %165 %18 %18 +%462 = OpCompositeConstruct %165 %7 %7 +%463 = OpSGreaterThanEqual %149 %461 %462 +%464 = OpCompositeConstruct %176 %24 %24 %24 +%465 = OpCompositeConstruct %176 %25 %25 %25 +%466 = OpUGreaterThanEqual %104 %464 %465 +%467 = OpCompositeConstruct %26 %14 %14 %14 %14 +%468 = OpCompositeConstruct %26 %3 %3 %3 %3 +%469 = OpFOrdGreaterThanEqual %28 %467 %468 OpReturn OpFunctionEnd -%473 = OpFunction %2 None %144 -%472 = OpLabel -%468 = OpVariable %469 Function %7 -%470 = OpVariable %471 Function %57 -OpBranch %474 +%475 = OpFunction %2 None %146 %474 = OpLabel -%475 = OpLoad %8 %468 -%476 = OpIAdd %8 %475 %7 -OpStore %468 %476 -%477 = OpLoad %8 %468 -%478 = OpISub %8 %477 %7 -OpStore %468 %478 -%479 = OpLoad %8 %468 -%480 = OpLoad %8 %468 -%481 = OpIMul %8 %479 %480 -OpStore %468 %481 -%482 = OpLoad %8 %468 -%483 = OpLoad %8 %468 -%484 = OpSDiv %8 %482 %483 -OpStore %468 %484 -%485 = OpLoad %8 %468 -%486 = OpSRem %8 %485 %7 -OpStore %468 %486 -%487 = OpLoad %8 %468 -%488 = OpBitwiseAnd %8 %487 %11 -OpStore %468 %488 -%489 = OpLoad %8 %468 -%490 = OpBitwiseOr %8 %489 %11 -OpStore %468 %490 -%491 = OpLoad %8 %468 -%492 = OpBitwiseXor %8 %491 %11 -OpStore %468 %492 -%493 = OpLoad %8 %468 -%494 = OpShiftLeftLogical %8 %493 %24 -OpStore %468 %494 -%495 = OpLoad %8 %468 -%496 = OpShiftRightArithmetic %8 %495 %25 -OpStore %468 %496 -%497 = OpLoad %8 %468 -%498 = OpIAdd %8 %497 %7 -OpStore %468 %498 -%499 = OpLoad %8 %468 -%500 = OpISub %8 %499 %7 -OpStore %468 %500 -%502 = OpAccessChain %501 %470 %25 -%503 = OpLoad %8 %502 -%504 = OpIAdd %8 %503 %7 -%505 = OpAccessChain %501 %470 %25 -OpStore %505 %504 -%506 = OpAccessChain %501 %470 %25 -%507 = OpLoad %8 %506 -%508 = OpISub %8 %507 %7 -%509 = OpAccessChain %501 %470 %25 -OpStore %509 %508 +%470 = OpVariable %471 Function %7 +%472 = OpVariable %473 Function %57 +OpBranch %476 +%476 = OpLabel +%477 = OpLoad %8 %470 +%478 = OpIAdd %8 %477 %7 +OpStore %470 %478 +%479 = OpLoad %8 %470 +%480 = OpISub %8 %479 %7 +OpStore %470 %480 +%481 = OpLoad %8 %470 +%482 = OpLoad %8 %470 +%483 = OpIMul %8 %481 %482 +OpStore %470 %483 +%484 = OpLoad %8 %470 +%485 = OpLoad %8 %470 +%486 = OpSDiv %8 %484 %485 +OpStore %470 %486 +%487 = OpLoad %8 %470 +%488 = OpSRem %8 %487 %7 +OpStore %470 %488 +%489 = OpLoad %8 %470 +%490 = OpBitwiseAnd %8 %489 %11 +OpStore %470 %490 +%491 = OpLoad %8 %470 +%492 = OpBitwiseOr %8 %491 %11 +OpStore %470 %492 +%493 = OpLoad %8 %470 +%494 = OpBitwiseXor %8 %493 %11 +OpStore %470 %494 +%495 = OpLoad %8 %470 +%496 = OpShiftLeftLogical %8 %495 %24 +OpStore %470 %496 +%497 = OpLoad %8 %470 +%498 = OpShiftRightArithmetic %8 %497 %25 +OpStore %470 %498 +%499 = OpLoad %8 %470 +%500 = OpIAdd %8 %499 %7 +OpStore %470 %500 +%501 = OpLoad %8 %470 +%502 = OpISub %8 %501 %7 +OpStore %470 %502 +%504 = OpAccessChain %503 %472 %25 +%505 = OpLoad %8 %504 +%506 = OpIAdd %8 %505 %7 +%507 = OpAccessChain %503 %472 %25 +OpStore %507 %506 +%508 = OpAccessChain %503 %472 %25 +%509 = OpLoad %8 %508 +%510 = OpISub %8 %509 %7 +%511 = OpAccessChain %503 %472 %25 +OpStore %511 %510 OpReturn OpFunctionEnd -%511 = OpFunction %2 None %144 -%510 = OpLabel -OpBranch %512 +%513 = OpFunction %2 None %146 %512 = OpLabel -%513 = OpFunctionCall %26 %59 -%514 = OpFunctionCall %26 %84 -%515 = OpVectorShuffle %29 %42 %42 0 1 2 -%516 = OpFunctionCall %29 %101 %515 -%517 = OpFunctionCall %4 %114 -%518 = OpFunctionCall %2 %143 -%519 = OpFunctionCall %2 %161 -%520 = OpFunctionCall %2 %345 -%521 = OpFunctionCall %2 %394 -%522 = OpFunctionCall %2 %473 +OpBranch %514 +%514 = OpLabel +%515 = OpFunctionCall %26 %59 +%516 = OpFunctionCall %26 %84 +%517 = OpVectorShuffle %29 %42 %42 0 1 2 +%518 = OpFunctionCall %29 %101 %517 +%519 = OpFunctionCall %4 %114 +%520 = OpFunctionCall %2 %145 +%521 = OpFunctionCall %2 %163 +%522 = OpFunctionCall %2 %347 +%523 = OpFunctionCall %2 %396 +%524 = OpFunctionCall %2 %475 OpReturn OpFunctionEnd \ No newline at end of file diff --git a/tests/out/wgsl/operators.wgsl b/tests/out/wgsl/operators.wgsl index 172a39109..2aa21785e 100644 --- a/tests/out/wgsl/operators.wgsl +++ b/tests/out/wgsl/operators.wgsl @@ -45,8 +45,10 @@ fn constructors() -> f32 { _ = f32(0.0); _ = vec2(vec2(0u, 0u)); _ = mat2x3(mat2x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); - let _e71 = foo.a.x; - return _e71; + _ = bitcast>(vec2(0u, 0u)); + _ = mat2x3(mat2x3(vec3(0.0, 0.0, 0.0), vec3(0.0, 0.0, 0.0))); + let _e75 = foo.a.x; + return _e75; } fn logical() {