From d388bc9b368c75bcc2bf73c9ebfaeb3d97ff6cf7 Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Fri, 30 Jul 2021 18:59:06 +0000 Subject: [PATCH] Restore "MSL writer: make signed int overflow defined behaviour" This reverts commit e33b0baa088146fc06881387157a92e19fcf5b7b. Added tests/expressions/literals/intmin.wgsl test. Bug: tint:124 Change-Id: I3d46f939ff20fa377ddb5fcb52f9afe728b8e430 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60441 Kokoro: Kokoro Commit-Queue: Antonio Maiorano Reviewed-by: Ben Clayton Reviewed-by: David Neto --- src/writer/msl/generator_impl.cc | 304 ++++++++++++++---- src/writer/msl/generator_impl.h | 1 + src/writer/msl/generator_impl_binary_test.cc | 79 +++++ .../msl/generator_impl_intrinsic_test.cc | 2 +- src/writer/msl/generator_impl_loop_test.cc | 8 +- .../msl/generator_impl_unary_op_test.cc | 4 +- test/array/type_constructor.wgsl.expected.msl | 10 +- .../loop_call_with_loop.wgsl.expected.msl | 4 +- .../loop_call_with_no_loop.wgsl.expected.msl | 2 +- .../loop_types_all.wgsl.expected.msl | 2 +- .../loop_types_repeated.wgsl.expected.msl | 2 +- .../loop_types_some.wgsl.expected.msl | 2 +- test/bug/tint/534.wgsl.expected.msl | 2 +- test/bug/tint/749.spvasm.expected.msl | 28 +- test/bug/tint/942.wgsl.expected.msl | 6 +- test/bug/tint/943.spvasm.expected.msl | 76 ++--- test/bug/tint/948.wgsl.expected.msl | 2 +- test/bug/tint/949.wgsl.expected.msl | 2 +- .../add/scalar-scalar/i32.wgsl.expected.msl | 2 +- .../add/scalar-vec3/i32.wgsl.expected.msl | 2 +- .../add/vec3-scalar/i32.wgsl.expected.msl | 2 +- .../add/vec3-vec3/i32.wgsl.expected.msl | 2 +- .../binary/left-shift/scalar-scalar/i32.wgsl | 6 + .../scalar-scalar/i32.wgsl.expected.hlsl | 5 + .../scalar-scalar/i32.wgsl.expected.msl | 10 + .../scalar-scalar/i32.wgsl.expected.spvasm | 21 ++ .../scalar-scalar/i32.wgsl.expected.wgsl | 6 + .../binary/left-shift/scalar-scalar/u32.wgsl | 6 + .../scalar-scalar/u32.wgsl.expected.hlsl | 5 + .../scalar-scalar/u32.wgsl.expected.msl | 10 + .../scalar-scalar/u32.wgsl.expected.spvasm | 20 ++ .../scalar-scalar/u32.wgsl.expected.wgsl | 6 + .../binary/left-shift/vector-vector/i32.wgsl | 6 + .../vector-vector/i32.wgsl.expected.hlsl | 7 + .../vector-vector/i32.wgsl.expected.msl | 10 + .../vector-vector/i32.wgsl.expected.spvasm | 29 ++ .../vector-vector/i32.wgsl.expected.wgsl | 6 + .../binary/left-shift/vector-vector/u32.wgsl | 6 + .../vector-vector/u32.wgsl.expected.hlsl | 7 + .../vector-vector/u32.wgsl.expected.msl | 10 + .../vector-vector/u32.wgsl.expected.spvasm | 27 ++ .../vector-vector/u32.wgsl.expected.wgsl | 6 + .../mul/scalar-scalar/i32.wgsl.expected.msl | 2 +- .../mul/scalar-vec3/i32.wgsl.expected.msl | 2 +- .../mul/vec3-scalar/i32.wgsl.expected.msl | 2 +- .../mul/vec3-vec3/i32.wgsl.expected.msl | 2 +- .../binary/right-shift/scalar-scalar/i32.wgsl | 6 + .../scalar-scalar/i32.wgsl.expected.hlsl | 5 + .../scalar-scalar/i32.wgsl.expected.msl | 10 + .../scalar-scalar/i32.wgsl.expected.spvasm | 21 ++ .../scalar-scalar/i32.wgsl.expected.wgsl | 6 + .../binary/right-shift/scalar-scalar/u32.wgsl | 6 + .../scalar-scalar/u32.wgsl.expected.hlsl | 5 + .../scalar-scalar/u32.wgsl.expected.msl | 10 + .../scalar-scalar/u32.wgsl.expected.spvasm | 20 ++ .../scalar-scalar/u32.wgsl.expected.wgsl | 6 + .../binary/right-shift/vector-vector/i32.wgsl | 6 + .../vector-vector/i32.wgsl.expected.hlsl | 7 + .../vector-vector/i32.wgsl.expected.msl | 10 + .../vector-vector/i32.wgsl.expected.spvasm | 29 ++ .../vector-vector/i32.wgsl.expected.wgsl | 6 + .../binary/right-shift/vector-vector/u32.wgsl | 6 + .../vector-vector/u32.wgsl.expected.hlsl | 7 + .../vector-vector/u32.wgsl.expected.msl | 10 + .../vector-vector/u32.wgsl.expected.spvasm | 27 ++ .../vector-vector/u32.wgsl.expected.wgsl | 6 + .../sub/scalar-scalar/i32.wgsl.expected.msl | 2 +- .../sub/scalar-vec3/i32.wgsl.expected.msl | 2 +- .../sub/vec3-scalar/i32.wgsl.expected.msl | 2 +- .../sub/vec3-vec3/i32.wgsl.expected.msl | 2 +- test/expressions/literals/intmin.wgsl | 7 + .../literals/intmin.wgsl.expected.hlsl | 11 + .../literals/intmin.wgsl.expected.msl | 10 + .../literals/intmin.wgsl.expected.spvasm | 40 +++ .../literals/intmin.wgsl.expected.wgsl | 6 + .../splat/expression/i32.wgsl.expected.msl | 6 +- .../splat/var/i32.wgsl.expected.msl | 2 +- .../unary/{ => complement}/complement.wgsl | 0 .../complement.wgsl.expected.hlsl | 0 .../complement.wgsl.expected.msl | 0 .../complement.wgsl.expected.spvasm | 0 .../complement.wgsl.expected.wgsl | 0 test/expressions/unary/negate/negate.wgsl | 7 + .../unary/negate/negate.wgsl.expected.hlsl | 12 + .../unary/negate/negate.wgsl.expected.msl | 20 ++ .../unary/negate/negate.wgsl.expected.spvasm | 36 +++ .../unary/negate/negate.wgsl.expected.wgsl | 7 + test/intrinsics/ignore/call.wgsl.expected.msl | 2 +- .../continue_in_switch.wgsl.expected.msl | 2 +- test/loops/loop.wgsl.expected.msl | 2 +- .../loop_with_continuing.wgsl.expected.msl | 2 +- test/loops/nested_loops.wgsl.expected.msl | 4 +- ...ed_loops_with_continuing.wgsl.expected.msl | 4 +- .../load/global/i32.spvasm.expected.msl | 2 +- .../ptr_ref/load/global/i32.wgsl.expected.msl | 2 +- .../load/local/i32.spvasm.expected.msl | 2 +- test/ptr_ref/load/local/i32.wgsl.expected.msl | 2 +- .../load/local/ptr_function.wgsl.expected.msl | 2 +- .../load/local/ptr_private.wgsl.expected.msl | 2 +- .../load/local/ptr_storage.wgsl.expected.msl | 2 +- .../load/local/ptr_uniform.wgsl.expected.msl | 2 +- .../local/ptr_workgroup.wgsl.expected.msl | 2 +- .../load/param/ptr.spvasm.expected.msl | 2 +- test/ptr_ref/load/param/ptr.wgsl.expected.msl | 2 +- .../store/global/i32.spvasm.expected.msl | 2 +- .../store/global/i32.wgsl.expected.msl | 2 +- .../store/local/i32.spvasm.expected.msl | 2 +- .../ptr_ref/store/local/i32.wgsl.expected.msl | 2 +- test/samples/compute_boids.wgsl.expected.msl | 4 +- test/statements/for/basic.wgsl.expected.msl | 2 +- test/statements/for/complex.wgsl.expected.msl | 4 +- .../for/continuing.wgsl.expected.msl | 2 +- .../struct/type_constructor.wgsl.expected.msl | 10 +- ...lTest_EmitExpression_0.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_4.spvasm.expected.msl | 2 +- ...hTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...hTest_EmitExpression_3.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_0.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_4.spvasm.expected.msl | 2 +- ...hTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...hTest_EmitExpression_3.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_0.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_4.spvasm.expected.msl | 2 +- ...hTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...hTest_EmitExpression_3.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_0.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_3.spvasm.expected.msl | 2 +- ...tTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...tTest_EmitExpression_3.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_0.spvasm.expected.msl | 2 +- ...lTest_EmitExpression_1.spvasm.expected.msl | 2 +- ...thTest_SNegate_Int_Int.spvasm.expected.msl | 7 +- ...hTest_SNegate_Int_Uint.spvasm.expected.msl | 7 +- ...te_SignedVec_SignedVec.spvasm.expected.msl | 7 +- ..._SignedVec_UnsignedVec.spvasm.expected.msl | 7 +- ...hTest_SNegate_Uint_Int.spvasm.expected.msl | 7 +- ...Test_SNegate_Uint_Uint.spvasm.expected.msl | 7 +- ..._UnsignedVec_SignedVec.spvasm.expected.msl | 7 +- ...nsignedVec_UnsignedVec.spvasm.expected.msl | 7 +- test/var/uses/private.wgsl.expected.msl | 4 +- test/var/uses/workgroup.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 42 +-- .../0-opt.wgsl.expected.msl | 42 +-- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../color-write-in-loop/0.spvasm.expected.msl | 6 +- .../color-write-in-loop/0.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 32 +- .../0-opt.wgsl.expected.msl | 32 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 16 +- .../0-opt.wgsl.expected.msl | 16 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../cov-bitcount/0-opt.spvasm.expected.msl | 2 +- .../cov-bitcount/0-opt.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 6 +- .../0.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 18 +- .../0-opt.wgsl.expected.msl | 18 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../1.spvasm.expected.msl | 8 +- .../1.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 11 +- .../0-opt.wgsl.expected.msl | 11 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 9 +- .../0-opt.wgsl.expected.msl | 9 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 7 +- .../0-opt.wgsl.expected.msl | 7 +- .../0-opt.spvasm.expected.msl | 7 +- .../0-opt.wgsl.expected.msl | 7 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0.spvasm.expected.msl | 8 +- .../0.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 11 +- .../0-opt.wgsl.expected.msl | 11 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 16 +- .../0-opt.wgsl.expected.msl | 16 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 4 +- .../0.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 9 +- .../0-opt.wgsl.expected.msl | 9 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 14 +- .../0-opt.wgsl.expected.msl | 14 +- .../0-opt.spvasm.expected.msl | 82 ++--- .../0-opt.wgsl.expected.msl | 82 ++--- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 38 +-- .../0-opt.wgsl.expected.msl | 38 +-- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 22 +- .../0-opt.wgsl.expected.msl | 22 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 20 +- .../0-opt.wgsl.expected.msl | 20 +- .../0-opt.spvasm.expected.msl | 24 +- .../0-opt.wgsl.expected.msl | 24 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 8 +- .../0.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 14 +- .../0-opt.wgsl.expected.msl | 14 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 13 +- .../0-opt.wgsl.expected.msl | 13 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 9 +- .../0-opt.wgsl.expected.msl | 9 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 33 +- .../0-opt.wgsl.expected.msl | 33 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../discard-in-loop/0-opt.spvasm.expected.msl | 6 +- .../discard-in-loop/0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0.spvasm.expected.msl | 18 +- .../0.wgsl.expected.msl | 18 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 6 +- .../loop-dead-if-loop/0-opt.wgsl.expected.msl | 6 +- .../loop-nested-ifs/0-opt.spvasm.expected.msl | 2 +- .../loop-nested-ifs/0-opt.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 6 +- .../0.wgsl.expected.msl | 6 +- .../0.spvasm.expected.msl | 4 +- .../0.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../nested-loops-switch/0.spvasm.expected.msl | 12 +- .../nested-loops-switch/0.wgsl.expected.msl | 12 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0.spvasm.expected.msl | 6 +- .../0.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 84 ++--- .../spv-access-chains/0-opt.wgsl.expected.msl | 84 ++--- .../spv-composite-phi/0.spvasm.expected.msl | 6 +- .../spv-composite-phi/0.wgsl.expected.msl | 6 +- .../spv-composite-phi/1.spvasm.expected.msl | 6 +- .../spv-composite-phi/1.wgsl.expected.msl | 6 +- .../spv-composite2/0.spvasm.expected.msl | 6 +- .../spv-composite2/0.wgsl.expected.msl | 6 +- .../spv-composite2/1.spvasm.expected.msl | 6 +- .../spv-composite2/1.wgsl.expected.msl | 6 +- .../spv-composites/0.spvasm.expected.msl | 8 +- .../spv-composites/0.wgsl.expected.msl | 8 +- .../spv-composites/1.spvasm.expected.msl | 19 +- .../spv-composites/1.wgsl.expected.msl | 19 +- .../1.spvasm.expected.msl | 97 +++--- .../1.wgsl.expected.msl | 97 +++--- .../0-opt.spvasm.expected.msl | 4 +- .../spv-declare-bvec4/0-opt.wgsl.expected.msl | 4 +- .../spv-declare-bvec4/1.spvasm.expected.msl | 4 +- .../spv-declare-bvec4/1.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 28 +- .../0-opt.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 28 +- .../1.wgsl.expected.msl | 28 +- .../0.spvasm.expected.msl | 12 +- .../0.wgsl.expected.msl | 12 +- .../1.spvasm.expected.msl | 12 +- .../1.wgsl.expected.msl | 12 +- .../1.spvasm.expected.msl | 28 +- .../1.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 8 +- .../1.wgsl.expected.msl | 8 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 6 +- .../1.wgsl.expected.msl | 6 +- .../2.spvasm.expected.msl | 6 +- .../2.wgsl.expected.msl | 6 +- .../0.spvasm.expected.msl | 12 +- .../0.wgsl.expected.msl | 12 +- .../1.spvasm.expected.msl | 12 +- .../1.wgsl.expected.msl | 12 +- .../0.spvasm.expected.msl | 6 +- .../0.wgsl.expected.msl | 6 +- .../1.spvasm.expected.msl | 6 +- .../1.wgsl.expected.msl | 6 +- .../1.spvasm.expected.msl | 6 +- .../1.wgsl.expected.msl | 6 +- .../1.spvasm.expected.msl | 86 ++--- .../1.wgsl.expected.msl | 86 ++--- .../2.spvasm.expected.msl | 84 ++--- .../2.wgsl.expected.msl | 84 ++--- .../1.spvasm.expected.msl | 46 +-- .../1.wgsl.expected.msl | 46 +-- .../2.spvasm.expected.msl | 46 +-- .../2.wgsl.expected.msl | 46 +-- .../0.spvasm.expected.msl | 28 +- .../0.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 28 +- .../1.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 28 +- .../1.wgsl.expected.msl | 28 +- .../2-opt.spvasm.expected.msl | 28 +- .../2-opt.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 36 +-- .../1.wgsl.expected.msl | 36 +-- .../2.spvasm.expected.msl | 36 +-- .../2.wgsl.expected.msl | 36 +-- .../0.spvasm.expected.msl | 19 +- .../0.wgsl.expected.msl | 19 +- .../1.spvasm.expected.msl | 19 +- .../1.wgsl.expected.msl | 19 +- .../0.spvasm.expected.msl | 19 +- .../0.wgsl.expected.msl | 19 +- .../1.spvasm.expected.msl | 19 +- .../1.wgsl.expected.msl | 19 +- .../2.spvasm.expected.msl | 19 +- .../2.wgsl.expected.msl | 19 +- .../1.spvasm.expected.msl | 8 +- .../1.wgsl.expected.msl | 8 +- .../2.spvasm.expected.msl | 8 +- .../2.wgsl.expected.msl | 8 +- .../0.spvasm.expected.msl | 8 +- .../0.wgsl.expected.msl | 8 +- .../1.spvasm.expected.msl | 8 +- .../1.wgsl.expected.msl | 8 +- .../0-opt.spvasm.expected.msl | 40 +-- .../0-opt.wgsl.expected.msl | 40 +-- .../1.spvasm.expected.msl | 40 +-- .../1.wgsl.expected.msl | 40 +-- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../2.spvasm.expected.msl | 4 +- .../2.wgsl.expected.msl | 4 +- .../0.spvasm.expected.msl | 6 +- .../0.wgsl.expected.msl | 6 +- .../1.spvasm.expected.msl | 8 +- .../1.wgsl.expected.msl | 8 +- .../0.spvasm.expected.msl | 24 +- .../0.wgsl.expected.msl | 24 +- .../1.spvasm.expected.msl | 24 +- .../1.wgsl.expected.msl | 24 +- .../1.spvasm.expected.msl | 24 +- .../1.wgsl.expected.msl | 24 +- .../0-opt.spvasm.expected.msl | 24 +- .../0-opt.wgsl.expected.msl | 24 +- .../1.spvasm.expected.msl | 30 +- .../1.wgsl.expected.msl | 30 +- .../0.spvasm.expected.msl | 6 +- .../0.wgsl.expected.msl | 6 +- .../1.spvasm.expected.msl | 6 +- .../1.wgsl.expected.msl | 6 +- .../0.spvasm.expected.msl | 4 +- .../0.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 34 +- .../1.wgsl.expected.msl | 34 +- .../1.spvasm.expected.msl | 28 +- .../1.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 28 +- .../1.wgsl.expected.msl | 28 +- .../1.spvasm.expected.msl | 42 +-- .../1.wgsl.expected.msl | 42 +-- .../0-opt.spvasm.expected.msl | 42 +-- .../0-opt.wgsl.expected.msl | 42 +-- .../2-opt.spvasm.expected.msl | 42 +-- .../2-opt.wgsl.expected.msl | 42 +-- .../0.spvasm.expected.msl | 78 ++--- .../0.wgsl.expected.msl | 78 ++--- .../2.spvasm.expected.msl | 66 ++-- .../2.wgsl.expected.msl | 66 ++-- .../2-opt.spvasm.expected.msl | 46 +-- .../2-opt.wgsl.expected.msl | 46 +-- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 2 +- .../0-opt.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../two-loops-matrix/0.spvasm.expected.msl | 4 +- .../two-loops-matrix/0.wgsl.expected.msl | 4 +- .../0.spvasm.expected.msl | 4 +- .../two-loops-set-struct/0.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 4 +- .../0-opt.wgsl.expected.msl | 4 +- .../0-opt.spvasm.expected.msl | 6 +- .../0-opt.wgsl.expected.msl | 6 +- .../0-opt.spvasm.expected.msl | 8 +- .../0-opt.wgsl.expected.msl | 8 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0.spvasm.expected.msl | 2 +- .../0.wgsl.expected.msl | 2 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 30 +- .../0-opt.wgsl.expected.msl | 30 +- .../0-opt.spvasm.expected.msl | 10 +- .../0-opt.wgsl.expected.msl | 10 +- .../0-opt.spvasm.expected.msl | 14 +- .../0-opt.wgsl.expected.msl | 14 +- .../0-opt.spvasm.expected.msl | 14 +- .../0-opt.wgsl.expected.msl | 14 +- .../uint_snegate/0-opt.spvasm.expected.msl | 7 +- .../uint_snegate/0-opt.wgsl.expected.msl | 7 +- .../no_image_store/1.spvasm.expected.msl | 2 +- .../no_image_store/1.wgsl.expected.msl | 2 +- .../no_output_write/1.spvasm.expected.msl | 2 +- .../no_output_write/1.wgsl.expected.msl | 2 +- .../1.spvasm.expected.msl | 2 +- .../1.wgsl.expected.msl | 2 +- .../no_ssbo_store/1.spvasm.expected.msl | 4 +- .../no_ssbo_store/1.wgsl.expected.msl | 4 +- .../1.spvasm.expected.msl | 4 +- .../1.wgsl.expected.msl | 4 +- .../terminate_loop/1.spvasm.expected.msl | 4 +- .../terminate_loop/1.wgsl.expected.msl | 4 +- 686 files changed, 4111 insertions(+), 3079 deletions(-) create mode 100644 test/expressions/binary/left-shift/scalar-scalar/i32.wgsl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.msl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/u32.wgsl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.msl create mode 100644 test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/left-shift/vector-vector/i32.wgsl create mode 100644 test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.msl create mode 100644 test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/left-shift/vector-vector/u32.wgsl create mode 100644 test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.msl create mode 100644 test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/i32.wgsl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.msl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/u32.wgsl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.msl create mode 100644 test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/right-shift/vector-vector/i32.wgsl create mode 100644 test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.msl create mode 100644 test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl create mode 100644 test/expressions/binary/right-shift/vector-vector/u32.wgsl create mode 100644 test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.hlsl create mode 100644 test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.msl create mode 100644 test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.spvasm create mode 100644 test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl create mode 100644 test/expressions/literals/intmin.wgsl create mode 100644 test/expressions/literals/intmin.wgsl.expected.hlsl create mode 100644 test/expressions/literals/intmin.wgsl.expected.msl create mode 100644 test/expressions/literals/intmin.wgsl.expected.spvasm create mode 100644 test/expressions/literals/intmin.wgsl.expected.wgsl rename test/expressions/unary/{ => complement}/complement.wgsl (100%) rename test/expressions/unary/{ => complement}/complement.wgsl.expected.hlsl (100%) rename test/expressions/unary/{ => complement}/complement.wgsl.expected.msl (100%) rename test/expressions/unary/{ => complement}/complement.wgsl.expected.spvasm (100%) rename test/expressions/unary/{ => complement}/complement.wgsl.expected.wgsl (100%) create mode 100644 test/expressions/unary/negate/negate.wgsl create mode 100644 test/expressions/unary/negate/negate.wgsl.expected.hlsl create mode 100644 test/expressions/unary/negate/negate.wgsl.expected.msl create mode 100644 test/expressions/unary/negate/negate.wgsl.expected.spvasm create mode 100644 test/expressions/unary/negate/negate.wgsl.expected.wgsl diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc index 1307f2051f..b4f1173ef8 100644 --- a/src/writer/msl/generator_impl.cc +++ b/src/writer/msl/generator_impl.cc @@ -75,6 +75,32 @@ bool last_is_break_or_fallthrough(const ast::BlockStatement* stmts) { stmts->last()->Is(); } +class ScopedBitCast { + public: + ScopedBitCast(GeneratorImpl* generator, + std::ostream& stream, + const sem::Type* curr_type, + const sem::Type* target_type) + : s(stream) { + auto* target_vec_type = target_type->As(); + + // If we need to promote from scalar to vector, bitcast the scalar to the + // vector element type. + if (curr_type->is_scalar() && target_vec_type) { + target_type = target_vec_type->type(); + } + + // Bit cast + s << "as_type<"; + generator->EmitType(s, target_type, ""); + s << ">("; + } + + ~ScopedBitCast() { s << ")"; } + + private: + std::ostream& s; +}; } // namespace GeneratorImpl::GeneratorImpl(const Program* program) : TextGenerator(program) {} @@ -227,8 +253,104 @@ bool GeneratorImpl::EmitAssign(ast::AssignmentStatement* stmt) { } bool GeneratorImpl::EmitBinary(std::ostream& out, ast::BinaryExpression* expr) { + auto emit_op = [&] { + out << " "; + + switch (expr->op()) { + case ast::BinaryOp::kAnd: + out << "&"; + break; + case ast::BinaryOp::kOr: + out << "|"; + break; + case ast::BinaryOp::kXor: + out << "^"; + break; + case ast::BinaryOp::kLogicalAnd: + out << "&&"; + break; + case ast::BinaryOp::kLogicalOr: + out << "||"; + break; + case ast::BinaryOp::kEqual: + out << "=="; + break; + case ast::BinaryOp::kNotEqual: + out << "!="; + break; + case ast::BinaryOp::kLessThan: + out << "<"; + break; + case ast::BinaryOp::kGreaterThan: + out << ">"; + break; + case ast::BinaryOp::kLessThanEqual: + out << "<="; + break; + case ast::BinaryOp::kGreaterThanEqual: + out << ">="; + break; + case ast::BinaryOp::kShiftLeft: + out << "<<"; + break; + case ast::BinaryOp::kShiftRight: + // TODO(dsinclair): MSL is based on C++14, and >> in C++14 has + // implementation-defined behaviour for negative LHS. We may have to + // generate extra code to implement WGSL-specified behaviour for + // negative LHS. + out << R"(>>)"; + break; + + case ast::BinaryOp::kAdd: + out << "+"; + break; + case ast::BinaryOp::kSubtract: + out << "-"; + break; + case ast::BinaryOp::kMultiply: + out << "*"; + break; + case ast::BinaryOp::kDivide: + out << "/"; + break; + case ast::BinaryOp::kModulo: + out << "%"; + break; + case ast::BinaryOp::kNone: + diagnostics_.add_error(diag::System::Writer, + "missing binary operation type"); + return false; + } + out << " "; + return true; + }; + + auto signed_type_of = [&](const sem::Type* ty) -> const sem::Type* { + if (ty->is_integer_scalar()) { + return builder_.create(); + } else if (auto* v = ty->As()) { + return builder_.create(builder_.create(), + v->Width()); + } + return {}; + }; + + auto unsigned_type_of = [&](const sem::Type* ty) -> const sem::Type* { + if (ty->is_integer_scalar()) { + return builder_.create(); + } else if (auto* v = ty->As()) { + return builder_.create(builder_.create(), + v->Width()); + } + return {}; + }; + + auto* lhs_type = TypeOf(expr->lhs())->UnwrapRef(); + auto* rhs_type = TypeOf(expr->rhs())->UnwrapRef(); + + // Handle fmod if (expr->op() == ast::BinaryOp::kModulo && - TypeOf(expr)->UnwrapRef()->is_float_scalar_or_vector()) { + lhs_type->is_float_scalar_or_vector()) { out << "fmod"; ScopedParen sp(out); if (!EmitExpression(out, expr->lhs())) { @@ -241,80 +363,75 @@ bool GeneratorImpl::EmitBinary(std::ostream& out, ast::BinaryExpression* expr) { return true; } - ScopedParen sp(out); + // Handle +/-/* of signed values + if ((expr->IsAdd() || expr->IsSubtract() || expr->IsMultiply()) && + lhs_type->is_signed_scalar_or_vector() && + rhs_type->is_signed_scalar_or_vector()) { + // If lhs or rhs is a vector, use that type (support implicit scalar to + // vector promotion) + auto* target_type = + lhs_type->Is() + ? lhs_type + : (rhs_type->Is() ? rhs_type : lhs_type); + // WGSL defines behaviour for signed overflow, MSL does not. For these + // cases, bitcast operands to unsigned, then cast result to signed. + ScopedBitCast outer_int_cast(this, out, target_type, + signed_type_of(target_type)); + ScopedParen sp(out); + { + ScopedBitCast lhs_uint_cast(this, out, lhs_type, + unsigned_type_of(target_type)); + if (!EmitExpression(out, expr->lhs())) { + return false; + } + } + if (!emit_op()) { + return false; + } + { + ScopedBitCast rhs_uint_cast(this, out, rhs_type, + unsigned_type_of(target_type)); + if (!EmitExpression(out, expr->rhs())) { + return false; + } + } + return true; + } + + // Handle left bit shifting a signed value + // TODO(crbug.com/tint/1077): This may not be necessary. The MSL spec + // seems to imply that left shifting a signed value is treated the same as + // left shifting an unsigned value, but we need to make sure. + if (expr->IsShiftLeft() && lhs_type->is_signed_scalar_or_vector()) { + // Shift left: discards top bits, so convert first operand to unsigned + // first, then convert result back to signed + ScopedBitCast outer_int_cast(this, out, lhs_type, signed_type_of(lhs_type)); + ScopedParen sp(out); + { + ScopedBitCast lhs_uint_cast(this, out, lhs_type, + unsigned_type_of(lhs_type)); + if (!EmitExpression(out, expr->lhs())) { + return false; + } + } + if (!emit_op()) { + return false; + } + if (!EmitExpression(out, expr->rhs())) { + return false; + } + return true; + } + + // Emit as usual + ScopedParen sp(out); if (!EmitExpression(out, expr->lhs())) { return false; } - out << " "; - - switch (expr->op()) { - case ast::BinaryOp::kAnd: - out << "&"; - break; - case ast::BinaryOp::kOr: - out << "|"; - break; - case ast::BinaryOp::kXor: - out << "^"; - break; - case ast::BinaryOp::kLogicalAnd: - out << "&&"; - break; - case ast::BinaryOp::kLogicalOr: - out << "||"; - break; - case ast::BinaryOp::kEqual: - out << "=="; - break; - case ast::BinaryOp::kNotEqual: - out << "!="; - break; - case ast::BinaryOp::kLessThan: - out << "<"; - break; - case ast::BinaryOp::kGreaterThan: - out << ">"; - break; - case ast::BinaryOp::kLessThanEqual: - out << "<="; - break; - case ast::BinaryOp::kGreaterThanEqual: - out << ">="; - break; - case ast::BinaryOp::kShiftLeft: - out << "<<"; - break; - case ast::BinaryOp::kShiftRight: - // TODO(dsinclair): MSL is based on C++14, and >> in C++14 has - // implementation-defined behaviour for negative LHS. We may have to - // generate extra code to implement WGSL-specified behaviour for negative - // LHS. - out << R"(>>)"; - break; - - case ast::BinaryOp::kAdd: - out << "+"; - break; - case ast::BinaryOp::kSubtract: - out << "-"; - break; - case ast::BinaryOp::kMultiply: - out << "*"; - break; - case ast::BinaryOp::kDivide: - out << "/"; - break; - case ast::BinaryOp::kModulo: - out << "%"; - break; - case ast::BinaryOp::kNone: - diagnostics_.add_error(diag::System::Writer, - "missing binary operation type"); - return false; + if (!emit_op()) { + return false; } - out << " "; - if (!EmitExpression(out, expr->rhs())) { return false; } @@ -2338,6 +2455,53 @@ bool GeneratorImpl::EmitStructType(TextBuffer* b, const sem::Struct* str) { bool GeneratorImpl::EmitUnaryOp(std::ostream& out, ast::UnaryOpExpression* expr) { + // Handle `-e` when `e` is signed, so that we ensure that if `e` is the + // largest negative value, it returns `e`. + auto* expr_type = TypeOf(expr->expr())->UnwrapRef(); + if (expr->op() == ast::UnaryOp::kNegation && + expr_type->is_signed_scalar_or_vector()) { + auto fn = + utils::GetOrCreate(unary_minus_funcs_, expr_type, [&]() -> std::string { + // e.g.: + // int tint_unary_minus(const int v) { + // return (v == -2147483648) ? v : -v; + // } + TextBuffer b; + TINT_DEFER(helpers_.Append(b)); + + auto fn_name = UniqueIdentifier("tint_unary_minus"); + { + auto decl = line(&b); + if (!EmitTypeAndName(decl, expr_type, fn_name)) { + return ""; + } + decl << "(const "; + if (!EmitType(decl, expr_type, "")) { + return ""; + } + decl << " v) {"; + } + + { + ScopedIndent si(&b); + const auto largest_negative_value = + std::to_string(std::numeric_limits::min()); + line(&b) << "return select(-v, v, v == " << largest_negative_value + << ");"; + } + line(&b) << "}"; + line(&b); + return fn_name; + }); + + out << fn << "("; + if (!EmitExpression(out, expr->expr())) { + return false; + } + out << ")"; + return true; + } + switch (expr->op()) { case ast::UnaryOp::kAddressOf: out << "&"; diff --git a/src/writer/msl/generator_impl.h b/src/writer/msl/generator_impl.h index 899025b6d3..6a4efb7f0b 100644 --- a/src/writer/msl/generator_impl.h +++ b/src/writer/msl/generator_impl.h @@ -356,6 +356,7 @@ class GeneratorImpl : public TextGenerator { bool has_invariant_ = false; std::unordered_map intrinsics_; + std::unordered_map unary_minus_funcs_; }; } // namespace msl diff --git a/src/writer/msl/generator_impl_binary_test.cc b/src/writer/msl/generator_impl_binary_test.cc index e228516af8..4b460dccbe 100644 --- a/src/writer/msl/generator_impl_binary_test.cc +++ b/src/writer/msl/generator_impl_binary_test.cc @@ -74,6 +74,85 @@ INSTANTIATE_TEST_SUITE_P( BinaryData{"(left / right)", ast::BinaryOp::kDivide}, BinaryData{"(left % right)", ast::BinaryOp::kModulo})); +using MslBinaryTest_SignedOverflowDefinedBehaviour = + TestParamHelper; +TEST_P(MslBinaryTest_SignedOverflowDefinedBehaviour, Emit) { + auto params = GetParam(); + + auto* a_type = ty.i32(); + auto* b_type = (params.op == ast::BinaryOp::kShiftLeft || + params.op == ast::BinaryOp::kShiftRight) + ? static_cast(ty.u32()) + : ty.i32(); + + auto* a = Var("a", a_type); + auto* b = Var("b", b_type); + + auto* expr = create(params.op, Expr(a), Expr(b)); + WrapInFunction(a, b, expr); + + GeneratorImpl& gen = Build(); + + std::stringstream out; + ASSERT_TRUE(gen.EmitExpression(out, expr)) << gen.error(); + EXPECT_EQ(out.str(), params.result); +} +using Op = ast::BinaryOp; +constexpr BinaryData signed_overflow_defined_behaviour_cases[] = { + {"as_type((as_type(a) << b))", Op::kShiftLeft}, + {"(a >> b)", Op::kShiftRight}, + {"as_type((as_type(a) + as_type(b)))", Op::kAdd}, + {"as_type((as_type(a) - as_type(b)))", Op::kSubtract}, + {"as_type((as_type(a) * as_type(b)))", Op::kMultiply}}; +INSTANTIATE_TEST_SUITE_P( + MslGeneratorImplTest, + MslBinaryTest_SignedOverflowDefinedBehaviour, + testing::ValuesIn(signed_overflow_defined_behaviour_cases)); + +using MslBinaryTest_SignedOverflowDefinedBehaviour_Chained = + TestParamHelper; +TEST_P(MslBinaryTest_SignedOverflowDefinedBehaviour_Chained, Emit) { + auto params = GetParam(); + + auto* a_type = ty.i32(); + auto* b_type = (params.op == ast::BinaryOp::kShiftLeft || + params.op == ast::BinaryOp::kShiftRight) + ? static_cast(ty.u32()) + : ty.i32(); + + auto* a = Var("a", a_type); + auto* b = Var("b", b_type); + + auto* expr1 = create(params.op, Expr(a), Expr(b)); + auto* expr2 = create(params.op, expr1, Expr(b)); + WrapInFunction(a, b, expr2); + + GeneratorImpl& gen = Build(); + + std::stringstream out; + ASSERT_TRUE(gen.EmitExpression(out, expr2)) << gen.error(); + EXPECT_EQ(out.str(), params.result); +} +using Op = ast::BinaryOp; +constexpr BinaryData signed_overflow_defined_behaviour_chained_cases[] = { + {"as_type((as_type(as_type((as_type(a) << b))) << " + "b))", + Op::kShiftLeft}, + {"((a >> b) >> b)", Op::kShiftRight}, + {"as_type((as_type(as_type((as_type(a) + " + "as_type(b)))) + as_type(b)))", + Op::kAdd}, + {"as_type((as_type(as_type((as_type(a) - " + "as_type(b)))) - as_type(b)))", + Op::kSubtract}, + {"as_type((as_type(as_type((as_type(a) * " + "as_type(b)))) * as_type(b)))", + Op::kMultiply}}; +INSTANTIATE_TEST_SUITE_P( + MslGeneratorImplTest, + MslBinaryTest_SignedOverflowDefinedBehaviour_Chained, + testing::ValuesIn(signed_overflow_defined_behaviour_chained_cases)); + TEST_F(MslBinaryTest, ModF32) { auto* left = Var("left", ty.f32()); auto* right = Var("right", ty.f32()); diff --git a/src/writer/msl/generator_impl_intrinsic_test.cc b/src/writer/msl/generator_impl_intrinsic_test.cc index 80c07f29f5..b2b718bf52 100644 --- a/src/writer/msl/generator_impl_intrinsic_test.cc +++ b/src/writer/msl/generator_impl_intrinsic_test.cc @@ -360,7 +360,7 @@ TEST_F(MslGeneratorImplTest, Ignore) { using namespace metal; int f(int a, int b, int c) { - return ((a + b) * c); + return as_type((as_type(as_type((as_type(a) + as_type(b)))) * as_type(c))); } kernel void func() { diff --git a/src/writer/msl/generator_impl_loop_test.cc b/src/writer/msl/generator_impl_loop_test.cc index 178df076ee..3fe2ba5ad2 100644 --- a/src/writer/msl/generator_impl_loop_test.cc +++ b/src/writer/msl/generator_impl_loop_test.cc @@ -259,7 +259,9 @@ TEST_F(MslGeneratorImplTest, Emit_ForLoopWithSimpleCont) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); - EXPECT_EQ(gen.result(), R"( for(; ; i = (i + 1)) { + EXPECT_EQ( + gen.result(), + R"( for(; ; i = as_type((as_type(i) + as_type(1)))) { a_statement(); } )"); @@ -310,7 +312,9 @@ TEST_F(MslGeneratorImplTest, Emit_ForLoopWithSimpleInitCondCont) { gen.increment_indent(); ASSERT_TRUE(gen.EmitStatement(f)) << gen.error(); - EXPECT_EQ(gen.result(), R"( for(int i = 0; true; i = (i + 1)) { + EXPECT_EQ( + gen.result(), + R"( for(int i = 0; true; i = as_type((as_type(i) + as_type(1)))) { a_statement(); } )"); diff --git a/src/writer/msl/generator_impl_unary_op_test.cc b/src/writer/msl/generator_impl_unary_op_test.cc index 31eac9c664..799efb67a3 100644 --- a/src/writer/msl/generator_impl_unary_op_test.cc +++ b/src/writer/msl/generator_impl_unary_op_test.cc @@ -85,7 +85,7 @@ TEST_F(MslUnaryOpTest, Negation) { std::stringstream out; ASSERT_TRUE(gen.EmitExpression(out, op)) << gen.error(); - EXPECT_EQ(out.str(), "-(expr)"); + EXPECT_EQ(out.str(), "tint_unary_minus(expr)"); } TEST_F(MslUnaryOpTest, NegationOfIntMin) { @@ -97,7 +97,7 @@ TEST_F(MslUnaryOpTest, NegationOfIntMin) { std::stringstream out; ASSERT_TRUE(gen.EmitExpression(out, op)) << gen.error(); - EXPECT_EQ(out.str(), "-((-2147483647 - 1))"); + EXPECT_EQ(out.str(), "tint_unary_minus((-2147483647 - 1))"); } } // namespace diff --git a/test/array/type_constructor.wgsl.expected.msl b/test/array/type_constructor.wgsl.expected.msl index 8de420bf2b..c7c48ac154 100644 --- a/test/array/type_constructor.wgsl.expected.msl +++ b/test/array/type_constructor.wgsl.expected.msl @@ -18,7 +18,7 @@ kernel void tint_symbol() { int const x = 42; tint_array_wrapper const empty = {.arr={}}; tint_array_wrapper const nonempty = {.arr={1, 2, 3, 4}}; - tint_array_wrapper const nonempty_with_expr = {.arr={1, x, (x + 1), nonempty.arr[3]}}; + tint_array_wrapper const nonempty_with_expr = {.arr={1, x, as_type((as_type(x) + as_type(1))), nonempty.arr[3]}}; tint_array_wrapper_1 const nested_empty = {.arr={}}; tint_array_wrapper const tint_symbol_1 = {.arr={1, 2, 3, 4}}; tint_array_wrapper const tint_symbol_2 = {.arr={5, 6, 7, 8}}; @@ -29,15 +29,15 @@ kernel void tint_symbol() { tint_array_wrapper const tint_symbol_7 = {.arr={21, 22, 23, 24}}; tint_array_wrapper_2 const tint_symbol_8 = {.arr={tint_symbol_5, tint_symbol_6, tint_symbol_7}}; tint_array_wrapper_1 const nested_nonempty = {.arr={tint_symbol_4, tint_symbol_8}}; - tint_array_wrapper const tint_symbol_9 = {.arr={1, 2, x, (x + 1)}}; - tint_array_wrapper const tint_symbol_10 = {.arr={5, 6, nonempty.arr[2], (nonempty.arr[3] + 1)}}; + tint_array_wrapper const tint_symbol_9 = {.arr={1, 2, x, as_type((as_type(x) + as_type(1)))}}; + tint_array_wrapper const tint_symbol_10 = {.arr={5, 6, nonempty.arr[2], as_type((as_type(nonempty.arr[3]) + as_type(1)))}}; tint_array_wrapper_2 const tint_symbol_11 = {.arr={tint_symbol_9, tint_symbol_10, nonempty}}; tint_array_wrapper_1 const nested_nonempty_with_expr = {.arr={tint_symbol_11, nested_nonempty.arr[1]}}; tint_array_wrapper const tint_symbol_12 = {.arr={}}; int const subexpr_empty = tint_symbol_12.arr[1]; tint_array_wrapper const tint_symbol_13 = {.arr={1, 2, 3, 4}}; int const subexpr_nonempty = tint_symbol_13.arr[2]; - tint_array_wrapper const tint_symbol_14 = {.arr={1, x, (x + 1), nonempty.arr[3]}}; + tint_array_wrapper const tint_symbol_14 = {.arr={1, x, as_type((as_type(x) + as_type(1))), nonempty.arr[3]}}; int const subexpr_nonempty_with_expr = tint_symbol_14.arr[2]; tint_array_wrapper_3 const tint_symbol_15 = {.arr={}}; tint_array_wrapper const subexpr_nested_empty = tint_symbol_15.arr[1]; @@ -45,7 +45,7 @@ kernel void tint_symbol() { tint_array_wrapper const tint_symbol_17 = {.arr={5, 6, 7, 8}}; tint_array_wrapper_3 const tint_symbol_18 = {.arr={tint_symbol_16, tint_symbol_17}}; tint_array_wrapper const subexpr_nested_nonempty = tint_symbol_18.arr[1]; - tint_array_wrapper const tint_symbol_19 = {.arr={1, x, (x + 1), nonempty.arr[3]}}; + tint_array_wrapper const tint_symbol_19 = {.arr={1, x, as_type((as_type(x) + as_type(1))), nonempty.arr[3]}}; tint_array_wrapper_3 const tint_symbol_20 = {.arr={tint_symbol_19, nested_nonempty.arr[1].arr[2]}}; tint_array_wrapper const subexpr_nested_nonempty_with_expr = tint_symbol_20.arr[1]; return; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl index 2ab266f915..1e1cbee395 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void foo(thread float2* const tint_symbol_1, thread int3* const tint_symbol_2, thread uint4* const tint_symbol_3, thread bool2* const tint_symbol_4) { - for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = as_type((as_type(i) + as_type(1)))) { (*(tint_symbol_1))[i] = 1.0f; (*(tint_symbol_2))[i] = 1; (*(tint_symbol_3))[i] = 1u; @@ -15,7 +15,7 @@ kernel void tint_symbol() { thread int3 tint_symbol_6 = 0; thread uint4 tint_symbol_7 = 0u; thread bool2 tint_symbol_8 = false; - for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = as_type((as_type(i) + as_type(1)))) { foo(&(tint_symbol_5), &(tint_symbol_6), &(tint_symbol_7), &(tint_symbol_8)); } return; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl index 44a4fa0220..ec498ee014 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.msl @@ -14,7 +14,7 @@ kernel void tint_symbol() { thread int3 tint_symbol_6 = 0; thread uint4 tint_symbol_7 = 0u; thread bool2 tint_symbol_8 = false; - for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = as_type((as_type(i) + as_type(1)))) { foo(&(tint_symbol_5), &(tint_symbol_6), &(tint_symbol_7), &(tint_symbol_8)); } return; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.msl b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.msl index b622316888..eb3e7d2e3d 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.msl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.msl @@ -14,7 +14,7 @@ kernel void tint_symbol() { bool2 v2b = false; bool3 v3b = false; bool4 v4b = false; - for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = as_type((as_type(i) + as_type(1)))) { v2f[i] = 1.0f; v3f[i] = 1.0f; v4f[i] = 1.0f; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.msl b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.msl index 4c124caaae..9b58f400e2 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.msl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.msl @@ -10,7 +10,7 @@ kernel void tint_symbol() { uint4 v4u_2 = 0u; bool2 v2b = false; bool2 v2b_2 = false; - for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = as_type((as_type(i) + as_type(1)))) { v2f[i] = 1.0f; v3i[i] = 1; v4u[i] = 1u; diff --git a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.msl b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.msl index 2113ef6ef3..fa9d188c4d 100644 --- a/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.msl +++ b/test/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.msl @@ -14,7 +14,7 @@ kernel void tint_symbol() { bool2 v2b = false; bool3 v3b = false; bool4 v4b = false; - for(int i = 0; (i < 2); i = (i + 1)) { + for(int i = 0; (i < 2); i = as_type((as_type(i) + as_type(1)))) { v2f[i] = 1.0f; v2i[i] = 1; v2u[i] = 1u; diff --git a/test/bug/tint/534.wgsl.expected.msl b/test/bug/tint/534.wgsl.expected.msl index 356f44d722..c363fc74c1 100644 --- a/test/bug/tint/534.wgsl.expected.msl +++ b/test/bug/tint/534.wgsl.expected.msl @@ -20,7 +20,7 @@ kernel void tint_symbol(texture2d tint_symbol_2 [[texture int2 dstTexCoord = int2(GlobalInvocationID.xy); int2 srcTexCoord = dstTexCoord; if ((uniforms.dstTextureFlipY == 1u)) { - srcTexCoord.y = ((size.y - dstTexCoord.y) - 1); + srcTexCoord.y = as_type((as_type(as_type((as_type(size.y) - as_type(dstTexCoord.y)))) - as_type(1))); } float4 srcColor = tint_symbol_2.read(uint2(srcTexCoord), 0); float4 dstColor = tint_symbol_3.read(uint2(dstTexCoord), 0); diff --git a/test/bug/tint/749.spvasm.expected.msl b/test/bug/tint/749.spvasm.expected.msl index b11eedca89..51883a63c5 100644 --- a/test/bug/tint/749.spvasm.expected.msl +++ b/test/bug/tint/749.spvasm.expected.msl @@ -152,7 +152,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_959 = *(l); *(l) = 0; *(l) = x_959; - i_1 = (x_45 - as_type(1u)); + i_1 = as_type((as_type(x_45) - as_type(as_type(1u)))); int const x_49 = *(l); float3 const x_536 = float3(x_534.x, x_534.z, x_535.x); j_1 = 10; @@ -192,7 +192,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_968 = param; param = 0; param = x_968; - if ((x_55 <= (x_56 - as_type(1u)))) { + if ((x_55 <= as_type((as_type(x_56) - as_type(as_type(1u)))))) { } else { break; } @@ -242,7 +242,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_979 = param; param = 0; param = x_979; - i_1 = (x_67 + as_type(1u)); + i_1 = as_type((as_type(x_67) + as_type(as_type(1u)))); int const x_980 = *(l); *(l) = 0; *(l) = x_980; @@ -290,7 +290,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_990 = param; param = 0; param = x_990; - j_1 = (1 + x_74); + j_1 = as_type((as_type(1) + as_type(x_74))); int const x_991 = param_1; param_1 = 0; param_1 = x_991; @@ -313,7 +313,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_995 = *(h); *(h) = 0; *(h) = x_995; - i_1 = (1 + x_76); + i_1 = as_type((as_type(1) + as_type(x_76))); int const x_996 = param_1; param_1 = 0; param_1 = x_996; @@ -392,7 +392,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1011 = p; p = 0; p = x_1011; - int const x_94 = (x_93 + as_type(1u)); + int const x_94 = as_type((as_type(x_93) + as_type(as_type(1u)))); int const x_1012 = top; top = 0; top = x_1012; @@ -436,7 +436,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1021 = stack.arr[x_96_save]; stack.arr[x_96_save] = 0; stack.arr[x_96_save] = x_1021; - int const x_98 = (x_97 + 1); + int const x_98 = as_type((as_type(x_97) + as_type(1))); int const x_1022 = stack.arr[x_96_save]; stack.arr[x_96_save] = 0; stack.arr[x_96_save] = x_1022; @@ -502,7 +502,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1035 = p; p = 0; p = x_1035; - top = (x_108 - as_type(1u)); + top = as_type((as_type(x_108) - as_type(as_type(1u)))); int const x_1036 = p; p = 0; p = x_1036; @@ -536,7 +536,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { stack.arr[x_100_save] = 0; stack.arr[x_100_save] = x_1043; float2 const x_573 = float2(float3(1.0f, 2.0f, 3.0f).y, float3(1.0f, 2.0f, 3.0f).z); - top = (x_112 - 1); + top = as_type((as_type(x_112) - as_type(1))); int const x_1044 = param_5; param_5 = 0; param_5 = x_1044; @@ -604,7 +604,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1059 = stack.arr[x_100_save]; stack.arr[x_100_save] = 0; stack.arr[x_100_save] = x_1059; - if (((x_122 - as_type(1u)) > x_124)) { + if ((as_type((as_type(x_122) - as_type(as_type(1u)))) > x_124)) { int const x_1060 = param_4; param_4 = 0; param_4 = x_1060; @@ -627,7 +627,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1064 = param_5; param_5 = 0; param_5 = x_1064; - int const x_131_save = (1 + x_128); + int const x_131_save = as_type((as_type(1) + as_type(x_128))); int const x_1065 = stack.arr[x_110_save]; stack.arr[x_110_save] = 0; stack.arr[x_110_save] = x_1065; @@ -666,7 +666,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { int const x_1073 = stack.arr[x_114_save]; stack.arr[x_114_save] = 0; stack.arr[x_114_save] = x_1073; - stack.arr[x_136_save] = (x_134 - as_type(1u)); + stack.arr[x_136_save] = as_type((as_type(x_134) - as_type(as_type(1u)))); int const x_1074 = stack.arr[x_96_save]; stack.arr[x_96_save] = 0; stack.arr[x_96_save] = x_1074; @@ -720,7 +720,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { stack.arr[x_114_save] = 0; stack.arr[x_114_save] = x_1086; float3 const x_597 = float3(x_562.y, x_560.y, x_560.y); - int const x_144 = (x_143 + 1); + int const x_144 = as_type((as_type(x_143) + as_type(1))); int const x_1087 = param_5; param_5 = 0; param_5 = x_1087; @@ -759,7 +759,7 @@ void quicksort_(thread QuicksortObject* const tint_symbol_85) { tint_array_wrapper const tint_symbol_35 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; stack = tint_symbol_35; stack = x_1095; - int const x_149 = (x_148 + as_type(1u)); + int const x_149 = as_type((as_type(x_148) + as_type(as_type(1u)))); int const x_1096 = stack.arr[x_147_save]; stack.arr[x_147_save] = 0; stack.arr[x_147_save] = x_1096; diff --git a/test/bug/tint/942.wgsl.expected.msl b/test/bug/tint/942.wgsl.expected.msl index 0e947ac907..8ae5eb16e3 100644 --- a/test/bug/tint/942.wgsl.expected.msl +++ b/test/bug/tint/942.wgsl.expected.msl @@ -25,10 +25,10 @@ kernel void tint_symbol(texture2d tint_symbol_3 [[texture threadgroup_barrier(mem_flags::mem_threadgroup); uint const filterOffset = ((params.filterDim - 1u) / 2u); int2 const dims = int2(tint_symbol_3.get_width(0), tint_symbol_3.get_height(0)); - int2 const baseIndex = (int2(((WorkGroupID.xy * uint2(params.blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u)))) - int2(int(filterOffset), 0)); + int2 const baseIndex = as_type((as_type(int2(((WorkGroupID.xy * uint2(params.blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u))))) - as_type(int2(int(filterOffset), 0)))); for(uint r = 0u; (r < 4u); r = (r + 1u)) { for(uint c = 0u; (c < 4u); c = (c + 1u)) { - int2 loadIndex = (baseIndex + int2(int(c), int(r))); + int2 loadIndex = as_type((as_type(baseIndex) + as_type(int2(int(c), int(r))))); if ((flip.value != 0u)) { loadIndex = loadIndex.yx; } @@ -38,7 +38,7 @@ kernel void tint_symbol(texture2d tint_symbol_3 [[texture threadgroup_barrier(mem_flags::mem_threadgroup); for(uint r = 0u; (r < 4u); r = (r + 1u)) { for(uint c = 0u; (c < 4u); c = (c + 1u)) { - int2 writeIndex = (baseIndex + int2(int(c), int(r))); + int2 writeIndex = as_type((as_type(baseIndex) + as_type(int2(int(c), int(r))))); if ((flip.value != 0u)) { writeIndex = writeIndex.yx; } diff --git a/test/bug/tint/943.spvasm.expected.msl b/test/bug/tint/943.spvasm.expected.msl index 8a720d1aaf..ae7f081506 100644 --- a/test/bug/tint/943.spvasm.expected.msl +++ b/test/bug/tint/943.spvasm.expected.msl @@ -60,7 +60,7 @@ float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread float x_430 = 0.0f; int const x_417 = x_48.aShape.y; int const x_419 = x_48.aShape.z; - batchASize = (x_417 * x_419); + batchASize = as_type((as_type(x_417) * as_type(x_419))); int const x_421 = *(row); int const x_422 = *(col); int const x_424 = *(tint_symbol_3); @@ -74,7 +74,7 @@ float mm_readA_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, thread int const x_441 = *(row); int const x_442 = *(tint_symbol_4); int const x_445 = *(col); - float const x_448 = x_165.A[(((x_438 * x_439) + (x_441 * x_442)) + x_445)]; + float const x_448 = x_165.A[as_type((as_type(as_type((as_type(as_type((as_type(x_438) * as_type(x_439)))) + as_type(as_type((as_type(x_441) * as_type(x_442))))))) + as_type(x_445)))]; x_430 = x_448; } else { x_430 = 0.0f; @@ -90,7 +90,7 @@ float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread float x_468 = 0.0f; int const x_455 = x_48.bShape.y; int const x_457 = x_48.bShape.z; - batchBSize = (x_455 * x_457); + batchBSize = as_type((as_type(x_455) * as_type(x_457))); int const x_459 = *(row_1); int const x_460 = *(col_1); int const x_462 = *(tint_symbol_6); @@ -104,7 +104,7 @@ float mm_readB_i1_i1_(constant Uniforms& x_48, const device ssbB& x_185, thread int const x_478 = *(row_1); int const x_479 = *(tint_symbol_7); int const x_482 = *(col_1); - float const x_485 = x_185.B[(((x_475 * x_476) + (x_478 * x_479)) + x_482)]; + float const x_485 = x_185.B[as_type((as_type(as_type((as_type(as_type((as_type(x_475) * as_type(x_476)))) + as_type(as_type((as_type(x_478) * as_type(x_479))))))) + as_type(x_482)))]; x_468 = x_485; } else { x_468 = 0.0f; @@ -204,15 +204,15 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int param_8 = 0; float param_9 = 0.0f; uint const x_132 = (*(tint_symbol_10)).y; - tileRow = (as_type(x_132) * 1); + tileRow = as_type((as_type(as_type(x_132)) * as_type(1))); uint const x_137 = (*(tint_symbol_10)).x; - tileCol = (as_type(x_137) * 1); + tileCol = as_type((as_type(as_type(x_137)) * as_type(1))); uint const x_143 = (*(tint_symbol_11)).y; - globalRow = (as_type(x_143) * 1); + globalRow = as_type((as_type(as_type(x_143)) * as_type(1))); uint const x_148 = (*(tint_symbol_11)).x; - globalCol = (as_type(x_148) * 1); + globalCol = as_type((as_type(as_type(x_148)) * as_type(1))); int const x_152 = *(dimInner); - numTiles = (((x_152 - 1) / 64) + 1); + numTiles = as_type((as_type((as_type((as_type(x_152) - as_type(1))) / 64)) + as_type(1))); innerRow = 0; while (true) { int const x_163 = innerRow; @@ -232,18 +232,18 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons acc.arr[x_177].arr[x_178] = 0.0f; { int const x_181 = innerCol; - innerCol = (x_181 + 1); + innerCol = as_type((as_type(x_181) + as_type(1))); } } { int const x_183 = innerRow; - innerRow = (x_183 + 1); + innerRow = as_type((as_type(x_183) + as_type(1))); } } uint const x_187 = (*(tint_symbol_10)).x; - tileColA = (as_type(x_187) * 64); + tileColA = as_type((as_type(as_type(x_187)) * as_type(64))); uint const x_192 = (*(tint_symbol_10)).y; - tileRowB = (as_type(x_192) * 1); + tileRowB = as_type((as_type(as_type(x_192)) * as_type(1))); t = 0; while (true) { int const x_201 = t; @@ -268,28 +268,28 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons } int const x_221 = tileRow; int const x_222 = innerRow_1; - inputRow = (x_221 + x_222); + inputRow = as_type((as_type(x_221) + as_type(x_222))); int const x_225 = tileColA; int const x_226 = innerCol_1; - inputCol = (x_225 + x_226); + inputCol = as_type((as_type(x_225) + as_type(x_226))); int const x_233 = inputRow; int const x_234 = inputCol; int const x_235 = globalRow; int const x_236 = innerRow_1; int const x_238 = t; int const x_240 = inputCol; - param_3 = (x_235 + x_236); - param_4 = ((x_238 * 64) + x_240); + param_3 = as_type((as_type(x_235) + as_type(x_236))); + param_4 = as_type((as_type(as_type((as_type(x_238) * as_type(64)))) + as_type(x_240))); float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_12, tint_symbol_13, tint_symbol_14); (*(tint_symbol_15)).arr[x_233].arr[x_234] = x_244; { int const x_247 = innerCol_1; - innerCol_1 = (x_247 + 1); + innerCol_1 = as_type((as_type(x_247) + as_type(1))); } } { int const x_249 = innerRow_1; - innerRow_1 = (x_249 + 1); + innerRow_1 = as_type((as_type(x_249) + as_type(1))); } } innerRow_2 = 0; @@ -308,28 +308,28 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons } int const x_268 = tileRowB; int const x_269 = innerRow_2; - inputRow_1 = (x_268 + x_269); + inputRow_1 = as_type((as_type(x_268) + as_type(x_269))); int const x_272 = tileCol; int const x_273 = innerCol_2; - inputCol_1 = (x_272 + x_273); + inputCol_1 = as_type((as_type(x_272) + as_type(x_273))); int const x_278 = inputRow_1; int const x_279 = inputCol_1; int const x_280 = t; int const x_282 = inputRow_1; int const x_284 = globalCol; int const x_285 = innerCol_2; - param_5 = ((x_280 * 64) + x_282); - param_6 = (x_284 + x_285); + param_5 = as_type((as_type(as_type((as_type(x_280) * as_type(64)))) + as_type(x_282))); + param_6 = as_type((as_type(x_284) + as_type(x_285))); float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_13, tint_symbol_16, tint_symbol_14); (*(tint_symbol_17)).arr[x_278].arr[x_279] = x_289; { int const x_291 = innerCol_2; - innerCol_2 = (x_291 + 1); + innerCol_2 = as_type((as_type(x_291) + as_type(1))); } } { int const x_293 = innerRow_2; - innerRow_2 = (x_293 + 1); + innerRow_2 = as_type((as_type(x_293) + as_type(1))); } } threadgroup_barrier(mem_flags::mem_threadgroup); @@ -351,11 +351,11 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_315 = k; int const x_316 = tileCol; int const x_317 = inner; - float const x_320 = (*(tint_symbol_17)).arr[x_315].arr[(x_316 + x_317)]; + float const x_320 = (*(tint_symbol_17)).arr[x_315].arr[as_type((as_type(x_316) + as_type(x_317)))]; BCached.arr[x_314] = x_320; { int const x_322 = inner; - inner = (x_322 + 1); + inner = as_type((as_type(x_322) + as_type(1))); } } innerRow_3 = 0; @@ -368,7 +368,7 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_333 = tileRow; int const x_334 = innerRow_3; int const x_336 = k; - float const x_338 = (*(tint_symbol_15)).arr[(x_333 + x_334)].arr[x_336]; + float const x_338 = (*(tint_symbol_15)).arr[as_type((as_type(x_333) + as_type(x_334)))].arr[x_336]; ACached = x_338; innerCol_3 = 0; while (true) { @@ -386,23 +386,23 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons acc.arr[x_347].arr[x_348] = (x_355 + (x_349 * x_352)); { int const x_358 = innerCol_3; - innerCol_3 = (x_358 + 1); + innerCol_3 = as_type((as_type(x_358) + as_type(1))); } } { int const x_360 = innerRow_3; - innerRow_3 = (x_360 + 1); + innerRow_3 = as_type((as_type(x_360) + as_type(1))); } } { int const x_362 = k; - k = (x_362 + 1); + k = as_type((as_type(x_362) + as_type(1))); } } threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_364 = t; - t = (x_364 + 1); + t = as_type((as_type(x_364) + as_type(1))); } } innerRow_4 = 0; @@ -424,13 +424,13 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_382 = globalCol; int const x_383 = innerCol_4; int const x_385 = *(dimBOuter); - bool const x_386 = ((x_382 + x_383) < x_385); + bool const x_386 = (as_type((as_type(x_382) + as_type(x_383))) < x_385); x_394_phi = x_386; if (x_386) { int const x_389 = globalRow; int const x_390 = innerRow_4; int const x_392 = *(dimAOuter); - x_393 = ((x_389 + x_390) < x_392); + x_393 = (as_type((as_type(x_389) + as_type(x_390))) < x_392); x_394_phi = x_393; } bool const x_394 = x_394_phi; @@ -441,20 +441,20 @@ void mm_matMul_i1_i1_i1_(constant Uniforms& x_48, const device ssbA& x_165, cons int const x_401 = innerCol_4; int const x_403 = innerRow_4; int const x_404 = innerCol_4; - param_7 = (x_397 + x_398); - param_8 = (x_400 + x_401); + param_7 = as_type((as_type(x_397) + as_type(x_398))); + param_8 = as_type((as_type(x_400) + as_type(x_401))); float const x_409 = acc.arr[x_403].arr[x_404]; param_9 = x_409; mm_write_i1_i1_f1_(x_48, x_54, &(param_7), &(param_8), &(param_9), tint_symbol_14); } { int const x_411 = innerCol_4; - innerCol_4 = (x_411 + 1); + innerCol_4 = as_type((as_type(x_411) + as_type(1))); } } { int const x_413 = innerRow_4; - innerRow_4 = (x_413 + 1); + innerRow_4 = as_type((as_type(x_413) + as_type(1))); } } return; diff --git a/test/bug/tint/948.wgsl.expected.msl b/test/bug/tint/948.wgsl.expected.msl index e7d07da4f9..86ebd22797 100644 --- a/test/bug/tint/948.wgsl.expected.msl +++ b/test/bug/tint/948.wgsl.expected.msl @@ -180,7 +180,7 @@ void main_1(constant LeftOver& x_20, thread float2* const tint_symbol_8, texture } { int const x_304 = i; - i = (x_304 + 1); + i = as_type((as_type(x_304) + as_type(1))); } } float3 const x_310 = x_20.colorMul; diff --git a/test/bug/tint/949.wgsl.expected.msl b/test/bug/tint/949.wgsl.expected.msl index 75eef874fe..3d195ff261 100644 --- a/test/bug/tint/949.wgsl.expected.msl +++ b/test/bug/tint/949.wgsl.expected.msl @@ -339,7 +339,7 @@ void main_1(constant LeftOver& x_269, constant Light0& light0, thread float* con } { int const x_441 = i; - i = (x_441 + 1); + i = as_type((as_type(x_441) + as_type(1))); } } float2 const x_444 = vCurrOffset; diff --git a/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.msl b/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.msl index 062cf47beb..e77d38fefe 100644 --- a/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.msl +++ b/test/expressions/binary/add/scalar-scalar/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int const a = 1; int const b = 2; - int const r = (a + b); + int const r = as_type((as_type(a) + as_type(b))); return; } diff --git a/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.msl b/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.msl index f46975e0d1..46f1909da0 100644 --- a/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.msl +++ b/test/expressions/binary/add/scalar-vec3/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int const a = 4; int3 const b = int3(1, 2, 3); - int3 const r = (a + b); + int3 const r = as_type((as_type(a) + as_type(b))); return; } diff --git a/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.msl b/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.msl index ba1fdc510d..89306cc895 100644 --- a/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.msl +++ b/test/expressions/binary/add/vec3-scalar/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int3 const a = int3(1, 2, 3); int const b = 4; - int3 const r = (a + b); + int3 const r = as_type((as_type(a) + as_type(b))); return; } diff --git a/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.msl b/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.msl index 2f4fbaee0a..54d88c782f 100644 --- a/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.msl +++ b/test/expressions/binary/add/vec3-vec3/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int3 const a = int3(1, 2, 3); int3 const b = int3(4, 5, 6); - int3 const r = (a + b); + int3 const r = as_type((as_type(a) + as_type(b))); return; } diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl new file mode 100644 index 0000000000..641f5bfef4 --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1; + let b = 2u; + let r : i32 = a << b; +} diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.hlsl b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.hlsl new file mode 100644 index 0000000000..9b54fe4a73 --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.hlsl @@ -0,0 +1,5 @@ +[numthreads(1, 1, 1)] +void f() { + const int r = (1 << 2u); + return; +} diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.msl b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.msl new file mode 100644 index 0000000000..3c5ec179ee --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + int const a = 1; + uint const b = 2u; + int const r = as_type((as_type(a) << b)); + return; +} + diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.spvasm b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.spvasm new file mode 100644 index 0000000000..d623dc4434 --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.spvasm @@ -0,0 +1,21 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 10 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %f = OpFunction %void None %1 + %4 = OpLabel + %9 = OpShiftLeftLogical %int %int_1 %uint_2 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl new file mode 100644 index 0000000000..df07fda2b1 --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1; + let b = 2u; + let r : i32 = (a << b); +} diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl new file mode 100644 index 0000000000..a1a39b6f3d --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1u; + let b = 2u; + let r : u32 = a << b; +} diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.hlsl b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.hlsl new file mode 100644 index 0000000000..3195ab7638 --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.hlsl @@ -0,0 +1,5 @@ +[numthreads(1, 1, 1)] +void f() { + const uint r = (1u << 2u); + return; +} diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.msl b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.msl new file mode 100644 index 0000000000..90ec5fb2ae --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + uint const a = 1u; + uint const b = 2u; + uint const r = (a << b); + return; +} + diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.spvasm b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.spvasm new file mode 100644 index 0000000000..17c61e3a0f --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.spvasm @@ -0,0 +1,20 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 9 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %uint = OpTypeInt 32 0 + %uint_1 = OpConstant %uint 1 + %uint_2 = OpConstant %uint 2 + %f = OpFunction %void None %1 + %4 = OpLabel + %8 = OpShiftLeftLogical %uint %uint_1 %uint_2 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl new file mode 100644 index 0000000000..1aee254658 --- /dev/null +++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1u; + let b = 2u; + let r : u32 = (a << b); +} diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl b/test/expressions/binary/left-shift/vector-vector/i32.wgsl new file mode 100644 index 0000000000..78156b23f4 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1, 2, 3); + let b = vec3(4u, 5u, 6u); + let r : vec3 = a << b; +} diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.hlsl b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.hlsl new file mode 100644 index 0000000000..d43dfb6f80 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.hlsl @@ -0,0 +1,7 @@ +[numthreads(1, 1, 1)] +void f() { + const int3 a = int3(1, 2, 3); + const uint3 b = uint3(4u, 5u, 6u); + const int3 r = (a << b); + return; +} diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.msl b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.msl new file mode 100644 index 0000000000..f97db25d1b --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + int3 const a = int3(1, 2, 3); + uint3 const b = uint3(4u, 5u, 6u); + int3 const r = as_type((as_type(a) << b)); + return; +} + diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.spvasm b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.spvasm new file mode 100644 index 0000000000..42f104e930 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.spvasm @@ -0,0 +1,29 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 18 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3 + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 + %uint_4 = OpConstant %uint 4 + %uint_5 = OpConstant %uint 5 + %uint_6 = OpConstant %uint 6 + %16 = OpConstantComposite %v3uint %uint_4 %uint_5 %uint_6 + %f = OpFunction %void None %1 + %4 = OpLabel + %17 = OpShiftLeftLogical %v3int %10 %16 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl new file mode 100644 index 0000000000..3a752fa0d2 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1, 2, 3); + let b = vec3(4u, 5u, 6u); + let r : vec3 = (a << b); +} diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl b/test/expressions/binary/left-shift/vector-vector/u32.wgsl new file mode 100644 index 0000000000..c85d91e5c5 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1u, 2u, 3u); + let b = vec3(4u, 5u, 6u); + let r : vec3 = a << b; +} diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.hlsl b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.hlsl new file mode 100644 index 0000000000..2de16f0c9b --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.hlsl @@ -0,0 +1,7 @@ +[numthreads(1, 1, 1)] +void f() { + const uint3 a = uint3(1u, 2u, 3u); + const uint3 b = uint3(4u, 5u, 6u); + const uint3 r = (a << b); + return; +} diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.msl b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.msl new file mode 100644 index 0000000000..c80e57e6a8 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + uint3 const a = uint3(1u, 2u, 3u); + uint3 const b = uint3(4u, 5u, 6u); + uint3 const r = (a << b); + return; +} + diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.spvasm b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.spvasm new file mode 100644 index 0000000000..27379ecff2 --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.spvasm @@ -0,0 +1,27 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 16 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 + %uint_1 = OpConstant %uint 1 + %uint_2 = OpConstant %uint 2 + %uint_3 = OpConstant %uint 3 + %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3 + %uint_4 = OpConstant %uint 4 + %uint_5 = OpConstant %uint 5 + %uint_6 = OpConstant %uint 6 + %14 = OpConstantComposite %v3uint %uint_4 %uint_5 %uint_6 + %f = OpFunction %void None %1 + %4 = OpLabel + %15 = OpShiftLeftLogical %v3uint %10 %14 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl new file mode 100644 index 0000000000..987e6804ea --- /dev/null +++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1u, 2u, 3u); + let b = vec3(4u, 5u, 6u); + let r : vec3 = (a << b); +} diff --git a/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.msl b/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.msl index 1bd365ec53..7a20eacd7c 100644 --- a/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.msl +++ b/test/expressions/binary/mul/scalar-scalar/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int const a = 1; int const b = 2; - int const r = (a * b); + int const r = as_type((as_type(a) * as_type(b))); return; } diff --git a/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.msl b/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.msl index 733799e953..216de39caa 100644 --- a/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.msl +++ b/test/expressions/binary/mul/scalar-vec3/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int const a = 4; int3 const b = int3(1, 2, 3); - int3 const r = (a * b); + int3 const r = as_type((as_type(a) * as_type(b))); return; } diff --git a/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.msl b/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.msl index afabaf3608..f320bd7520 100644 --- a/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.msl +++ b/test/expressions/binary/mul/vec3-scalar/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int3 const a = int3(1, 2, 3); int const b = 4; - int3 const r = (a * b); + int3 const r = as_type((as_type(a) * as_type(b))); return; } diff --git a/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.msl b/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.msl index 91d1b9fc8a..f4511b2010 100644 --- a/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.msl +++ b/test/expressions/binary/mul/vec3-vec3/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int3 const a = int3(1, 2, 3); int3 const b = int3(4, 5, 6); - int3 const r = (a * b); + int3 const r = as_type((as_type(a) * as_type(b))); return; } diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl new file mode 100644 index 0000000000..ef2e9f97a2 --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1; + let b = 2u; + let r : i32 = a >> b; +} diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.hlsl b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.hlsl new file mode 100644 index 0000000000..861995c7bc --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.hlsl @@ -0,0 +1,5 @@ +[numthreads(1, 1, 1)] +void f() { + const int r = (1 >> 2u); + return; +} diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.msl b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.msl new file mode 100644 index 0000000000..9d9f74941d --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + int const a = 1; + uint const b = 2u; + int const r = (a >> b); + return; +} + diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.spvasm b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.spvasm new file mode 100644 index 0000000000..10b58f2cf6 --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.spvasm @@ -0,0 +1,21 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 10 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %int_1 = OpConstant %int 1 + %uint = OpTypeInt 32 0 + %uint_2 = OpConstant %uint 2 + %f = OpFunction %void None %1 + %4 = OpLabel + %9 = OpShiftRightArithmetic %int %int_1 %uint_2 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl new file mode 100644 index 0000000000..9953bcc258 --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1; + let b = 2u; + let r : i32 = (a >> b); +} diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl new file mode 100644 index 0000000000..ecfbc1b75b --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1u; + let b = 2u; + let r : u32 = a >> b; +} diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.hlsl b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.hlsl new file mode 100644 index 0000000000..4e90e73f1d --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.hlsl @@ -0,0 +1,5 @@ +[numthreads(1, 1, 1)] +void f() { + const uint r = (1u >> 2u); + return; +} diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.msl b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.msl new file mode 100644 index 0000000000..68036b5ce6 --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + uint const a = 1u; + uint const b = 2u; + uint const r = (a >> b); + return; +} + diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.spvasm b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.spvasm new file mode 100644 index 0000000000..04adcf8923 --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.spvasm @@ -0,0 +1,20 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 9 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %uint = OpTypeInt 32 0 + %uint_1 = OpConstant %uint 1 + %uint_2 = OpConstant %uint 2 + %f = OpFunction %void None %1 + %4 = OpLabel + %8 = OpShiftRightLogical %uint %uint_1 %uint_2 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl new file mode 100644 index 0000000000..3757438a87 --- /dev/null +++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = 1u; + let b = 2u; + let r : u32 = (a >> b); +} diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl b/test/expressions/binary/right-shift/vector-vector/i32.wgsl new file mode 100644 index 0000000000..ffae0c15a6 --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1, 2, 3); + let b = vec3(4u, 5u, 6u); + let r : vec3 = a >> b; +} diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.hlsl b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.hlsl new file mode 100644 index 0000000000..2520c5e787 --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.hlsl @@ -0,0 +1,7 @@ +[numthreads(1, 1, 1)] +void f() { + const int3 a = int3(1, 2, 3); + const uint3 b = uint3(4u, 5u, 6u); + const int3 r = (a >> b); + return; +} diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.msl b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.msl new file mode 100644 index 0000000000..5c3fd63d2d --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + int3 const a = int3(1, 2, 3); + uint3 const b = uint3(4u, 5u, 6u); + int3 const r = (a >> b); + return; +} + diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.spvasm b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.spvasm new file mode 100644 index 0000000000..227bd0212e --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.spvasm @@ -0,0 +1,29 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 18 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %v3int = OpTypeVector %int 3 + %int_1 = OpConstant %int 1 + %int_2 = OpConstant %int 2 + %int_3 = OpConstant %int 3 + %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3 + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 + %uint_4 = OpConstant %uint 4 + %uint_5 = OpConstant %uint 5 + %uint_6 = OpConstant %uint 6 + %16 = OpConstantComposite %v3uint %uint_4 %uint_5 %uint_6 + %f = OpFunction %void None %1 + %4 = OpLabel + %17 = OpShiftRightArithmetic %v3int %10 %16 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl new file mode 100644 index 0000000000..765b4b1f50 --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1, 2, 3); + let b = vec3(4u, 5u, 6u); + let r : vec3 = (a >> b); +} diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl b/test/expressions/binary/right-shift/vector-vector/u32.wgsl new file mode 100644 index 0000000000..35da87305d --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1u, 2u, 3u); + let b = vec3(4u, 5u, 6u); + let r : vec3 = a >> b; +} diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.hlsl b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.hlsl new file mode 100644 index 0000000000..1c57ee7a4d --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.hlsl @@ -0,0 +1,7 @@ +[numthreads(1, 1, 1)] +void f() { + const uint3 a = uint3(1u, 2u, 3u); + const uint3 b = uint3(4u, 5u, 6u); + const uint3 r = (a >> b); + return; +} diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.msl b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.msl new file mode 100644 index 0000000000..b5aa9e9f95 --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +kernel void f() { + uint3 const a = uint3(1u, 2u, 3u); + uint3 const b = uint3(4u, 5u, 6u); + uint3 const r = (a >> b); + return; +} + diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.spvasm b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.spvasm new file mode 100644 index 0000000000..17932f21fd --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.spvasm @@ -0,0 +1,27 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 16 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %f "f" + OpExecutionMode %f LocalSize 1 1 1 + OpName %f "f" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %uint = OpTypeInt 32 0 + %v3uint = OpTypeVector %uint 3 + %uint_1 = OpConstant %uint 1 + %uint_2 = OpConstant %uint 2 + %uint_3 = OpConstant %uint 3 + %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3 + %uint_4 = OpConstant %uint 4 + %uint_5 = OpConstant %uint 5 + %uint_6 = OpConstant %uint 6 + %14 = OpConstantComposite %v3uint %uint_4 %uint_5 %uint_6 + %f = OpFunction %void None %1 + %4 = OpLabel + %15 = OpShiftRightLogical %v3uint %10 %14 + OpReturn + OpFunctionEnd diff --git a/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl new file mode 100644 index 0000000000..7368058c4c --- /dev/null +++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +[[stage(compute), workgroup_size(1)]] +fn f() { + let a = vec3(1u, 2u, 3u); + let b = vec3(4u, 5u, 6u); + let r : vec3 = (a >> b); +} diff --git a/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.msl b/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.msl index 7a7adf0e6d..4c25a09764 100644 --- a/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.msl +++ b/test/expressions/binary/sub/scalar-scalar/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int const a = 1; int const b = 2; - int const r = (a - b); + int const r = as_type((as_type(a) - as_type(b))); return; } diff --git a/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.msl b/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.msl index c679179622..8837be0e92 100644 --- a/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.msl +++ b/test/expressions/binary/sub/scalar-vec3/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int const a = 4; int3 const b = int3(1, 2, 3); - int3 const r = (a - b); + int3 const r = as_type((as_type(a) - as_type(b))); return; } diff --git a/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.msl b/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.msl index 9fc724fa4e..6149a0c537 100644 --- a/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.msl +++ b/test/expressions/binary/sub/vec3-scalar/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int3 const a = int3(1, 2, 3); int const b = 4; - int3 const r = (a - b); + int3 const r = as_type((as_type(a) - as_type(b))); return; } diff --git a/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.msl b/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.msl index f611cb20aa..142bb72d1a 100644 --- a/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.msl +++ b/test/expressions/binary/sub/vec3-vec3/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void f() { int3 const a = int3(1, 2, 3); int3 const b = int3(4, 5, 6); - int3 const r = (a - b); + int3 const r = as_type((as_type(a) - as_type(b))); return; } diff --git a/test/expressions/literals/intmin.wgsl b/test/expressions/literals/intmin.wgsl new file mode 100644 index 0000000000..9829c8e133 --- /dev/null +++ b/test/expressions/literals/intmin.wgsl @@ -0,0 +1,7 @@ +fn add_int_min_explicit() -> i32 { + var a = -2147483648; + var b = a + 1; + + var c = -2147483648 + 1; + return c; +} diff --git a/test/expressions/literals/intmin.wgsl.expected.hlsl b/test/expressions/literals/intmin.wgsl.expected.hlsl new file mode 100644 index 0000000000..90844e8065 --- /dev/null +++ b/test/expressions/literals/intmin.wgsl.expected.hlsl @@ -0,0 +1,11 @@ +[numthreads(1, 1, 1)] +void unused_entry_point() { + return; +} + +int add_int_min_explicit() { + int a = -2147483648; + int b = (a + 1); + int c = (-2147483648 + 1); + return c; +} diff --git a/test/expressions/literals/intmin.wgsl.expected.msl b/test/expressions/literals/intmin.wgsl.expected.msl new file mode 100644 index 0000000000..c51ac85827 --- /dev/null +++ b/test/expressions/literals/intmin.wgsl.expected.msl @@ -0,0 +1,10 @@ +#include + +using namespace metal; +int add_int_min_explicit() { + int a = (-2147483647 - 1); + int b = as_type((as_type(a) + as_type(1))); + int c = as_type((as_type((-2147483647 - 1)) + as_type(1))); + return c; +} + diff --git a/test/expressions/literals/intmin.wgsl.expected.spvasm b/test/expressions/literals/intmin.wgsl.expected.spvasm new file mode 100644 index 0000000000..b7eb829642 --- /dev/null +++ b/test/expressions/literals/intmin.wgsl.expected.spvasm @@ -0,0 +1,40 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 20 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %unused_entry_point "unused_entry_point" + OpExecutionMode %unused_entry_point LocalSize 1 1 1 + OpName %unused_entry_point "unused_entry_point" + OpName %add_int_min_explicit "add_int_min_explicit" + OpName %a "a" + OpName %b "b" + OpName %c "c" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %5 = OpTypeFunction %int +%int_n2147483648 = OpConstant %int -2147483648 +%_ptr_Function_int = OpTypePointer Function %int + %12 = OpConstantNull %int + %int_1 = OpConstant %int 1 +%unused_entry_point = OpFunction %void None %1 + %4 = OpLabel + OpReturn + OpFunctionEnd +%add_int_min_explicit = OpFunction %int None %5 + %8 = OpLabel + %a = OpVariable %_ptr_Function_int Function %12 + %b = OpVariable %_ptr_Function_int Function %12 + %c = OpVariable %_ptr_Function_int Function %12 + OpStore %a %int_n2147483648 + %13 = OpLoad %int %a + %15 = OpIAdd %int %13 %int_1 + OpStore %b %15 + %17 = OpIAdd %int %int_n2147483648 %int_1 + OpStore %c %17 + %19 = OpLoad %int %c + OpReturnValue %19 + OpFunctionEnd diff --git a/test/expressions/literals/intmin.wgsl.expected.wgsl b/test/expressions/literals/intmin.wgsl.expected.wgsl new file mode 100644 index 0000000000..b3834c1420 --- /dev/null +++ b/test/expressions/literals/intmin.wgsl.expected.wgsl @@ -0,0 +1,6 @@ +fn add_int_min_explicit() -> i32 { + var a = -2147483648; + var b = (a + 1); + var c = (-2147483648 + 1); + return c; +} diff --git a/test/expressions/splat/expression/i32.wgsl.expected.msl b/test/expressions/splat/expression/i32.wgsl.expected.msl index ad7738ca83..afbc9b28ba 100644 --- a/test/expressions/splat/expression/i32.wgsl.expected.msl +++ b/test/expressions/splat/expression/i32.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void f() { - int2 v2 = int2((1 + 2)); - int3 v3 = int3((1 + 2)); - int4 v4 = int4((1 + 2)); + int2 v2 = int2(as_type((as_type(1) + as_type(2)))); + int3 v3 = int3(as_type((as_type(1) + as_type(2)))); + int4 v4 = int4(as_type((as_type(1) + as_type(2)))); } diff --git a/test/expressions/splat/var/i32.wgsl.expected.msl b/test/expressions/splat/var/i32.wgsl.expected.msl index 30ae6c0df9..7e62e14488 100644 --- a/test/expressions/splat/var/i32.wgsl.expected.msl +++ b/test/expressions/splat/var/i32.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void f() { - int v = (1 + 2); + int v = as_type((as_type(1) + as_type(2))); int2 v2 = int2(v); int3 v3 = int3(v); int4 v4 = int4(v); diff --git a/test/expressions/unary/complement.wgsl b/test/expressions/unary/complement/complement.wgsl similarity index 100% rename from test/expressions/unary/complement.wgsl rename to test/expressions/unary/complement/complement.wgsl diff --git a/test/expressions/unary/complement.wgsl.expected.hlsl b/test/expressions/unary/complement/complement.wgsl.expected.hlsl similarity index 100% rename from test/expressions/unary/complement.wgsl.expected.hlsl rename to test/expressions/unary/complement/complement.wgsl.expected.hlsl diff --git a/test/expressions/unary/complement.wgsl.expected.msl b/test/expressions/unary/complement/complement.wgsl.expected.msl similarity index 100% rename from test/expressions/unary/complement.wgsl.expected.msl rename to test/expressions/unary/complement/complement.wgsl.expected.msl diff --git a/test/expressions/unary/complement.wgsl.expected.spvasm b/test/expressions/unary/complement/complement.wgsl.expected.spvasm similarity index 100% rename from test/expressions/unary/complement.wgsl.expected.spvasm rename to test/expressions/unary/complement/complement.wgsl.expected.spvasm diff --git a/test/expressions/unary/complement.wgsl.expected.wgsl b/test/expressions/unary/complement/complement.wgsl.expected.wgsl similarity index 100% rename from test/expressions/unary/complement.wgsl.expected.wgsl rename to test/expressions/unary/complement/complement.wgsl.expected.wgsl diff --git a/test/expressions/unary/negate/negate.wgsl b/test/expressions/unary/negate/negate.wgsl new file mode 100644 index 0000000000..d54631f693 --- /dev/null +++ b/test/expressions/unary/negate/negate.wgsl @@ -0,0 +1,7 @@ +fn i(x : i32) -> i32 { + return -x; +} + +fn vi(x : vec4) -> vec4 { + return -x; +} diff --git a/test/expressions/unary/negate/negate.wgsl.expected.hlsl b/test/expressions/unary/negate/negate.wgsl.expected.hlsl new file mode 100644 index 0000000000..a19621ebe6 --- /dev/null +++ b/test/expressions/unary/negate/negate.wgsl.expected.hlsl @@ -0,0 +1,12 @@ +[numthreads(1, 1, 1)] +void unused_entry_point() { + return; +} + +int i(int x) { + return -(x); +} + +int4 vi(int4 x) { + return -(x); +} diff --git a/test/expressions/unary/negate/negate.wgsl.expected.msl b/test/expressions/unary/negate/negate.wgsl.expected.msl new file mode 100644 index 0000000000..7c4e322739 --- /dev/null +++ b/test/expressions/unary/negate/negate.wgsl.expected.msl @@ -0,0 +1,20 @@ +#include + +using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + +int4 tint_unary_minus_1(const int4 v) { + return select(-v, v, v == -2147483648); +} + +int i(int x) { + return tint_unary_minus(x); +} + +int4 vi(int4 x) { + return tint_unary_minus_1(x); +} + diff --git a/test/expressions/unary/negate/negate.wgsl.expected.spvasm b/test/expressions/unary/negate/negate.wgsl.expected.spvasm new file mode 100644 index 0000000000..8378e84d4b --- /dev/null +++ b/test/expressions/unary/negate/negate.wgsl.expected.spvasm @@ -0,0 +1,36 @@ +; SPIR-V +; Version: 1.3 +; Generator: Google Tint Compiler; 0 +; Bound: 17 +; Schema: 0 + OpCapability Shader + OpMemoryModel Logical GLSL450 + OpEntryPoint GLCompute %unused_entry_point "unused_entry_point" + OpExecutionMode %unused_entry_point LocalSize 1 1 1 + OpName %unused_entry_point "unused_entry_point" + OpName %i "i" + OpName %x "x" + OpName %vi "vi" + OpName %x_0 "x" + %void = OpTypeVoid + %1 = OpTypeFunction %void + %int = OpTypeInt 32 1 + %5 = OpTypeFunction %int %int + %v4int = OpTypeVector %int 4 + %11 = OpTypeFunction %v4int %v4int +%unused_entry_point = OpFunction %void None %1 + %4 = OpLabel + OpReturn + OpFunctionEnd + %i = OpFunction %int None %5 + %x = OpFunctionParameter %int + %9 = OpLabel + %10 = OpSNegate %int %x + OpReturnValue %10 + OpFunctionEnd + %vi = OpFunction %v4int None %11 + %x_0 = OpFunctionParameter %v4int + %15 = OpLabel + %16 = OpSNegate %v4int %x_0 + OpReturnValue %16 + OpFunctionEnd diff --git a/test/expressions/unary/negate/negate.wgsl.expected.wgsl b/test/expressions/unary/negate/negate.wgsl.expected.wgsl new file mode 100644 index 0000000000..5bcf144135 --- /dev/null +++ b/test/expressions/unary/negate/negate.wgsl.expected.wgsl @@ -0,0 +1,7 @@ +fn i(x : i32) -> i32 { + return -(x); +} + +fn vi(x : vec4) -> vec4 { + return -(x); +} diff --git a/test/intrinsics/ignore/call.wgsl.expected.msl b/test/intrinsics/ignore/call.wgsl.expected.msl index 1dc15cf531..c2406f8911 100644 --- a/test/intrinsics/ignore/call.wgsl.expected.msl +++ b/test/intrinsics/ignore/call.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; int f(int a, int b, int c) { - return ((a * b) + c); + return as_type((as_type(as_type((as_type(a) * as_type(b)))) + as_type(c))); } kernel void tint_symbol() { diff --git a/test/loops/continue_in_switch.wgsl.expected.msl b/test/loops/continue_in_switch.wgsl.expected.msl index 589d7e31aa..494b64af8c 100644 --- a/test/loops/continue_in_switch.wgsl.expected.msl +++ b/test/loops/continue_in_switch.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; kernel void f() { - for(int i = 0; (i < 4); i = (i + 1)) { + for(int i = 0; (i < 4); i = as_type((as_type(i) + as_type(1)))) { switch(i) { case 0: { continue; diff --git a/test/loops/loop.wgsl.expected.msl b/test/loops/loop.wgsl.expected.msl index 9772ce4ee9..59523f018f 100644 --- a/test/loops/loop.wgsl.expected.msl +++ b/test/loops/loop.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; int f() { int i = 0; while (true) { - i = (i + 1); + i = as_type((as_type(i) + as_type(1))); if ((i > 4)) { return i; } diff --git a/test/loops/loop_with_continuing.wgsl.expected.msl b/test/loops/loop_with_continuing.wgsl.expected.msl index fc31429f67..c99f6f82a9 100644 --- a/test/loops/loop_with_continuing.wgsl.expected.msl +++ b/test/loops/loop_with_continuing.wgsl.expected.msl @@ -8,7 +8,7 @@ int f() { return i; } { - i = (i + 1); + i = as_type((as_type(i) + as_type(1))); } } return 0; diff --git a/test/loops/nested_loops.wgsl.expected.msl b/test/loops/nested_loops.wgsl.expected.msl index e8138288f5..580263cc8e 100644 --- a/test/loops/nested_loops.wgsl.expected.msl +++ b/test/loops/nested_loops.wgsl.expected.msl @@ -5,12 +5,12 @@ int f() { int i = 0; int j = 0; while (true) { - i = (i + 1); + i = as_type((as_type(i) + as_type(1))); if ((i > 4)) { return 1; } while (true) { - j = (j + 1); + j = as_type((as_type(j) + as_type(1))); if ((j > 4)) { return 2; } diff --git a/test/loops/nested_loops_with_continuing.wgsl.expected.msl b/test/loops/nested_loops_with_continuing.wgsl.expected.msl index 8c9f8fdee2..24fa85d817 100644 --- a/test/loops/nested_loops_with_continuing.wgsl.expected.msl +++ b/test/loops/nested_loops_with_continuing.wgsl.expected.msl @@ -13,11 +13,11 @@ int f() { return 2; } { - j = (j + 1); + j = as_type((as_type(j) + as_type(1))); } } { - i = (i + 1); + i = as_type((as_type(i) + as_type(1))); } } return 0; diff --git a/test/ptr_ref/load/global/i32.spvasm.expected.msl b/test/ptr_ref/load/global/i32.spvasm.expected.msl index 58c70f561a..178b0a5e25 100644 --- a/test/ptr_ref/load/global/i32.spvasm.expected.msl +++ b/test/ptr_ref/load/global/i32.spvasm.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void main_1(thread int* const tint_symbol_1) { int const x_9 = *(tint_symbol_1); - int const x_11 = (x_9 + 1); + int const x_11 = as_type((as_type(x_9) + as_type(1))); return; } diff --git a/test/ptr_ref/load/global/i32.wgsl.expected.msl b/test/ptr_ref/load/global/i32.wgsl.expected.msl index d7d3c6353d..a041b63463 100644 --- a/test/ptr_ref/load/global/i32.wgsl.expected.msl +++ b/test/ptr_ref/load/global/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void tint_symbol() { thread int tint_symbol_1 = 0; int const i = tint_symbol_1; - int const use = (i + 1); + int const use = as_type((as_type(i) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/i32.spvasm.expected.msl b/test/ptr_ref/load/local/i32.spvasm.expected.msl index bfbd8e517e..5e52f4aa80 100644 --- a/test/ptr_ref/load/local/i32.spvasm.expected.msl +++ b/test/ptr_ref/load/local/i32.spvasm.expected.msl @@ -5,7 +5,7 @@ void main_1() { int i = 0; i = 123; int const x_10 = i; - int const x_12 = (x_10 + 1); + int const x_12 = as_type((as_type(x_10) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/i32.wgsl.expected.msl b/test/ptr_ref/load/local/i32.wgsl.expected.msl index e7b87bb817..57e23d32f2 100644 --- a/test/ptr_ref/load/local/i32.wgsl.expected.msl +++ b/test/ptr_ref/load/local/i32.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; kernel void tint_symbol() { int i = 123; - int const use = (i + 1); + int const use = as_type((as_type(i) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/ptr_function.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_function.wgsl.expected.msl index e7b87bb817..57e23d32f2 100644 --- a/test/ptr_ref/load/local/ptr_function.wgsl.expected.msl +++ b/test/ptr_ref/load/local/ptr_function.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; kernel void tint_symbol() { int i = 123; - int const use = (i + 1); + int const use = as_type((as_type(i) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/ptr_private.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_private.wgsl.expected.msl index 5ceee0ad2a..bbb957e5f1 100644 --- a/test/ptr_ref/load/local/ptr_private.wgsl.expected.msl +++ b/test/ptr_ref/load/local/ptr_private.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; kernel void tint_symbol() { thread int tint_symbol_1 = 123; - int const use = (tint_symbol_1 + 1); + int const use = as_type((as_type(tint_symbol_1) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/ptr_storage.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_storage.wgsl.expected.msl index c00663c41e..2426a3db4d 100644 --- a/test/ptr_ref/load/local/ptr_storage.wgsl.expected.msl +++ b/test/ptr_ref/load/local/ptr_storage.wgsl.expected.msl @@ -6,7 +6,7 @@ struct S { }; kernel void tint_symbol(device S& v [[buffer(0)]]) { - int const use = (v.a + 1); + int const use = as_type((as_type(v.a) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.msl index 5aeb08155e..9c4e4e4b07 100644 --- a/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.msl +++ b/test/ptr_ref/load/local/ptr_uniform.wgsl.expected.msl @@ -6,7 +6,7 @@ struct S { }; kernel void tint_symbol(constant S& v [[buffer(0)]]) { - int const use = (v.a + 1); + int const use = as_type((as_type(v.a) + as_type(1))); return; } diff --git a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl index 561ee1cdb5..bc311a2bdc 100644 --- a/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl +++ b/test/ptr_ref/load/local/ptr_workgroup.wgsl.expected.msl @@ -8,7 +8,7 @@ kernel void tint_symbol(uint local_invocation_index [[thread_index_in_threadgrou } threadgroup_barrier(mem_flags::mem_threadgroup); tint_symbol_2 = 123; - int const use = (tint_symbol_2 + 1); + int const use = as_type((as_type(tint_symbol_2) + as_type(1))); return; } diff --git a/test/ptr_ref/load/param/ptr.spvasm.expected.msl b/test/ptr_ref/load/param/ptr.spvasm.expected.msl index 9c1e7cbb0e..712ca5ebe5 100644 --- a/test/ptr_ref/load/param/ptr.spvasm.expected.msl +++ b/test/ptr_ref/load/param/ptr.spvasm.expected.msl @@ -3,7 +3,7 @@ using namespace metal; int func(int value, thread int* const pointer) { int const x_9 = *(pointer); - return (value + x_9); + return as_type((as_type(value) + as_type(x_9))); } void main_1() { diff --git a/test/ptr_ref/load/param/ptr.wgsl.expected.msl b/test/ptr_ref/load/param/ptr.wgsl.expected.msl index a2154743c9..613530d5b0 100644 --- a/test/ptr_ref/load/param/ptr.wgsl.expected.msl +++ b/test/ptr_ref/load/param/ptr.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; int func(int value, thread int* const pointer) { - return (value + *(pointer)); + return as_type((as_type(value) + as_type(*(pointer)))); } kernel void tint_symbol() { diff --git a/test/ptr_ref/store/global/i32.spvasm.expected.msl b/test/ptr_ref/store/global/i32.spvasm.expected.msl index 6451fe4d19..c27b618d1a 100644 --- a/test/ptr_ref/store/global/i32.spvasm.expected.msl +++ b/test/ptr_ref/store/global/i32.spvasm.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void main_1(thread int* const tint_symbol_1) { *(tint_symbol_1) = 123; - *(tint_symbol_1) = ((100 + 20) + 3); + *(tint_symbol_1) = as_type((as_type(as_type((as_type(100) + as_type(20)))) + as_type(3))); return; } diff --git a/test/ptr_ref/store/global/i32.wgsl.expected.msl b/test/ptr_ref/store/global/i32.wgsl.expected.msl index 7eaf2d692a..f68ac56077 100644 --- a/test/ptr_ref/store/global/i32.wgsl.expected.msl +++ b/test/ptr_ref/store/global/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void tint_symbol() { thread int tint_symbol_1 = 0; tint_symbol_1 = 123; - tint_symbol_1 = ((100 + 20) + 3); + tint_symbol_1 = as_type((as_type(as_type((as_type(100) + as_type(20)))) + as_type(3))); return; } diff --git a/test/ptr_ref/store/local/i32.spvasm.expected.msl b/test/ptr_ref/store/local/i32.spvasm.expected.msl index dd05e5cd02..1e56158829 100644 --- a/test/ptr_ref/store/local/i32.spvasm.expected.msl +++ b/test/ptr_ref/store/local/i32.spvasm.expected.msl @@ -5,7 +5,7 @@ void main_1() { int i = 0; i = 123; i = 123; - i = ((100 + 20) + 3); + i = as_type((as_type(as_type((as_type(100) + as_type(20)))) + as_type(3))); return; } diff --git a/test/ptr_ref/store/local/i32.wgsl.expected.msl b/test/ptr_ref/store/local/i32.wgsl.expected.msl index bde28674c1..fc37fba94b 100644 --- a/test/ptr_ref/store/local/i32.wgsl.expected.msl +++ b/test/ptr_ref/store/local/i32.wgsl.expected.msl @@ -4,7 +4,7 @@ using namespace metal; kernel void tint_symbol() { int i = 123; i = 123; - i = ((100 + 20) + 3); + i = as_type((as_type(as_type((as_type(100) + as_type(20)))) + as_type(3))); return; } diff --git a/test/samples/compute_boids.wgsl.expected.msl b/test/samples/compute_boids.wgsl.expected.msl index cc9a8565db..980c2378fb 100644 --- a/test/samples/compute_boids.wgsl.expected.msl +++ b/test/samples/compute_boids.wgsl.expected.msl @@ -69,14 +69,14 @@ kernel void comp_main(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], c vel = particlesA.particles.arr[i].vel.xy; if ((distance(pos, vPos) < params.rule1Distance)) { cMass = (cMass + pos); - cMassCount = (cMassCount + 1); + cMassCount = as_type((as_type(cMassCount) + as_type(1))); } if ((distance(pos, vPos) < params.rule2Distance)) { colVel = (colVel - (pos - vPos)); } if ((distance(pos, vPos) < params.rule3Distance)) { cVel = (cVel + vel); - cVelCount = (cVelCount + 1); + cVelCount = as_type((as_type(cVelCount) + as_type(1))); } } if ((cMassCount > 0)) { diff --git a/test/statements/for/basic.wgsl.expected.msl b/test/statements/for/basic.wgsl.expected.msl index e36af9f62d..20c444b44e 100644 --- a/test/statements/for/basic.wgsl.expected.msl +++ b/test/statements/for/basic.wgsl.expected.msl @@ -5,7 +5,7 @@ void some_loop_body() { } void f() { - for(int i = 0; (i < 5); i = (i + 1)) { + for(int i = 0; (i < 5); i = as_type((as_type(i) + as_type(1)))) { some_loop_body(); } } diff --git a/test/statements/for/complex.wgsl.expected.msl b/test/statements/for/complex.wgsl.expected.msl index 9ed6331267..534cd3a2a8 100644 --- a/test/statements/for/complex.wgsl.expected.msl +++ b/test/statements/for/complex.wgsl.expected.msl @@ -6,9 +6,9 @@ void some_loop_body() { void f() { int j = 0; - for(int i = 0; ((i < 5) && (j < 10)); i = (i + 1)) { + for(int i = 0; ((i < 5) && (j < 10)); i = as_type((as_type(i) + as_type(1)))) { some_loop_body(); - j = (i * 30); + j = as_type((as_type(i) * as_type(30))); } } diff --git a/test/statements/for/continuing.wgsl.expected.msl b/test/statements/for/continuing.wgsl.expected.msl index a288b5d2bf..6426654a78 100644 --- a/test/statements/for/continuing.wgsl.expected.msl +++ b/test/statements/for/continuing.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void f() { int i = 0; - for(; ; i = (i + 1)) { + for(; ; i = as_type((as_type(i) + as_type(1)))) { } } diff --git a/test/struct/type_constructor.wgsl.expected.msl b/test/struct/type_constructor.wgsl.expected.msl index 36ef72f49f..69583e6ebf 100644 --- a/test/struct/type_constructor.wgsl.expected.msl +++ b/test/struct/type_constructor.wgsl.expected.msl @@ -30,27 +30,27 @@ kernel void tint_symbol() { int const x = 42; S1 const empty = {}; S1 const nonempty = {.a=1, .b=2, .c=3, .d=4}; - S1 const nonempty_with_expr = {.a=1, .b=x, .c=(x + 1), .d=nonempty.d}; + S1 const nonempty_with_expr = {.a=1, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nonempty.d}; S3 const nested_empty = {}; S1 const tint_symbol_1 = {.a=2, .b=3, .c=4, .d=5}; S1 const tint_symbol_2 = {.a=7, .b=8, .c=9, .d=10}; S2 const tint_symbol_3 = {.e=6, .f=tint_symbol_2}; S3 const nested_nonempty = {.g=1, .h=tint_symbol_1, .i=tint_symbol_3}; - S1 const tint_symbol_4 = {.a=2, .b=x, .c=(x + 1), .d=nested_nonempty.i.f.d}; + S1 const tint_symbol_4 = {.a=2, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nested_nonempty.i.f.d}; S2 const tint_symbol_5 = {.e=6, .f=nonempty}; S3 const nested_nonempty_with_expr = {.g=1, .h=tint_symbol_4, .i=tint_symbol_5}; S1 const tint_symbol_6 = {}; int const subexpr_empty = tint_symbol_6.a; S1 const tint_symbol_7 = {.a=1, .b=2, .c=3, .d=4}; int const subexpr_nonempty = tint_symbol_7.b; - S1 const tint_symbol_8 = {.a=1, .b=x, .c=(x + 1), .d=nonempty.d}; + S1 const tint_symbol_8 = {.a=1, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nonempty.d}; int const subexpr_nonempty_with_expr = tint_symbol_8.c; S2 const tint_symbol_9 = {}; S1 const subexpr_nested_empty = tint_symbol_9.f; S1 const tint_symbol_10 = {.a=2, .b=3, .c=4, .d=5}; S2 const tint_symbol_11 = {.e=1, .f=tint_symbol_10}; S1 const subexpr_nested_nonempty = tint_symbol_11.f; - S1 const tint_symbol_12 = {.a=2, .b=x, .c=(x + 1), .d=nested_nonempty.i.f.d}; + S1 const tint_symbol_12 = {.a=2, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nested_nonempty.i.f.d}; S2 const tint_symbol_13 = {.e=1, .f=tint_symbol_12}; S1 const subexpr_nested_nonempty_with_expr = tint_symbol_13.f; tint_array_wrapper_1 const aosoa_empty = {.arr={}}; @@ -59,7 +59,7 @@ kernel void tint_symbol() { tint_array_wrapper const tint_symbol_16 = {.arr={3, 4}}; T const tint_symbol_17 = {.a=tint_symbol_16}; tint_array_wrapper_1 const aosoa_nonempty = {.arr={tint_symbol_15, tint_symbol_17}}; - tint_array_wrapper const tint_symbol_18 = {.arr={1, (aosoa_nonempty.arr[0].a.arr[0] + 1)}}; + tint_array_wrapper const tint_symbol_18 = {.arr={1, as_type((as_type(aosoa_nonempty.arr[0].a.arr[0]) + as_type(1)))}}; T const tint_symbol_19 = {.a=tint_symbol_18}; tint_array_wrapper_1 const aosoa_nonempty_with_expr = {.arr={tint_symbol_19, aosoa_nonempty.arr[1]}}; return; diff --git a/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl index 6bd4685512..10a013ce41 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint const x_1 = as_type((30 + as_type(10u))); + uint const x_1 = as_type(as_type((as_type(30) + as_type(as_type(10u))))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl index 53b8e7779b..a43d563e1b 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 + as_type(10u)); + int const x_1 = as_type((as_type(30) + as_type(as_type(10u)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl index 057f374590..ce30689316 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IAdd_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint2 const x_1 = as_type((int2(30, 40) + as_type(uint2(10u, 20u)))); + uint2 const x_1 = as_type(as_type((as_type(int2(30, 40)) + as_type(as_type(uint2(10u, 20u)))))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl index 7a5d3301cc..9bc4d08dd9 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 + 40); + int const x_1 = as_type((as_type(30) + as_type(40))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl index 409fe524d6..4a2d842ac5 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IAdd_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int2 const x_1 = (int2(30, 40) + int2(40, 30)); + int2 const x_1 = as_type((as_type(int2(30, 40)) + as_type(int2(40, 30)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl index 16997fae7d..deba5f1e85 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint const x_1 = as_type((30 * as_type(10u))); + uint const x_1 = as_type(as_type((as_type(30) * as_type(as_type(10u))))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl index e44de6a043..d47c480f72 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 * as_type(10u)); + int const x_1 = as_type((as_type(30) * as_type(as_type(10u)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl index 004e320d87..19aa3dafa4 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IMul_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint2 const x_1 = as_type((int2(30, 40) * as_type(uint2(10u, 20u)))); + uint2 const x_1 = as_type(as_type((as_type(int2(30, 40)) * as_type(as_type(uint2(10u, 20u)))))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl index 97abd51418..8c5646e4fc 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 * 40); + int const x_1 = as_type((as_type(30) * as_type(40))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl index c0ed5fa90f..a644e96151 100644 --- a/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_IMul_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int2 const x_1 = (int2(30, 40) * int2(40, 30)); + int2 const x_1 = as_type((as_type(int2(30, 40)) * as_type(int2(40, 30)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl index d0a0b1ae40..11ac7ced95 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_0.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint const x_1 = as_type((30 - as_type(10u))); + uint const x_1 = as_type(as_type((as_type(30) - as_type(as_type(10u))))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl index 2e450fed48..4bdc2cd984 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 - as_type(10u)); + int const x_1 = as_type((as_type(30) - as_type(as_type(10u)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl index 7caef80417..e4f851c0f1 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ISub_MixedSignedness_SpvBinaryArithGeneralTest_EmitExpression_4.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint2 const x_1 = as_type((int2(30, 40) - as_type(uint2(10u, 20u)))); + uint2 const x_1 = as_type(as_type((as_type(int2(30, 40)) - as_type(as_type(uint2(10u, 20u)))))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl index f75aa31450..70fc7a6b22 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 - 40); + int const x_1 = as_type((as_type(30) - as_type(40))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl index 525e924556..57ee2da0a4 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ISub_SpvBinaryArithTest_EmitExpression_3.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int2 const x_1 = (int2(30, 40) - int2(40, 30)); + int2 const x_1 = as_type((as_type(int2(30, 40)) - as_type(int2(40, 30)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl index 9d374056ce..a8ef0fdecf 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 << as_type(40)); + int const x_1 = as_type((as_type(30) << as_type(40))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_3.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_3.spvasm.expected.msl index 92b03c4214..dbaa54e627 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Signed_SpvBinaryBitGeneralTest_EmitExpression_3.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int2 const x_1 = (int2(30, 40) << as_type(int2(40, 30))); + int2 const x_1 = as_type((as_type(int2(30, 40)) << as_type(int2(40, 30)))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_1.spvasm.expected.msl index 868ba01c55..49e4eba1d1 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int const x_1 = (30 << 20u); + int const x_1 = as_type((as_type(30) << 20u)); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_3.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_3.spvasm.expected.msl index f600d43240..80d40ff8b3 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_3.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_Arg2Unsigned_SpvBinaryBitTest_EmitExpression_3.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - int2 const x_1 = (int2(30, 40) << uint2(20u, 10u)); + int2 const x_1 = as_type((as_type(int2(30, 40)) << uint2(20u, 10u))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl index cee25833f3..d746695dde 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_0.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint const x_1 = as_type((30 << 10u)); + uint const x_1 = as_type(as_type((as_type(30) << 10u))); return; } diff --git a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_1.spvasm.expected.msl b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_1.spvasm.expected.msl index 1fca25d8ed..999f72a152 100644 --- a/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_1.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvParserTest_ShiftLeftLogical_BitcastResult_SpvBinaryBitGeneralTest_EmitExpression_1.spvasm.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void main_1() { - uint2 const x_1 = as_type((int2(30, 40) << uint2(20u, 10u))); + uint2 const x_1 = as_type(as_type((as_type(int2(30, 40)) << uint2(20u, 10u)))); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Int.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Int.spvasm.expected.msl index 8a0cc68dd4..4cee065a33 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Int.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Int.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - int const x_1 = -(30); + int const x_1 = tint_unary_minus(30); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Uint.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Uint.spvasm.expected.msl index 9a0b0f7dfa..532c85b6ff 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Uint.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Int_Uint.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - int const x_1 = -(as_type(10u)); + int const x_1 = tint_unary_minus(as_type(10u)); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_SignedVec.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_SignedVec.spvasm.expected.msl index 37bd39b4ae..89d098afe2 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_SignedVec.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_SignedVec.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int2 tint_unary_minus(const int2 v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - int2 const x_1 = -(int2(30, 40)); + int2 const x_1 = tint_unary_minus(int2(30, 40)); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_UnsignedVec.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_UnsignedVec.spvasm.expected.msl index 24c5e3c9a8..e58159ae7e 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_UnsignedVec.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_SignedVec_UnsignedVec.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int2 tint_unary_minus(const int2 v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - int2 const x_1 = -(as_type(uint2(10u, 20u))); + int2 const x_1 = tint_unary_minus(as_type(uint2(10u, 20u))); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Int.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Int.spvasm.expected.msl index 7afd7f08dd..473cac5a97 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Int.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Int.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - uint const x_1 = as_type(-(30)); + uint const x_1 = as_type(tint_unary_minus(30)); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Uint.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Uint.spvasm.expected.msl index 181216d1ed..5e00292e21 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Uint.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_Uint_Uint.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - uint const x_1 = as_type(-(as_type(10u))); + uint const x_1 = as_type(tint_unary_minus(as_type(10u))); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_SignedVec.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_SignedVec.spvasm.expected.msl index 73a6e7e6cf..eb13ffff8f 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_SignedVec.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_SignedVec.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int2 tint_unary_minus(const int2 v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - uint2 const x_1 = as_type(-(int2(30, 40))); + uint2 const x_1 = as_type(tint_unary_minus(int2(30, 40))); return; } diff --git a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_UnsignedVec.spvasm.expected.msl b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_UnsignedVec.spvasm.expected.msl index b557aefd00..49b59a212d 100644 --- a/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_UnsignedVec.spvasm.expected.msl +++ b/test/unittest/reader/spirv/SpvUnaryArithTest_SNegate_UnsignedVec_UnsignedVec.spvasm.expected.msl @@ -1,8 +1,13 @@ #include using namespace metal; + +int2 tint_unary_minus(const int2 v) { + return select(-v, v, v == -2147483648); +} + void main_1() { - uint2 const x_1 = as_type(-(as_type(uint2(10u, 20u)))); + uint2 const x_1 = as_type(tint_unary_minus(as_type(uint2(10u, 20u)))); return; } diff --git a/test/var/uses/private.wgsl.expected.msl b/test/var/uses/private.wgsl.expected.msl index ed8cfa6d28..d5f572f0a7 100644 --- a/test/var/uses/private.wgsl.expected.msl +++ b/test/var/uses/private.wgsl.expected.msl @@ -2,11 +2,11 @@ using namespace metal; void uses_a(thread int* const tint_symbol) { - *(tint_symbol) = (*(tint_symbol) + 1); + *(tint_symbol) = as_type((as_type(*(tint_symbol)) + as_type(1))); } void uses_b(thread int* const tint_symbol_1) { - *(tint_symbol_1) = (*(tint_symbol_1) * 2); + *(tint_symbol_1) = as_type((as_type(*(tint_symbol_1)) * as_type(2))); } void uses_a_and_b(thread int* const tint_symbol_2, thread int* const tint_symbol_3) { diff --git a/test/var/uses/workgroup.wgsl.expected.msl b/test/var/uses/workgroup.wgsl.expected.msl index f491761e31..4713b0efe1 100644 --- a/test/var/uses/workgroup.wgsl.expected.msl +++ b/test/var/uses/workgroup.wgsl.expected.msl @@ -2,11 +2,11 @@ using namespace metal; void uses_a(threadgroup int* const tint_symbol_3) { - *(tint_symbol_3) = (*(tint_symbol_3) + 1); + *(tint_symbol_3) = as_type((as_type(*(tint_symbol_3)) + as_type(1))); } void uses_b(threadgroup int* const tint_symbol_4) { - *(tint_symbol_4) = (*(tint_symbol_4) * 2); + *(tint_symbol_4) = as_type((as_type(*(tint_symbol_4)) * as_type(2))); } void uses_a_and_b(threadgroup int* const tint_symbol_5, threadgroup int* const tint_symbol_6) { diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl index 5262879438..0de2d02ce5 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.spvasm.expected.msl @@ -56,7 +56,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { } else { break; } - int const x_22 = (x_21 - 1); + int const x_22 = as_type((as_type(x_21) - as_type(1))); x_19 = x_22; int const x_23 = x_24.arr[x_22]; if ((x_23 == 1)) { @@ -139,7 +139,7 @@ int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) { } else { break; } - int const x_13 = (x_15 - 1); + int const x_13 = as_type((as_type(x_15) - as_type(1))); zero = x_13; int const x_14 = (*(obj)).nmb.arr[x_13]; if ((x_14 == 1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl index 5262879438..0de2d02ce5 100644 --- a/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/always-discarding-function/0-opt.wgsl.expected.msl @@ -56,7 +56,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) { } else { break; } - int const x_22 = (x_21 - 1); + int const x_22 = as_type((as_type(x_21) - as_type(1))); x_19 = x_22; int const x_23 = x_24.arr[x_22]; if ((x_23 == 1)) { @@ -139,7 +139,7 @@ int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) { } else { break; } - int const x_13 = (x_15 - 1); + int const x_13 = as_type((as_type(x_15) - as_type(1))); zero = x_13; int const x_14 = (*(obj)).nmb.arr[x_13]; if ((x_14 == 1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl index 3bf51a59ea..33c3ed3f91 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.spvasm.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104]; pivot = x_106; int const x_107 = *(l); - i_1 = (x_107 - 1); + i_1 = as_type((as_type(x_107) - as_type(1))); int const x_109 = *(l); j_1 = x_109; while (true) { int const x_114 = j_1; int const x_115 = *(h); - if ((x_114 <= (x_115 - 1))) { + if ((x_114 <= as_type((as_type(x_115) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_122 = pivot; if ((x_121 <= x_122)) { int const x_126 = i_1; - i_1 = (x_126 + 1); + i_1 = as_type((as_type(x_126) + as_type(1))); int const x_128 = i_1; param = x_128; int const x_129 = j_1; @@ -68,16 +68,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_131 = j_1; - j_1 = (x_131 + 1); + j_1 = as_type((as_type(x_131) + as_type(1))); } } int const x_133 = i_1; - param_2 = (x_133 + 1); + param_2 = as_type((as_type(x_133) + as_type(1))); int const x_135 = *(h); param_3 = x_135; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_5); int const x_137 = i_1; - return (x_137 + 1); + return as_type((as_type(x_137) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_6) { @@ -92,12 +92,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { h_1 = 9; top = -1; int const x_140 = top; - int const x_141 = (x_140 + 1); + int const x_141 = as_type((as_type(x_140) + as_type(1))); top = x_141; int const x_142 = l_1; stack.arr[x_141] = x_142; int const x_144 = top; - int const x_145 = (x_144 + 1); + int const x_145 = as_type((as_type(x_144) + as_type(1))); top = x_145; int const x_146 = h_1; stack.arr[x_145] = x_146; @@ -108,11 +108,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { break; } int const x_155 = top; - top = (x_155 - 1); + top = as_type((as_type(x_155) - as_type(1))); int const x_158 = stack.arr[x_155]; h_1 = x_158; int const x_159 = top; - top = (x_159 - 1); + top = as_type((as_type(x_159) - as_type(1))); int const x_162 = stack.arr[x_159]; l_1 = x_162; int const x_163 = l_1; @@ -123,28 +123,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { p = x_165; int const x_166 = p; int const x_168 = l_1; - if (((x_166 - 1) > x_168)) { + if ((as_type((as_type(x_166) - as_type(1))) > x_168)) { int const x_172 = top; - int const x_173 = (x_172 + 1); + int const x_173 = as_type((as_type(x_172) + as_type(1))); top = x_173; int const x_174 = l_1; stack.arr[x_173] = x_174; int const x_176 = top; - int const x_177 = (x_176 + 1); + int const x_177 = as_type((as_type(x_176) + as_type(1))); top = x_177; int const x_178 = p; - stack.arr[x_177] = (x_178 - 1); + stack.arr[x_177] = as_type((as_type(x_178) - as_type(1))); } int const x_181 = p; int const x_183 = h_1; - if (((x_181 + 1) < x_183)) { + if ((as_type((as_type(x_181) + as_type(1))) < x_183)) { int const x_187 = top; - int const x_188 = (x_187 + 1); + int const x_188 = as_type((as_type(x_187) + as_type(1))); top = x_188; int const x_189 = p; - stack.arr[x_188] = (x_189 + 1); + stack.arr[x_188] = as_type((as_type(x_189) + as_type(1))); int const x_192 = top; - int const x_193 = (x_192 + 1); + int const x_193 = as_type((as_type(x_192) + as_type(1))); top = x_193; int const x_194 = h_1; stack.arr[x_193] = x_194; @@ -164,16 +164,16 @@ void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const ti } int const x_67 = i_2; int const x_68 = i_2; - (*(tint_symbol_7)).numbers.arr[x_67] = (10 - x_68); + (*(tint_symbol_7)).numbers.arr[x_67] = as_type((as_type(10) - as_type(x_68))); int const x_71 = i_2; int const x_72 = i_2; int const x_74 = (*(tint_symbol_7)).numbers.arr[x_72]; int const x_75 = i_2; int const x_77 = (*(tint_symbol_7)).numbers.arr[x_75]; - (*(tint_symbol_7)).numbers.arr[x_71] = (x_74 * x_77); + (*(tint_symbol_7)).numbers.arr[x_71] = as_type((as_type(x_74) * as_type(x_77))); { int const x_80 = i_2; - i_2 = (x_80 + 1); + i_2 = as_type((as_type(x_80) + as_type(1))); } } quicksort_(tint_symbol_7); diff --git a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl index 3bf51a59ea..33c3ed3f91 100644 --- a/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/arr-value-set-to-arr-value-squared/0-opt.wgsl.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104]; pivot = x_106; int const x_107 = *(l); - i_1 = (x_107 - 1); + i_1 = as_type((as_type(x_107) - as_type(1))); int const x_109 = *(l); j_1 = x_109; while (true) { int const x_114 = j_1; int const x_115 = *(h); - if ((x_114 <= (x_115 - 1))) { + if ((x_114 <= as_type((as_type(x_115) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_122 = pivot; if ((x_121 <= x_122)) { int const x_126 = i_1; - i_1 = (x_126 + 1); + i_1 = as_type((as_type(x_126) + as_type(1))); int const x_128 = i_1; param = x_128; int const x_129 = j_1; @@ -68,16 +68,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_131 = j_1; - j_1 = (x_131 + 1); + j_1 = as_type((as_type(x_131) + as_type(1))); } } int const x_133 = i_1; - param_2 = (x_133 + 1); + param_2 = as_type((as_type(x_133) + as_type(1))); int const x_135 = *(h); param_3 = x_135; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_5); int const x_137 = i_1; - return (x_137 + 1); + return as_type((as_type(x_137) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_6) { @@ -92,12 +92,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { h_1 = 9; top = -1; int const x_140 = top; - int const x_141 = (x_140 + 1); + int const x_141 = as_type((as_type(x_140) + as_type(1))); top = x_141; int const x_142 = l_1; stack.arr[x_141] = x_142; int const x_144 = top; - int const x_145 = (x_144 + 1); + int const x_145 = as_type((as_type(x_144) + as_type(1))); top = x_145; int const x_146 = h_1; stack.arr[x_145] = x_146; @@ -108,11 +108,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { break; } int const x_155 = top; - top = (x_155 - 1); + top = as_type((as_type(x_155) - as_type(1))); int const x_158 = stack.arr[x_155]; h_1 = x_158; int const x_159 = top; - top = (x_159 - 1); + top = as_type((as_type(x_159) - as_type(1))); int const x_162 = stack.arr[x_159]; l_1 = x_162; int const x_163 = l_1; @@ -123,28 +123,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) { p = x_165; int const x_166 = p; int const x_168 = l_1; - if (((x_166 - 1) > x_168)) { + if ((as_type((as_type(x_166) - as_type(1))) > x_168)) { int const x_172 = top; - int const x_173 = (x_172 + 1); + int const x_173 = as_type((as_type(x_172) + as_type(1))); top = x_173; int const x_174 = l_1; stack.arr[x_173] = x_174; int const x_176 = top; - int const x_177 = (x_176 + 1); + int const x_177 = as_type((as_type(x_176) + as_type(1))); top = x_177; int const x_178 = p; - stack.arr[x_177] = (x_178 - 1); + stack.arr[x_177] = as_type((as_type(x_178) - as_type(1))); } int const x_181 = p; int const x_183 = h_1; - if (((x_181 + 1) < x_183)) { + if ((as_type((as_type(x_181) + as_type(1))) < x_183)) { int const x_187 = top; - int const x_188 = (x_187 + 1); + int const x_188 = as_type((as_type(x_187) + as_type(1))); top = x_188; int const x_189 = p; - stack.arr[x_188] = (x_189 + 1); + stack.arr[x_188] = as_type((as_type(x_189) + as_type(1))); int const x_192 = top; - int const x_193 = (x_192 + 1); + int const x_193 = as_type((as_type(x_192) + as_type(1))); top = x_193; int const x_194 = h_1; stack.arr[x_193] = x_194; @@ -164,16 +164,16 @@ void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const ti } int const x_67 = i_2; int const x_68 = i_2; - (*(tint_symbol_7)).numbers.arr[x_67] = (10 - x_68); + (*(tint_symbol_7)).numbers.arr[x_67] = as_type((as_type(10) - as_type(x_68))); int const x_71 = i_2; int const x_72 = i_2; int const x_74 = (*(tint_symbol_7)).numbers.arr[x_72]; int const x_75 = i_2; int const x_77 = (*(tint_symbol_7)).numbers.arr[x_75]; - (*(tint_symbol_7)).numbers.arr[x_71] = (x_74 * x_77); + (*(tint_symbol_7)).numbers.arr[x_71] = as_type((as_type(x_74) * as_type(x_77))); { int const x_80 = i_2; - i_2 = (x_80 + 1); + i_2 = as_type((as_type(x_80) + as_type(1))); } } quicksort_(tint_symbol_7); diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl index 4eedfbc1a5..34a6d5147d 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.spvasm.expected.msl @@ -29,7 +29,7 @@ float func_(constant buf0& x_7, thread float4* const tint_symbol_5) { x = int(x_111); float const x_114 = x_7.injectionSwitch.x; int const x_118 = x; - x = (x_118 + (int(clamp(x_114, 0.0f, 1.0f)) * 3)); + x = as_type((as_type(x_118) + as_type(as_type((as_type(int(clamp(x_114, 0.0f, 1.0f))) * as_type(3)))))); int const x_120 = x; return (5.0f + float(x_120)); } @@ -42,7 +42,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float while (true) { int const x_48 = i; float const x_50 = x_7.injectionSwitch.x; - if ((x_48 < (4 + int(x_50)))) { + if ((x_48 < as_type((as_type(4) + as_type(int(x_50)))))) { } else { break; } @@ -60,7 +60,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float int const x_67 = j; int const x_69 = i; float const x_71 = func_(x_7, tint_symbol_6); - data.arr[((4 * x_67) + x_69)].x = x_71; + data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_67)))) + as_type(x_69)))].x = x_71; float const x_74 = data.arr[0].x; bool const x_75 = (x_74 == 5.0f); x_82_phi = x_75; @@ -82,13 +82,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } { int const x_93 = j; - j = (x_93 + 1); + j = as_type((as_type(x_93) + as_type(1))); } } } { int const x_95 = i; - i = (x_95 + 1); + i = as_type((as_type(x_95) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl index 4eedfbc1a5..34a6d5147d 100644 --- a/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/array-idx-multiplied-by-for-loop-idx/0-opt.wgsl.expected.msl @@ -29,7 +29,7 @@ float func_(constant buf0& x_7, thread float4* const tint_symbol_5) { x = int(x_111); float const x_114 = x_7.injectionSwitch.x; int const x_118 = x; - x = (x_118 + (int(clamp(x_114, 0.0f, 1.0f)) * 3)); + x = as_type((as_type(x_118) + as_type(as_type((as_type(int(clamp(x_114, 0.0f, 1.0f))) * as_type(3)))))); int const x_120 = x; return (5.0f + float(x_120)); } @@ -42,7 +42,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float while (true) { int const x_48 = i; float const x_50 = x_7.injectionSwitch.x; - if ((x_48 < (4 + int(x_50)))) { + if ((x_48 < as_type((as_type(4) + as_type(int(x_50)))))) { } else { break; } @@ -60,7 +60,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float int const x_67 = j; int const x_69 = i; float const x_71 = func_(x_7, tint_symbol_6); - data.arr[((4 * x_67) + x_69)].x = x_71; + data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_67)))) + as_type(x_69)))].x = x_71; float const x_74 = data.arr[0].x; bool const x_75 = (x_74 == 5.0f); x_82_phi = x_75; @@ -82,13 +82,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_6, thread float } { int const x_93 = j; - j = (x_93 + 1); + j = as_type((as_type(x_93) + as_type(1))); } } } { int const x_95 = i; - i = (x_95 + 1); + i = as_type((as_type(x_95) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl index 106d1585e6..9f12b7ce29 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.spvasm.expected.msl @@ -41,7 +41,7 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol int const x_90 = (*(tint_symbol_5)).arr[x_88]; (*(tint_symbol_7)).arr[x_87] = x_90; int const x_92 = b; - b = (x_92 + 2); + b = as_type((as_type(x_92) + as_type(2))); } } } @@ -54,10 +54,10 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol } int const x_101 = i; int const x_103 = (*(tint_symbol_7)).arr[0]; - (*(tint_symbol_5)).arr[x_101] = (x_103 + 1); + (*(tint_symbol_5)).arr[x_101] = as_type((as_type(x_103) + as_type(1))); { int const x_106 = i; - i = (x_106 + 1); + i = as_type((as_type(x_106) + as_type(1))); } } int const x_109 = (*(tint_symbol_7)).arr[0]; @@ -101,7 +101,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const } { int const x_62 = i_1; - i_1 = (x_62 + 1); + i_1 = as_type((as_type(x_62) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl index 106d1585e6..9f12b7ce29 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array-2/0-opt.wgsl.expected.msl @@ -41,7 +41,7 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol int const x_90 = (*(tint_symbol_5)).arr[x_88]; (*(tint_symbol_7)).arr[x_87] = x_90; int const x_92 = b; - b = (x_92 + 2); + b = as_type((as_type(x_92) + as_type(2))); } } } @@ -54,10 +54,10 @@ float func_i1_(thread int* const a, thread tint_array_wrapper* const tint_symbol } int const x_101 = i; int const x_103 = (*(tint_symbol_7)).arr[0]; - (*(tint_symbol_5)).arr[x_101] = (x_103 + 1); + (*(tint_symbol_5)).arr[x_101] = as_type((as_type(x_103) + as_type(1))); { int const x_106 = i; - i = (x_106 + 1); + i = as_type((as_type(x_106) + as_type(1))); } } int const x_109 = (*(tint_symbol_7)).arr[0]; @@ -101,7 +101,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_8, thread float4* const } { int const x_62 = i_1; - i_1 = (x_62 + 1); + i_1 = as_type((as_type(x_62) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl index 8260441934..4063dcbe3b 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.spvasm.expected.msl @@ -37,7 +37,7 @@ void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { int const x_69 = data.arr[min(x_66, 0)]; temp.arr[min(x_64, 1)] = x_69; int const x_71 = a; - a = (x_71 + 1); + a = as_type((as_type(x_71) + as_type(1))); } } i = 0; @@ -50,10 +50,10 @@ void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { int const x_80 = i; int const x_82 = temp.arr[0]; int const x_83 = i; - data.arr[x_80] = (x_82 + x_83); + data.arr[x_80] = as_type((as_type(x_82) + as_type(x_83))); { int const x_86 = i; - i = (x_86 + 1); + i = as_type((as_type(x_86) + as_type(1))); } } int const x_89 = data.arr[0]; @@ -88,7 +88,7 @@ void main_1(thread float4* const tint_symbol_5) { func_i1_(&(param), tint_symbol_5); { int const x_48 = i_1; - i_1 = (x_48 + 1); + i_1 = as_type((as_type(x_48) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl index 8260441934..4063dcbe3b 100644 --- a/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/assign-array-value-to-another-array/0-opt.wgsl.expected.msl @@ -37,7 +37,7 @@ void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { int const x_69 = data.arr[min(x_66, 0)]; temp.arr[min(x_64, 1)] = x_69; int const x_71 = a; - a = (x_71 + 1); + a = as_type((as_type(x_71) + as_type(1))); } } i = 0; @@ -50,10 +50,10 @@ void func_i1_(thread int* const x, thread float4* const tint_symbol_4) { int const x_80 = i; int const x_82 = temp.arr[0]; int const x_83 = i; - data.arr[x_80] = (x_82 + x_83); + data.arr[x_80] = as_type((as_type(x_82) + as_type(x_83))); { int const x_86 = i; - i = (x_86 + 1); + i = as_type((as_type(x_86) + as_type(1))); } } int const x_89 = data.arr[0]; @@ -88,7 +88,7 @@ void main_1(thread float4* const tint_symbol_5) { func_i1_(&(param), tint_symbol_5); { int const x_48 = i_1; - i_1 = (x_48 + 1); + i_1 = as_type((as_type(x_48) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl index 99eb99a20b..9d6a2d8685 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.spvasm.expected.msl @@ -27,9 +27,9 @@ void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const int const x_51 = lid; if ((x_51 > 0)) { int const x_55 = lid; - int const x_58 = x_7.data[(x_55 - 1)]; + int const x_58 = x_7.data[as_type((as_type(x_55) - as_type(1)))]; int const x_59 = val; - val = (x_59 + x_58); + val = as_type((as_type(x_59) + as_type(x_58))); float const x_62 = x_10.injectionSwitch.x; if ((x_62 > 100.0f)) { break; @@ -38,7 +38,7 @@ void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_66 = i; - i = (x_66 + 1); + i = as_type((as_type(x_66) + as_type(1))); } } int const x_68 = lid; diff --git a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl index 99eb99a20b..9d6a2d8685 100644 --- a/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/barrier-in-loop-with-break/0-opt.wgsl.expected.msl @@ -27,9 +27,9 @@ void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const int const x_51 = lid; if ((x_51 > 0)) { int const x_55 = lid; - int const x_58 = x_7.data[(x_55 - 1)]; + int const x_58 = x_7.data[as_type((as_type(x_55) - as_type(1)))]; int const x_59 = val; - val = (x_59 + x_58); + val = as_type((as_type(x_59) + as_type(x_58))); float const x_62 = x_10.injectionSwitch.x; if ((x_62 > 100.0f)) { break; @@ -38,7 +38,7 @@ void main_1(constant buf1& x_10, device doesNotMatter& x_7, thread uint3* const threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_66 = i; - i = (x_66 + 1); + i = as_type((as_type(x_66) + as_type(1))); } } int const x_68 = lid; diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl index 1063af21fa..b53ef9698d 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.spvasm.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int x_54_phi = 0; - int const x_8 = (x_11 + 1); + int const x_8 = as_type((as_type(x_11) + as_type(1))); float const x_47 = x_6.injectionSwitch.x; x_54_phi = x_40; switch(int(x_47)) { @@ -43,7 +43,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { /* fallthrough */ } case 19: { - x_54_phi = as_type((x_40 + as_type(1))); + x_54_phi = as_type(as_type((as_type(x_40) + as_type(as_type(1))))); /* fallthrough */ } case 23: diff --git a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl index 1063af21fa..b53ef9698d 100644 --- a/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/call-if-while-switch/0-opt.wgsl.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int x_54_phi = 0; - int const x_8 = (x_11 + 1); + int const x_8 = as_type((as_type(x_11) + as_type(1))); float const x_47 = x_6.injectionSwitch.x; x_54_phi = x_40; switch(int(x_47)) { @@ -43,7 +43,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { /* fallthrough */ } case 19: { - x_54_phi = as_type((x_40 + as_type(1))); + x_54_phi = as_type(as_type((as_type(x_40) + as_type(as_type(1))))); /* fallthrough */ } case 23: diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl index 734666e7de..85a576db52 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.spvasm.expected.msl @@ -36,8 +36,8 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol { *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); x_46 = x_45; - x_46.f0 = (x_45.f0 + 1); - x_9 = (x_11 + 1); + x_46.f0 = as_type((as_type(x_45.f0) + as_type(1))); + x_9 = as_type((as_type(x_11) + as_type(1))); x_45_phi = x_46; x_11_phi = x_9; } @@ -57,7 +57,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol } { *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); - x_6 = (x_12 + 1); + x_6 = as_type((as_type(x_12) + as_type(1))); x_12_phi = x_6; } } diff --git a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl index 734666e7de..85a576db52 100644 --- a/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/color-write-in-loop/0.wgsl.expected.msl @@ -36,8 +36,8 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol { *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); x_46 = x_45; - x_46.f0 = (x_45.f0 + 1); - x_9 = (x_11 + 1); + x_46.f0 = as_type((as_type(x_45.f0) + as_type(1))); + x_9 = as_type((as_type(x_11) + as_type(1))); x_45_phi = x_46; x_11_phi = x_9; } @@ -57,7 +57,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol } { *(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f); - x_6 = (x_12 + 1); + x_6 = as_type((as_type(x_12) + as_type(1))); x_12_phi = x_6; } } diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl index cb848eabef..7fd58836de 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl @@ -83,7 +83,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_41 = GLF_live4_looplimiter5; - GLF_live4_looplimiter5 = (x_41 + 1); + GLF_live4_looplimiter5 = as_type((as_type(x_41) + as_type(1))); GLF_live7m42 = float4x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f), float2(0.0f, 0.0f), float2(1.0f, 0.0f)); GLF_live7m33 = float3x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f)); GLF_live7cols = 2; @@ -98,7 +98,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_45 = GLF_live7_looplimiter3; - GLF_live7_looplimiter3 = (x_45 + 1); + GLF_live7_looplimiter3 = as_type((as_type(x_45) + as_type(1))); GLF_live7rows = 2; while (true) { int const x_47 = GLF_live7rows; @@ -111,7 +111,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_49 = GLF_live7_looplimiter2; - GLF_live7_looplimiter2 = (x_49 + 1); + GLF_live7_looplimiter2 = as_type((as_type(x_49) + as_type(1))); GLF_live7_looplimiter1 = 0; GLF_live7c = 0; while (true) { @@ -125,7 +125,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_53 = GLF_live7_looplimiter1; - GLF_live7_looplimiter1 = (x_53 + 1); + GLF_live7_looplimiter1 = as_type((as_type(x_53) + as_type(1))); GLF_live7r = 0; while (true) { int const x_55 = GLF_live7r; @@ -138,7 +138,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_57 = GLF_live7_looplimiter0; - GLF_live7_looplimiter0 = (x_57 + 1); + GLF_live7_looplimiter0 = as_type((as_type(x_57) + as_type(1))); int const x_59 = GLF_live7c; int const x_60 = GLF_live7c; int const x_61 = GLF_live7c; @@ -159,22 +159,22 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { } { int const x_71 = GLF_live7r; - GLF_live7r = (x_71 + 1); + GLF_live7r = as_type((as_type(x_71) + as_type(1))); } } { int const x_73 = GLF_live7c; - GLF_live7c = (x_73 + 1); + GLF_live7c = as_type((as_type(x_73) + as_type(1))); } } { int const x_75 = GLF_live7rows; - GLF_live7rows = (x_75 + 1); + GLF_live7rows = as_type((as_type(x_75) + as_type(1))); } } { int const x_77 = GLF_live7cols; - GLF_live7cols = (x_77 + 1); + GLF_live7cols = as_type((as_type(x_77) + as_type(1))); } } GLF_live7sum_index = 0; @@ -191,7 +191,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_81 = GLF_live7_looplimiter7; - GLF_live7_looplimiter7 = (x_81 + 1); + GLF_live7_looplimiter7 = as_type((as_type(x_81) + as_type(1))); GLF_live7rows_1 = 2; int const x_83 = GLF_live7sum_index; int const x_84 = GLF_live7sum_index; @@ -241,24 +241,24 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { GLF_live7sums.arr[x_332] = (x_336 + x_334); { int const x_98 = GLF_live7r_1; - GLF_live7r_1 = (x_98 + 1); + GLF_live7r_1 = as_type((as_type(x_98) + as_type(1))); } } { int const x_100 = GLF_live7c_1; - GLF_live7c_1 = (x_100 + 1); + GLF_live7c_1 = as_type((as_type(x_100) + as_type(1))); } } int const x_102 = GLF_live7sum_index; - GLF_live7sum_index = (x_102 + 1); + GLF_live7sum_index = as_type((as_type(x_102) + as_type(1))); { int const x_104 = GLF_live7cols_1; - GLF_live7cols_1 = (x_104 + 1); + GLF_live7cols_1 = as_type((as_type(x_104) + as_type(1))); } } { int const x_106 = GLF_live4i; - GLF_live4i = (x_106 + 1); + GLF_live4i = as_type((as_type(x_106) + as_type(1))); } } return float3(1.0f, 1.0f, 1.0f); @@ -292,7 +292,7 @@ void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread floa float3 const x_178 = drawShape_vf2_(x_25, &(param_2)); { int const x_109 = i; - i = (x_109 - 1); + i = as_type((as_type(x_109) - as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl index 9f3a7ed7b2..5842374ff3 100644 --- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.wgsl.expected.msl @@ -83,7 +83,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_41 = GLF_live4_looplimiter5; - GLF_live4_looplimiter5 = (x_41 + 1); + GLF_live4_looplimiter5 = as_type((as_type(x_41) + as_type(1))); GLF_live7m42 = float4x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f), float2(0.0f, 0.0f), float2(1.0f, 0.0f)); GLF_live7m33 = float3x3(float3(1.0f, 0.0f, 0.0f), float3(0.0f, 1.0f, 0.0f), float3(0.0f, 0.0f, 1.0f)); GLF_live7cols = 2; @@ -98,7 +98,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_45 = GLF_live7_looplimiter3; - GLF_live7_looplimiter3 = (x_45 + 1); + GLF_live7_looplimiter3 = as_type((as_type(x_45) + as_type(1))); GLF_live7rows = 2; while (true) { int const x_47 = GLF_live7rows; @@ -111,7 +111,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_49 = GLF_live7_looplimiter2; - GLF_live7_looplimiter2 = (x_49 + 1); + GLF_live7_looplimiter2 = as_type((as_type(x_49) + as_type(1))); GLF_live7_looplimiter1 = 0; GLF_live7c = 0; while (true) { @@ -125,7 +125,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_53 = GLF_live7_looplimiter1; - GLF_live7_looplimiter1 = (x_53 + 1); + GLF_live7_looplimiter1 = as_type((as_type(x_53) + as_type(1))); GLF_live7r = 0; while (true) { int const x_55 = GLF_live7r; @@ -138,7 +138,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_57 = GLF_live7_looplimiter0; - GLF_live7_looplimiter0 = (x_57 + 1); + GLF_live7_looplimiter0 = as_type((as_type(x_57) + as_type(1))); int const x_59 = GLF_live7c; int const x_60 = GLF_live7c; int const x_61 = GLF_live7c; @@ -159,22 +159,22 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { } { int const x_71 = GLF_live7r; - GLF_live7r = (x_71 + 1); + GLF_live7r = as_type((as_type(x_71) + as_type(1))); } } { int const x_73 = GLF_live7c; - GLF_live7c = (x_73 + 1); + GLF_live7c = as_type((as_type(x_73) + as_type(1))); } } { int const x_75 = GLF_live7rows; - GLF_live7rows = (x_75 + 1); + GLF_live7rows = as_type((as_type(x_75) + as_type(1))); } } { int const x_77 = GLF_live7cols; - GLF_live7cols = (x_77 + 1); + GLF_live7cols = as_type((as_type(x_77) + as_type(1))); } } GLF_live7sum_index = 0; @@ -191,7 +191,7 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { break; } int const x_81 = GLF_live7_looplimiter7; - GLF_live7_looplimiter7 = (x_81 + 1); + GLF_live7_looplimiter7 = as_type((as_type(x_81) + as_type(1))); GLF_live7rows_1 = 2; int const x_83 = GLF_live7sum_index; int const x_84 = GLF_live7sum_index; @@ -241,24 +241,24 @@ float3 drawShape_vf2_(constant buf0& x_25, thread float2* const pos) { GLF_live7sums.arr[x_332] = (x_336 + x_334); { int const x_98 = GLF_live7r_1; - GLF_live7r_1 = (x_98 + 1); + GLF_live7r_1 = as_type((as_type(x_98) + as_type(1))); } } { int const x_100 = GLF_live7c_1; - GLF_live7c_1 = (x_100 + 1); + GLF_live7c_1 = as_type((as_type(x_100) + as_type(1))); } } int const x_102 = GLF_live7sum_index; - GLF_live7sum_index = (x_102 + 1); + GLF_live7sum_index = as_type((as_type(x_102) + as_type(1))); { int const x_104 = GLF_live7cols_1; - GLF_live7cols_1 = (x_104 + 1); + GLF_live7cols_1 = as_type((as_type(x_104) + as_type(1))); } } { int const x_106 = GLF_live4i; - GLF_live4i = (x_106 + 1); + GLF_live4i = as_type((as_type(x_106) + as_type(1))); } } return float3(1.0f, 1.0f, 1.0f); @@ -292,7 +292,7 @@ void main_1(constant buf0& x_25, thread float4* const tint_symbol_5, thread floa float3 const x_178 = drawShape_vf2_(x_25, &(param_2)); { int const x_109 = i; - i = (x_109 - 1); + i = as_type((as_type(x_109) - as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl index d5ad8847fc..c65a101bb4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.spvasm.expected.msl @@ -35,13 +35,13 @@ float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread f } { int const x_121 = i; - i = (x_121 + 1); + i = as_type((as_type(x_121) + as_type(1))); } } } { int const x_123 = ndx; - ndx = (x_123 + 1); + ndx = as_type((as_type(x_123) + as_type(1))); } } int const x_125 = *(b); @@ -80,17 +80,17 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread floa while (true) { int const x_74 = x_1; float const x_76 = x_11.zero; - if ((x_74 < (int(x_76) + 1))) { + if ((x_74 < as_type((as_type(int(x_76)) + as_type(1))))) { } else { break; } int const x_81 = x_1; - param_1 = (x_81 + 10); + param_1 = as_type((as_type(x_81) + as_type(10))); float const x_83 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_7); f = x_83; { int const x_84 = x_1; - x_1 = (x_84 + 1); + x_1 = as_type((as_type(x_84) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl index d5ad8847fc..c65a101bb4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cosh-return-inf-unused/0-opt.wgsl.expected.msl @@ -35,13 +35,13 @@ float func_i1_(thread int* const b, thread float4* const tint_symbol_5, thread f } { int const x_121 = i; - i = (x_121 + 1); + i = as_type((as_type(x_121) + as_type(1))); } } } { int const x_123 = ndx; - ndx = (x_123 + 1); + ndx = as_type((as_type(x_123) + as_type(1))); } } int const x_125 = *(b); @@ -80,17 +80,17 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_7, thread floa while (true) { int const x_74 = x_1; float const x_76 = x_11.zero; - if ((x_74 < (int(x_76) + 1))) { + if ((x_74 < as_type((as_type(int(x_76)) + as_type(1))))) { } else { break; } int const x_81 = x_1; - param_1 = (x_81 + 10); + param_1 = as_type((as_type(x_81) + as_type(10))); float const x_83 = func_i1_(&(param_1), tint_symbol_8, tint_symbol_7); f = x_83; { int const x_84 = x_1; - x_1 = (x_84 + 1); + x_1 = as_type((as_type(x_84) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl index 9140262fdd..007dbce846 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.spvasm.expected.msl @@ -20,7 +20,7 @@ float func_(constant buf0& x_8) { while (true) { int const x_47 = i; int const x_49 = x_8.zero; - if ((x_47 < (x_49 + 1))) { + if ((x_47 < as_type((as_type(x_49) + as_type(1))))) { } else { break; } @@ -39,12 +39,12 @@ float func_(constant buf0& x_8) { } { int const x_67 = j; - j = (x_67 + 1); + j = as_type((as_type(x_67) + as_type(1))); } } { int const x_69 = i; - i = (x_69 + 1); + i = as_type((as_type(x_69) + as_type(1))); } } float const x_71 = s; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl index 9140262fdd..007dbce846 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-analysis-reachable-from-many/0-opt.wgsl.expected.msl @@ -20,7 +20,7 @@ float func_(constant buf0& x_8) { while (true) { int const x_47 = i; int const x_49 = x_8.zero; - if ((x_47 < (x_49 + 1))) { + if ((x_47 < as_type((as_type(x_49) + as_type(1))))) { } else { break; } @@ -39,12 +39,12 @@ float func_(constant buf0& x_8) { } { int const x_67 = j; - j = (x_67 + 1); + j = as_type((as_type(x_67) + as_type(1))); } } { int const x_69 = i; - i = (x_69 + 1); + i = as_type((as_type(x_69) + as_type(1))); } } float const x_71 = s; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl index 4c716f0b9a..6c4b3c8a86 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.spvasm.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_74 = v.x; int const x_76 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_80 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_6) = float4(x_63, float(((x_65 - x_67) & x_70)), float((x_74 & x_76)), x_80); + *(tint_symbol_6) = float4(x_63, float((as_type((as_type(x_65) - as_type(x_67))) & x_70)), float((x_74 & x_76)), x_80); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl index 4c716f0b9a..6c4b3c8a86 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-and-even-numbers-from-fragcoord/0-opt.wgsl.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_74 = v.x; int const x_76 = x_8.x_GLF_uniform_int_values.arr[1].el; float const x_80 = x_6.x_GLF_uniform_float_values.arr[1].el; - *(tint_symbol_6) = float4(x_63, float(((x_65 - x_67) & x_70)), float((x_74 & x_76)), x_80); + *(tint_symbol_6) = float4(x_63, float((as_type((as_type(x_65) - as_type(x_67))) & x_70)), float((x_74 & x_76)), x_80); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl index 941cf2870b..7e3095b526 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.spvasm.expected.msl @@ -36,7 +36,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_10 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_11 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_12 = x_6.x_GLF_uniform_int_values.arr[1].el; - bool const x_44 = (x_10 == (x_11 + x_12)); + bool const x_44 = (x_10 == as_type((as_type(x_11) + as_type(x_12)))); x_52_phi = x_44; if (!(x_44)) { float const x_48 = undefined; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl index 6033ad9eb4..05942bce61 100755 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-mod-zero/0-opt.wgsl.expected.msl @@ -36,7 +36,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_10 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_11 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_12 = x_6.x_GLF_uniform_int_values.arr[1].el; - bool const x_44 = (x_10 == (x_11 + x_12)); + bool const x_44 = (x_10 == as_type((as_type(x_11) + as_type(x_12)))); x_52_phi = x_44; if (!(x_44)) { float const x_48 = undefined; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl index 5daa237480..1b780b8900 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.spvasm.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_55 = x_6.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl index 5daa237480..1b780b8900 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-unpackunorm-loop/0-opt.wgsl.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_55 = x_6.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl index 76666da7e4..24f173cfd6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.spvasm.expected.msl @@ -45,12 +45,12 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_49 = arr.arr[x_47]; a = x_49; int const x_50 = a; - b = (x_50 - 1); + b = as_type((as_type(x_50) - as_type(1))); float const x_53 = (*(tint_symbol_6)).x; float const x_55 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_53 < x_55)) { int const x_59 = b; - b = (x_59 + 1); + b = as_type((as_type(x_59) + as_type(1))); } int const x_62 = x_7.x_GLF_uniform_int_values.arr[0].el; c = x_62; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl index 76666da7e4..24f173cfd6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-accesses-clamp/0-opt.wgsl.expected.msl @@ -45,12 +45,12 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s int const x_49 = arr.arr[x_47]; a = x_49; int const x_50 = a; - b = (x_50 - 1); + b = as_type((as_type(x_50) - as_type(1))); float const x_53 = (*(tint_symbol_6)).x; float const x_55 = x_11.x_GLF_uniform_float_values.arr[0].el; if ((x_53 < x_55)) { int const x_59 = b; - b = (x_59 + 1); + b = as_type((as_type(x_59) + as_type(1))); } int const x_62 = x_7.x_GLF_uniform_int_values.arr[0].el; c = x_62; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl index 417083de2b..60b542ad3a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.spvasm.expected.msl @@ -80,7 +80,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_122 = limiter0; - limiter0 = (x_122 + 1); + limiter0 = as_type((as_type(x_122) + as_type(1))); int const x_125 = x_6.x_GLF_uniform_int_values.arr[2].el; limiter1 = x_125; int const x_127 = x_6.x_GLF_uniform_int_values.arr[3].el; @@ -98,14 +98,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_143 = limiter1; - limiter1 = (x_143 + 1); + limiter1 = as_type((as_type(x_143) + as_type(1))); int const x_145 = b; int const x_146 = a; int const x_148 = arr1.arr[x_146]; arr0.arr[x_145] = x_148; { int const x_150 = b; - b = (x_150 + 1); + b = as_type((as_type(x_150) + as_type(1))); } } } @@ -117,7 +117,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_159 = limiter2; - limiter2 = (x_159 + 1); + limiter2 = as_type((as_type(x_159) + as_type(1))); int const x_162 = arr1.arr[1]; arr0.arr[1] = x_162; } @@ -135,14 +135,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_179 = limiter3; - limiter3 = (x_179 + 1); + limiter3 = as_type((as_type(x_179) + as_type(1))); int const x_181 = d; int const x_182 = d; int const x_184 = arr0.arr[x_182]; arr1.arr[x_181] = x_184; { int const x_186 = d; - d = (x_186 + 1); + d = as_type((as_type(x_186) + as_type(1))); } } { @@ -156,7 +156,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { } { int const x_193 = a; - a = (x_193 + 1); + a = as_type((as_type(x_193) + as_type(1))); } } int const x_196 = x_6.x_GLF_uniform_int_values.arr[11].el; @@ -221,7 +221,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { } { int const x_285 = i; - i = (x_285 + 1); + i = as_type((as_type(x_285) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl index 417083de2b..60b542ad3a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-array-copies-loops-with-limiters/0-opt.wgsl.expected.msl @@ -80,7 +80,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_122 = limiter0; - limiter0 = (x_122 + 1); + limiter0 = as_type((as_type(x_122) + as_type(1))); int const x_125 = x_6.x_GLF_uniform_int_values.arr[2].el; limiter1 = x_125; int const x_127 = x_6.x_GLF_uniform_int_values.arr[3].el; @@ -98,14 +98,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_143 = limiter1; - limiter1 = (x_143 + 1); + limiter1 = as_type((as_type(x_143) + as_type(1))); int const x_145 = b; int const x_146 = a; int const x_148 = arr1.arr[x_146]; arr0.arr[x_145] = x_148; { int const x_150 = b; - b = (x_150 + 1); + b = as_type((as_type(x_150) + as_type(1))); } } } @@ -117,7 +117,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_159 = limiter2; - limiter2 = (x_159 + 1); + limiter2 = as_type((as_type(x_159) + as_type(1))); int const x_162 = arr1.arr[1]; arr0.arr[1] = x_162; } @@ -135,14 +135,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { break; } int const x_179 = limiter3; - limiter3 = (x_179 + 1); + limiter3 = as_type((as_type(x_179) + as_type(1))); int const x_181 = d; int const x_182 = d; int const x_184 = arr0.arr[x_182]; arr1.arr[x_181] = x_184; { int const x_186 = d; - d = (x_186 + 1); + d = as_type((as_type(x_186) + as_type(1))); } } { @@ -156,7 +156,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { } { int const x_193 = a; - a = (x_193 + 1); + a = as_type((as_type(x_193) + as_type(1))); } } int const x_196 = x_6.x_GLF_uniform_int_values.arr[11].el; @@ -221,7 +221,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) { } { int const x_285 = i; - i = (x_285 + 1); + i = as_type((as_type(x_285) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl index 66a656e000..89cd26027b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { param = x_35; x_37 = func_i1_(&(param)); a = x_37; - int const x_36 = (x_35 + 1); + int const x_36 = as_type((as_type(x_35) + as_type(1))); b = x_36; x_35_phi = x_36; if ((x_36 < 4)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl index 66a656e000..89cd26027b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-basic-block-discard-in-function/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { param = x_35; x_37 = func_i1_(&(param)); a = x_37; - int const x_36 = (x_35 + 1); + int const x_36 = as_type((as_type(x_35) + as_type(1))); b = x_36; x_35_phi = x_36; if ((x_36 < 4)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl index cbab4dbd15..1cfbbb0eb2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.spvasm.expected.msl @@ -36,7 +36,7 @@ int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbo float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_65 > x_67)) { int const x_71 = a; - a = (x_71 + 1); + a = as_type((as_type(x_71) + as_type(1))); } int const x_73 = a; i = popcount(x_73); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl index cbab4dbd15..1cfbbb0eb2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitcount/0-opt.wgsl.expected.msl @@ -36,7 +36,7 @@ int f1_(constant buf0& x_8, constant buf1& x_11, thread float4* const tint_symbo float const x_67 = x_8.x_GLF_uniform_float_values.arr[0].el; if ((x_65 > x_67)) { int const x_71 = a; - a = (x_71 + 1); + a = as_type((as_type(x_71) + as_type(1))); } int const x_73 = a; i = popcount(x_73); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl index 971d8fe009..be7c5a2721 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.spvasm.expected.msl @@ -33,18 +33,18 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_28 = x_28_phi; int const x_31 = x_31_phi; x_42_phi = x_28; - if ((x_31 <= (x_24 - 1))) { + if ((x_31 <= as_type((as_type(x_24) - as_type(1))))) { } else { break; } - x_29 = as_type((x_28 + as_type(x_31))); + x_29 = as_type(as_type((as_type(x_28) + as_type(as_type(x_31))))); int const x_38 = x_5.x_GLF_uniform_int_values.arr[0].el; if ((x_38 == 1)) { x_42_phi = x_29; break; } { - x_32 = (x_31 + 1); + x_32 = as_type((as_type(x_31) + as_type(1))); x_28_phi = x_29; x_31_phi = x_32; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl index 971d8fe009..be7c5a2721 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-bitfieldreverse-loop-limit-underflow/0.wgsl.expected.msl @@ -33,18 +33,18 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { x_28 = x_28_phi; int const x_31 = x_31_phi; x_42_phi = x_28; - if ((x_31 <= (x_24 - 1))) { + if ((x_31 <= as_type((as_type(x_24) - as_type(1))))) { } else { break; } - x_29 = as_type((x_28 + as_type(x_31))); + x_29 = as_type(as_type((as_type(x_28) + as_type(as_type(x_31))))); int const x_38 = x_5.x_GLF_uniform_int_values.arr[0].el; if ((x_38 == 1)) { x_42_phi = x_29; break; } { - x_32 = (x_31 + 1); + x_32 = as_type((as_type(x_31) + as_type(1))); x_28_phi = x_29; x_31_phi = x_32; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl index 5e6ba535b3..b50ffb6fb1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.spvasm.expected.msl @@ -82,45 +82,45 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol break; } int const x_104 = a; - a = (x_104 + 1); + a = as_type((as_type(x_104) + as_type(1))); { int const x_106 = i8_1; - i8_1 = (x_106 + 1); + i8_1 = as_type((as_type(x_106) + as_type(1))); } } { int const x_108 = i7; - i7 = (x_108 + 1); + i7 = as_type((as_type(x_108) + as_type(1))); } } { int const x_110 = i6; - i6 = (x_110 + 1); + i6 = as_type((as_type(x_110) + as_type(1))); } } { int const x_112 = i5; - i5 = (x_112 + 1); + i5 = as_type((as_type(x_112) + as_type(1))); } } { int const x_114 = i4; - i4 = (x_114 + 1); + i4 = as_type((as_type(x_114) + as_type(1))); } } { int const x_116 = i3; - i3 = (x_116 + 1); + i3 = as_type((as_type(x_116) + as_type(1))); } } { int const x_118 = i2; - i2 = (x_118 + 1); + i2 = as_type((as_type(x_118) + as_type(1))); } } { int const x_120 = i1; - i1 = (x_120 + 1); + i1 = as_type((as_type(x_120) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl index 5e6ba535b3..b50ffb6fb1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-blockfrequency-several-for-loops/0-opt.wgsl.expected.msl @@ -82,45 +82,45 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol break; } int const x_104 = a; - a = (x_104 + 1); + a = as_type((as_type(x_104) + as_type(1))); { int const x_106 = i8_1; - i8_1 = (x_106 + 1); + i8_1 = as_type((as_type(x_106) + as_type(1))); } } { int const x_108 = i7; - i7 = (x_108 + 1); + i7 = as_type((as_type(x_108) + as_type(1))); } } { int const x_110 = i6; - i6 = (x_110 + 1); + i6 = as_type((as_type(x_110) + as_type(1))); } } { int const x_112 = i5; - i5 = (x_112 + 1); + i5 = as_type((as_type(x_112) + as_type(1))); } } { int const x_114 = i4; - i4 = (x_114 + 1); + i4 = as_type((as_type(x_114) + as_type(1))); } } { int const x_116 = i3; - i3 = (x_116 + 1); + i3 = as_type((as_type(x_116) + as_type(1))); } } { int const x_118 = i2; - i2 = (x_118 + 1); + i2 = as_type((as_type(x_118) + as_type(1))); } } { int const x_120 = i1; - i1 = (x_120 + 1); + i1 = as_type((as_type(x_120) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl index ed07fe72f1..0972c1e1c1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.spvasm.expected.msl @@ -102,22 +102,22 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy sums.arr[x_35] = (x_142 + x_140); { int const x_39 = d; - d = (x_39 + 1); + d = as_type((as_type(x_39) + as_type(1))); } } { int const x_41 = c; - c = (x_41 + 1); + c = as_type((as_type(x_41) + as_type(1))); } } { int const x_43 = b; - b = (x_43 + 1); + b = as_type((as_type(x_43) + as_type(1))); } } { int const x_45 = a; - a = (x_45 + 1); + a = as_type((as_type(x_45) + as_type(1))); } } int const x_47 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl index ed07fe72f1..0972c1e1c1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-branch-probability-identity-matrix/0-opt.wgsl.expected.msl @@ -102,22 +102,22 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy sums.arr[x_35] = (x_142 + x_140); { int const x_39 = d; - d = (x_39 + 1); + d = as_type((as_type(x_39) + as_type(1))); } } { int const x_41 = c; - c = (x_41 + 1); + c = as_type((as_type(x_41) + as_type(1))); } } { int const x_43 = b; - b = (x_43 + 1); + b = as_type((as_type(x_43) + as_type(1))); } } { int const x_45 = a; - a = (x_45 + 1); + a = as_type((as_type(x_45) + as_type(1))); } } int const x_47 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl index d993da94be..2fbf155f87 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.spvasm.expected.msl @@ -59,7 +59,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy sums.arr[x_59] = (x_71 + x_69); { int const x_74 = i; - i = (x_74 + 1); + i = as_type((as_type(x_74) + as_type(1))); } } int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl index d993da94be..2fbf155f87 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-loop-limit-increment-float-array/0-opt.wgsl.expected.msl @@ -59,7 +59,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy sums.arr[x_59] = (x_71 + x_69); { int const x_74 = i; - i = (x_74 + 1); + i = as_type((as_type(x_74) + as_type(1))); } } int const x_77 = x_9.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl index 3c693a41cb..95cd418fe5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.spvasm.expected.msl @@ -61,7 +61,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy } { int const x_109 = i; - i = (x_109 + 1); + i = as_type((as_type(x_109) + as_type(1))); } } float4 const x_111 = v; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl index 3c693a41cb..95cd418fe5 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-clamp-vector-component-condition-using-matrix/0-opt.wgsl.expected.msl @@ -61,7 +61,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy } { int const x_109 = i; - i = (x_109 + 1); + i = as_type((as_type(x_109) + as_type(1))); } } float4 const x_111 = v; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl index 1cbfbfa0ac..335c044a79 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.spvasm.expected.msl @@ -113,15 +113,15 @@ void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, consta } int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_9, tint_symbol_10); int const x_92 = a_1; - a_1 = (x_92 + x_91); + a_1 = as_type((as_type(x_92) + as_type(x_91))); { int const x_94 = j; - j = (x_94 + 1); + j = as_type((as_type(x_94) + as_type(1))); } } { int const x_96 = i; - i = (x_96 + 1); + i = as_type((as_type(x_96) + as_type(1))); } } int const x_98 = a_1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl index 1cbfbfa0ac..335c044a79 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-color-output-undefined-in-unexecuted-branch/0-opt.wgsl.expected.msl @@ -113,15 +113,15 @@ void main_1(constant buf1& x_8, constant buf0& x_16, constant buf2& x_12, consta } int const x_91 = func1_(x_12, x_14, x_8, tint_symbol_9, tint_symbol_10); int const x_92 = a_1; - a_1 = (x_92 + x_91); + a_1 = as_type((as_type(x_92) + as_type(x_91))); { int const x_94 = j; - j = (x_94 + 1); + j = as_type((as_type(x_94) + as_type(1))); } } { int const x_96 = i; - i = (x_96 + 1); + i = as_type((as_type(x_96) + as_type(1))); } } int const x_98 = a_1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl index 374c16d126..94b9529312 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.spvasm.expected.msl @@ -35,11 +35,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_38 = i; if ((~(x_38) != 0)) { int const x_43 = a; - a = (x_43 + 1); + a = as_type((as_type(x_43) + as_type(1))); } { int const x_45 = i; - i = (x_45 + 1); + i = as_type((as_type(x_45) + as_type(1))); } } int const x_47 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl index 374c16d126..94b9529312 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-condition-loop-index-bitwise-not/0-opt.wgsl.expected.msl @@ -35,11 +35,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_38 = i; if ((~(x_38) != 0)) { int const x_43 = a; - a = (x_43 + 1); + a = as_type((as_type(x_43) + as_type(1))); } { int const x_45 = i; - i = (x_45 + 1); + i = as_type((as_type(x_45) + as_type(1))); } } int const x_47 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl index 51c456778d..80079dce25 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.spvasm.expected.msl @@ -50,7 +50,7 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread break; } int const x_61 = a; - a = (x_61 + 1); + a = as_type((as_type(x_61) + as_type(1))); if ((x_61 > 3)) { break; } @@ -61,7 +61,7 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread } { int const x_73 = i; - i = (x_73 + 1); + i = as_type((as_type(x_73) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl index 51c456778d..80079dce25 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-conditional-discard-inside-loop/0-opt.wgsl.expected.msl @@ -50,7 +50,7 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread break; } int const x_61 = a; - a = (x_61 + 1); + a = as_type((as_type(x_61) + as_type(1))); if ((x_61 > 3)) { break; } @@ -61,7 +61,7 @@ void main_1(constant buf0& x_6, constant buf2& x_9, constant buf1& x_11, thread } { int const x_73 = i; - i = (x_73 + 1); + i = as_type((as_type(x_73) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl index 6c19a66422..57e7f66998 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl @@ -21,9 +21,9 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_33 = i; - i = (x_33 + 1); + i = as_type((as_type(x_33) + as_type(1))); int const x_35 = j; - j = (x_35 + 1); + j = as_type((as_type(x_35) + as_type(1))); } int const x_37 = i; int const x_39 = j; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl index 35f0b9cecb..d1907be3ae 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.wgsl.expected.msl @@ -21,9 +21,9 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_33 = i; - i = (x_33 + 1); + i = as_type((as_type(x_33) + as_type(1))); int const x_35 = j; - j = (x_35 + 1); + j = as_type((as_type(x_35) + as_type(1))); } int const x_37 = i; int const x_39 = j; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl index b29ecd097e..e4553afc0a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.spvasm.expected.msl @@ -29,7 +29,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_42 = i; int const x_43 = highSigned; int const x_46 = x_8.zero; - if ((x_42 < (min(10, x_43) + x_46))) { + if ((x_42 < as_type((as_type(min(10, x_43)) + as_type(x_46))))) { } else { break; } @@ -37,7 +37,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { data.arr[x_50] = 5; { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } i_1 = 1u; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl index b29ecd097e..e4553afc0a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-min-as-loop-range/0-opt.wgsl.expected.msl @@ -29,7 +29,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_42 = i; int const x_43 = highSigned; int const x_46 = x_8.zero; - if ((x_42 < (min(10, x_43) + x_46))) { + if ((x_42 < as_type((as_type(min(10, x_43)) + as_type(x_46))))) { } else { break; } @@ -37,7 +37,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { data.arr[x_50] = 5; { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } i_1 = 1u; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl index b0caa47c70..5954cddd84 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.spvasm.expected.msl @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_37 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_39 = x_6.x_GLF_uniform_int_values.arr[1].el; - bool const x_41 = (x_35 == (x_37 + x_39)); + bool const x_41 = (x_35 == as_type((as_type(x_37) + as_type(x_39)))); x_49_phi = x_41; if (!(x_41)) { float const x_45 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl index b0caa47c70..5954cddd84 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-pow-large-exp/0-opt.wgsl.expected.msl @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_37 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_39 = x_6.x_GLF_uniform_int_values.arr[1].el; - bool const x_41 = (x_35 == (x_37 + x_39)); + bool const x_41 = (x_35 == as_type((as_type(x_37) + as_type(x_39)))); x_49_phi = x_41; if (!(x_41)) { float const x_45 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl index 3a57b2877f..51d38f61c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.spvasm.expected.msl @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { { float2 const x_32 = float2(1.0f, float(x_5)); x_27 = float2(x_32.x, x_32.y); - x_4 = (x_5 + 1); + x_4 = as_type((as_type(x_5) + as_type(1))); x_26_phi = x_27; x_5_phi = x_4; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl index 3a57b2877f..51d38f61c7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-vector-shuffle/0.wgsl.expected.msl @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { { float2 const x_32 = float2(1.0f, float(x_5)); x_27 = float2(x_32.x, x_32.y); - x_4 = (x_5 + 1); + x_4 = as_type((as_type(x_5) + as_type(1))); x_26_phi = x_27; x_5_phi = x_4; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl index e105e07dd1..4219d4348a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.spvasm.expected.msl @@ -43,12 +43,12 @@ int func_f1_(constant buf0& x_8, thread float* const f) { float const x_80 = *(f); int const x_83 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_86 = i; - a = ((int(x_80) - (x_83 / 2)) + x_86); + a = as_type((as_type(as_type((as_type(int(x_80)) - as_type((x_83 / 2))))) + as_type(x_86))); int const x_88 = b; - b = (x_88 + 1); + b = as_type((as_type(x_88) + as_type(1))); { int const x_90 = i; - i = (x_90 + 1); + i = as_type((as_type(x_90) + as_type(1))); } } int const x_92 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl index e105e07dd1..4219d4348a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-constants-combine-add-sub/0-opt.wgsl.expected.msl @@ -43,12 +43,12 @@ int func_f1_(constant buf0& x_8, thread float* const f) { float const x_80 = *(f); int const x_83 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_86 = i; - a = ((int(x_80) - (x_83 / 2)) + x_86); + a = as_type((as_type(as_type((as_type(int(x_80)) - as_type((x_83 / 2))))) + as_type(x_86))); int const x_88 = b; - b = (x_88 + 1); + b = as_type((as_type(x_88) + as_type(1))); { int const x_90 = i; - i = (x_90 + 1); + i = as_type((as_type(x_90) + as_type(1))); } } int const x_92 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl index 604ed912b0..439f521d1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.spvasm.expected.msl @@ -48,7 +48,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_56 = x_6.x_GLF_uniform_int_values.arr[3].el; if ((x_54 > x_56)) { int const x_60 = a; - a = (x_60 + 1); + a = as_type((as_type(x_60) + as_type(1))); if (false) { int const x_65 = x_6.x_GLF_uniform_int_values.arr[2].el; i_1 = x_65; @@ -65,7 +65,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { } { int const x_75 = i; - i = (x_75 + 1); + i = as_type((as_type(x_75) + as_type(1))); } } int const x_78 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -84,10 +84,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { indexable = tint_symbol_3; int const x_95 = indexable.arr[x_93]; int const x_96 = a; - a = (x_96 + x_95); + a = as_type((as_type(x_96) + as_type(x_95))); { int const x_98 = i_2; - i_2 = (x_98 + 1); + i_2 = as_type((as_type(x_98) + as_type(1))); } } int const x_100 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl index 604ed912b0..439f521d1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/0-opt.wgsl.expected.msl @@ -48,7 +48,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_56 = x_6.x_GLF_uniform_int_values.arr[3].el; if ((x_54 > x_56)) { int const x_60 = a; - a = (x_60 + 1); + a = as_type((as_type(x_60) + as_type(1))); if (false) { int const x_65 = x_6.x_GLF_uniform_int_values.arr[2].el; i_1 = x_65; @@ -65,7 +65,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { } { int const x_75 = i; - i = (x_75 + 1); + i = as_type((as_type(x_75) + as_type(1))); } } int const x_78 = x_6.x_GLF_uniform_int_values.arr[2].el; @@ -84,10 +84,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { indexable = tint_symbol_3; int const x_95 = indexable.arr[x_93]; int const x_96 = a; - a = (x_96 + x_95); + a = as_type((as_type(x_96) + as_type(x_95))); { int const x_98 = i_2; - i_2 = (x_98 + 1); + i_2 = as_type((as_type(x_98) + as_type(1))); } } int const x_100 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl index 030119e019..9a7b4b877e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.spvasm.expected.msl @@ -31,7 +31,7 @@ void main_1(thread float4* const tint_symbol_5) { int const x_41 = i; if ((x_41 > 1)) { int const x_45 = a; - a = (x_45 + 1); + a = as_type((as_type(x_45) + as_type(1))); if (false) { i_1 = 0; while (true) { @@ -46,7 +46,7 @@ void main_1(thread float4* const tint_symbol_5) { } { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } i_2 = 0; @@ -61,10 +61,10 @@ void main_1(thread float4* const tint_symbol_5) { indexable = tint_symbol_3; int const x_67 = indexable.arr[x_65]; int const x_68 = a; - a = (x_68 + x_67); + a = as_type((as_type(x_68) + as_type(x_67))); { int const x_70 = i_2; - i_2 = (x_70 + 1); + i_2 = as_type((as_type(x_70) + as_type(1))); } } int const x_72 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl index 030119e019..9a7b4b877e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-cumulate-loops-unreachable/1.wgsl.expected.msl @@ -31,7 +31,7 @@ void main_1(thread float4* const tint_symbol_5) { int const x_41 = i; if ((x_41 > 1)) { int const x_45 = a; - a = (x_45 + 1); + a = as_type((as_type(x_45) + as_type(1))); if (false) { i_1 = 0; while (true) { @@ -46,7 +46,7 @@ void main_1(thread float4* const tint_symbol_5) { } { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } i_2 = 0; @@ -61,10 +61,10 @@ void main_1(thread float4* const tint_symbol_5) { indexable = tint_symbol_3; int const x_67 = indexable.arr[x_65]; int const x_68 = a; - a = (x_68 + x_67); + a = as_type((as_type(x_68) + as_type(x_67))); { int const x_70 = i_2; - i_2 = (x_70 + 1); + i_2 = as_type((as_type(x_70) + as_type(1))); } } int const x_72 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl index 3d744a33ee..64ce0dd54a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { v[uint3(0u, 1u, 2u)[x_50]] = float(x_51); { int const x_55 = i; - i = (x_55 + 1); + i = as_type((as_type(x_55) + as_type(1))); } } float4 const x_57 = v; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl index 3d744a33ee..64ce0dd54a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-combine-casts-legalize-vector-types-xyz-swizzle-for-loop/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { v[uint3(0u, 1u, 2u)[x_50]] = float(x_51); { int const x_55 = i; - i = (x_55 + 1); + i = as_type((as_type(x_55) + as_type(1))); } } float4 const x_57 = v; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl index f8f6e267b5..2ce6493af2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -24,10 +29,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_27; int const x_29 = x_6.x_GLF_uniform_int_values.arr[3].el; - i = -(x_29); + i = tint_unary_minus(x_29); while (true) { int const x_35 = i; - int const x_36 = (x_35 + 1); + int const x_36 = as_type((as_type(x_35) + as_type(1))); i = x_36; int const x_39 = x_6.x_GLF_uniform_int_values.arr[2].el; if ((reverse_bits(x_36) <= x_39)) { @@ -35,7 +40,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_42 = a; - a = (x_42 + 1); + a = as_type((as_type(x_42) + as_type(1))); } int const x_44 = a; int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl index f8f6e267b5..2ce6493af2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-loop-bitfieldreverse/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -24,10 +29,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_27; int const x_29 = x_6.x_GLF_uniform_int_values.arr[3].el; - i = -(x_29); + i = tint_unary_minus(x_29); while (true) { int const x_35 = i; - int const x_36 = (x_35 + 1); + int const x_36 = as_type((as_type(x_35) + as_type(1))); i = x_36; int const x_39 = x_6.x_GLF_uniform_int_values.arr[2].el; if ((reverse_bits(x_36) <= x_39)) { @@ -35,7 +40,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_42 = a; - a = (x_42 + 1); + a = as_type((as_type(x_42) + as_type(1))); } int const x_44 = a; int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl index 673c4787e0..56fe5a1ae4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.spvasm.expected.msl @@ -34,12 +34,12 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s } int const x_46 = x_10.minusEight; int const x_48 = a; - a = (x_48 + (x_46 / -4)); + a = as_type((as_type(x_48) + as_type((x_46 / -4)))); int const x_50 = b; - b = (x_50 + 1); + b = as_type((as_type(x_50) + as_type(1))); { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_54 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl index 673c4787e0..56fe5a1ae4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-neg-div-pow2/0-opt.wgsl.expected.msl @@ -34,12 +34,12 @@ void main_1(constant buf1& x_8, constant buf0& x_10, thread float4* const tint_s } int const x_46 = x_10.minusEight; int const x_48 = a; - a = (x_48 + (x_46 / -4)); + a = as_type((as_type(x_48) + as_type((x_46 / -4)))); int const x_50 = b; - b = (x_50 + 1); + b = as_type((as_type(x_50) + as_type(1))); { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_54 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl index bab3597373..5eb30b6da1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.spvasm.expected.msl @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { v[x_50] = (x_51 + float(x_52)); { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } float const x_59 = x_6.one; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl index bab3597373..5eb30b6da1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dag-combiner-same-cond-nested/0-opt.wgsl.expected.msl @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { v[x_50] = (x_51 + float(x_52)); { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } float const x_59 = x_6.one; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl index f9b0707e22..031cc10d03 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.spvasm.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint (*(tint_symbol_7)).arr[x_16] = 0.0f; float const x_65 = x_11.injectionSwitch.x; int const x_18 = q; - switch((int(x_65) + x_18)) { + switch(as_type((as_type(int(x_65)) + as_type(x_18)))) { case 51: { while (true) { if (true) { @@ -62,7 +62,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint } { int const x_22 = c; - c = (x_22 + 1); + c = as_type((as_type(x_22) + as_type(1))); } } int const x_24 = i; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl index f9b0707e22..031cc10d03 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-dead-code-unreachable-merge/0-opt.wgsl.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint (*(tint_symbol_7)).arr[x_16] = 0.0f; float const x_65 = x_11.injectionSwitch.x; int const x_18 = q; - switch((int(x_65) + x_18)) { + switch(as_type((as_type(int(x_65)) + as_type(x_18)))) { case 51: { while (true) { if (true) { @@ -62,7 +62,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_5, thread tint } { int const x_22 = c; - c = (x_22 + 1); + c = as_type((as_type(x_22) + as_type(1))); } } int const x_24 = i; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl index 8361b24dac..ae1ce51608 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.spvasm.expected.msl @@ -47,13 +47,13 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread break; } int const x_54 = *(tint_symbol_4); - *(tint_symbol_4) = (x_54 + 1); + *(tint_symbol_4) = as_type((as_type(x_54) + as_type(1))); float2 const x_57 = x_12.injectionSwitch; float const x_60 = f; f = (x_60 + dfdx(x_57).y); { int const x_62 = r; - r = (x_62 + 1); + r = as_type((as_type(x_62) + as_type(1))); } } while (true) { @@ -63,7 +63,7 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread break; } int const x_71 = *(tint_symbol_4); - *(tint_symbol_4) = (x_71 + 1); + *(tint_symbol_4) = as_type((as_type(x_71) + as_type(1))); float const x_74 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_75 = f; f = (x_75 + x_74); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl index 8361b24dac..ae1ce51608 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-derivative-uniform-vector-global-loop-count/0-opt.wgsl.expected.msl @@ -47,13 +47,13 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread break; } int const x_54 = *(tint_symbol_4); - *(tint_symbol_4) = (x_54 + 1); + *(tint_symbol_4) = as_type((as_type(x_54) + as_type(1))); float2 const x_57 = x_12.injectionSwitch; float const x_60 = f; f = (x_60 + dfdx(x_57).y); { int const x_62 = r; - r = (x_62 + 1); + r = as_type((as_type(x_62) + as_type(1))); } } while (true) { @@ -63,7 +63,7 @@ void main_1(constant buf1& x_7, constant buf0& x_10, constant buf2& x_12, thread break; } int const x_71 = *(tint_symbol_4); - *(tint_symbol_4) = (x_71 + 1); + *(tint_symbol_4) = as_type((as_type(x_71) + as_type(1))); float const x_74 = x_7.x_GLF_uniform_float_values.arr[0].el; float const x_75 = f; f = (x_75 + x_74); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl index c3d3e976b3..4fb97f0be8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.spvasm.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy f = fmin(fmax(x_53, 0.0f), 0.0f); { int const x_56 = i; - i = (x_56 - 1); + i = as_type((as_type(x_56) - as_type(1))); } } float const x_58 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl index c3d3e976b3..4fb97f0be8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-descending-loop-min-max-always-zero/0-opt.wgsl.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy f = fmin(fmax(x_53, 0.0f), 0.0f); { int const x_56 = i; - i = (x_56 - 1); + i = as_type((as_type(x_56) - as_type(1))); } } float const x_58 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl index 2f4c481edc..a0efc1edd1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.spvasm.expected.msl @@ -24,7 +24,7 @@ int func_(constant buf0& x_7) { i = x_53; while (true) { int const x_58 = i; - i = (x_58 + 1); + i = as_type((as_type(x_58) + as_type(1))); if (true) { if (true) { int const x_65 = x_7.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl index 2f4c481edc..a0efc1edd1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-double-if-true-in-loop/0-opt.wgsl.expected.msl @@ -24,7 +24,7 @@ int func_(constant buf0& x_7) { i = x_53; while (true) { int const x_58 = i; - i = (x_58 + 1); + i = as_type((as_type(x_58) + as_type(1))); if (true) { if (true) { int const x_65 = x_7.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl index 821d826db2..a2e952dc68 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.spvasm.expected.msl @@ -42,11 +42,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { } { int const x_59 = i; - i = (x_59 + 1); + i = as_type((as_type(x_59) + as_type(1))); } } int const x_61 = a; - a = (x_61 + 1); + a = as_type((as_type(x_61) + as_type(1))); } int const x_63 = a; int const x_66 = x_7.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl index 821d826db2..a2e952dc68 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-empty-loop-minus-one-modulo-variable-one/0-opt.wgsl.expected.msl @@ -42,11 +42,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { } { int const x_59 = i; - i = (x_59 + 1); + i = as_type((as_type(x_59) + as_type(1))); } } int const x_61 = a; - a = (x_61 + 1); + a = as_type((as_type(x_61) + as_type(1))); } int const x_63 = a; int const x_66 = x_7.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl index f57fd220e4..7bb12689b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.spvasm.expected.msl @@ -24,11 +24,11 @@ int func_(constant buf0& x_8) { break; } int const x_44 = ret; - ret = (x_44 + 1); + ret = as_type((as_type(x_44) + as_type(1))); { int const x_47 = x_8.one; int const x_48 = i; - i = (x_48 - x_47); + i = as_type((as_type(x_48) - as_type(x_47))); } } int const x_50 = ret; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl index f57fd220e4..7bb12689b4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-and-in-for-loop-range/0-opt.wgsl.expected.msl @@ -24,11 +24,11 @@ int func_(constant buf0& x_8) { break; } int const x_44 = ret; - ret = (x_44 + 1); + ret = as_type((as_type(x_44) + as_type(1))); { int const x_47 = x_8.one; int const x_48 = i; - i = (x_48 - x_47); + i = as_type((as_type(x_48) - as_type(x_47))); } } int const x_50 = ret; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl index fdfaeeb0b5..9a920a07a6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl @@ -13,7 +13,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol i = 2; while (true) { int const x_6 = i; - i = (x_6 + 1); + i = as_type((as_type(x_6) + as_type(1))); { float const x_35 = (*(tint_symbol_5)).x; if (((x_35 >= 0.0f) & false)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl index a3fb456737..587b3e2d38 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.wgsl.expected.msl @@ -13,7 +13,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol i = 2; while (true) { int const x_6 = i; - i = (x_6 + 1); + i = as_type((as_type(x_6) + as_type(1))); { float const x_35 = (*(tint_symbol_5)).x; if (((x_35 >= 0.0f) && false)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl index 6b6a5dd547..7272ad9c5a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ int minusOne; }; @@ -16,11 +21,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int negMinValue = 0; minValue = (-2147483647 - 1); int const x_25 = minValue; - negMinValue = -(x_25); + negMinValue = tint_unary_minus(x_25); int const x_27 = negMinValue; int const x_28 = minValue; int const x_30 = x_7.minusOne; - if ((x_27 == (x_28 * x_30))) { + if ((x_27 == as_type((as_type(x_28) * as_type(x_30))))) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl index 6b6a5dd547..7272ad9c5a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-negate-min-int-value/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ int minusOne; }; @@ -16,11 +21,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int negMinValue = 0; minValue = (-2147483647 - 1); int const x_25 = minValue; - negMinValue = -(x_25); + negMinValue = tint_unary_minus(x_25); int const x_27 = negMinValue; int const x_28 = minValue; int const x_30 = x_7.minusOne; - if ((x_27 == (x_28 * x_30))) { + if ((x_27 == as_type((as_type(x_28) * as_type(x_30))))) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl index b73cd87619..45dc7c5440 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.spvasm.expected.msl @@ -13,7 +13,7 @@ struct tint_symbol_1 { void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_24 = x_5.one; - if (((1 + (3 - x_24)) == 3)) { + if ((as_type((as_type(1) + as_type(as_type((as_type(3) - as_type(x_24)))))) == 3)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl index b73cd87619..45dc7c5440 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-merge-add-sub-uniform/0-opt.wgsl.expected.msl @@ -13,7 +13,7 @@ struct tint_symbol_1 { void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_24 = x_5.one; - if (((1 + (3 - x_24)) == 3)) { + if ((as_type((as_type(1) + as_type(as_type((as_type(3) - as_type(x_24)))))) == 3)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl index 921f5ead83..ade8de6413 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.spvasm.expected.msl @@ -18,9 +18,9 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_6 = i; - i = (x_6 - 3); + i = as_type((as_type(x_6) - as_type(3))); int const x_8 = i; - i = (x_8 + 1); + i = as_type((as_type(x_8) + as_type(1))); } int const x_10 = i; if ((x_10 == -1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl index 921f5ead83..ade8de6413 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-add-sub/0-opt.wgsl.expected.msl @@ -18,9 +18,9 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_6 = i; - i = (x_6 - 3); + i = as_type((as_type(x_6) - as_type(3))); int const x_8 = i; - i = (x_8 + 1); + i = as_type((as_type(x_8) + as_type(1))); } int const x_10 = i; if ((x_10 == -1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl index 1392c3bd90..971bd1116e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_9 = i; - i = (x_9 - 1); + i = as_type((as_type(x_9) - as_type(1))); } } bool const x_44 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl index 1392c3bd90..971bd1116e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-add/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_9 = i; - i = (x_9 - 1); + i = as_type((as_type(x_9) - as_type(1))); } } bool const x_44 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl index c2559b697a..c195bec70b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_9 = i; - i = (x_9 - 1); + i = as_type((as_type(x_9) - as_type(1))); } } bool const x_45 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl index c2559b697a..c195bec70b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-sub-sub/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_9 = i; - i = (x_9 - 1); + i = as_type((as_type(x_9) - as_type(1))); } } bool const x_45 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl index 9138eca65b..e51689605b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.spvasm.expected.msl @@ -22,9 +22,9 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_34 = i; - i = (x_34 - 1); + i = as_type((as_type(x_34) - as_type(1))); int const x_36 = i; - i = (x_36 - 1); + i = as_type((as_type(x_36) - as_type(1))); } int const x_38 = i; if ((x_38 == -1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl index 9138eca65b..e51689605b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-var-sub/0-opt.wgsl.expected.msl @@ -22,9 +22,9 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_34 = i; - i = (x_34 - 1); + i = as_type((as_type(x_34) - as_type(1))); int const x_36 = i; - i = (x_36 - 1); + i = as_type((as_type(x_36) - as_type(1))); } int const x_38 = i; if ((x_38 == -1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl index 342ee1d30d..5d3b770bfa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ int four; }; @@ -13,7 +18,7 @@ struct tint_symbol_1 { void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_6 = x_5.four; - if ((-((x_6 / 2)) == -2)) { + if ((tint_unary_minus((x_6 / 2)) == -2)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl index 342ee1d30d..5d3b770bfa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-div/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ int four; }; @@ -13,7 +18,7 @@ struct tint_symbol_1 { void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_6 = x_5.four; - if ((-((x_6 / 2)) == -2)) { + if ((tint_unary_minus((x_6 / 2)) == -2)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); } else { *(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl index ba9466131b..d7a23cd22f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ int one; }; @@ -14,7 +19,7 @@ struct tint_symbol_1 { void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int x = 0; int const x_26 = x_6.one; - x = -((5 - x_26)); + x = tint_unary_minus(as_type((as_type(5) - as_type(x_26)))); int const x_29 = x; if ((x_29 == -4)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl index ba9466131b..d7a23cd22f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-negate-sub/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ int one; }; @@ -14,7 +19,7 @@ struct tint_symbol_1 { void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int x = 0; int const x_26 = x_6.one; - x = -((5 - x_26)); + x = tint_unary_minus(as_type((as_type(5) - as_type(x_26)))); int const x_29 = x; if ((x_29 == -4)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl index e614cff779..917b1d979c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.spvasm.expected.msl @@ -40,7 +40,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { a = tint_symbol_3; { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_55 = x_6.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl index e614cff779..917b1d979c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-array-initializing-modulo/0-opt.wgsl.expected.msl @@ -40,7 +40,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { a = tint_symbol_3; { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_55 = x_6.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl index cd5d0e3aa1..122ec2d143 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.spvasm.expected.msl @@ -53,7 +53,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy arr.arr[x_53] = (x_57 + x_55); { int const x_60 = i; - i = (x_60 + 1); + i = as_type((as_type(x_60) + as_type(1))); } } int const x_63 = x_9.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl index cd5d0e3aa1..122ec2d143 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-loop-min-increment-array-element/0-opt.wgsl.expected.msl @@ -53,7 +53,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy arr.arr[x_53] = (x_57 + x_55); { int const x_60 = i; - i = (x_60 + 1); + i = as_type((as_type(x_60) + as_type(1))); } } int const x_63 = x_9.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl index cb70f17c46..d08d1ee066 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.spvasm.expected.msl @@ -46,7 +46,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_43 = i; - i = (x_43 + 1); + i = as_type((as_type(x_43) + as_type(1))); } } int const x_45 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl index cb70f17c46..d08d1ee066 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-for-switch-fallthrough/0-opt.wgsl.expected.msl @@ -46,7 +46,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_43 = i; - i = (x_43 + 1); + i = as_type((as_type(x_43) + as_type(1))); } } int const x_45 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl index 18db7a4573..ac797e73ee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.spvasm.expected.msl @@ -73,10 +73,10 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_s break; } int const x_86 = b; - b = (x_86 + 1); + b = as_type((as_type(x_86) + as_type(1))); { int const x_88 = i; - i = (x_88 + 1); + i = as_type((as_type(x_88) + as_type(1))); } } int const x_90 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl index 18db7a4573..ac797e73ee 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-clamp-array-access/0-opt.wgsl.expected.msl @@ -73,10 +73,10 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread float4* const tint_s break; } int const x_86 = b; - b = (x_86 + 1); + b = as_type((as_type(x_86) + as_type(1))); { int const x_88 = i; - i = (x_88 + 1); + i = as_type((as_type(x_88) + as_type(1))); } } int const x_90 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl index c57161c023..a4060c7120 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.spvasm.expected.msl @@ -46,7 +46,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_69 = icoord.x; int const x_71 = icoord.y; int const x_74 = x_9.x_GLF_uniform_int_values.arr[0].el; - if (((x_69 * x_71) != x_74)) { + if ((as_type((as_type(x_69) * as_type(x_71))) != x_74)) { float const x_80 = x_6.x_GLF_uniform_float_values.arr[3].el; x_40 = x_80; } else { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl index c57161c023..a4060c7120 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-fragcoord-multiply/0-opt.wgsl.expected.msl @@ -46,7 +46,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy int const x_69 = icoord.x; int const x_71 = icoord.y; int const x_74 = x_9.x_GLF_uniform_int_values.arr[0].el; - if (((x_69 * x_71) != x_74)) { + if ((as_type((as_type(x_69) * as_type(x_71))) != x_74)) { float const x_80 = x_6.x_GLF_uniform_float_values.arr[3].el; x_40 = x_80; } else { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl index 80f3c6a5db..e0f4d2a72a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.spvasm.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_45 = *(tint_symbol_4); - *(tint_symbol_4) = (x_45 + 1); + *(tint_symbol_4) = as_type((as_type(x_45) + as_type(1))); x_55_phi = true; if (!(true)) { int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -54,7 +54,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_66 = *(tint_symbol_4); - *(tint_symbol_4) = (x_66 + 1); + *(tint_symbol_4) = as_type((as_type(x_66) + as_type(1))); int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_70 = float(x_69); *(tint_symbol_5) = float4(x_70, x_70, x_70, x_70); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl index 80f3c6a5db..e0f4d2a72a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-bound-true-logical-or/0-opt.wgsl.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_45 = *(tint_symbol_4); - *(tint_symbol_4) = (x_45 + 1); + *(tint_symbol_4) = as_type((as_type(x_45) + as_type(1))); x_55_phi = true; if (!(true)) { int const x_51 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -54,7 +54,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_66 = *(tint_symbol_4); - *(tint_symbol_4) = (x_66 + 1); + *(tint_symbol_4) = as_type((as_type(x_66) + as_type(1))); int const x_69 = x_6.x_GLF_uniform_int_values.arr[0].el; float const x_70 = float(x_69); *(tint_symbol_5) = float4(x_70, x_70, x_70, x_70); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl index 68f79989e3..5c952b7431 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.spvasm.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread break; } int const x_118 = *(tint_symbol_4); - *(tint_symbol_4) = (x_118 + 1); + *(tint_symbol_4) = as_type((as_type(x_118) + as_type(1))); int const x_120 = a; int const x_121 = clamp(x_120, 0, 3); float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -87,7 +87,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread break; } int const x_137 = *(tint_symbol_4); - *(tint_symbol_4) = (x_137 + 1); + *(tint_symbol_4) = as_type((as_type(x_137) + as_type(1))); int const x_139 = b; float const x_142 = v[clamp(x_139, 0, 3)]; int const x_143 = b; @@ -97,7 +97,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread f = (x_149 + (x_142 * x_147)); { int const x_151 = b; - b = (x_151 - 1); + b = as_type((as_type(x_151) - as_type(1))); } } int const x_153 = a; @@ -115,7 +115,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread } { int const x_172 = a; - a = (x_172 + 1); + a = as_type((as_type(x_172) + as_type(1))); } } float const x_175 = x_7.x_GLF_uniform_float_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl index 68f79989e3..5c952b7431 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-float-accumulate-matrix/0-opt.wgsl.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread break; } int const x_118 = *(tint_symbol_4); - *(tint_symbol_4) = (x_118 + 1); + *(tint_symbol_4) = as_type((as_type(x_118) + as_type(1))); int const x_120 = a; int const x_121 = clamp(x_120, 0, 3); float const x_123 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -87,7 +87,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread break; } int const x_137 = *(tint_symbol_4); - *(tint_symbol_4) = (x_137 + 1); + *(tint_symbol_4) = as_type((as_type(x_137) + as_type(1))); int const x_139 = b; float const x_142 = v[clamp(x_139, 0, 3)]; int const x_143 = b; @@ -97,7 +97,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread f = (x_149 + (x_142 * x_147)); { int const x_151 = b; - b = (x_151 - 1); + b = as_type((as_type(x_151) - as_type(1))); } } int const x_153 = a; @@ -115,7 +115,7 @@ void main_1(constant buf1& x_7, constant buf0& x_12, constant buf2& x_15, thread } { int const x_172 = a; - a = (x_172 + 1); + a = as_type((as_type(x_172) + as_type(1))); } } float const x_175 = x_7.x_GLF_uniform_float_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl index 6527266f07..3a59796c9d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl @@ -26,7 +26,7 @@ int func_(constant buf0& x_7, thread int* const tint_symbol_4) { break; } int const x_75 = *(tint_symbol_4); - *(tint_symbol_4) = (x_75 + 1); + *(tint_symbol_4) = as_type((as_type(x_75) + as_type(1))); int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el; return x_78; } @@ -39,7 +39,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* *(tint_symbol_5) = 0; while (true) { int const x_35 = *(tint_symbol_5); - *(tint_symbol_5) = (x_35 + 1); + *(tint_symbol_5) = as_type((as_type(x_35) + as_type(1))); if (false) { return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl index e3bf7ba177..7db4d7c31c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.wgsl.expected.msl @@ -26,7 +26,7 @@ int func_(constant buf0& x_7, thread int* const tint_symbol_4) { break; } int const x_75 = *(tint_symbol_4); - *(tint_symbol_4) = (x_75 + 1); + *(tint_symbol_4) = as_type((as_type(x_75) + as_type(1))); int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el; return x_78; } @@ -39,7 +39,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* *(tint_symbol_5) = 0; while (true) { int const x_35 = *(tint_symbol_5); - *(tint_symbol_5) = (x_35 + 1); + *(tint_symbol_5) = as_type((as_type(x_35) + as_type(1))); if (false) { return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl index de0a7fc8c8..56d2e87f08 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.spvasm.expected.msl @@ -29,12 +29,12 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int x_24 = 0; x_23 = x_23_phi; x_27 = x_5.x_GLF_uniform_int_values.arr[1].el; - if ((x_23 < (100 - as_type(x_27)))) { + if ((x_23 < as_type((as_type(100) - as_type(as_type(x_27)))))) { } else { break; } { - x_24 = as_type((x_23 + as_type(1))); + x_24 = as_type(as_type((as_type(x_23) + as_type(as_type(1))))); x_23_phi = x_24; } } @@ -55,8 +55,8 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } { - x_41 = (x_40 + 1); - x_38 = as_type((x_37 * as_type((1 - as_type(x_37))))); + x_41 = as_type((as_type(x_40) + as_type(1))); + x_38 = as_type(as_type((as_type(x_37) * as_type(as_type(as_type((as_type(1) - as_type(as_type(x_37))))))))); x_37_phi = x_38; x_40_phi = x_41; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl index de0a7fc8c8..56d2e87f08 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-multiply-one-minus/0.wgsl.expected.msl @@ -29,12 +29,12 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int x_24 = 0; x_23 = x_23_phi; x_27 = x_5.x_GLF_uniform_int_values.arr[1].el; - if ((x_23 < (100 - as_type(x_27)))) { + if ((x_23 < as_type((as_type(100) - as_type(as_type(x_27)))))) { } else { break; } { - x_24 = as_type((x_23 + as_type(1))); + x_24 = as_type(as_type((as_type(x_23) + as_type(as_type(1))))); x_23_phi = x_24; } } @@ -55,8 +55,8 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } { - x_41 = (x_40 + 1); - x_38 = as_type((x_37 * as_type((1 - as_type(x_37))))); + x_41 = as_type((as_type(x_40) + as_type(1))); + x_38 = as_type(as_type((as_type(x_37) * as_type(as_type(as_type((as_type(1) - as_type(as_type(x_37))))))))); x_37_phi = x_38; x_40_phi = x_41; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl index a7c34d0d23..ef3b65bc3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.spvasm.expected.msl @@ -27,10 +27,10 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_33 = *(tint_symbol_4); - *(tint_symbol_4) = (x_33 + 1); + *(tint_symbol_4) = as_type((as_type(x_33) + as_type(1))); int const x_35 = *(tint_symbol_4); int const x_36 = *(tint_symbol_4); - if (((x_35 * x_36) > 10)) { + if ((as_type((as_type(x_35) * as_type(x_36))) > 10)) { break; } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl index a7c34d0d23..ef3b65bc3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-squared-comparison/0-opt.wgsl.expected.msl @@ -27,10 +27,10 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_33 = *(tint_symbol_4); - *(tint_symbol_4) = (x_33 + 1); + *(tint_symbol_4) = as_type((as_type(x_33) + as_type(1))); int const x_35 = *(tint_symbol_4); int const x_36 = *(tint_symbol_4); - if (((x_35 * x_36) > 10)) { + if ((as_type((as_type(x_35) * as_type(x_36))) > 10)) { break; } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl index 63f4fcd14c..5db673bcc0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.spvasm.expected.msl @@ -18,10 +18,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_26 = a; if ((x_26 == 0)) { int const x_31 = a; - a = (x_31 + 1); + a = as_type((as_type(x_31) + as_type(1))); } else { int const x_33 = a; - a = (x_33 + 1); + a = as_type((as_type(x_33) + as_type(1))); } int const x_35 = a; if ((x_35 == 1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl index 63f4fcd14c..5db673bcc0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-conversion-identical-branches/0-opt.wgsl.expected.msl @@ -18,10 +18,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_26 = a; if ((x_26 == 0)) { int const x_31 = a; - a = (x_31 + 1); + a = as_type((as_type(x_31) + as_type(1))); } else { int const x_33 = a; - a = (x_33 + 1); + a = as_type((as_type(x_33) + as_type(1))); } int const x_35 = a; if ((x_35 == 1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl index b18bbf73a6..20c03a24bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.spvasm.expected.msl @@ -38,13 +38,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_42 = a; - a = (x_42 + 1); + a = as_type((as_type(x_42) + as_type(1))); int const x_44 = c; int const x_46 = x_6.x_GLF_uniform_int_values.arr[2].el; if ((x_44 == x_46)) { int const x_52 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_53 = c; - c = (x_53 * x_52); + c = as_type((as_type(x_53) * as_type(x_52))); } else { if (true) { continue; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl index b18bbf73a6..20c03a24bb 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-continue/0-opt.wgsl.expected.msl @@ -38,13 +38,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_42 = a; - a = (x_42 + 1); + a = as_type((as_type(x_42) + as_type(1))); int const x_44 = c; int const x_46 = x_6.x_GLF_uniform_int_values.arr[2].el; if ((x_44 == x_46)) { int const x_52 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_53 = c; - c = (x_53 * x_52); + c = as_type((as_type(x_53) * as_type(x_52))); } else { if (true) { continue; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl index 6aa0157cef..5989dc482a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { discard_fragment(); } int const x_37 = a; - a = (x_37 + 1); + a = as_type((as_type(x_37) + as_type(1))); { int const x_39 = a; if ((x_39 != 1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl index 6aa0157cef..5989dc482a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-if-true-discard-in-do-while-never-reached/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { discard_fragment(); } int const x_37 = a; - a = (x_37 + 1); + a = as_type((as_type(x_37) + as_type(1))); { int const x_39 = a; if ((x_39 != 1)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl index b25d714923..82604e9b49 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.spvasm.expected.msl @@ -19,7 +19,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_31 = i; int const x_33 = x_7.three; - if ((x_31 < (7 + x_33))) { + if ((x_31 < as_type((as_type(7) + as_type(x_33))))) { } else { break; } @@ -28,7 +28,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { case 7: case 8: { int const x_40 = a; - a = (x_40 + 1); + a = as_type((as_type(x_40) + as_type(1))); break; } default: { @@ -37,7 +37,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } { int const x_42 = i; - i = (x_42 + 1); + i = as_type((as_type(x_42) + as_type(1))); } } int const x_44 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl index b25d714923..82604e9b49 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inc-inside-switch-and-for/0-opt.wgsl.expected.msl @@ -19,7 +19,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_31 = i; int const x_33 = x_7.three; - if ((x_31 < (7 + x_33))) { + if ((x_31 < as_type((as_type(7) + as_type(x_33))))) { } else { break; } @@ -28,7 +28,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { case 7: case 8: { int const x_40 = a; - a = (x_40 + 1); + a = as_type((as_type(x_40) + as_type(1))); break; } default: { @@ -37,7 +37,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } { int const x_42 = i; - i = (x_42 + 1); + i = as_type((as_type(x_42) + as_type(1))); } } int const x_44 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl index 28fc564faa..7f0eda59d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.spvasm.expected.msl @@ -52,7 +52,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy break; } int const x_49 = a; - a = (x_49 + 1); + a = as_type((as_type(x_49) + as_type(1))); float const x_52 = x_6.x_GLF_uniform_float_values.arr[0].el; arr.arr[x_49] = x_52; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl index 28fc564faa..7f0eda59d9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-array-element-in-loop/0-opt.wgsl.expected.msl @@ -52,7 +52,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy break; } int const x_49 = a; - a = (x_49 + 1); + a = as_type((as_type(x_49) + as_type(1))); float const x_52 = x_6.x_GLF_uniform_float_values.arr[0].el; arr.arr[x_49] = x_52; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl index fa495164ac..9c31fcefd0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.spvasm.expected.msl @@ -53,7 +53,7 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s f1 = x_51; { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } float const x_54 = f1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl index fa495164ac..9c31fcefd0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-float-in-loop-abs/0-opt.wgsl.expected.msl @@ -53,7 +53,7 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s f1 = x_51; { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } float const x_54 = f1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl index 9a18e812db..6c3580d827 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.spvasm.expected.msl @@ -33,8 +33,8 @@ void func_(constant buf0& x_7, thread int* const tint_symbol_4) { } { int const x_73 = *(tint_symbol_4); - *(tint_symbol_4) = (x_73 + 1); - x_67 = (x_66 + 1); + *(tint_symbol_4) = as_type((as_type(x_73) + as_type(1))); + x_67 = as_type((as_type(x_66) + as_type(1))); x_66_phi = x_67; } } @@ -54,7 +54,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* } { int const x_32 = *(tint_symbol_5); - *(tint_symbol_5) = (x_32 + 1); + *(tint_symbol_5) = as_type((as_type(x_32) + as_type(1))); func_(x_7, tint_symbol_5); } } @@ -66,7 +66,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* } { int const x_40 = *(tint_symbol_5); - *(tint_symbol_5) = (x_40 + 1); + *(tint_symbol_5) = as_type((as_type(x_40) + as_type(1))); } } int const x_42 = *(tint_symbol_5); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl index 9a18e812db..6c3580d827 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-global-counter-loop-function/0-opt.wgsl.expected.msl @@ -33,8 +33,8 @@ void func_(constant buf0& x_7, thread int* const tint_symbol_4) { } { int const x_73 = *(tint_symbol_4); - *(tint_symbol_4) = (x_73 + 1); - x_67 = (x_66 + 1); + *(tint_symbol_4) = as_type((as_type(x_73) + as_type(1))); + x_67 = as_type((as_type(x_66) + as_type(1))); x_66_phi = x_67; } } @@ -54,7 +54,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* } { int const x_32 = *(tint_symbol_5); - *(tint_symbol_5) = (x_32 + 1); + *(tint_symbol_5) = as_type((as_type(x_32) + as_type(1))); func_(x_7, tint_symbol_5); } } @@ -66,7 +66,7 @@ void main_1(constant buf0& x_7, thread int* const tint_symbol_5, thread float4* } { int const x_40 = *(tint_symbol_5); - *(tint_symbol_5) = (x_40 + 1); + *(tint_symbol_5) = as_type((as_type(x_40) + as_type(1))); } } int const x_42 = *(tint_symbol_5); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl index 231e58aa32..141d1a78b6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.spvasm.expected.msl @@ -29,14 +29,14 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { if ((x_41 > 1)) { *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 0.0f); int const x_45 = b; - b = (x_45 + 1); + b = as_type((as_type(x_45) + as_type(1))); } int const x_47 = b; - int const x_48 = (x_47 + 1); + int const x_48 = as_type((as_type(x_47) + as_type(1))); b = x_48; int const x_50_save = clamp(x_48, 0, 2); int const x_51 = a.arr[x_50_save]; - a.arr[x_50_save] = (x_51 + 1); + a.arr[x_50_save] = as_type((as_type(x_51) + as_type(1))); int const x_54 = a.arr[2]; if ((x_54 == 4)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl index 231e58aa32..141d1a78b6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-inside-clamp/0-opt.wgsl.expected.msl @@ -29,14 +29,14 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { if ((x_41 > 1)) { *(tint_symbol_4) = float4(0.0f, 1.0f, 1.0f, 0.0f); int const x_45 = b; - b = (x_45 + 1); + b = as_type((as_type(x_45) + as_type(1))); } int const x_47 = b; - int const x_48 = (x_47 + 1); + int const x_48 = as_type((as_type(x_47) + as_type(1))); b = x_48; int const x_50_save = clamp(x_48, 0, 2); int const x_51 = a.arr[x_50_save]; - a.arr[x_50_save] = (x_51 + 1); + a.arr[x_50_save] = as_type((as_type(x_51) + as_type(1))); int const x_54 = a.arr[2]; if ((x_54 == 4)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl index 8671edc22b..3f78d7f847 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.spvasm.expected.msl @@ -42,10 +42,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { indexable = tint_symbol_3; int const x_55 = indexable.arr[(x_50 % x_52)]; int const x_56 = a; - a = (x_56 + x_55); + a = as_type((as_type(x_56) + as_type(x_55))); { int const x_58 = i; - i = (x_58 + 1); + i = as_type((as_type(x_58) + as_type(1))); } } int const x_60 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl index 8671edc22b..3f78d7f847 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-int-loop-counter-mod-array/0-opt.wgsl.expected.msl @@ -42,10 +42,10 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { indexable = tint_symbol_3; int const x_55 = indexable.arr[(x_50 % x_52)]; int const x_56 = a; - a = (x_56 + x_55); + a = as_type((as_type(x_56) + as_type(x_55))); { int const x_58 = i; - i = (x_58 + 1); + i = as_type((as_type(x_58) + as_type(1))); } } int const x_60 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl index 45a90bc4e6..083b8d5a5f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl @@ -44,11 +44,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_50 = a; - a = (x_50 + 1); + a = as_type((as_type(x_50) + as_type(1))); int const x_52 = c; - c = (x_52 + 1); + c = as_type((as_type(x_52) + as_type(1))); int const x_54 = b; - b = (x_54 + 1); + b = as_type((as_type(x_54) + as_type(1))); } while (true) { int const x_60 = a; @@ -59,7 +59,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_65 = a; - a = (x_65 + 1); + a = as_type((as_type(x_65) + as_type(1))); } } int const x_67 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl index 2c946fea4b..e80a8e09a1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.wgsl.expected.msl @@ -44,11 +44,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_50 = a; - a = (x_50 + 1); + a = as_type((as_type(x_50) + as_type(1))); int const x_52 = c; - c = (x_52 + 1); + c = as_type((as_type(x_52) + as_type(1))); int const x_54 = b; - b = (x_54 + 1); + b = as_type((as_type(x_54) + as_type(1))); } while (true) { int const x_60 = a; @@ -59,7 +59,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_65 = a; - a = (x_65 + 1); + a = as_type((as_type(x_65) + as_type(1))); } } int const x_67 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl index 5b389f37c6..5db1f98520 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.spvasm.expected.msl @@ -20,7 +20,7 @@ float func_() { int const x_38 = i; if ((x_38 > 5)) { int const x_42 = i; - i = (x_42 + 1); + i = as_type((as_type(x_42) + as_type(1))); } int const x_44 = i; if ((x_44 > 8)) { @@ -28,7 +28,7 @@ float func_() { } { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } return 1.0f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl index 5b389f37c6..5db1f98520 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inline-pass-return-in-loop/0-opt.wgsl.expected.msl @@ -20,7 +20,7 @@ float func_() { int const x_38 = i; if ((x_38 > 5)) { int const x_42 = i; - i = (x_42 + 1); + i = as_type((as_type(x_42) + as_type(1))); } int const x_44 = i; if ((x_44 > 8)) { @@ -28,7 +28,7 @@ float func_() { } { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } return 1.0f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl index 26ba969070..c8fdc80719 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.spvasm.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s arr.arr[x_50] = x_52; { int const x_54 = i; - i = (x_54 + 1); + i = as_type((as_type(x_54) + as_type(1))); } } a = -1; @@ -57,13 +57,13 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s float const x_59 = x_11.x_GLF_uniform_float_values.arr[0].el; if (!((x_57 < x_59))) { int const x_64 = a; - int const x_65 = (x_64 + 1); + int const x_65 = as_type((as_type(x_64) + as_type(1))); a = x_65; int const x_67 = x_7.x_GLF_uniform_int_values.arr[1].el; arr.arr[x_65] = x_67; } int const x_69 = a; - int const x_70 = (x_69 + 1); + int const x_70 = as_type((as_type(x_69) + as_type(1))); a = x_70; int const x_72 = x_7.x_GLF_uniform_int_values.arr[2].el; arr.arr[x_70] = x_72; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl index 26ba969070..c8fdc80719 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-increase-negative/0-opt.wgsl.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s arr.arr[x_50] = x_52; { int const x_54 = i; - i = (x_54 + 1); + i = as_type((as_type(x_54) + as_type(1))); } } a = -1; @@ -57,13 +57,13 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s float const x_59 = x_11.x_GLF_uniform_float_values.arr[0].el; if (!((x_57 < x_59))) { int const x_64 = a; - int const x_65 = (x_64 + 1); + int const x_65 = as_type((as_type(x_64) + as_type(1))); a = x_65; int const x_67 = x_7.x_GLF_uniform_int_values.arr[1].el; arr.arr[x_65] = x_67; } int const x_69 = a; - int const x_70 = (x_69 + 1); + int const x_70 = as_type((as_type(x_69) + as_type(1))); a = x_70; int const x_72 = x_7.x_GLF_uniform_int_values.arr[2].el; arr.arr[x_70] = x_72; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl index bcdae401ea..4d2e2999d2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -35,7 +40,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_34; int const x_35 = a; - a = (x_35 + 1); + a = as_type((as_type(x_35) + as_type(1))); int const x_38 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_38; while (true) { @@ -47,10 +52,10 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s } int const x_48 = i; int const x_50 = a; - b = ldexp(float(x_48), -(x_50)); + b = ldexp(float(x_48), tint_unary_minus(x_50)); { int const x_53 = i; - i = (x_53 + 1); + i = as_type((as_type(x_53) + as_type(1))); } } float const x_55 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl index bcdae401ea..4d2e2999d2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-ldexp/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -35,7 +40,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s int const x_34 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_34; int const x_35 = a; - a = (x_35 + 1); + a = as_type((as_type(x_35) + as_type(1))); int const x_38 = x_6.x_GLF_uniform_int_values.arr[1].el; i = x_38; while (true) { @@ -47,10 +52,10 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s } int const x_48 = i; int const x_50 = a; - b = ldexp(float(x_48), -(x_50)); + b = ldexp(float(x_48), tint_unary_minus(x_50)); { int const x_53 = i; - i = (x_53 + 1); + i = as_type((as_type(x_53) + as_type(1))); } } float const x_55 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl index e2416d2339..6c318fa632 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.spvasm.expected.msl @@ -43,12 +43,12 @@ int func_f1_(constant buf0& x_8, thread float* const f) { float const x_80 = *(f); int const x_84 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_86 = i; - a = (((int(x_80) - 1) - x_84) + x_86); + a = as_type((as_type(as_type((as_type(as_type((as_type(int(x_80)) - as_type(1)))) - as_type(x_84)))) + as_type(x_86))); int const x_88 = b; - b = (x_88 + 1); + b = as_type((as_type(x_88) + as_type(1))); { int const x_90 = i; - i = (x_90 + 1); + i = as_type((as_type(x_90) + as_type(1))); } } int const x_92 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl index e2416d2339..6c318fa632 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-neg-func-arg/0-opt.wgsl.expected.msl @@ -43,12 +43,12 @@ int func_f1_(constant buf0& x_8, thread float* const f) { float const x_80 = *(f); int const x_84 = x_8.x_GLF_uniform_int_values.arr[1].el; int const x_86 = i; - a = (((int(x_80) - 1) - x_84) + x_86); + a = as_type((as_type(as_type((as_type(as_type((as_type(int(x_80)) - as_type(1)))) - as_type(x_84)))) + as_type(x_86))); int const x_88 = b; - b = (x_88 + 1); + b = as_type((as_type(x_88) + as_type(1))); { int const x_90 = i; - i = (x_90 + 1); + i = as_type((as_type(x_90) + as_type(1))); } } int const x_92 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl index d0afc76e42..523aec7d1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.spvasm.expected.msl @@ -49,7 +49,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo A.arr[x_66] = x_68; { int const x_70 = i; - i = (x_70 + 1); + i = as_type((as_type(x_70) + as_type(1))); } } a = -1; @@ -57,7 +57,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el; if ((x_73 >= x_75)) { int const x_79 = a; - int const x_80 = (x_79 + 1); + int const x_80 = as_type((as_type(x_79) + as_type(1))); a = x_80; int const x_82 = x_8.x_GLF_uniform_int_values.arr[1].el; A.arr[x_80] = x_82; @@ -67,7 +67,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo int const x_89 = x_8.x_GLF_uniform_int_values.arr[1].el; if ((x_87 == x_89)) { int const x_94 = a; - int const x_95 = (x_94 + 1); + int const x_95 = as_type((as_type(x_94) + as_type(1))); a = x_95; int const x_97 = A.arr[x_95]; return x_97; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl index d0afc76e42..523aec7d1c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-add-sub-pre-increase/0-opt.wgsl.expected.msl @@ -49,7 +49,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo A.arr[x_66] = x_68; { int const x_70 = i; - i = (x_70 + 1); + i = as_type((as_type(x_70) + as_type(1))); } } a = -1; @@ -57,7 +57,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo float const x_75 = x_12.x_GLF_uniform_float_values.arr[0].el; if ((x_73 >= x_75)) { int const x_79 = a; - int const x_80 = (x_79 + 1); + int const x_80 = as_type((as_type(x_79) + as_type(1))); a = x_80; int const x_82 = x_8.x_GLF_uniform_int_values.arr[1].el; A.arr[x_80] = x_82; @@ -67,7 +67,7 @@ int f1_(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_symbo int const x_89 = x_8.x_GLF_uniform_int_values.arr[1].el; if ((x_87 == x_89)) { int const x_94 = a; - int const x_95 = (x_94 + 1); + int const x_95 = as_type((as_type(x_94) + as_type(1))); a = x_95; int const x_97 = A.arr[x_95]; return x_97; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl index 4f33cd7482..3db287a552 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.spvasm.expected.msl @@ -40,13 +40,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 0: case 1: { int const x_47 = count0; - count0 = (x_47 + 1); + count0 = as_type((as_type(x_47) + as_type(1))); /* fallthrough */ } case 2: case 3: { int const x_49 = count1; - count1 = (x_49 + 1); + count1 = as_type((as_type(x_49) + as_type(1))); break; } default: { @@ -55,7 +55,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_51 = i; - i = (x_51 + 1); + i = as_type((as_type(x_51) + as_type(1))); } } int const x_53 = count1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl index 4f33cd7482..3db287a552 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-and-or-xor-switch/0-opt.wgsl.expected.msl @@ -40,13 +40,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 0: case 1: { int const x_47 = count0; - count0 = (x_47 + 1); + count0 = as_type((as_type(x_47) + as_type(1))); /* fallthrough */ } case 2: case 3: { int const x_49 = count1; - count1 = (x_49 + 1); + count1 = as_type((as_type(x_49) + as_type(1))); break; } default: { @@ -55,7 +55,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_51 = i; - i = (x_51 + 1); + i = as_type((as_type(x_51) + as_type(1))); } } int const x_53 = count1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl index b727426114..25b2762d81 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.spvasm.expected.msl @@ -36,9 +36,9 @@ float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tin float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_71 >= x_73)) { int const x_77 = b; - b = (x_77 + 1); + b = as_type((as_type(x_77) + as_type(1))); int const x_79 = b; - b = (x_79 + 1); + b = as_type((as_type(x_79) + as_type(1))); } float const x_81 = *(a); float const x_83 = x_9.x_GLF_uniform_float_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl index b727426114..25b2762d81 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-pre-increment-clamp/0-opt.wgsl.expected.msl @@ -36,9 +36,9 @@ float f1_f1_(constant buf0& x_9, thread float* const a, thread float4* const tin float const x_73 = x_9.x_GLF_uniform_float_values.arr[0].el; if ((x_71 >= x_73)) { int const x_77 = b; - b = (x_77 + 1); + b = as_type((as_type(x_77) + as_type(1))); int const x_79 = b; - b = (x_79 + 1); + b = as_type((as_type(x_79) + as_type(1))); } float const x_81 = *(a); float const x_83 = x_9.x_GLF_uniform_float_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl index 111c664b67..fe0cdc7f25 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.spvasm.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); } int const x_59 = i; - i = (x_59 - 1); + i = as_type((as_type(x_59) - as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl index 111c664b67..fe0cdc7f25 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-compares-while-modulo/0-opt.wgsl.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy *(tint_symbol_4) = float4(x_57, x_57, x_57, x_57); } int const x_59 = i; - i = (x_59 - 1); + i = as_type((as_type(x_59) - as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl index 752c12b1bb..2bc64d6360 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35); float const x_38 = (*(tint_symbol_6)).y; float const x_40 = x_9.x_GLF_uniform_float_values.arr[0].el; - i = (1 << as_type(select(1, 2, (x_38 >= x_40)))); + i = as_type((as_type(1) << as_type(select(1, 2, (x_38 >= x_40))))); while (true) { bool x_57 = false; bool x_58_phi = false; @@ -61,7 +61,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy *(tint_symbol_5) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); { int const x_73 = i; - i = (x_73 + 1); + i = as_type((as_type(x_73) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl index 752c12b1bb..2bc64d6360 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-left-shift-for/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy *(tint_symbol_5) = float4(x_35, x_35, x_35, x_35); float const x_38 = (*(tint_symbol_6)).y; float const x_40 = x_9.x_GLF_uniform_float_values.arr[0].el; - i = (1 << as_type(select(1, 2, (x_38 >= x_40)))); + i = as_type((as_type(1) << as_type(select(1, 2, (x_38 >= x_40))))); while (true) { bool x_57 = false; bool x_58_phi = false; @@ -61,7 +61,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy *(tint_symbol_5) = float4(float(x_61), float(x_64), float(x_67), float(x_70)); { int const x_73 = i; - i = (x_73 + 1); + i = as_type((as_type(x_73) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl index 57d1bbaa65..166f249e43 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.spvasm.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s break; } int const x_66 = i; - i = (x_66 - 1); + i = as_type((as_type(x_66) - as_type(1))); } float const x_69 = x_10.x_GLF_uniform_float_values.arr[1].el; float const x_71 = x_10.x_GLF_uniform_float_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl index 57d1bbaa65..166f249e43 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-shifts-mix-mix-clamp/0-opt.wgsl.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s break; } int const x_66 = i; - i = (x_66 - 1); + i = as_type((as_type(x_66) - as_type(1))); } float const x_69 = x_10.x_GLF_uniform_float_values.arr[1].el; float const x_71 = x_10.x_GLF_uniform_float_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl index ed3ad85e1a..63a0e833f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.spvasm.expected.msl @@ -59,7 +59,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy a = x_55; { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } float const x_59 = x_6.x_GLF_uniform_float_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl index ed3ad85e1a..63a0e833f3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-inst-combine-vector-ops-asin/0-opt.wgsl.expected.msl @@ -59,7 +59,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy a = x_55; { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } float const x_59 = x_6.x_GLF_uniform_float_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl index 0e0fb17bca..1219c9f280 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.spvasm.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int a = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; - a = ((1 >> as_type((x_25 << as_type(5)))) >> as_type(x_29)); + a = ((1 >> as_type(as_type((as_type(x_25) << as_type(5))))) >> as_type(x_29)); int const x_31 = a; if ((x_31 == 1)) { int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl index 0e0fb17bca..1219c9f280 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-bit-shifting/0-opt.wgsl.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int a = 0; int const x_25 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_29 = x_6.x_GLF_uniform_int_values.arr[0].el; - a = ((1 >> as_type((x_25 << as_type(5)))) >> as_type(x_29)); + a = ((1 >> as_type(as_type((as_type(x_25) << as_type(5))))) >> as_type(x_29)); int const x_31 = a; if ((x_31 == 1)) { int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl index 6399b00769..5aae4c1b30 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.spvasm.expected.msl @@ -40,7 +40,7 @@ int f_i1_(constant buf0& x_8, thread int* const a) { } { int const x_22 = i; - i = (x_22 + 1); + i = as_type((as_type(x_22) + as_type(1))); } } int const x_24 = x_8.x_GLF_uniform_int_values.arr[0].el; @@ -103,20 +103,20 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_54 = i_1; int const x_55 = i_1; int const x_56 = x_8.x_GLF_uniform_int_values.arr[1].el; - a_1.arr[x_54] = (x_55 + x_56); + a_1.arr[x_54] = as_type((as_type(x_55) + as_type(x_56))); int const x_58 = i_1; int const x_59 = x_8.x_GLF_uniform_int_values.arr[6].el; if ((x_58 < x_59)) { { int const x_79 = i_1; - i_1 = (x_79 + 1); + i_1 = as_type((as_type(x_79) + as_type(1))); } continue; } int const x_60 = i_1; int const x_61 = i_1; int const x_62 = x_8.x_GLF_uniform_int_values.arr[8].el; - a_1.arr[x_60] = (x_61 + x_62); + a_1.arr[x_60] = as_type((as_type(x_61) + as_type(x_62))); int const x_64 = i_1; int const x_65 = a_1.arr[x_64]; param = x_65; @@ -126,7 +126,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_68 = i_1; int const x_182_save = x_68; int const x_69 = a_1.arr[x_182_save]; - a_1.arr[x_182_save] = (x_69 - 1); + a_1.arr[x_182_save] = as_type((as_type(x_69) - as_type(1))); } } else { int const x_71 = i_1; @@ -138,12 +138,12 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_75 = i_1; int const x_76 = x_8.x_GLF_uniform_int_values.arr[4].el; int const x_77 = a_1.arr[x_75]; - a_1.arr[x_75] = (x_77 + x_76); + a_1.arr[x_75] = as_type((as_type(x_77) + as_type(x_76))); } } { int const x_79 = i_1; - i_1 = (x_79 + 1); + i_1 = as_type((as_type(x_79) + as_type(1))); } } int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el; @@ -167,7 +167,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } { int const x_89 = i_2; - i_2 = (x_89 + 1); + i_2 = as_type((as_type(x_89) + as_type(1))); } } int const x_91 = x_8.x_GLF_uniform_int_values.arr[11].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl index 6399b00769..5aae4c1b30 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-inst-combine-calls-for-compare-function-call-result/0-opt.wgsl.expected.msl @@ -40,7 +40,7 @@ int f_i1_(constant buf0& x_8, thread int* const a) { } { int const x_22 = i; - i = (x_22 + 1); + i = as_type((as_type(x_22) + as_type(1))); } } int const x_24 = x_8.x_GLF_uniform_int_values.arr[0].el; @@ -103,20 +103,20 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_54 = i_1; int const x_55 = i_1; int const x_56 = x_8.x_GLF_uniform_int_values.arr[1].el; - a_1.arr[x_54] = (x_55 + x_56); + a_1.arr[x_54] = as_type((as_type(x_55) + as_type(x_56))); int const x_58 = i_1; int const x_59 = x_8.x_GLF_uniform_int_values.arr[6].el; if ((x_58 < x_59)) { { int const x_79 = i_1; - i_1 = (x_79 + 1); + i_1 = as_type((as_type(x_79) + as_type(1))); } continue; } int const x_60 = i_1; int const x_61 = i_1; int const x_62 = x_8.x_GLF_uniform_int_values.arr[8].el; - a_1.arr[x_60] = (x_61 + x_62); + a_1.arr[x_60] = as_type((as_type(x_61) + as_type(x_62))); int const x_64 = i_1; int const x_65 = a_1.arr[x_64]; param = x_65; @@ -126,7 +126,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_68 = i_1; int const x_182_save = x_68; int const x_69 = a_1.arr[x_182_save]; - a_1.arr[x_182_save] = (x_69 - 1); + a_1.arr[x_182_save] = as_type((as_type(x_69) - as_type(1))); } } else { int const x_71 = i_1; @@ -138,12 +138,12 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { int const x_75 = i_1; int const x_76 = x_8.x_GLF_uniform_int_values.arr[4].el; int const x_77 = a_1.arr[x_75]; - a_1.arr[x_75] = (x_77 + x_76); + a_1.arr[x_75] = as_type((as_type(x_77) + as_type(x_76))); } } { int const x_79 = i_1; - i_1 = (x_79 + 1); + i_1 = as_type((as_type(x_79) + as_type(1))); } } int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el; @@ -167,7 +167,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } { int const x_89 = i_2; - i_2 = (x_89 + 1); + i_2 = as_type((as_type(x_89) + as_type(1))); } } int const x_91 = x_8.x_GLF_uniform_int_values.arr[11].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl index df420d2be1..031445553a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.spvasm.expected.msl @@ -62,7 +62,7 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s arr.arr[x_56].data = x_57; { int const x_59 = i; - i = (x_59 + 1); + i = as_type((as_type(x_59) + as_type(1))); } } int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el; @@ -107,13 +107,13 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s } { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } } } { int const x_115 = i_1; - i_1 = (x_115 + 1); + i_1 = as_type((as_type(x_115) + as_type(1))); } } int const x_118 = x_10.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl index df420d2be1..031445553a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-first-value-phi/0-opt.wgsl.expected.msl @@ -62,7 +62,7 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s arr.arr[x_56].data = x_57; { int const x_59 = i; - i = (x_59 + 1); + i = as_type((as_type(x_59) + as_type(1))); } } int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el; @@ -107,13 +107,13 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s } { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } } } { int const x_115 = i_1; - i_1 = (x_115 + 1); + i_1 = as_type((as_type(x_115) + as_type(1))); } } int const x_118 = x_10.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl index f3e2dd6808..e93e2b5e16 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.spvasm.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_sy } { int const x_62 = i; - i = (x_62 + 1); + i = as_type((as_type(x_62) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl index f3e2dd6808..e93e2b5e16 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-instructions-for-if-less-than-equal/0-opt.wgsl.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf1& x_5, constant buf0& x_8, thread float4* const tint_sy } { int const x_62 = i; - i = (x_62 + 1); + i = as_type((as_type(x_62) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl index 4b31f2bcdb..0ecda7c97c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float a = (x_45 / 2); { int const x_47 = i; - i = (x_47 + 1); + i = as_type((as_type(x_47) + as_type(1))); } } int const x_49 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl index 4b31f2bcdb..0ecda7c97c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-int-full-bits-divide-by-two-loop/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float a = (x_45 / 2); { int const x_47 = i; - i = (x_47 + 1); + i = as_type((as_type(x_47) + as_type(1))); } } int const x_49 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl index 3ebe7f7285..573e4e9fc8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.spvasm.expected.msl @@ -36,11 +36,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el; if (((x_39 % -93448) > x_42)) { int const x_46 = count; - count = (x_46 + 1); + count = as_type((as_type(x_46) + as_type(1))); } { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_50 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl index 3ebe7f7285..573e4e9fc8 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-integer-modulo-negative/0-opt.wgsl.expected.msl @@ -36,11 +36,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_42 = x_6.x_GLF_uniform_int_values.arr[1].el; if (((x_39 % -93448) > x_42)) { int const x_46 = count; - count = (x_46 + 1); + count = as_type((as_type(x_46) + as_type(1))); } { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_50 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl index 06c165930d..4c40186183 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.spvasm.expected.msl @@ -30,10 +30,10 @@ float3 func_() { } v.y = 1.0f; int const x_100 = i; - i = (x_100 + 1); + i = as_type((as_type(x_100) + as_type(1))); { int const x_102 = k; - k = (x_102 + 1); + k = as_type((as_type(x_102) + as_type(1))); } } int const x_104 = i; @@ -63,7 +63,7 @@ void main_1(thread float4* const tint_symbol_4) { data.arr[x_52] = x_53; { int const x_55 = j; - j = (x_55 + 1); + j = as_type((as_type(x_55) + as_type(1))); } } j_1 = 0; @@ -75,10 +75,10 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_64 = j_1; float3 const x_67 = func_(); - data.arr[((4 * x_64) + 1)] = x_67; + data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_64)))) + as_type(1)))] = x_67; { int const x_69 = j_1; - j_1 = (x_69 + 1); + j_1 = as_type((as_type(x_69) + as_type(1))); } } float3 const x_72 = data.arr[0]; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl index 06c165930d..4c40186183 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-intervalmap-set-stop/0-opt.wgsl.expected.msl @@ -30,10 +30,10 @@ float3 func_() { } v.y = 1.0f; int const x_100 = i; - i = (x_100 + 1); + i = as_type((as_type(x_100) + as_type(1))); { int const x_102 = k; - k = (x_102 + 1); + k = as_type((as_type(x_102) + as_type(1))); } } int const x_104 = i; @@ -63,7 +63,7 @@ void main_1(thread float4* const tint_symbol_4) { data.arr[x_52] = x_53; { int const x_55 = j; - j = (x_55 + 1); + j = as_type((as_type(x_55) + as_type(1))); } } j_1 = 0; @@ -75,10 +75,10 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_64 = j_1; float3 const x_67 = func_(); - data.arr[((4 * x_64) + 1)] = x_67; + data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_64)))) + as_type(1)))] = x_67; { int const x_69 = j_1; - j_1 = (x_69 + 1); + j_1 = as_type((as_type(x_69) + as_type(1))); } } float3 const x_72 = data.arr[0]; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl index 2ff0873e4c..380f54837e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.spvasm.expected.msl @@ -23,7 +23,7 @@ void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { int a = 0; tint_array_wrapper indexable = {}; int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; - idx = (1 << as_type(x_27)); + idx = as_type((as_type(1) << as_type(x_27))); int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = idx; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl index 2ff0873e4c..380f54837e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-array-access/0-opt.wgsl.expected.msl @@ -23,7 +23,7 @@ void main_1(constant buf1& x_6, thread float4* const tint_symbol_5) { int a = 0; tint_array_wrapper indexable = {}; int const x_27 = x_6.x_GLF_uniform_int_values.arr[1].el; - idx = (1 << as_type(x_27)); + idx = as_type((as_type(1) << as_type(x_27))); int const x_30 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_32 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_34 = idx; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl index 6500f1c113..ae8062404d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.spvasm.expected.msl @@ -24,7 +24,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float const x_25 = float(x_24); *(tint_symbol_4) = float4(x_25, x_25, x_25, x_25); int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el; - int const x_30 = ((x_28 << as_type(x_28)) >> as_type(1)); + int const x_30 = (as_type((as_type(x_28) << as_type(x_28))) >> as_type(1)); x_32_phi = x_24; while (true) { int const x_32 = x_32_phi; @@ -33,7 +33,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } int x_33 = 0; - x_33 = (x_32 + 1); + x_33 = as_type((as_type(x_32) + as_type(1))); int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el; if ((x_33 == as_type(x_39))) { float const x_43 = float(x_28); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl index 6500f1c113..ae8062404d 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-left-shift-right-shift-compare/0.wgsl.expected.msl @@ -24,7 +24,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float const x_25 = float(x_24); *(tint_symbol_4) = float4(x_25, x_25, x_25, x_25); int const x_28 = x_5.x_GLF_uniform_int_values.arr[0].el; - int const x_30 = ((x_28 << as_type(x_28)) >> as_type(1)); + int const x_30 = (as_type((as_type(x_28) << as_type(x_28))) >> as_type(1)); x_32_phi = x_24; while (true) { int const x_32 = x_32_phi; @@ -33,7 +33,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } int x_33 = 0; - x_33 = (x_32 + 1); + x_33 = as_type((as_type(x_32) + as_type(1))); int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el; if ((x_33 == as_type(x_39))) { float const x_43 = float(x_28); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl index 0932150e20..ddde176fe3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.spvasm.expected.msl @@ -30,10 +30,10 @@ float3 func_() { } v.y = 1.0f; int const x_89 = i; - i = (x_89 + 1); + i = as_type((as_type(x_89) + as_type(1))); { int const x_91 = k; - k = (x_91 + 1); + k = as_type((as_type(x_91) + as_type(1))); } } int const x_93 = i; @@ -61,7 +61,7 @@ void main_1(thread float4* const tint_symbol_4) { data.arr[x_49] = x_50; { int const x_52 = j; - j = (x_52 + 1); + j = as_type((as_type(x_52) + as_type(1))); } } j_1 = 0; @@ -73,10 +73,10 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_61 = j_1; float3 const x_64 = func_(); - data.arr[((4 * x_61) + 1)] = x_64; + data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_61)))) + as_type(1)))] = x_64; { int const x_66 = j_1; - j_1 = (x_66 + 1); + j_1 = as_type((as_type(x_66) + as_type(1))); } } float3 const x_69 = data.arr[0]; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl index 0932150e20..ddde176fe3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-liveinterval-different-dest/0-opt.wgsl.expected.msl @@ -30,10 +30,10 @@ float3 func_() { } v.y = 1.0f; int const x_89 = i; - i = (x_89 + 1); + i = as_type((as_type(x_89) + as_type(1))); { int const x_91 = k; - k = (x_91 + 1); + k = as_type((as_type(x_91) + as_type(1))); } } int const x_93 = i; @@ -61,7 +61,7 @@ void main_1(thread float4* const tint_symbol_4) { data.arr[x_49] = x_50; { int const x_52 = j; - j = (x_52 + 1); + j = as_type((as_type(x_52) + as_type(1))); } } j_1 = 0; @@ -73,10 +73,10 @@ void main_1(thread float4* const tint_symbol_4) { } int const x_61 = j_1; float3 const x_64 = func_(); - data.arr[((4 * x_61) + 1)] = x_64; + data.arr[as_type((as_type(as_type((as_type(4) * as_type(x_61)))) + as_type(1)))] = x_64; { int const x_66 = j_1; - j_1 = (x_66 + 1); + j_1 = as_type((as_type(x_66) + as_type(1))); } } float3 const x_69 = data.arr[0]; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl index d81e3ea915..ab1a1a43a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.spvasm.expected.msl @@ -50,7 +50,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy f = (fabs((-(x_47) * x_49)) + x_53); { int const x_55 = i; - i = (x_55 + 1); + i = as_type((as_type(x_55) + as_type(1))); } } float const x_57 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl index d81e3ea915..ab1a1a43a9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-abs-multiply-offset/0-opt.wgsl.expected.msl @@ -50,7 +50,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy f = (fabs((-(x_47) * x_49)) + x_53); { int const x_55 = i; - i = (x_55 + 1); + i = as_type((as_type(x_55) + as_type(1))); } } float const x_57 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl index a1922a94d6..4836c63bc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.spvasm.expected.msl @@ -30,10 +30,10 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } } int const x_45 = a; - a = (x_45 + 1); + a = as_type((as_type(x_45) + as_type(1))); { int const x_47 = i; - i = (x_47 + 1); + i = as_type((as_type(x_47) + as_type(1))); } } int const x_49 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl index a1922a94d6..4836c63bc9 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-break-floor-nan-never-executed/0-opt.wgsl.expected.msl @@ -30,10 +30,10 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } } int const x_45 = a; - a = (x_45 + 1); + a = as_type((as_type(x_45) + as_type(1))); { int const x_47 = i; - i = (x_47 + 1); + i = as_type((as_type(x_47) + as_type(1))); } } int const x_49 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl index df997cd2c6..e902978e40 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.spvasm.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb f = ((1.0f - clamp(x_55, 1.0f, x_56)) + float(x_59)); { int const x_62 = i; - i = (x_62 + 1); + i = as_type((as_type(x_62) + as_type(1))); } } float const x_64 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl index df997cd2c6..e902978e40 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-clamp-to-one-empty-condition/0-opt.wgsl.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb f = ((1.0f - clamp(x_55, 1.0f, x_56)) + float(x_59)); { int const x_62 = i; - i = (x_62 + 1); + i = as_type((as_type(x_62) + as_type(1))); } } float const x_64 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl index 49fff4f376..03f75a76e6 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl @@ -52,9 +52,9 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_55 = index; int const x_56_save = x_55; int const x_57 = arr.arr[x_56_save]; - arr.arr[x_56_save] = (x_57 + 1); + arr.arr[x_56_save] = as_type((as_type(x_57) + as_type(1))); int const x_59 = index; - index = (x_59 + 1); + index = as_type((as_type(x_59) + as_type(1))); } int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = arr.arr[x_62]; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl index 028ec7e42a..f10a979d5c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.wgsl.expected.msl @@ -52,9 +52,9 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5) { int const x_55 = index; int const x_56_save = x_55; int const x_57 = arr.arr[x_56_save]; - arr.arr[x_56_save] = (x_57 + 1); + arr.arr[x_56_save] = as_type((as_type(x_57) + as_type(1))); int const x_59 = index; - index = (x_59 + 1); + index = as_type((as_type(x_59) + as_type(1))); } int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_64 = arr.arr[x_62]; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl index 70485b36b3..10f8c7033e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.spvasm.expected.msl @@ -62,7 +62,7 @@ void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_s a = (x_64 / x_65); { int const x_67 = i; - i = (x_67 + 1); + i = as_type((as_type(x_67) + as_type(1))); } } float const x_69 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl index 70485b36b3..10f8c7033e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-dfdx-constant-divide/0-opt.wgsl.expected.msl @@ -62,7 +62,7 @@ void main_1(constant buf0& x_6, constant buf1& x_11, thread float4* const tint_s a = (x_64 / x_65); { int const x_67 = i; - i = (x_67 + 1); + i = as_type((as_type(x_67) + as_type(1))); } } float const x_69 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl index 5bef25a11f..1c8b0d4929 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl @@ -64,7 +64,7 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s } { int const x_85 = i; - i = (x_85 + 1); + i = as_type((as_type(x_85) + as_type(1))); } } float2x3 const x_87 = m23; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl index 6b34014f16..a488355a59 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.wgsl.expected.msl @@ -64,7 +64,7 @@ void main_1(constant buf1& x_7, constant buf0& x_10, thread float4* const tint_s } { int const x_85 = i; - i = (x_85 + 1); + i = as_type((as_type(x_85) + as_type(1))); } } float2x3 const x_87 = m23; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl index 20ea6374ba..df166232f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.spvasm.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; if ((x_35 == x_37)) { int const x_42 = a; - a = (x_42 + 1); + a = as_type((as_type(x_42) + as_type(1))); } else { int const x_44 = a; int const x_45 = i; @@ -42,7 +42,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_47 = i; - i = (x_47 + 1); + i = as_type((as_type(x_47) + as_type(1))); } } int const x_49 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl index 20ea6374ba..df166232f0 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-or-divide-by-loop-index/0-opt.wgsl.expected.msl @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_37 = x_6.x_GLF_uniform_int_values.arr[1].el; if ((x_35 == x_37)) { int const x_42 = a; - a = (x_42 + 1); + a = as_type((as_type(x_42) + as_type(1))); } else { int const x_44 = a; int const x_45 = i; @@ -42,7 +42,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_47 = i; - i = (x_47 + 1); + i = as_type((as_type(x_47) + as_type(1))); } } int const x_49 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl index 13329881b9..78ca106118 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -29,11 +34,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_33 = a; - a = ((x_33 / 2) - 1); + a = as_type((as_type((x_33 / 2)) - as_type(1))); } int const x_36 = a; int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; - if ((x_36 == -(x_38))) { + if ((x_36 == tint_unary_minus(x_38))) { int const x_45 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl index 13329881b9..78ca106118 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-integer-half-minus-one/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -29,11 +34,11 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { break; } int const x_33 = a; - a = ((x_33 / 2) - 1); + a = as_type((as_type((x_33 / 2)) - as_type(1))); } int const x_36 = a; int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el; - if ((x_36 == -(x_38))) { + if ((x_36 == tint_unary_minus(x_38))) { int const x_45 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_48 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_51 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl index 886f813f32..87ab4e75ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.spvasm.expected.msl @@ -44,7 +44,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* *(tint_symbol_5) = float4(x_56, x_56, x_56, x_56); while (true) { int const x_62 = *(tint_symbol_4); - *(tint_symbol_4) = (x_62 + 1); + *(tint_symbol_4) = as_type((as_type(x_62) + as_type(1))); if (false) { return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl index 886f813f32..87ab4e75ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-returns-behind-true-and-false/0-opt.wgsl.expected.msl @@ -44,7 +44,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* *(tint_symbol_5) = float4(x_56, x_56, x_56, x_56); while (true) { int const x_62 = *(tint_symbol_4); - *(tint_symbol_4) = (x_62 + 1); + *(tint_symbol_4) = as_type((as_type(x_62) + as_type(1))); if (false) { return; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl index ec7cae1ee1..a8ea0d5542 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.spvasm.expected.msl @@ -61,9 +61,9 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy arr.arr[x_63] = (x_65 + 1.0f); { int const x_68 = i; - i = (x_68 + 1); + i = as_type((as_type(x_68) + as_type(1))); int const x_70 = j; - j = (x_70 + 1); + j = as_type((as_type(x_70) + as_type(1))); } } float const x_73 = x_6.x_GLF_uniform_float_values.arr[0].el; @@ -88,7 +88,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } { int const x_101 = i; - i = (x_101 + 1); + i = as_type((as_type(x_101) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl index ec7cae1ee1..a8ea0d5542 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-with-two-integers/0-opt.wgsl.expected.msl @@ -61,9 +61,9 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy arr.arr[x_63] = (x_65 + 1.0f); { int const x_68 = i; - i = (x_68 + 1); + i = as_type((as_type(x_68) + as_type(1))); int const x_70 = j; - j = (x_70 + 1); + j = as_type((as_type(x_70) + as_type(1))); } } float const x_73 = x_6.x_GLF_uniform_float_values.arr[0].el; @@ -88,7 +88,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } { int const x_101 = i; - i = (x_101 + 1); + i = as_type((as_type(x_101) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl index e35af4fbb1..cd059fcf07 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.spvasm.expected.msl @@ -87,17 +87,17 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s } { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } } { int const x_115 = i; - i = (x_115 + 1); + i = as_type((as_type(x_115) + as_type(1))); } } { int const x_117 = a; - a = (x_117 + 1); + a = as_type((as_type(x_117) + as_type(1))); } } while (true) { @@ -121,7 +121,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s *(tint_symbol_6) = float4(x_142, x_142, x_142, x_142); { int const x_144 = i_1; - i_1 = (x_144 + 1); + i_1 = as_type((as_type(x_144) + as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl index e35af4fbb1..cd059fcf07 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-basic-block-for-for-for-less-than/0-opt.wgsl.expected.msl @@ -87,17 +87,17 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s } { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } } { int const x_115 = i; - i = (x_115 + 1); + i = as_type((as_type(x_115) + as_type(1))); } } { int const x_117 = a; - a = (x_117 + 1); + a = as_type((as_type(x_117) + as_type(1))); } } while (true) { @@ -121,7 +121,7 @@ void main_1(constant buf1& x_6, constant buf0& x_12, thread float4* const tint_s *(tint_symbol_6) = float4(x_142, x_142, x_142, x_142); { int const x_144 = i_1; - i_1 = (x_144 + 1); + i_1 = as_type((as_type(x_144) + as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl index efced0c880..9ddedab51b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.spvasm.expected.msl @@ -73,7 +73,7 @@ void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_s a = pow((((x_91 + x_93) + x_96) + x_99), x_102); { int const x_18 = i; - i = (x_18 + 1); + i = as_type((as_type(x_18) + as_type(1))); } } float const x_104 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl index efced0c880..9ddedab51b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machine-scheduler-for-if-pow/0-opt.wgsl.expected.msl @@ -73,7 +73,7 @@ void main_1(constant buf1& x_8, constant buf0& x_12, thread float4* const tint_s a = pow((((x_91 + x_93) + x_96) + x_99), x_102); { int const x_18 = i; - i = (x_18 + 1); + i = as_type((as_type(x_18) + as_type(1))); } } float const x_104 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl index 813f700c65..3afddf2f94 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.spvasm.expected.msl @@ -28,10 +28,10 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { break; } float const x_44 = x_7.injectionSwitch.y; - a = ((int(x_44) * 2) / 2); + a = (as_type((as_type(int(x_44)) * as_type(2))) / 2); { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_50 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl index 813f700c65..3afddf2f94 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-machinevaluetype-one-iter-loop/0-opt.wgsl.expected.msl @@ -28,10 +28,10 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { break; } float const x_44 = x_7.injectionSwitch.y; - a = ((int(x_44) * 2) / 2); + a = (as_type((as_type(int(x_44)) * as_type(2))) / 2); { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_50 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl index 5d2d058329..6c07995f4e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.spvasm.expected.msl @@ -61,7 +61,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } { int const x_91 = i; - i = (x_91 + 1); + i = as_type((as_type(x_91) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl index 5d2d058329..6c07995f4e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-conditions-break/0-opt.wgsl.expected.msl @@ -61,7 +61,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } { int const x_91 = i; - i = (x_91 + 1); + i = as_type((as_type(x_91) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl index f72fd0ab9b..19ebc96cec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.spvasm.expected.msl @@ -61,7 +61,7 @@ int func_i1_(constant buf0& x_8, thread int* const x) { } { int const x_112 = i; - i = (x_112 + 1); + i = as_type((as_type(x_112) + as_type(1))); } } int const x_115 = x_8.x_GLF_uniform_int_values.arr[0].el; @@ -80,7 +80,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { param_1 = x_42; int const x_43 = func_i1_(x_8, &(param_1)); int const x_44 = a_1; - a_1 = (x_44 + x_43); + a_1 = as_type((as_type(x_44) + as_type(x_43))); int const x_46 = a_1; int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el; if ((x_46 == x_48)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl index f72fd0ab9b..19ebc96cec 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-matching-if-always-true-inside-loop/0-opt.wgsl.expected.msl @@ -61,7 +61,7 @@ int func_i1_(constant buf0& x_8, thread int* const x) { } { int const x_112 = i; - i = (x_112 + 1); + i = as_type((as_type(x_112) + as_type(1))); } } int const x_115 = x_8.x_GLF_uniform_int_values.arr[0].el; @@ -80,7 +80,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5) { param_1 = x_42; int const x_43 = func_i1_(x_8, &(param_1)); int const x_44 = a_1; - a_1 = (x_44 + x_43); + a_1 = as_type((as_type(x_44) + as_type(x_43))); int const x_46 = a_1; int const x_48 = x_8.x_GLF_uniform_int_values.arr[2].el; if ((x_46 == x_48)) { diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl index 91c59aced0..b986b1eeb4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.spvasm.expected.msl @@ -37,7 +37,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { } else { S const x_60 = arr.arr[1]; param = x_60; - param_1 = (2 + as_type(x_50)); + param_1 = as_type((as_type(2) + as_type(as_type(x_50)))); int const x_61 = param_1; S const x_63 = param; S x_64_1 = x_63; @@ -55,13 +55,13 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { int const x_72 = param_1; S const x_75 = param; S x_76_1 = x_75; - x_76_1.b = (x_72 + 1); + x_76_1.b = as_type((as_type(x_72) + as_type(1))); S const x_76 = x_76_1; param = x_76; int const x_77 = param_1; S const x_80 = param; S x_81_1 = x_80; - x_81_1.c = (x_77 + 2); + x_81_1.c = as_type((as_type(x_77) + as_type(2))); S const x_81 = x_81_1; param = x_81; S const x_82 = param; @@ -75,7 +75,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { S const x_89 = param; S const x_91 = param; S const x_94 = param; - x_43 = ((x_89.a + x_91.b) + x_94.c); + x_43 = as_type((as_type(as_type((as_type(x_89.a) + as_type(x_91.b)))) + as_type(x_94.c))); int const x_97 = x_43; if ((x_97 == 12)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); @@ -105,9 +105,9 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) { (*(s)).a = 9; } int const x_109 = *(x); - (*(s)).b = (x_109 + 1); + (*(s)).b = as_type((as_type(x_109) + as_type(1))); int const x_112 = *(x); - (*(s)).c = (x_112 + 2); + (*(s)).c = as_type((as_type(x_112) + as_type(2))); int const x_115 = (*(s)).b; if ((x_115 == 2)) { (*(s)).b = 7; @@ -115,6 +115,6 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) { int const x_119 = (*(s)).a; int const x_120 = (*(s)).b; int const x_122 = (*(s)).c; - return ((x_119 + x_120) + x_122); + return as_type((as_type(as_type((as_type(x_119) + as_type(x_120)))) + as_type(x_122))); } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl index 91c59aced0..b986b1eeb4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-mem-pass-sum-struct-members/0-opt.wgsl.expected.msl @@ -37,7 +37,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { } else { S const x_60 = arr.arr[1]; param = x_60; - param_1 = (2 + as_type(x_50)); + param_1 = as_type((as_type(2) + as_type(as_type(x_50)))); int const x_61 = param_1; S const x_63 = param; S x_64_1 = x_63; @@ -55,13 +55,13 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { int const x_72 = param_1; S const x_75 = param; S x_76_1 = x_75; - x_76_1.b = (x_72 + 1); + x_76_1.b = as_type((as_type(x_72) + as_type(1))); S const x_76 = x_76_1; param = x_76; int const x_77 = param_1; S const x_80 = param; S x_81_1 = x_80; - x_81_1.c = (x_77 + 2); + x_81_1.c = as_type((as_type(x_77) + as_type(2))); S const x_81 = x_81_1; param = x_81; S const x_82 = param; @@ -75,7 +75,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) { S const x_89 = param; S const x_91 = param; S const x_94 = param; - x_43 = ((x_89.a + x_91.b) + x_94.c); + x_43 = as_type((as_type(as_type((as_type(x_89.a) + as_type(x_91.b)))) + as_type(x_94.c))); int const x_97 = x_43; if ((x_97 == 12)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); @@ -105,9 +105,9 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) { (*(s)).a = 9; } int const x_109 = *(x); - (*(s)).b = (x_109 + 1); + (*(s)).b = as_type((as_type(x_109) + as_type(1))); int const x_112 = *(x); - (*(s)).c = (x_112 + 2); + (*(s)).c = as_type((as_type(x_112) + as_type(2))); int const x_115 = (*(s)).b; if ((x_115 == 2)) { (*(s)).b = 7; @@ -115,6 +115,6 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) { int const x_119 = (*(s)).a; int const x_120 = (*(s)).b; int const x_122 = (*(s)).c; - return ((x_119 + x_120) + x_122); + return as_type((as_type(as_type((as_type(x_119) + as_type(x_120)))) + as_type(x_122))); } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl index 0ab9beb3aa..0b412c205c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.spvasm.expected.msl @@ -334,7 +334,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) } while (true) { int const x_371 = *(tint_symbol_4); - *(tint_symbol_4) = (x_371 + 1); + *(tint_symbol_4) = as_type((as_type(x_371) + as_type(1))); { int const x_373 = *(tint_symbol_4); if ((x_373 < 98)) { @@ -369,192 +369,192 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) m44[x_396][x_397] = 1.0f; { int const x_399 = i_37; - i_37 = (x_399 + 1); + i_37 = as_type((as_type(x_399) + as_type(1))); } } { int const x_401 = i_36; - i_36 = (x_401 + 1); + i_36 = as_type((as_type(x_401) + as_type(1))); } } { int const x_403 = i_35; - i_35 = (x_403 + 1); + i_35 = as_type((as_type(x_403) + as_type(1))); } } { int const x_405 = i_34; - i_34 = (x_405 + 1); + i_34 = as_type((as_type(x_405) + as_type(1))); } } { int const x_407 = i_33; - i_33 = (x_407 + 1); + i_33 = as_type((as_type(x_407) + as_type(1))); } } { int const x_409 = i_32; - i_32 = (x_409 + 1); + i_32 = as_type((as_type(x_409) + as_type(1))); } } { int const x_411 = i_31; - i_31 = (x_411 + 1); + i_31 = as_type((as_type(x_411) + as_type(1))); } } { int const x_413 = i_30; - i_30 = (x_413 + 1); + i_30 = as_type((as_type(x_413) + as_type(1))); } } { int const x_415 = i_29; - i_29 = (x_415 + 1); + i_29 = as_type((as_type(x_415) + as_type(1))); } } { int const x_417 = i_28; - i_28 = (x_417 + 1); + i_28 = as_type((as_type(x_417) + as_type(1))); } } { int const x_419 = i_27; - i_27 = (x_419 + 1); + i_27 = as_type((as_type(x_419) + as_type(1))); } } { int const x_421 = i_26; - i_26 = (x_421 + 1); + i_26 = as_type((as_type(x_421) + as_type(1))); } } { int const x_423 = i_25; - i_25 = (x_423 + 1); + i_25 = as_type((as_type(x_423) + as_type(1))); } } { int const x_425 = i_24; - i_24 = (x_425 + 1); + i_24 = as_type((as_type(x_425) + as_type(1))); } } { int const x_427 = i_23; - i_23 = (x_427 + 1); + i_23 = as_type((as_type(x_427) + as_type(1))); } } { int const x_429 = i_22; - i_22 = (x_429 + 1); + i_22 = as_type((as_type(x_429) + as_type(1))); } } { int const x_431 = i_21; - i_21 = (x_431 + 1); + i_21 = as_type((as_type(x_431) + as_type(1))); } } { int const x_433 = i_20; - i_20 = (x_433 + 1); + i_20 = as_type((as_type(x_433) + as_type(1))); } } { int const x_435 = i_19; - i_19 = (x_435 + 1); + i_19 = as_type((as_type(x_435) + as_type(1))); } } { int const x_437 = i_18; - i_18 = (x_437 + 1); + i_18 = as_type((as_type(x_437) + as_type(1))); } } { int const x_439 = i_17; - i_17 = (x_439 + 1); + i_17 = as_type((as_type(x_439) + as_type(1))); } } { int const x_441 = i_16; - i_16 = (x_441 + 1); + i_16 = as_type((as_type(x_441) + as_type(1))); } } { int const x_443 = i_15; - i_15 = (x_443 + 1); + i_15 = as_type((as_type(x_443) + as_type(1))); } } { int const x_445 = i_14; - i_14 = (x_445 + 1); + i_14 = as_type((as_type(x_445) + as_type(1))); } } { int const x_447 = i_13; - i_13 = (x_447 + 1); + i_13 = as_type((as_type(x_447) + as_type(1))); } } { int const x_449 = i_12; - i_12 = (x_449 + 1); + i_12 = as_type((as_type(x_449) + as_type(1))); } } { int const x_451 = i_11; - i_11 = (x_451 + 1); + i_11 = as_type((as_type(x_451) + as_type(1))); } } { int const x_453 = i_10; - i_10 = (x_453 + 1); + i_10 = as_type((as_type(x_453) + as_type(1))); } } { int const x_455 = i_9; - i_9 = (x_455 + 1); + i_9 = as_type((as_type(x_455) + as_type(1))); } } { int const x_457 = i_8; - i_8 = (x_457 + 1); + i_8 = as_type((as_type(x_457) + as_type(1))); } } { int const x_459 = i_7; - i_7 = (x_459 + 1); + i_7 = as_type((as_type(x_459) + as_type(1))); } } { int const x_461 = i_6; - i_6 = (x_461 + 1); + i_6 = as_type((as_type(x_461) + as_type(1))); } } { int const x_463 = i_5; - i_5 = (x_463 + 1); + i_5 = as_type((as_type(x_463) + as_type(1))); } } { int const x_465 = i_4; - i_4 = (x_465 + 1); + i_4 = as_type((as_type(x_465) + as_type(1))); } } { int const x_467 = i_3; - i_3 = (x_467 + 1); + i_3 = as_type((as_type(x_467) + as_type(1))); } } { int const x_469 = i_2; - i_2 = (x_469 + 1); + i_2 = as_type((as_type(x_469) + as_type(1))); } } { int const x_471 = i_1; - i_1 = (x_471 + 1); + i_1 = as_type((as_type(x_471) + as_type(1))); } } { int const x_473 = i; - i = (x_473 + 1); + i = as_type((as_type(x_473) + as_type(1))); } } sum = 0.0f; @@ -566,7 +566,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) break; } int const x_482 = *(tint_symbol_4); - *(tint_symbol_4) = (x_482 + 1); + *(tint_symbol_4) = as_type((as_type(x_482) + as_type(1))); int const x_484 = r; float const x_486 = m23[0][x_484]; float const x_487 = sum; @@ -601,7 +601,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) sum = (x_522 + x_521); { int const x_524 = r; - r = (x_524 + 1); + r = as_type((as_type(x_524) + as_type(1))); } } float const x_526 = sum; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl index 0ab9beb3aa..0b412c205c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-multiple-one-iteration-loops-global-counter-write-matrices/0-opt.wgsl.expected.msl @@ -334,7 +334,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) } while (true) { int const x_371 = *(tint_symbol_4); - *(tint_symbol_4) = (x_371 + 1); + *(tint_symbol_4) = as_type((as_type(x_371) + as_type(1))); { int const x_373 = *(tint_symbol_4); if ((x_373 < 98)) { @@ -369,192 +369,192 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) m44[x_396][x_397] = 1.0f; { int const x_399 = i_37; - i_37 = (x_399 + 1); + i_37 = as_type((as_type(x_399) + as_type(1))); } } { int const x_401 = i_36; - i_36 = (x_401 + 1); + i_36 = as_type((as_type(x_401) + as_type(1))); } } { int const x_403 = i_35; - i_35 = (x_403 + 1); + i_35 = as_type((as_type(x_403) + as_type(1))); } } { int const x_405 = i_34; - i_34 = (x_405 + 1); + i_34 = as_type((as_type(x_405) + as_type(1))); } } { int const x_407 = i_33; - i_33 = (x_407 + 1); + i_33 = as_type((as_type(x_407) + as_type(1))); } } { int const x_409 = i_32; - i_32 = (x_409 + 1); + i_32 = as_type((as_type(x_409) + as_type(1))); } } { int const x_411 = i_31; - i_31 = (x_411 + 1); + i_31 = as_type((as_type(x_411) + as_type(1))); } } { int const x_413 = i_30; - i_30 = (x_413 + 1); + i_30 = as_type((as_type(x_413) + as_type(1))); } } { int const x_415 = i_29; - i_29 = (x_415 + 1); + i_29 = as_type((as_type(x_415) + as_type(1))); } } { int const x_417 = i_28; - i_28 = (x_417 + 1); + i_28 = as_type((as_type(x_417) + as_type(1))); } } { int const x_419 = i_27; - i_27 = (x_419 + 1); + i_27 = as_type((as_type(x_419) + as_type(1))); } } { int const x_421 = i_26; - i_26 = (x_421 + 1); + i_26 = as_type((as_type(x_421) + as_type(1))); } } { int const x_423 = i_25; - i_25 = (x_423 + 1); + i_25 = as_type((as_type(x_423) + as_type(1))); } } { int const x_425 = i_24; - i_24 = (x_425 + 1); + i_24 = as_type((as_type(x_425) + as_type(1))); } } { int const x_427 = i_23; - i_23 = (x_427 + 1); + i_23 = as_type((as_type(x_427) + as_type(1))); } } { int const x_429 = i_22; - i_22 = (x_429 + 1); + i_22 = as_type((as_type(x_429) + as_type(1))); } } { int const x_431 = i_21; - i_21 = (x_431 + 1); + i_21 = as_type((as_type(x_431) + as_type(1))); } } { int const x_433 = i_20; - i_20 = (x_433 + 1); + i_20 = as_type((as_type(x_433) + as_type(1))); } } { int const x_435 = i_19; - i_19 = (x_435 + 1); + i_19 = as_type((as_type(x_435) + as_type(1))); } } { int const x_437 = i_18; - i_18 = (x_437 + 1); + i_18 = as_type((as_type(x_437) + as_type(1))); } } { int const x_439 = i_17; - i_17 = (x_439 + 1); + i_17 = as_type((as_type(x_439) + as_type(1))); } } { int const x_441 = i_16; - i_16 = (x_441 + 1); + i_16 = as_type((as_type(x_441) + as_type(1))); } } { int const x_443 = i_15; - i_15 = (x_443 + 1); + i_15 = as_type((as_type(x_443) + as_type(1))); } } { int const x_445 = i_14; - i_14 = (x_445 + 1); + i_14 = as_type((as_type(x_445) + as_type(1))); } } { int const x_447 = i_13; - i_13 = (x_447 + 1); + i_13 = as_type((as_type(x_447) + as_type(1))); } } { int const x_449 = i_12; - i_12 = (x_449 + 1); + i_12 = as_type((as_type(x_449) + as_type(1))); } } { int const x_451 = i_11; - i_11 = (x_451 + 1); + i_11 = as_type((as_type(x_451) + as_type(1))); } } { int const x_453 = i_10; - i_10 = (x_453 + 1); + i_10 = as_type((as_type(x_453) + as_type(1))); } } { int const x_455 = i_9; - i_9 = (x_455 + 1); + i_9 = as_type((as_type(x_455) + as_type(1))); } } { int const x_457 = i_8; - i_8 = (x_457 + 1); + i_8 = as_type((as_type(x_457) + as_type(1))); } } { int const x_459 = i_7; - i_7 = (x_459 + 1); + i_7 = as_type((as_type(x_459) + as_type(1))); } } { int const x_461 = i_6; - i_6 = (x_461 + 1); + i_6 = as_type((as_type(x_461) + as_type(1))); } } { int const x_463 = i_5; - i_5 = (x_463 + 1); + i_5 = as_type((as_type(x_463) + as_type(1))); } } { int const x_465 = i_4; - i_4 = (x_465 + 1); + i_4 = as_type((as_type(x_465) + as_type(1))); } } { int const x_467 = i_3; - i_3 = (x_467 + 1); + i_3 = as_type((as_type(x_467) + as_type(1))); } } { int const x_469 = i_2; - i_2 = (x_469 + 1); + i_2 = as_type((as_type(x_469) + as_type(1))); } } { int const x_471 = i_1; - i_1 = (x_471 + 1); + i_1 = as_type((as_type(x_471) + as_type(1))); } } { int const x_473 = i; - i = (x_473 + 1); + i = as_type((as_type(x_473) + as_type(1))); } } sum = 0.0f; @@ -566,7 +566,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) break; } int const x_482 = *(tint_symbol_4); - *(tint_symbol_4) = (x_482 + 1); + *(tint_symbol_4) = as_type((as_type(x_482) + as_type(1))); int const x_484 = r; float const x_486 = m23[0][x_484]; float const x_487 = sum; @@ -601,7 +601,7 @@ void main_1(thread int* const tint_symbol_4, thread float4* const tint_symbol_5) sum = (x_522 + x_521); { int const x_524 = r; - r = (x_524 + 1); + r = as_type((as_type(x_524) + as_type(1))); } } float const x_526 = sum; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl index 1a1463be35..86c77f20db 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl @@ -75,7 +75,7 @@ void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, th float const x_160 = (*(tint_symbol_5))[x_155][x_156]; (*(tint_symbol_5))[x_155][x_156] = (x_160 + x_158); int const x_163 = i; - i = (x_163 + 1); + i = as_type((as_type(x_163) + as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl index 5cd7a35c95..cc84cc2d73 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.wgsl.expected.msl @@ -75,7 +75,7 @@ void func0_i1_(constant buf2& x_10, constant buf0& x_12, thread int* const x, th float const x_160 = (*(tint_symbol_5))[x_155][x_156]; (*(tint_symbol_5))[x_155][x_156] = (x_160 + x_158); int const x_163 = i; - i = (x_163 + 1); + i = as_type((as_type(x_163) + as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl index ecc0d68b4e..70bd67b6f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.spvasm.expected.msl @@ -73,12 +73,12 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s } { int const x_96 = c; - c = (x_96 + 1); + c = as_type((as_type(x_96) + as_type(1))); } } { int const x_98 = a; - a = (x_98 + 1); + a = as_type((as_type(x_98) + as_type(1))); } } float const x_101 = v1.x; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl index ecc0d68b4e..70bd67b6f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loop-undefined-smoothstep-never-executed/0-opt.wgsl.expected.msl @@ -73,12 +73,12 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s } { int const x_96 = c; - c = (x_96 + 1); + c = as_type((as_type(x_96) + as_type(1))); } } { int const x_98 = a; - a = (x_98 + 1); + a = as_type((as_type(x_98) + as_type(1))); } } float const x_101 = v1.x; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl index a589c96bb8..a1f4edb023 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.spvasm.expected.msl @@ -187,11 +187,11 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb } while (true) { int const x_223 = *(tint_symbol_4); - *(tint_symbol_4) = (x_223 + 1); + *(tint_symbol_4) = as_type((as_type(x_223) + as_type(1))); { int const x_225 = *(tint_symbol_4); int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el; - if ((x_225 < (100 - x_227))) { + if ((x_225 < as_type((as_type(100) - as_type(x_227))))) { } else { break; } @@ -202,77 +202,77 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb f = (x_232 + x_231); { int const x_234 = i_14; - i_14 = (x_234 + 1); + i_14 = as_type((as_type(x_234) + as_type(1))); } } { int const x_236 = i_13; - i_13 = (x_236 + 1); + i_13 = as_type((as_type(x_236) + as_type(1))); } } { int const x_238 = i_12; - i_12 = (x_238 + 1); + i_12 = as_type((as_type(x_238) + as_type(1))); } } { int const x_240 = i_11; - i_11 = (x_240 + 1); + i_11 = as_type((as_type(x_240) + as_type(1))); } } { int const x_242 = i_10; - i_10 = (x_242 + 1); + i_10 = as_type((as_type(x_242) + as_type(1))); } } { int const x_244 = i_9; - i_9 = (x_244 + 1); + i_9 = as_type((as_type(x_244) + as_type(1))); } } { int const x_246 = i_8; - i_8 = (x_246 + 1); + i_8 = as_type((as_type(x_246) + as_type(1))); } } { int const x_248 = i_7; - i_7 = (x_248 + 1); + i_7 = as_type((as_type(x_248) + as_type(1))); } } { int const x_250 = i_6; - i_6 = (x_250 + 1); + i_6 = as_type((as_type(x_250) + as_type(1))); } } { int const x_252 = i_5; - i_5 = (x_252 + 1); + i_5 = as_type((as_type(x_252) + as_type(1))); } } { int const x_254 = i_4; - i_4 = (x_254 + 1); + i_4 = as_type((as_type(x_254) + as_type(1))); } } { int const x_256 = i_3; - i_3 = (x_256 + 1); + i_3 = as_type((as_type(x_256) + as_type(1))); } } { int const x_258 = i_2; - i_2 = (x_258 + 1); + i_2 = as_type((as_type(x_258) + as_type(1))); } } { int const x_260 = i_1; - i_1 = (x_260 + 1); + i_1 = as_type((as_type(x_260) + as_type(1))); } } { int const x_262 = i; - i = (x_262 + 1); + i = as_type((as_type(x_262) + as_type(1))); } } float const x_265 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -286,13 +286,13 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb break; } int const x_275 = *(tint_symbol_4); - *(tint_symbol_4) = (x_275 + 1); + *(tint_symbol_4) = as_type((as_type(x_275) + as_type(1))); float const x_277 = f; float const x_278 = sum; sum = (x_278 + x_277); { int const x_280 = r; - r = (x_280 + 1); + r = as_type((as_type(x_280) + as_type(1))); } } float const x_282 = sum; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl index a589c96bb8..a1f4edb023 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-loops-global-loop-counter-do-while-accumulate-float/0-opt.wgsl.expected.msl @@ -187,11 +187,11 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb } while (true) { int const x_223 = *(tint_symbol_4); - *(tint_symbol_4) = (x_223 + 1); + *(tint_symbol_4) = as_type((as_type(x_223) + as_type(1))); { int const x_225 = *(tint_symbol_4); int const x_227 = x_10.x_GLF_uniform_int_values.arr[3].el; - if ((x_225 < (100 - x_227))) { + if ((x_225 < as_type((as_type(100) - as_type(x_227))))) { } else { break; } @@ -202,77 +202,77 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb f = (x_232 + x_231); { int const x_234 = i_14; - i_14 = (x_234 + 1); + i_14 = as_type((as_type(x_234) + as_type(1))); } } { int const x_236 = i_13; - i_13 = (x_236 + 1); + i_13 = as_type((as_type(x_236) + as_type(1))); } } { int const x_238 = i_12; - i_12 = (x_238 + 1); + i_12 = as_type((as_type(x_238) + as_type(1))); } } { int const x_240 = i_11; - i_11 = (x_240 + 1); + i_11 = as_type((as_type(x_240) + as_type(1))); } } { int const x_242 = i_10; - i_10 = (x_242 + 1); + i_10 = as_type((as_type(x_242) + as_type(1))); } } { int const x_244 = i_9; - i_9 = (x_244 + 1); + i_9 = as_type((as_type(x_244) + as_type(1))); } } { int const x_246 = i_8; - i_8 = (x_246 + 1); + i_8 = as_type((as_type(x_246) + as_type(1))); } } { int const x_248 = i_7; - i_7 = (x_248 + 1); + i_7 = as_type((as_type(x_248) + as_type(1))); } } { int const x_250 = i_6; - i_6 = (x_250 + 1); + i_6 = as_type((as_type(x_250) + as_type(1))); } } { int const x_252 = i_5; - i_5 = (x_252 + 1); + i_5 = as_type((as_type(x_252) + as_type(1))); } } { int const x_254 = i_4; - i_4 = (x_254 + 1); + i_4 = as_type((as_type(x_254) + as_type(1))); } } { int const x_256 = i_3; - i_3 = (x_256 + 1); + i_3 = as_type((as_type(x_256) + as_type(1))); } } { int const x_258 = i_2; - i_2 = (x_258 + 1); + i_2 = as_type((as_type(x_258) + as_type(1))); } } { int const x_260 = i_1; - i_1 = (x_260 + 1); + i_1 = as_type((as_type(x_260) + as_type(1))); } } { int const x_262 = i; - i = (x_262 + 1); + i = as_type((as_type(x_262) + as_type(1))); } } float const x_265 = x_7.x_GLF_uniform_float_values.arr[1].el; @@ -286,13 +286,13 @@ void main_1(constant buf0& x_7, constant buf1& x_10, thread int* const tint_symb break; } int const x_275 = *(tint_symbol_4); - *(tint_symbol_4) = (x_275 + 1); + *(tint_symbol_4) = as_type((as_type(x_275) + as_type(1))); float const x_277 = f; float const x_278 = sum; sum = (x_278 + x_277); { int const x_280 = r; - r = (x_280 + 1); + r = as_type((as_type(x_280) + as_type(1))); } } float const x_282 = sum; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl index 5993503ba7..f1c678f068 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.spvasm.expected.msl @@ -79,17 +79,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { } int const x_134 = i; int const x_135 = a; - a = (x_135 - 1); + a = as_type((as_type(x_135) - as_type(1))); A.arr[x_134] = x_135; int const x_138 = i; int const x_140 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_142 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_144 = i; int const x_146 = x_6.x_GLF_uniform_int_values.arr[3].el; - A.arr[clamp(x_138, x_140, x_142)] = (x_144 + x_146); + A.arr[clamp(x_138, x_140, x_142)] = as_type((as_type(x_144) + as_type(x_146))); { int const x_149 = i; - i = (x_149 + 1); + i = as_type((as_type(x_149) + as_type(1))); } } ok = true; @@ -111,7 +111,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { } { int const x_171 = i_1; - i_1 = (x_171 + 1); + i_1 = as_type((as_type(x_171) + as_type(1))); } } int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl index 5993503ba7..f1c678f068 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-array-access/0-opt.wgsl.expected.msl @@ -79,17 +79,17 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { } int const x_134 = i; int const x_135 = a; - a = (x_135 - 1); + a = as_type((as_type(x_135) - as_type(1))); A.arr[x_134] = x_135; int const x_138 = i; int const x_140 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_142 = x_6.x_GLF_uniform_int_values.arr[18].el; int const x_144 = i; int const x_146 = x_6.x_GLF_uniform_int_values.arr[3].el; - A.arr[clamp(x_138, x_140, x_142)] = (x_144 + x_146); + A.arr[clamp(x_138, x_140, x_142)] = as_type((as_type(x_144) + as_type(x_146))); { int const x_149 = i; - i = (x_149 + 1); + i = as_type((as_type(x_149) + as_type(1))); } } ok = true; @@ -111,7 +111,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6) { } { int const x_171 = i_1; - i_1 = (x_171 + 1); + i_1 = as_type((as_type(x_171) + as_type(1))); } } int const x_174 = x_6.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl index f8f8420d41..7cdef232fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.spvasm.expected.msl @@ -70,7 +70,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy v1 = x_88; { int const x_89 = i; - i = (x_89 + 1); + i = as_type((as_type(x_89) + as_type(1))); } } float4 const x_91 = v1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl index f8f8420d41..7cdef232fa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-nir-opt-large-constants-for-clamp-vector-access/0-opt.wgsl.expected.msl @@ -70,7 +70,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy v1 = x_88; { int const x_89 = i; - i = (x_89 + 1); + i = as_type((as_type(x_89) + as_type(1))); } } float4 const x_91 = v1; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl index b6ec84f009..856f1d979a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.spvasm.expected.msl @@ -55,7 +55,7 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s a = (x_71 + x_70); { int const x_73 = c; - c = (x_73 + 1); + c = as_type((as_type(x_73) + as_type(1))); } } float const x_75 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl index b6ec84f009..856f1d979a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-not-clamp-matrix-access/0-opt.wgsl.expected.msl @@ -55,7 +55,7 @@ void main_1(constant buf0& x_6, constant buf1& x_10, thread float4* const tint_s a = (x_71 + x_70); { int const x_73 = c; - c = (x_73 + 1); + c = as_type((as_type(x_73) + as_type(1))); } } float const x_75 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl index e1218a1f2a..589b4c6f87 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.spvasm.expected.msl @@ -76,12 +76,12 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s } { int const x_83 = j; - j = (x_83 + 1); + j = as_type((as_type(x_83) + as_type(1))); } } { int const x_85 = i; - i = (x_85 + 1); + i = as_type((as_type(x_85) + as_type(1))); } } int const x_87 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl index e1218a1f2a..589b4c6f87 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for-for-do-while-if-if/0-opt.wgsl.expected.msl @@ -76,12 +76,12 @@ void main_1(constant buf1& x_7, constant buf0& x_11, thread float4* const tint_s } { int const x_83 = j; - j = (x_83 + 1); + j = as_type((as_type(x_83) + as_type(1))); } } { int const x_85 = i; - i = (x_85 + 1); + i = as_type((as_type(x_85) + as_type(1))); } } int const x_87 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl index 8d410b0559..15bee7e923 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.spvasm.expected.msl @@ -154,59 +154,59 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } { int const x_57 = i_10; - i_10 = (x_57 + 1); + i_10 = as_type((as_type(x_57) + as_type(1))); } } { int const x_59 = i_9; - i_9 = (x_59 + 1); + i_9 = as_type((as_type(x_59) + as_type(1))); } } { int const x_61 = i_8; - i_8 = (x_61 + 1); + i_8 = as_type((as_type(x_61) + as_type(1))); } } { int const x_63 = i_7; - i_7 = (x_63 + 1); + i_7 = as_type((as_type(x_63) + as_type(1))); } } { int const x_65 = i_6; - i_6 = (x_65 + 1); + i_6 = as_type((as_type(x_65) + as_type(1))); } } { int const x_67 = i_5; - i_5 = (x_67 + 1); + i_5 = as_type((as_type(x_67) + as_type(1))); } } { int const x_69 = i_4; - i_4 = (x_69 + 1); + i_4 = as_type((as_type(x_69) + as_type(1))); } } { int const x_71 = i_3; - i_3 = (x_71 + 1); + i_3 = as_type((as_type(x_71) + as_type(1))); } } { int const x_73 = i_2; - i_2 = (x_73 + 1); + i_2 = as_type((as_type(x_73) + as_type(1))); } } { int const x_75 = i_1; - i_1 = (x_75 + 1); + i_1 = as_type((as_type(x_75) + as_type(1))); } } float const x_204 = b; b = (x_204 + 1.0f); { int const x_77 = i; - i = (x_77 + 1); + i = as_type((as_type(x_77) + as_type(1))); } } float const x_206 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl index 8d410b0559..15bee7e923 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-optimize-phis-for/0-opt.wgsl.expected.msl @@ -154,59 +154,59 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } { int const x_57 = i_10; - i_10 = (x_57 + 1); + i_10 = as_type((as_type(x_57) + as_type(1))); } } { int const x_59 = i_9; - i_9 = (x_59 + 1); + i_9 = as_type((as_type(x_59) + as_type(1))); } } { int const x_61 = i_8; - i_8 = (x_61 + 1); + i_8 = as_type((as_type(x_61) + as_type(1))); } } { int const x_63 = i_7; - i_7 = (x_63 + 1); + i_7 = as_type((as_type(x_63) + as_type(1))); } } { int const x_65 = i_6; - i_6 = (x_65 + 1); + i_6 = as_type((as_type(x_65) + as_type(1))); } } { int const x_67 = i_5; - i_5 = (x_67 + 1); + i_5 = as_type((as_type(x_67) + as_type(1))); } } { int const x_69 = i_4; - i_4 = (x_69 + 1); + i_4 = as_type((as_type(x_69) + as_type(1))); } } { int const x_71 = i_3; - i_3 = (x_71 + 1); + i_3 = as_type((as_type(x_71) + as_type(1))); } } { int const x_73 = i_2; - i_2 = (x_73 + 1); + i_2 = as_type((as_type(x_73) + as_type(1))); } } { int const x_75 = i_1; - i_1 = (x_75 + 1); + i_1 = as_type((as_type(x_75) + as_type(1))); } } float const x_204 = b; b = (x_204 + 1.0f); { int const x_77 = i; - i = (x_77 + 1); + i = as_type((as_type(x_77) + as_type(1))); } } float const x_206 = b; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl index 301e8f0cfd..abd41b56aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.spvasm.expected.msl @@ -73,7 +73,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } { int const x_97 = i; - i = (x_97 + 1); + i = as_type((as_type(x_97) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl index 301e8f0cfd..abd41b56aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-peephole-optimizer-target-instr-info-for-if-if-if/0-opt.wgsl.expected.msl @@ -73,7 +73,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } { int const x_97 = i; - i = (x_97 + 1); + i = as_type((as_type(x_97) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl index a59c60d6d2..f75a9115d3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.spvasm.expected.msl @@ -66,12 +66,12 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy *(tint_symbol_6) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); { int const x_84 = j; - j = (x_84 + 1); + j = as_type((as_type(x_84) + as_type(1))); } } { int const x_86 = i; - i = (x_86 + 1); + i = as_type((as_type(x_86) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl index a59c60d6d2..f75a9115d3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-register-coalescer-live-intervals-target-instr-info-for-discard-for-discard/0-opt.wgsl.expected.msl @@ -66,12 +66,12 @@ void main_1(constant buf1& x_7, constant buf0& x_9, thread float4* const tint_sy *(tint_symbol_6) = float4(float(x_72), float(x_75), float(x_78), float(x_81)); { int const x_84 = j; - j = (x_84 + 1); + j = as_type((as_type(x_84) + as_type(1))); } } { int const x_86 = i; - i = (x_86 + 1); + i = as_type((as_type(x_86) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl index d580cda5e2..e9afb939bd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl @@ -51,15 +51,15 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_68 = i; int const x_70 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_72 = j; - m[x_66][x_67] = float(((x_68 * x_70) + x_72)); + m[x_66][x_67] = float(as_type((as_type(as_type((as_type(x_68) * as_type(x_70)))) + as_type(x_72)))); { int const x_76 = j; - j = (x_76 + 1); + j = as_type((as_type(x_76) + as_type(1))); } } { int const x_78 = i; - i = (x_78 + 1); + i = as_type((as_type(x_78) + as_type(1))); } } float2x2 const x_80 = m; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl index d6a3fcf7f0..c00aec3c1f 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.wgsl.expected.msl @@ -51,15 +51,15 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { int const x_68 = i; int const x_70 = x_5.x_GLF_uniform_int_values.arr[0].el; int const x_72 = j; - m[x_66][x_67] = float(((x_68 * x_70) + x_72)); + m[x_66][x_67] = float(as_type((as_type(as_type((as_type(x_68) * as_type(x_70)))) + as_type(x_72)))); { int const x_76 = j; - j = (x_76 + 1); + j = as_type((as_type(x_76) + as_type(1))); } } { int const x_78 = i; - i = (x_78 + 1); + i = as_type((as_type(x_78) + as_type(1))); } } float2x2 const x_80 = m; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl index fc2142783a..b86c0c80cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.spvasm.expected.msl @@ -22,7 +22,7 @@ int func_struct_S_i11_i1_(thread S* const s, thread int* const x) { if ((x_17 == 1)) { int const x_18 = *(x); int const x_19 = (*(s)).data; - return (x_18 + x_19); + return as_type((as_type(x_18) + as_type(x_19))); } else { int const x_21 = *(x); return x_21; @@ -45,7 +45,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { while (true) { int const x_23 = i; int const x_24 = x_11.one; - if ((x_23 < (5 + x_24))) { + if ((x_23 < as_type((as_type(5) + as_type(x_24))))) { } else { break; } @@ -70,7 +70,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { } { int const x_31 = i; - i = (x_31 + 1); + i = as_type((as_type(x_31) + as_type(1))); } } int const x_33 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl index fc2142783a..b86c0c80cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-replace-copy-object/0-opt.wgsl.expected.msl @@ -22,7 +22,7 @@ int func_struct_S_i11_i1_(thread S* const s, thread int* const x) { if ((x_17 == 1)) { int const x_18 = *(x); int const x_19 = (*(s)).data; - return (x_18 + x_19); + return as_type((as_type(x_18) + as_type(x_19))); } else { int const x_21 = *(x); return x_21; @@ -45,7 +45,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { while (true) { int const x_23 = i; int const x_24 = x_11.one; - if ((x_23 < (5 + x_24))) { + if ((x_23 < as_type((as_type(5) + as_type(x_24))))) { } else { break; } @@ -70,7 +70,7 @@ void main_1(constant buf0& x_11, thread float4* const tint_symbol_4) { } { int const x_31 = i; - i = (x_31 + 1); + i = as_type((as_type(x_31) + as_type(1))); } } int const x_33 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl index 4e920ba1a6..ab191bdbaf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.spvasm.expected.msl @@ -50,7 +50,7 @@ void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread } { int const x_58 = i; - i = (x_58 + 1); + i = as_type((as_type(x_58) + as_type(1))); } } float const x_61 = (*(tint_symbol_6)).y; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl index 4e920ba1a6..ab191bdbaf 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-return-after-first-iteration/0-opt.wgsl.expected.msl @@ -50,7 +50,7 @@ void main_1(constant buf1& x_7, constant buf0& x_9, constant buf2& x_11, thread } { int const x_58 = i; - i = (x_58 + 1); + i = as_type((as_type(x_58) + as_type(1))); } } float const x_61 = (*(tint_symbol_6)).y; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl index 14a2550238..c3f9b0065c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.spvasm.expected.msl @@ -147,52 +147,52 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy sums.arr[x_53] = (x_199 + x_197); { int const x_54 = j; - j = (x_54 - 1); + j = as_type((as_type(x_54) - as_type(1))); } } { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } { int const x_58 = h; - h = (x_58 + 1); + h = as_type((as_type(x_58) + as_type(1))); } } { int const x_60 = g; - g = (x_60 + 1); + g = as_type((as_type(x_60) + as_type(1))); } } { int const x_62 = f; - f = (x_62 + 1); + f = as_type((as_type(x_62) + as_type(1))); } } { int const x_64 = e; - e = (x_64 + 1); + e = as_type((as_type(x_64) + as_type(1))); } } { int const x_66 = d; - d = (x_66 + 1); + d = as_type((as_type(x_66) + as_type(1))); } } { int const x_68 = c; - c = (x_68 + 1); + c = as_type((as_type(x_68) + as_type(1))); } } { int const x_70 = b; - b = (x_70 + 1); + b = as_type((as_type(x_70) + as_type(1))); } } { int const x_72 = a; - a = (x_72 + 1); + a = as_type((as_type(x_72) + as_type(1))); } } int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl index 14a2550238..c3f9b0065c 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops-array-access/0-opt.wgsl.expected.msl @@ -147,52 +147,52 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy sums.arr[x_53] = (x_199 + x_197); { int const x_54 = j; - j = (x_54 - 1); + j = as_type((as_type(x_54) - as_type(1))); } } { int const x_56 = i; - i = (x_56 + 1); + i = as_type((as_type(x_56) + as_type(1))); } } { int const x_58 = h; - h = (x_58 + 1); + h = as_type((as_type(x_58) + as_type(1))); } } { int const x_60 = g; - g = (x_60 + 1); + g = as_type((as_type(x_60) + as_type(1))); } } { int const x_62 = f; - f = (x_62 + 1); + f = as_type((as_type(x_62) + as_type(1))); } } { int const x_64 = e; - e = (x_64 + 1); + e = as_type((as_type(x_64) + as_type(1))); } } { int const x_66 = d; - d = (x_66 + 1); + d = as_type((as_type(x_66) + as_type(1))); } } { int const x_68 = c; - c = (x_68 + 1); + c = as_type((as_type(x_68) + as_type(1))); } } { int const x_70 = b; - b = (x_70 + 1); + b = as_type((as_type(x_70) + as_type(1))); } } { int const x_72 = a; - a = (x_72 + 1); + a = as_type((as_type(x_72) + as_type(1))); } } int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl index 77cd3d14b7..1ef23cb010 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.spvasm.expected.msl @@ -52,7 +52,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_67 = i3; int const x_69 = x_7.one; - if ((x_67 < (x_69 + 2))) { + if ((x_67 < as_type((as_type(x_69) + as_type(2))))) { } else { break; } @@ -111,57 +111,57 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { break; } int const x_135 = a; - a = (x_135 + 1); + a = as_type((as_type(x_135) + as_type(1))); { int const x_137 = i9; - i9 = (x_137 + 1); + i9 = as_type((as_type(x_137) + as_type(1))); } } { int const x_139 = i8_1; - i8_1 = (x_139 + 1); + i8_1 = as_type((as_type(x_139) + as_type(1))); } } { int const x_141 = i7; - i7 = (x_141 + 1); + i7 = as_type((as_type(x_141) + as_type(1))); } } { int const x_143 = i6; - i6 = (x_143 + 1); + i6 = as_type((as_type(x_143) + as_type(1))); } } break; } { int const x_145 = i5; - i5 = (x_145 + 1); + i5 = as_type((as_type(x_145) + as_type(1))); } } { int const x_147 = i4; - i4 = (x_147 + 1); + i4 = as_type((as_type(x_147) + as_type(1))); } } { int const x_149 = i3; - i3 = (x_149 + 1); + i3 = as_type((as_type(x_149) + as_type(1))); } } { int const x_151 = i2; - i2 = (x_151 + 1); + i2 = as_type((as_type(x_151) + as_type(1))); } } { int const x_153 = i1; - i1 = (x_153 + 1); + i1 = as_type((as_type(x_153) + as_type(1))); } } { int const x_155 = i0; - i0 = (x_155 + 1); + i0 = as_type((as_type(x_155) + as_type(1))); } } int const x_157 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl index 77cd3d14b7..1ef23cb010 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-scaled-number-nested-loops/0-opt.wgsl.expected.msl @@ -52,7 +52,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_67 = i3; int const x_69 = x_7.one; - if ((x_67 < (x_69 + 2))) { + if ((x_67 < as_type((as_type(x_69) + as_type(2))))) { } else { break; } @@ -111,57 +111,57 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { break; } int const x_135 = a; - a = (x_135 + 1); + a = as_type((as_type(x_135) + as_type(1))); { int const x_137 = i9; - i9 = (x_137 + 1); + i9 = as_type((as_type(x_137) + as_type(1))); } } { int const x_139 = i8_1; - i8_1 = (x_139 + 1); + i8_1 = as_type((as_type(x_139) + as_type(1))); } } { int const x_141 = i7; - i7 = (x_141 + 1); + i7 = as_type((as_type(x_141) + as_type(1))); } } { int const x_143 = i6; - i6 = (x_143 + 1); + i6 = as_type((as_type(x_143) + as_type(1))); } } break; } { int const x_145 = i5; - i5 = (x_145 + 1); + i5 = as_type((as_type(x_145) + as_type(1))); } } { int const x_147 = i4; - i4 = (x_147 + 1); + i4 = as_type((as_type(x_147) + as_type(1))); } } { int const x_149 = i3; - i3 = (x_149 + 1); + i3 = as_type((as_type(x_149) + as_type(1))); } } { int const x_151 = i2; - i2 = (x_151 + 1); + i2 = as_type((as_type(x_151) + as_type(1))); } } { int const x_153 = i1; - i1 = (x_153 + 1); + i1 = as_type((as_type(x_153) + as_type(1))); } } { int const x_155 = i0; - i0 = (x_155 + 1); + i0 = as_type((as_type(x_155) + as_type(1))); } } int const x_157 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl index 99d436c731..f3cbdcf643 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { c = clamp(x_41, 0, 3); { int const x_43 = i; - i = (x_43 + 1); + i = as_type((as_type(x_43) + as_type(1))); } } int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl index 99d436c731..f3cbdcf643 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-selection-dag-inverse-clamp/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { c = clamp(x_41, 0, 3); { int const x_43 = i; - i = (x_43 + 1); + i = as_type((as_type(x_43) + as_type(1))); } } int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl index c5bf9c843c..a1a1c5a0b2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.spvasm.expected.msl @@ -65,9 +65,9 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } { - float const x_61 = float((x_38 + x_56)); + float const x_61 = float(as_type((as_type(x_38) + as_type(x_56)))); x_54 = float4(x_61, x_61, x_61, x_61); - x_57 = (x_56 + 1); + x_57 = as_type((as_type(x_56) + as_type(1))); x_53_phi = x_54; x_56_phi = x_57; } @@ -81,9 +81,9 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float4 const x_34 = x_34_phi; int const x_62 = x_62_phi; { - x_39 = (x_38 + 1); + x_39 = as_type((as_type(x_38) + as_type(1))); x_33_phi = x_34; - x_36_phi = as_type((x_36 + as_type(x_62))); + x_36_phi = as_type(as_type((as_type(x_36) + as_type(as_type(x_62))))); x_38_phi = x_39; } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl index c5bf9c843c..a1a1c5a0b2 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-set-output-color-function-call-nested-loop/0.wgsl.expected.msl @@ -65,9 +65,9 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { break; } { - float const x_61 = float((x_38 + x_56)); + float const x_61 = float(as_type((as_type(x_38) + as_type(x_56)))); x_54 = float4(x_61, x_61, x_61, x_61); - x_57 = (x_56 + 1); + x_57 = as_type((as_type(x_56) + as_type(1))); x_53_phi = x_54; x_56_phi = x_57; } @@ -81,9 +81,9 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_4) { float4 const x_34 = x_34_phi; int const x_62 = x_62_phi; { - x_39 = (x_38 + 1); + x_39 = as_type((as_type(x_38) + as_type(1))); x_33_phi = x_34; - x_36_phi = as_type((x_36 + as_type(x_62))); + x_36_phi = as_type(as_type((as_type(x_36) + as_type(as_type(x_62))))); x_38_phi = x_39; } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl index 5852dfa9bf..0163d7c7da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.spvasm.expected.msl @@ -19,7 +19,7 @@ struct tint_symbol_1 { int func_struct_S_i1_2_1_i1_(constant buf0& x_9, thread S* const s, thread int* const x) { int const x_16 = *(x); - (*(s)).arr.arr[1] = (x_16 + 1); + (*(s)).arr.arr[1] = as_type((as_type(x_16) + as_type(1))); int const x_18 = x_9.one; int const x_19 = (*(s)).arr.arr[x_18]; int const x_20 = *(x); @@ -42,7 +42,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { while (true) { int const x_22 = i; int const x_23 = x_9.one; - if ((x_22 < (2 + x_23))) { + if ((x_22 < as_type((as_type(2) + as_type(x_23))))) { } else { break; } @@ -50,7 +50,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { while (true) { int const x_25 = j; int const x_26 = x_9.one; - if ((x_25 < (3 + x_26))) { + if ((x_25 < as_type((as_type(3) + as_type(x_26))))) { } else { break; } @@ -58,18 +58,18 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { int const x_29 = j; S const x_79 = s_1; param = x_79; - param_1 = (x_28 + x_29); + param_1 = as_type((as_type(x_28) + as_type(x_29))); int const x_31 = func_struct_S_i1_2_1_i1_(x_9, &(param), &(param_1)); int const x_32 = a; - a = (x_32 + x_31); + a = as_type((as_type(x_32) + as_type(x_31))); { int const x_34 = j; - j = (x_34 + 1); + j = as_type((as_type(x_34) + as_type(1))); } } { int const x_36 = i; - i = (x_36 + 1); + i = as_type((as_type(x_36) + as_type(1))); } } int const x_38 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl index 5852dfa9bf..0163d7c7da 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-unused-struct/0-opt.wgsl.expected.msl @@ -19,7 +19,7 @@ struct tint_symbol_1 { int func_struct_S_i1_2_1_i1_(constant buf0& x_9, thread S* const s, thread int* const x) { int const x_16 = *(x); - (*(s)).arr.arr[1] = (x_16 + 1); + (*(s)).arr.arr[1] = as_type((as_type(x_16) + as_type(1))); int const x_18 = x_9.one; int const x_19 = (*(s)).arr.arr[x_18]; int const x_20 = *(x); @@ -42,7 +42,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { while (true) { int const x_22 = i; int const x_23 = x_9.one; - if ((x_22 < (2 + x_23))) { + if ((x_22 < as_type((as_type(2) + as_type(x_23))))) { } else { break; } @@ -50,7 +50,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { while (true) { int const x_25 = j; int const x_26 = x_9.one; - if ((x_25 < (3 + x_26))) { + if ((x_25 < as_type((as_type(3) + as_type(x_26))))) { } else { break; } @@ -58,18 +58,18 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { int const x_29 = j; S const x_79 = s_1; param = x_79; - param_1 = (x_28 + x_29); + param_1 = as_type((as_type(x_28) + as_type(x_29))); int const x_31 = func_struct_S_i1_2_1_i1_(x_9, &(param), &(param_1)); int const x_32 = a; - a = (x_32 + x_31); + a = as_type((as_type(x_32) + as_type(x_31))); { int const x_34 = j; - j = (x_34 + 1); + j = as_type((as_type(x_34) + as_type(1))); } } { int const x_36 = i; - i = (x_36 + 1); + i = as_type((as_type(x_36) + as_type(1))); } } int const x_38 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl index 5e8b3f948a..abf71b6c14 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.spvasm.expected.msl @@ -40,7 +40,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_55 = x_9.zero; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl index 5e8b3f948a..abf71b6c14 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplification-while-inside-for/0-opt.wgsl.expected.msl @@ -40,7 +40,7 @@ void main_1(constant buf0& x_6, constant buf1& x_9, thread float4* const tint_sy } { int const x_52 = i; - i = (x_52 + 1); + i = as_type((as_type(x_52) + as_type(1))); } } int const x_55 = x_9.zero; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl index beae1ddf4d..6e6d19827b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.spvasm.expected.msl @@ -20,7 +20,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_40 = i; int const x_42 = x_7.sequence.w; - if ((x_40 < (x_42 + 1))) { + if ((x_40 < as_type((as_type(x_42) + as_type(1))))) { } else { break; } @@ -38,14 +38,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } { int const x_62 = i; - i = (x_62 + 1); + i = as_type((as_type(x_62) + as_type(1))); } } int const x_65 = a.x; int const x_67 = a.y; int const x_70 = a.z; int const x_73 = a.w; - sum = (((x_65 + x_67) + x_70) + x_73); + sum = as_type((as_type(as_type((as_type(as_type((as_type(x_65) + as_type(x_67)))) + as_type(x_70)))) + as_type(x_73))); int const x_75 = sum; if ((x_75 == 10)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl index beae1ddf4d..6e6d19827b 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-clamp-max-itself/0-opt.wgsl.expected.msl @@ -20,7 +20,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_40 = i; int const x_42 = x_7.sequence.w; - if ((x_40 < (x_42 + 1))) { + if ((x_40 < as_type((as_type(x_42) + as_type(1))))) { } else { break; } @@ -38,14 +38,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } { int const x_62 = i; - i = (x_62 + 1); + i = as_type((as_type(x_62) + as_type(1))); } } int const x_65 = a.x; int const x_67 = a.y; int const x_70 = a.z; int const x_73 = a.w; - sum = (((x_65 + x_67) + x_70) + x_73); + sum = as_type((as_type(as_type((as_type(as_type((as_type(x_65) + as_type(x_67)))) + as_type(x_70)))) + as_type(x_73))); int const x_75 = sum; if ((x_75 == 10)) { *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl index b2f057cafa..79dbc241a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.spvasm.expected.msl @@ -19,17 +19,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_35 = r; int const x_37 = x_7.two; - if ((x_35 < (x_37 * 4))) { + if ((x_35 < as_type((as_type(x_37) * as_type(4))))) { } else { break; } int const x_41 = r; int const x_43 = x_7.two; int const x_46 = i; - i = (x_46 + int4(1, 2, 3, 4)[(x_41 / x_43)]); + i = as_type((as_type(x_46) + as_type(int4(1, 2, 3, 4)[(x_41 / x_43)]))); { int const x_48 = r; - r = (x_48 + 2); + r = as_type((as_type(x_48) + as_type(2))); } } int const x_50 = i; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl index b2f057cafa..79dbc241a3 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-component-uniform-idx/0-opt.wgsl.expected.msl @@ -19,17 +19,17 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { while (true) { int const x_35 = r; int const x_37 = x_7.two; - if ((x_35 < (x_37 * 4))) { + if ((x_35 < as_type((as_type(x_37) * as_type(4))))) { } else { break; } int const x_41 = r; int const x_43 = x_7.two; int const x_46 = i; - i = (x_46 + int4(1, 2, 3, 4)[(x_41 / x_43)]); + i = as_type((as_type(x_46) + as_type(int4(1, 2, 3, 4)[(x_41 / x_43)]))); { int const x_48 = r; - r = (x_48 + 2); + r = as_type((as_type(x_48) + as_type(2))); } } int const x_50 = i; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl index 1ec287cefd..fdecb2318a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -24,7 +29,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_25; int const x_27 = x_6.x_GLF_uniform_int_values.arr[0].el; - i = -(x_27); + i = tint_unary_minus(x_27); while (true) { int const x_33 = i; int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -35,15 +40,15 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_41 = i; int const x_43 = x_6.x_GLF_uniform_int_values.arr[0].el; - a = (x_41 * x_43); + a = as_type((as_type(x_41) * as_type(x_43))); { int const x_45 = i; - i = (x_45 + 1); + i = as_type((as_type(x_45) + as_type(1))); } } int const x_47 = a; int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el; - if ((x_47 == -(x_49))) { + if ((x_47 == tint_unary_minus(x_49))) { int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl index 1ec287cefd..fdecb2318a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-for-bitwise-condition/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -24,7 +29,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_25 = x_6.x_GLF_uniform_int_values.arr[1].el; a = x_25; int const x_27 = x_6.x_GLF_uniform_int_values.arr[0].el; - i = -(x_27); + i = tint_unary_minus(x_27); while (true) { int const x_33 = i; int const x_35 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -35,15 +40,15 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } int const x_41 = i; int const x_43 = x_6.x_GLF_uniform_int_values.arr[0].el; - a = (x_41 * x_43); + a = as_type((as_type(x_41) * as_type(x_43))); { int const x_45 = i; - i = (x_45 + 1); + i = as_type((as_type(x_45) + as_type(1))); } } int const x_47 = a; int const x_49 = x_6.x_GLF_uniform_int_values.arr[0].el; - if ((x_47 == -(x_49))) { + if ((x_47 == tint_unary_minus(x_49))) { int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el; int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl index a850e67b6b..fa512e1761 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.spvasm.expected.msl @@ -45,13 +45,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_47 = i; int const x_50 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[1].el; - if ((max((2 * x_47), (2 * x_50)) == x_54)) { + if ((max(as_type((as_type(2) * as_type(x_47))), as_type((as_type(2) * as_type(x_50)))) == x_54)) { int const x_58 = i; A.arr[x_58] = 1; } { int const x_60 = i; - i = (x_60 + 1); + i = as_type((as_type(x_60) + as_type(1))); } } int const x_63 = x_6.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl index a850e67b6b..fa512e1761 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-simplify-max-multiplied-values/0-opt.wgsl.expected.msl @@ -45,13 +45,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_47 = i; int const x_50 = x_6.x_GLF_uniform_int_values.arr[3].el; int const x_54 = x_6.x_GLF_uniform_int_values.arr[1].el; - if ((max((2 * x_47), (2 * x_50)) == x_54)) { + if ((max(as_type((as_type(2) * as_type(x_47))), as_type((as_type(2) * as_type(x_50)))) == x_54)) { int const x_58 = i; A.arr[x_58] = 1; } { int const x_60 = i; - i = (x_60 + 1); + i = as_type((as_type(x_60) + as_type(1))); } } int const x_63 = x_6.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl index 0bb48330e1..d1fa98fa37 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.spvasm.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_9 = *(tint_symbol_4); - *(tint_symbol_4) = (x_9 + 1); + *(tint_symbol_4) = as_type((as_type(x_9) + as_type(1))); } int const x_11 = *(tint_symbol_4); a = x_11; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_13 = *(tint_symbol_4); - *(tint_symbol_4) = (x_13 + 1); + *(tint_symbol_4) = as_type((as_type(x_13) + as_type(1))); } int const x_15 = a; a = x_15; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl index 0bb48330e1..d1fa98fa37 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-single-block-elim-self-assign/0-opt.wgsl.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_9 = *(tint_symbol_4); - *(tint_symbol_4) = (x_9 + 1); + *(tint_symbol_4) = as_type((as_type(x_9) + as_type(1))); } int const x_11 = *(tint_symbol_4); a = x_11; @@ -34,7 +34,7 @@ void main_1(constant buf0& x_6, thread int* const tint_symbol_4, thread float4* break; } int const x_13 = *(tint_symbol_4); - *(tint_symbol_4) = (x_13 + 1); + *(tint_symbol_4) = as_type((as_type(x_13) + as_type(1))); } int const x_15 = a; a = x_15; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl index 6614fe80f0..a9726f71e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.spvasm.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_44 = i; - i = (x_44 + 1); + i = as_type((as_type(x_44) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl index 6614fe80f0..a9726f71e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-ssa-rewrite-case-with-default/0-opt.wgsl.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_44 = i; - i = (x_44 + 1); + i = as_type((as_type(x_44) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl index 82cc6aed7a..5d1a17bb04 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.spvasm.expected.msl @@ -75,12 +75,12 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s color[x_71] = x_73; { int const x_75 = k; - k = (x_75 + 1); + k = as_type((as_type(x_75) + as_type(1))); } } { int const x_77 = j; - j = (x_77 + 1); + j = as_type((as_type(x_77) + as_type(1))); } } int const x_79 = i; @@ -94,7 +94,7 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } { int const x_87 = i; - i = (x_87 + 1); + i = as_type((as_type(x_87) + as_type(1))); } } float4 const x_89 = color; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl index 82cc6aed7a..5d1a17bb04 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-for-for-for/0-opt.wgsl.expected.msl @@ -75,12 +75,12 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s color[x_71] = x_73; { int const x_75 = k; - k = (x_75 + 1); + k = as_type((as_type(x_75) + as_type(1))); } } { int const x_77 = j; - j = (x_77 + 1); + j = as_type((as_type(x_77) + as_type(1))); } } int const x_79 = i; @@ -94,7 +94,7 @@ void main_1(constant buf0& x_7, constant buf1& x_11, thread float4* const tint_s } { int const x_87 = i; - i = (x_87 + 1); + i = as_type((as_type(x_87) + as_type(1))); } } float4 const x_89 = color; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl index 126ce9219a..3f6b2dca31 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.spvasm.expected.msl @@ -71,7 +71,7 @@ void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); { int const x_16 = i; - i = (x_16 + 1); + i = as_type((as_type(x_16) + as_type(1))); } } break; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl index 126ce9219a..3f6b2dca31 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-tail-duplicator-infinite-loops/0-opt.wgsl.expected.msl @@ -71,7 +71,7 @@ void main_1(constant buf1& x_5, constant buf2& x_7, constant buf0& x_10, thread *(tint_symbol_4) = float4(x_73, x_75, x_77, x_79); { int const x_16 = i; - i = (x_16 + 1); + i = as_type((as_type(x_16) + as_type(1))); } } break; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl index e3b232ef13..a342ca8a32 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.spvasm.expected.msl @@ -66,7 +66,7 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s arr.arr[x_56].data = x_57; { int const x_59 = i; - i = (x_59 + 1); + i = as_type((as_type(x_59) + as_type(1))); } } int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el; @@ -113,13 +113,13 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s } { int const x_117 = j; - j = (x_117 + 1); + j = as_type((as_type(x_117) + as_type(1))); } } } { int const x_119 = i_1; - i_1 = (x_119 + 1); + i_1 = as_type((as_type(x_119) + as_type(1))); } } int const x_122 = x_10.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl index e3b232ef13..a342ca8a32 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-inst-combine-compares-struct-array-clamp-function-cal/0-opt.wgsl.expected.msl @@ -66,7 +66,7 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s arr.arr[x_56].data = x_57; { int const x_59 = i; - i = (x_59 + 1); + i = as_type((as_type(x_59) + as_type(1))); } } int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el; @@ -113,13 +113,13 @@ void main_1(constant buf0& x_10, constant buf1& x_8, thread float4* const tint_s } { int const x_117 = j; - j = (x_117 + 1); + j = as_type((as_type(x_117) + as_type(1))); } } } { int const x_119 = i_1; - i_1 = (x_119 + 1); + i_1 = as_type((as_type(x_119) + as_type(1))); } } int const x_122 = x_10.x_GLF_uniform_int_values.arr[2].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl index 34d029d82a..94156297e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.spvasm.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { arr.arr[x_46].data = 0; { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_51 = x_9.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl index 34d029d82a..94156297e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-uninitialized-values-passed-to-function-never-executed/0-opt.wgsl.expected.msl @@ -54,7 +54,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { arr.arr[x_46].data = 0; { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_51 = x_9.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl index 3fc4376ec7..0aa7f65119 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.spvasm.expected.msl @@ -62,7 +62,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy float const x_83 = sums.arr[x_77].el; sums.arr[x_77].el = (x_83 + x_81); { - int const x_68 = (x_67 + 1); + int const x_68 = as_type((as_type(x_67) + as_type(1))); i = x_68; x_67_phi = x_68; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl index 3fc4376ec7..0aa7f65119 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-access-past-matrix-elements/0-opt.wgsl.expected.msl @@ -62,7 +62,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy float const x_83 = sums.arr[x_77].el; sums.arr[x_77].el = (x_83 + x_81); { - int const x_68 = (x_67 + 1); + int const x_68 = as_type((as_type(x_67) + as_type(1))); i = x_68; x_67_phi = x_68; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl index 5b0e89ee9c..d35b7e28fe 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl @@ -58,7 +58,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s m0[(x_68 % x_70)][x_73] = x_75; { int const x_77 = c; - c = (x_77 + 1); + c = as_type((as_type(x_77) + as_type(1))); } } float4x4 const x_79 = m0; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl index 2e9eaea41a..690351b9d1 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.wgsl.expected.msl @@ -58,7 +58,7 @@ void main_1(constant buf1& x_6, constant buf0& x_10, thread float4* const tint_s m0[(x_68 % x_70)][x_73] = x_75; { int const x_77 = c; - c = (x_77 + 1); + c = as_type((as_type(x_77) + as_type(1))); } } float4x4 const x_79 = m0; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl index 4aaf44e23e..f471e20286 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -39,7 +44,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { A.arr[x_40] = x_41; { int const x_43 = i; - i = (x_43 + 1); + i = as_type((as_type(x_43) + as_type(1))); } } int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -52,7 +57,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); int const x_60 = a; int const x_62 = x_6.x_GLF_uniform_int_values.arr[0].el; - if ((x_60 == -(x_62))) { + if ((x_60 == tint_unary_minus(x_62))) { int const x_68 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl index 4aaf44e23e..f471e20286 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-inst-combine-select-value-tracking-flip-bits/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -39,7 +44,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { A.arr[x_40] = x_41; { int const x_43 = i; - i = (x_43 + 1); + i = as_type((as_type(x_43) + as_type(1))); } } int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el; @@ -52,7 +57,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { *(tint_symbol_4) = float4(x_58, x_58, x_58, x_58); int const x_60 = a; int const x_62 = x_6.x_GLF_uniform_int_values.arr[0].el; - if ((x_60 == -(x_62))) { + if ((x_60 == tint_unary_minus(x_62))) { int const x_68 = x_6.x_GLF_uniform_int_values.arr[2].el; int const x_71 = x_6.x_GLF_uniform_int_values.arr[1].el; int const x_74 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl index bd9b04a315..7d21ec98f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.spvasm.expected.msl @@ -37,15 +37,15 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if (((1 % x_39) == x_42)) { { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } continue; } int const x_46 = a; - a = (x_46 + 1); + a = as_type((as_type(x_46) + as_type(1))); { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_50 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl index bd9b04a315..7d21ec98f7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-apint-inst-combine-simplify-one-mod-loop-iterator/0-opt.wgsl.expected.msl @@ -37,15 +37,15 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { if (((1 % x_39) == x_42)) { { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } continue; } int const x_46 = a; - a = (x_46 + 1); + a = as_type((as_type(x_46) + as_type(1))); { int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } int const x_50 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl index f06e3b0e4b..b6bcce5b3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.spvasm.expected.msl @@ -23,10 +23,10 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_33 = i; - a = ((x_33 | -2) - 1); + a = as_type((as_type((x_33 | -2)) - as_type(1))); { int const x_36 = i; - i = (x_36 + 1); + i = as_type((as_type(x_36) + as_type(1))); } } int const x_38 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl index f06e3b0e4b..b6bcce5b3e 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-inclusive-or/0-opt.wgsl.expected.msl @@ -23,10 +23,10 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_33 = i; - a = ((x_33 | -2) - 1); + a = as_type((as_type((x_33 | -2)) - as_type(1))); { int const x_36 = i; - i = (x_36 + 1); + i = as_type((as_type(x_36) + as_type(1))); } } int const x_38 = a; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl index aca4892519..449f564cd7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.spvasm.expected.msl @@ -28,7 +28,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_31 = x_7.x_GLF_uniform_int_values.arr[1].el; if ((1 == x_31)) { int const x_35 = a; - a = (x_35 - 1); + a = as_type((as_type(x_35) - as_type(1))); } i = 0; while (true) { @@ -40,11 +40,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_45 = i; int const x_46 = sum; - sum = (x_46 + x_45); + sum = as_type((as_type(x_46) + as_type(x_45))); { int const x_49 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_50 = i; - i = (x_50 + x_49); + i = as_type((as_type(x_50) + as_type(x_49))); } } int const x_52 = sum; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl index aca4892519..449f564cd7 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-known-nonzero/0-opt.wgsl.expected.msl @@ -28,7 +28,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { int const x_31 = x_7.x_GLF_uniform_int_values.arr[1].el; if ((1 == x_31)) { int const x_35 = a; - a = (x_35 - 1); + a = as_type((as_type(x_35) - as_type(1))); } i = 0; while (true) { @@ -40,11 +40,11 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_4) { } int const x_45 = i; int const x_46 = sum; - sum = (x_46 + x_45); + sum = as_type((as_type(x_46) + as_type(x_45))); { int const x_49 = x_7.x_GLF_uniform_int_values.arr[2].el; int const x_50 = i; - i = (x_50 + x_49); + i = as_type((as_type(x_50) + as_type(x_49))); } } int const x_52 = sum; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl index cceaae5a1d..0846e48eca 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -45,34 +50,34 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { ref.arr[x_66] = x_68; int const x_71 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_73 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_71] = -(x_73); + ref.arr[x_71] = tint_unary_minus(x_73); int const x_77 = x_6.x_GLF_uniform_int_values.arr[8].el; int const x_79 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_77] = -(x_79); + ref.arr[x_77] = tint_unary_minus(x_79); int const x_83 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_85 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_83] = -(x_85); + ref.arr[x_83] = tint_unary_minus(x_85); int const x_89 = x_6.x_GLF_uniform_int_values.arr[10].el; int const x_91 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_89] = -(x_91); + ref.arr[x_89] = tint_unary_minus(x_91); int const x_95 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_97 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_95] = -(x_97); + ref.arr[x_95] = tint_unary_minus(x_97); int const x_101 = x_6.x_GLF_uniform_int_values.arr[6].el; int const x_103 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_101] = -(x_103); + ref.arr[x_101] = tint_unary_minus(x_103); int const x_107 = x_6.x_GLF_uniform_int_values.arr[12].el; int const x_109 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_107] = -(x_109); + ref.arr[x_107] = tint_unary_minus(x_109); int const x_113 = x_6.x_GLF_uniform_int_values.arr[13].el; int const x_115 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_113] = -(x_115); + ref.arr[x_113] = tint_unary_minus(x_115); int const x_119 = x_6.x_GLF_uniform_int_values.arr[14].el; int const x_121 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_119] = -(x_121); + ref.arr[x_119] = tint_unary_minus(x_121); int const x_125 = x_6.x_GLF_uniform_int_values.arr[15].el; int const x_127 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_125] = -(x_127); + ref.arr[x_125] = tint_unary_minus(x_127); i = 0; while (true) { int const x_134 = i; @@ -88,7 +93,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { data.arr[x_139] = ~(clamp(~(x_140), ~(x_142), x_145)); { int const x_149 = i; - i = (x_149 + 1); + i = as_type((as_type(x_149) + as_type(1))); } } int const x_152 = x_6.x_GLF_uniform_int_values.arr[5].el; @@ -105,7 +110,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { data.arr[x_162] = ~(clamp(~(x_163), 0, 1)); { int const x_168 = i_1; - i_1 = (x_168 + 1); + i_1 = as_type((as_type(x_168) + as_type(1))); } } int const x_171 = x_6.x_GLF_uniform_int_values.arr[6].el; @@ -122,7 +127,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { data.arr[x_181] = ~(clamp(x_182, 0, 1)); { int const x_186 = i_2; - i_2 = (x_186 + 1); + i_2 = as_type((as_type(x_186) + as_type(1))); } } int const x_189 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -146,7 +151,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_212 = i_3; - i_3 = (x_212 + 1); + i_3 = as_type((as_type(x_212) + as_type(1))); } } int const x_215 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl index cceaae5a1d..0846e48eca 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-value-tracking-selection-dag-negation-clamp-loop/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct tint_padded_array_element { /* 0x0000 */ int el; /* 0x0004 */ int8_t tint_pad[12]; @@ -45,34 +50,34 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { ref.arr[x_66] = x_68; int const x_71 = x_6.x_GLF_uniform_int_values.arr[5].el; int const x_73 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_71] = -(x_73); + ref.arr[x_71] = tint_unary_minus(x_73); int const x_77 = x_6.x_GLF_uniform_int_values.arr[8].el; int const x_79 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_77] = -(x_79); + ref.arr[x_77] = tint_unary_minus(x_79); int const x_83 = x_6.x_GLF_uniform_int_values.arr[9].el; int const x_85 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_83] = -(x_85); + ref.arr[x_83] = tint_unary_minus(x_85); int const x_89 = x_6.x_GLF_uniform_int_values.arr[10].el; int const x_91 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_89] = -(x_91); + ref.arr[x_89] = tint_unary_minus(x_91); int const x_95 = x_6.x_GLF_uniform_int_values.arr[11].el; int const x_97 = x_6.x_GLF_uniform_int_values.arr[1].el; - ref.arr[x_95] = -(x_97); + ref.arr[x_95] = tint_unary_minus(x_97); int const x_101 = x_6.x_GLF_uniform_int_values.arr[6].el; int const x_103 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_101] = -(x_103); + ref.arr[x_101] = tint_unary_minus(x_103); int const x_107 = x_6.x_GLF_uniform_int_values.arr[12].el; int const x_109 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_107] = -(x_109); + ref.arr[x_107] = tint_unary_minus(x_109); int const x_113 = x_6.x_GLF_uniform_int_values.arr[13].el; int const x_115 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_113] = -(x_115); + ref.arr[x_113] = tint_unary_minus(x_115); int const x_119 = x_6.x_GLF_uniform_int_values.arr[14].el; int const x_121 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_119] = -(x_121); + ref.arr[x_119] = tint_unary_minus(x_121); int const x_125 = x_6.x_GLF_uniform_int_values.arr[15].el; int const x_127 = x_6.x_GLF_uniform_int_values.arr[2].el; - ref.arr[x_125] = -(x_127); + ref.arr[x_125] = tint_unary_minus(x_127); i = 0; while (true) { int const x_134 = i; @@ -88,7 +93,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { data.arr[x_139] = ~(clamp(~(x_140), ~(x_142), x_145)); { int const x_149 = i; - i = (x_149 + 1); + i = as_type((as_type(x_149) + as_type(1))); } } int const x_152 = x_6.x_GLF_uniform_int_values.arr[5].el; @@ -105,7 +110,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { data.arr[x_162] = ~(clamp(~(x_163), 0, 1)); { int const x_168 = i_1; - i_1 = (x_168 + 1); + i_1 = as_type((as_type(x_168) + as_type(1))); } } int const x_171 = x_6.x_GLF_uniform_int_values.arr[6].el; @@ -122,7 +127,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { data.arr[x_181] = ~(clamp(x_182, 0, 1)); { int const x_186 = i_2; - i_2 = (x_186 + 1); + i_2 = as_type((as_type(x_186) + as_type(1))); } } int const x_189 = x_6.x_GLF_uniform_int_values.arr[0].el; @@ -146,7 +151,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_212 = i_3; - i_3 = (x_212 + 1); + i_3 = as_type((as_type(x_212) + as_type(1))); } } int const x_215 = x_6.x_GLF_uniform_int_values.arr[1].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl index 2843739bc3..6605a4f606 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.spvasm.expected.msl @@ -36,14 +36,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { while (true) { int const x_31 = x_31_phi; int const x_35 = x_7.zero; - if ((x_31 < (10 + x_35))) { + if ((x_31 < as_type((as_type(10) + as_type(x_35))))) { } else { break; } { param = x_31; func_i1_(x_7, &(param), tint_symbol_5); - int const x_32 = (x_31 + 1); + int const x_32 = as_type((as_type(x_31) + as_type(1))); i = x_32; x_31_phi = x_32; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl index 2843739bc3..6605a4f606 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-for-loop/0-opt.wgsl.expected.msl @@ -36,14 +36,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { while (true) { int const x_31 = x_31_phi; int const x_35 = x_7.zero; - if ((x_31 < (10 + x_35))) { + if ((x_31 < as_type((as_type(10) + as_type(x_35))))) { } else { break; } { param = x_31; func_i1_(x_7, &(param), tint_symbol_5); - int const x_32 = (x_31 + 1); + int const x_32 = as_type((as_type(x_31) + as_type(1))); i = x_32; x_31_phi = x_32; } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl index df17a9a354..15e5fa377a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.spvasm.expected.msl @@ -47,7 +47,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa float const x_47 = func_f1_(&(param), tint_symbol_6); f = x_47; int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } float const x_50 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl index df17a9a354..15e5fa377a 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-wrap-op-kill-two-branches/0-opt.wgsl.expected.msl @@ -47,7 +47,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa float const x_47 = func_f1_(&(param), tint_symbol_6); f = x_47; int const x_48 = i; - i = (x_48 + 1); + i = as_type((as_type(x_48) + as_type(1))); } } float const x_50 = f; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl index 852c3288b0..844f4c9864 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.spvasm.expected.msl @@ -57,7 +57,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_61_save = x_56; float const x_62 = sums.arr[x_61_save]; sums.arr[x_61_save] = (x_62 + x_60); - x_53 = (x_52 + 1); + x_53 = as_type((as_type(x_52) + as_type(1))); x_52_phi = x_53; } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl index 852c3288b0..844f4c9864 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-write-past-matrix-elements-unused/0.wgsl.expected.msl @@ -57,7 +57,7 @@ void main_1(constant buf1& x_6, constant buf0& x_8, thread float4* const tint_sy int const x_61_save = x_56; float const x_62 = sums.arr[x_61_save]; sums.arr[x_61_save] = (x_62 + x_60); - x_53 = (x_52 + 1); + x_53 = as_type((as_type(x_52) + as_type(1))); x_52_phi = x_53; } } diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl index 933626f679..70dcbca418 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.spvasm.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy if (((-2147483647 - 1) < x_70)) { { int const x_82 = j; - j = (x_82 + 1); + j = as_type((as_type(x_82) + as_type(1))); } continue; } @@ -87,12 +87,12 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy } { int const x_82 = j; - j = (x_82 + 1); + j = as_type((as_type(x_82) + as_type(1))); } } { int const x_84 = i; - i = (x_84 + 1); + i = as_type((as_type(x_84) + as_type(1))); } } int const x_87 = x_9.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl index 933626f679..70dcbca418 100644 --- a/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/cov-x86-isel-lowering-negative-left-shift/0-opt.wgsl.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy if (((-2147483647 - 1) < x_70)) { { int const x_82 = j; - j = (x_82 + 1); + j = as_type((as_type(x_82) + as_type(1))); } continue; } @@ -87,12 +87,12 @@ void main_1(constant buf1& x_6, constant buf0& x_9, thread float4* const tint_sy } { int const x_82 = j; - j = (x_82 + 1); + j = as_type((as_type(x_82) + as_type(1))); } } { int const x_84 = i; - i = (x_84 + 1); + i = as_type((as_type(x_84) + as_type(1))); } } int const x_87 = x_9.x_GLF_uniform_int_values.arr[0].el; diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl index bea4a4bc27..348e88d3d3 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.spvasm.expected.msl @@ -57,7 +57,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } { int const x_85 = i; - i = (x_85 + 1); + i = as_type((as_type(x_85) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl index bea4a4bc27..348e88d3d3 100644 --- a/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/create-color-in-do-while-for-loop/0-opt.wgsl.expected.msl @@ -57,7 +57,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_5, thread float } { int const x_85 = i; - i = (x_85 + 1); + i = as_type((as_type(x_85) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl index 3fa3858546..8e396a6011 100644 --- a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf1& x_6, device theSSBO& x_4) { threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_60 = i; - i = (x_60 - 1); + i = as_type((as_type(x_60) - as_type(1))); } } GLF_live3s = 0.0f; @@ -68,7 +68,7 @@ void main_1(constant buf1& x_6, device theSSBO& x_4) { GLF_live3s = (x_95 + 1.0f); { int const x_97 = z; - z = (x_97 - 1); + z = as_type((as_type(x_97) - as_type(1))); } } int const x_99 = i_1; @@ -80,7 +80,7 @@ void main_1(constant buf1& x_6, device theSSBO& x_4) { } { int const x_108 = i_1; - i_1 = (x_108 + 1); + i_1 = as_type((as_type(x_108) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl index 3fa3858546..8e396a6011 100644 --- a/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/dead-barriers-in-loops/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf1& x_6, device theSSBO& x_4) { threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_60 = i; - i = (x_60 - 1); + i = as_type((as_type(x_60) - as_type(1))); } } GLF_live3s = 0.0f; @@ -68,7 +68,7 @@ void main_1(constant buf1& x_6, device theSSBO& x_4) { GLF_live3s = (x_95 + 1.0f); { int const x_97 = z; - z = (x_97 - 1); + z = as_type((as_type(x_97) - as_type(1))); } } int const x_99 = i_1; @@ -80,7 +80,7 @@ void main_1(constant buf1& x_6, device theSSBO& x_4) { } { int const x_108 = i_1; - i_1 = (x_108 + 1); + i_1 = as_type((as_type(x_108) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl index 08b8b280a1..74506560cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.spvasm.expected.msl @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol data.arr[0] = x_55; { int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); } } float const x_58 = data.arr[0]; diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl index 08b8b280a1..74506560cd 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-array-manipulating-loop/0-opt.wgsl.expected.msl @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_6, thread float4* const tint_symbol data.arr[0] = x_55; { int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); } } float const x_58 = data.arr[0]; diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl index 9e3108ac86..a7924517aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.spvasm.expected.msl @@ -33,13 +33,13 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol break; } else { { - x_31 = (x_30 + 1); + x_31 = as_type((as_type(x_30) + as_type(1))); x_30_phi = x_31; } continue; } { - x_31 = (x_30 + 1); + x_31 = as_type((as_type(x_30) + as_type(1))); x_30_phi = x_31; } continue; @@ -48,7 +48,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol x_48_phi = true; break; { - x_31 = (x_30 + 1); + x_31 = as_type((as_type(x_30) + as_type(1))); x_30_phi = x_31; } } diff --git a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl index 9e3108ac86..a7924517aa 100644 --- a/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discard-in-loop/0-opt.wgsl.expected.msl @@ -33,13 +33,13 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol break; } else { { - x_31 = (x_30 + 1); + x_31 = as_type((as_type(x_30) + as_type(1))); x_30_phi = x_31; } continue; } { - x_31 = (x_30 + 1); + x_31 = as_type((as_type(x_30) + as_type(1))); x_30_phi = x_31; } continue; @@ -48,7 +48,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol x_48_phi = true; break; { - x_31 = (x_30 + 1); + x_31 = as_type((as_type(x_30) + as_type(1))); x_30_phi = x_31; } } diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl index f11683a884..badaebb878 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.spvasm.expected.msl @@ -26,7 +26,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } { int const x_7 = ll; - ll = (x_7 + 1); + ll = as_type((as_type(x_7) + as_type(1))); } } float const x_49 = (*(tint_symbol_6)).x; diff --git a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl index f11683a884..badaebb878 100644 --- a/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/discards-in-control-flow/0-opt.wgsl.expected.msl @@ -26,7 +26,7 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } { int const x_7 = ll; - ll = (x_7 + 1); + ll = as_type((as_type(x_7) + as_type(1))); } } float const x_49 = (*(tint_symbol_6)).x; diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl index 428b891c8d..a6d951d8b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.spvasm.expected.msl @@ -20,17 +20,17 @@ float3 f_() { break; } int const x_8 = iteration; - iteration = (x_8 + 1); + iteration = as_type((as_type(x_8) + as_type(1))); { int const x_10 = k; - k = (x_10 + 1); + k = as_type((as_type(x_10) + as_type(1))); } } int const x_12 = iteration; if ((x_12 < 100)) { int const x_13 = iteration; int const x_15 = iteration; - return float3(1.0f, float((x_13 - 1)), float((x_15 - 1))); + return float3(1.0f, float(as_type((as_type(x_13) - as_type(1)))), float(as_type((as_type(x_15) - as_type(1))))); } else { while (true) { while (true) { diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl index 428b891c8d..a6d951d8b5 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-false-loops/0-opt.wgsl.expected.msl @@ -20,17 +20,17 @@ float3 f_() { break; } int const x_8 = iteration; - iteration = (x_8 + 1); + iteration = as_type((as_type(x_8) + as_type(1))); { int const x_10 = k; - k = (x_10 + 1); + k = as_type((as_type(x_10) + as_type(1))); } } int const x_12 = iteration; if ((x_12 < 100)) { int const x_13 = iteration; int const x_15 = iteration; - return float3(1.0f, float((x_13 - 1)), float((x_15 - 1))); + return float3(1.0f, float(as_type((as_type(x_13) - as_type(1)))), float(as_type((as_type(x_15) - as_type(1))))); } else { while (true) { while (true) { diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl index a19b54d776..f983be3211 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.spvasm.expected.msl @@ -20,12 +20,12 @@ int func_(constant buf0& x_7) { int x_39 = 0; int x_45_phi = 0; int const x_38 = x_38_phi; - int const x_43 = (x_38 + 1); + int const x_43 = as_type((as_type(x_38) + as_type(1))); loop_count = x_43; x_45_phi = x_43; while (true) { int const x_45 = x_45_phi; - x_39 = (x_45 + 1); + x_39 = as_type((as_type(x_45) + as_type(1))); loop_count = x_39; float const x_50 = x_7.injectionSwitch.x; float const x_52 = x_7.injectionSwitch.y; diff --git a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl index a19b54d776..f983be3211 100644 --- a/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/do-while-if-return/0-opt.wgsl.expected.msl @@ -20,12 +20,12 @@ int func_(constant buf0& x_7) { int x_39 = 0; int x_45_phi = 0; int const x_38 = x_38_phi; - int const x_43 = (x_38 + 1); + int const x_43 = as_type((as_type(x_38) + as_type(1))); loop_count = x_43; x_45_phi = x_43; while (true) { int const x_45 = x_45_phi; - x_39 = (x_45 + 1); + x_39 = as_type((as_type(x_45) + as_type(1))); loop_count = x_39; float const x_50 = x_7.injectionSwitch.x; float const x_52 = x_7.injectionSwitch.y; diff --git a/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.msl index d4c94f7a45..049c25ab04 100644 --- a/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.spvasm.expected.msl @@ -21,7 +21,7 @@ void main_1(device theSSBO& x_4) { break; } { - x_33 = (x_32 - 1); + x_33 = as_type((as_type(x_32) - as_type(1))); x_30_phi = float2x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f)); x_32_phi = x_33; } diff --git a/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.msl index d4c94f7a45..049c25ab04 100644 --- a/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/early-return-and-barrier/0.wgsl.expected.msl @@ -21,7 +21,7 @@ void main_1(device theSSBO& x_4) { break; } { - x_33 = (x_32 - 1); + x_33 = as_type((as_type(x_32) - as_type(1))); x_30_phi = float2x2(float2(1.0f, 0.0f), float2(0.0f, 1.0f)); x_32_phi = x_33; } diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl index 763a5d8fa0..ce03716998 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.spvasm.expected.msl @@ -55,13 +55,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } { int const x_67 = loop_count; - loop_count = (x_67 + 1); + loop_count = as_type((as_type(x_67) + as_type(1))); } } } { int const x_69 = loop_count; - loop_count = (x_69 + 1); + loop_count = as_type((as_type(x_69) + as_type(1))); } } int const x_71 = loop_count; diff --git a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl index 763a5d8fa0..ce03716998 100644 --- a/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/flag-always-false-if/0-opt.wgsl.expected.msl @@ -55,13 +55,13 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } { int const x_67 = loop_count; - loop_count = (x_67 + 1); + loop_count = as_type((as_type(x_67) + as_type(1))); } } } { int const x_69 = loop_count; - loop_count = (x_69 + 1); + loop_count = as_type((as_type(x_69) + as_type(1))); } } int const x_71 = loop_count; diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl index d32227c0dd..7ba8d10001 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.spvasm.expected.msl @@ -26,14 +26,14 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } { int const x_7 = i; - i = (x_7 + 1); + i = as_type((as_type(x_7) + as_type(1))); } continue; } return; { int const x_7 = i; - i = (x_7 + 1); + i = as_type((as_type(x_7) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl index d32227c0dd..7ba8d10001 100644 --- a/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/for-with-ifs-and-return/0-opt.wgsl.expected.msl @@ -26,14 +26,14 @@ void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol } { int const x_7 = i; - i = (x_7 + 1); + i = as_type((as_type(x_7) + as_type(1))); } continue; } return; { int const x_7 = i; - i = (x_7 + 1); + i = as_type((as_type(x_7) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl index 7d54d73fd2..87ba14b6de 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.spvasm.expected.msl @@ -120,17 +120,17 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { globalNumbers.arr[x_102_save] = 1; } { - int const x_19 = (x_25 + 1); + int const x_19 = as_type((as_type(x_25) + as_type(1))); x_17 = x_19; x_25_phi = x_19; } } float const x_107 = x_8.one; - int const x_14 = globalNumbers.arr[(int(x_107) - 1)]; - int const x_15 = as_type((x_24 + as_type(x_14))); + int const x_14 = globalNumbers.arr[as_type((as_type(int(x_107)) - as_type(1)))]; + int const x_15 = as_type(as_type((as_type(x_24) + as_type(as_type(x_14))))); acc = x_15; { - int const x_16 = (x_23 + 1); + int const x_16 = as_type((as_type(x_23) + as_type(1))); i_1 = x_16; x_24_phi = x_15; x_23_phi = x_16; diff --git a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl index 7d54d73fd2..87ba14b6de 100644 --- a/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/global-array-loops/0-opt.wgsl.expected.msl @@ -120,17 +120,17 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { globalNumbers.arr[x_102_save] = 1; } { - int const x_19 = (x_25 + 1); + int const x_19 = as_type((as_type(x_25) + as_type(1))); x_17 = x_19; x_25_phi = x_19; } } float const x_107 = x_8.one; - int const x_14 = globalNumbers.arr[(int(x_107) - 1)]; - int const x_15 = as_type((x_24 + as_type(x_14))); + int const x_14 = globalNumbers.arr[as_type((as_type(int(x_107)) - as_type(1)))]; + int const x_15 = as_type(as_type((as_type(x_24) + as_type(as_type(x_14))))); acc = x_15; { - int const x_16 = (x_23 + 1); + int const x_16 = as_type((as_type(x_23) + as_type(1))); i_1 = x_16; x_24_phi = x_15; x_23_phi = x_16; diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl index f21f0fac8d..0ab13c59f2 100644 --- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.spvasm.expected.msl @@ -99,7 +99,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } if (x_78) { { - x_87 = (x_86 + 1); + x_87 = as_type((as_type(x_86) + as_type(1))); x_86_phi = x_87; } continue; @@ -110,7 +110,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_87 = (x_86 + 1); + x_87 = as_type((as_type(x_86) + as_type(1))); x_86_phi = x_87; } } @@ -125,7 +125,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } x_66 = x_66_phi; - x_63 = as_type((x_62 + x_66)); + x_63 = as_type(as_type((as_type(x_62) + as_type(x_66)))); if (x_41) { while (true) { if (x_41) { @@ -143,7 +143,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_68 = (x_67 + 1); + x_68 = as_type((as_type(x_67) + as_type(1))); x_62_phi = x_63; x_65_phi = x_66; x_67_phi = x_68; @@ -163,7 +163,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_53 = (x_52 + 1); + x_53 = as_type((as_type(x_52) + as_type(1))); x_45_phi = x_46; x_48_phi = x_49; x_50_phi = x_51; @@ -215,7 +215,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } if (x_135) { { - x_144 = (x_143 + 1); + x_144 = as_type((as_type(x_143) + as_type(1))); x_143_phi = x_144; } continue; @@ -226,7 +226,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_144 = (x_143 + 1); + x_144 = as_type((as_type(x_143) + as_type(1))); x_143_phi = x_144; } } @@ -242,13 +242,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } int x_119 = 0; x_119 = x_119_phi; - x_116 = as_type((x_115 + x_119)); + x_116 = as_type(as_type((as_type(x_115) + as_type(x_119)))); if (select(x_41, false, !(x_41))) { x_161_phi = x_116; break; } { - x_121 = (x_120 + 1); + x_121 = as_type((as_type(x_120) + as_type(1))); x_115_phi = x_116; x_118_phi = x_119; x_120_phi = x_121; diff --git a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl index f21f0fac8d..0ab13c59f2 100644 --- a/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/increment-value-in-nested-for-loop/0.wgsl.expected.msl @@ -99,7 +99,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } if (x_78) { { - x_87 = (x_86 + 1); + x_87 = as_type((as_type(x_86) + as_type(1))); x_86_phi = x_87; } continue; @@ -110,7 +110,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_87 = (x_86 + 1); + x_87 = as_type((as_type(x_86) + as_type(1))); x_86_phi = x_87; } } @@ -125,7 +125,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } x_66 = x_66_phi; - x_63 = as_type((x_62 + x_66)); + x_63 = as_type(as_type((as_type(x_62) + as_type(x_66)))); if (x_41) { while (true) { if (x_41) { @@ -143,7 +143,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_68 = (x_67 + 1); + x_68 = as_type((as_type(x_67) + as_type(1))); x_62_phi = x_63; x_65_phi = x_66; x_67_phi = x_68; @@ -163,7 +163,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_53 = (x_52 + 1); + x_53 = as_type((as_type(x_52) + as_type(1))); x_45_phi = x_46; x_48_phi = x_49; x_50_phi = x_51; @@ -215,7 +215,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } if (x_135) { { - x_144 = (x_143 + 1); + x_144 = as_type((as_type(x_143) + as_type(1))); x_143_phi = x_144; } continue; @@ -226,7 +226,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float break; } { - x_144 = (x_143 + 1); + x_144 = as_type((as_type(x_143) + as_type(1))); x_143_phi = x_144; } } @@ -242,13 +242,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float } int x_119 = 0; x_119 = x_119_phi; - x_116 = as_type((x_115 + x_119)); + x_116 = as_type(as_type((as_type(x_115) + as_type(x_119)))); if (select(x_41, false, !(x_41))) { x_161_phi = x_116; break; } { - x_121 = (x_120 + 1); + x_121 = as_type((as_type(x_120) + as_type(1))); x_115_phi = x_116; x_118_phi = x_119; x_120_phi = x_121; diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl index c1f76729d2..af005b69bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.spvasm.expected.msl @@ -77,7 +77,7 @@ float makeFrame_(constant buf0& x_6) { break; } { - x_7 = as_type((x_9 + as_type(1))); + x_7 = as_type(as_type((as_type(x_9) + as_type(as_type(1))))); x_41_phi = x_42; x_8_phi = x_7; x_44_phi = x_45; diff --git a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl index c1f76729d2..af005b69bc 100644 --- a/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/injection-switch-as-comparison/0.wgsl.expected.msl @@ -77,7 +77,7 @@ float makeFrame_(constant buf0& x_6) { break; } { - x_7 = as_type((x_9 + as_type(1))); + x_7 = as_type(as_type((as_type(x_9) + as_type(as_type(1))))); x_41_phi = x_42; x_8_phi = x_7; x_44_phi = x_45; diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl index d05608adc5..8aad500344 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl @@ -43,7 +43,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_15 = donor_replacementGLF_dead0top; if (((x_14 >= 0) & (x_15 < 9))) { int const x_16 = donor_replacementGLF_dead0top; - int const x_17 = (x_16 + 1); + int const x_17 = as_type((as_type(x_16) + as_type(1))); donor_replacementGLF_dead0top = x_17; x_54 = x_17; } else { @@ -66,12 +66,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { matrix_b[x_20] = (x_87 - 1.0f); { int const x_22 = b; - b = (x_22 - 1); + b = as_type((as_type(x_22) - as_type(1))); } } { int const x_24 = k; - k = (x_24 + 1); + k = as_type((as_type(x_24) + as_type(1))); } } *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl index 837b916059..a41081a534 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.wgsl.expected.msl @@ -43,7 +43,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_15 = donor_replacementGLF_dead0top; if (((x_14 >= 0) && (x_15 < 9))) { int const x_16 = donor_replacementGLF_dead0top; - int const x_17 = (x_16 + 1); + int const x_17 = as_type((as_type(x_16) + as_type(1))); donor_replacementGLF_dead0top = x_17; x_54 = x_17; } else { @@ -66,12 +66,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { matrix_b[x_20] = (x_87 - 1.0f); { int const x_22 = b; - b = (x_22 - 1); + b = as_type((as_type(x_22) - as_type(1))); } } { int const x_24 = k; - k = (x_24 + 1); + k = as_type((as_type(x_24) + as_type(1))); } } *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl index 447bbeb4a5..b378883e62 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.spvasm.expected.msl @@ -37,7 +37,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_11 = j; - j = (x_11 + 1); + j = as_type((as_type(x_11) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl index 447bbeb4a5..b378883e62 100644 --- a/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loop-nested-ifs/0-opt.wgsl.expected.msl @@ -37,7 +37,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_11 = j; - j = (x_11 + 1); + j = as_type((as_type(x_11) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl index dee463b663..86dc88599b 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.spvasm.expected.msl @@ -51,7 +51,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { if ((x_17 != 3)) { int const x_18 = i; float const x_67 = x_8.injectionSwitch.x; - if (((x_18 - int(x_67)) == 4)) { + if ((as_type((as_type(x_18) - as_type(int(x_67)))) == 4)) { int const x_21 = i; obj_1.prime_numbers.arr[x_21] = 11; } else { @@ -62,7 +62,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } { int const x_24 = i; - i = (x_24 + 1); + i = as_type((as_type(x_24) + as_type(1))); } continue; } @@ -78,7 +78,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } { int const x_24 = i; - i = (x_24 + 1); + i = as_type((as_type(x_24) + as_type(1))); } } BinarySearchObject const x_84 = obj_1; diff --git a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl index dee463b663..86dc88599b 100644 --- a/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/loops-ifs-continues-call/0.wgsl.expected.msl @@ -51,7 +51,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { if ((x_17 != 3)) { int const x_18 = i; float const x_67 = x_8.injectionSwitch.x; - if (((x_18 - int(x_67)) == 4)) { + if ((as_type((as_type(x_18) - as_type(int(x_67)))) == 4)) { int const x_21 = i; obj_1.prime_numbers.arr[x_21] = 11; } else { @@ -62,7 +62,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } { int const x_24 = i; - i = (x_24 + 1); + i = as_type((as_type(x_24) + as_type(1))); } continue; } @@ -78,7 +78,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { } { int const x_24 = i; - i = (x_24 + 1); + i = as_type((as_type(x_24) + as_type(1))); } } BinarySearchObject const x_84 = obj_1; diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl index 998e2de4c9..394db173a6 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.spvasm.expected.msl @@ -42,12 +42,12 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float int const x_73_save_1 = x_11; float const x_74 = m44[x_73_save][x_73_save_1]; m44[x_73_save][x_73_save_1] = (x_74 + x_72); - x_8 = (x_11 + 1); + x_8 = as_type((as_type(x_11) + as_type(1))); x_11_phi = x_8; } } { - x_9 = (x_10 + 1); + x_9 = as_type((as_type(x_10) + as_type(1))); x_10_phi = x_9; } } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl index 998e2de4c9..394db173a6 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-for-break-mat-color/0.wgsl.expected.msl @@ -42,12 +42,12 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float int const x_73_save_1 = x_11; float const x_74 = m44[x_73_save][x_73_save_1]; m44[x_73_save][x_73_save_1] = (x_74 + x_72); - x_8 = (x_11 + 1); + x_8 = as_type((as_type(x_11) + as_type(1))); x_11_phi = x_8; } } { - x_9 = (x_10 + 1); + x_9 = as_type((as_type(x_10) + as_type(1))); x_10_phi = x_9; } } diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl index 54dd6b330c..68b02b15ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.spvasm.expected.msl @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_8 = i; - i = (x_8 + 1); + i = as_type((as_type(x_8) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl index 54dd6b330c..68b02b15ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-ifs-and-return-in-for-loop/0-opt.wgsl.expected.msl @@ -31,7 +31,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_8 = i; - i = (x_8 + 1); + i = as_type((as_type(x_8) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl index 5965457a95..c22cdd3ed5 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl @@ -79,29 +79,29 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_101 = GLF_dead5r; - GLF_dead5r = (x_101 + 1); + GLF_dead5r = as_type((as_type(x_101) + as_type(1))); } } { int const x_103 = GLF_dead5c; - GLF_dead5c = (x_103 + 1); + GLF_dead5c = as_type((as_type(x_103) + as_type(1))); } } int const x_105 = msb10; - msb10 = (x_105 + 1); + msb10 = as_type((as_type(x_105) + as_type(1))); { int const x_107 = GLF_dead5rows; - GLF_dead5rows = (x_107 + 1); + GLF_dead5rows = as_type((as_type(x_107) + as_type(1))); } } { int const x_109 = GLF_dead5cols; - GLF_dead5cols = (x_109 + 1); + GLF_dead5cols = as_type((as_type(x_109) + as_type(1))); } } } int const x_111 = i; - i = (x_111 + 1); + i = as_type((as_type(x_111) + as_type(1))); { int const x_113 = i; if ((x_113 < 200)) { diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl index d1d24c8260..0a2d6a4846 100644 --- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.wgsl.expected.msl @@ -79,29 +79,29 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } { int const x_101 = GLF_dead5r; - GLF_dead5r = (x_101 + 1); + GLF_dead5r = as_type((as_type(x_101) + as_type(1))); } } { int const x_103 = GLF_dead5c; - GLF_dead5c = (x_103 + 1); + GLF_dead5c = as_type((as_type(x_103) + as_type(1))); } } int const x_105 = msb10; - msb10 = (x_105 + 1); + msb10 = as_type((as_type(x_105) + as_type(1))); { int const x_107 = GLF_dead5rows; - GLF_dead5rows = (x_107 + 1); + GLF_dead5rows = as_type((as_type(x_107) + as_type(1))); } } { int const x_109 = GLF_dead5cols; - GLF_dead5cols = (x_109 + 1); + GLF_dead5cols = as_type((as_type(x_109) + as_type(1))); } } } int const x_111 = i; - i = (x_111 + 1); + i = as_type((as_type(x_111) + as_type(1))); { int const x_113 = i; if ((x_113 < 200)) { diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl index 110e1af70e..15cae52e16 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.spvasm.expected.msl @@ -23,13 +23,13 @@ float f_() { } else { { int const x_10 = i; - i = (x_10 + 1); + i = as_type((as_type(x_10) + as_type(1))); } continue; } { int const x_10 = i; - i = (x_10 + 1); + i = as_type((as_type(x_10) + as_type(1))); } } return 1.0f; @@ -50,7 +50,7 @@ void main_1(thread float4* const tint_symbol_4) { float const x_39 = f_(); c.x = x_39; int const x_13 = i_1; - i_1 = (x_13 + 1); + i_1 = as_type((as_type(x_13) + as_type(1))); } } float4 const x_41 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl index 110e1af70e..15cae52e16 100644 --- a/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/return-in-loop-in-function/0-opt.wgsl.expected.msl @@ -23,13 +23,13 @@ float f_() { } else { { int const x_10 = i; - i = (x_10 + 1); + i = as_type((as_type(x_10) + as_type(1))); } continue; } { int const x_10 = i; - i = (x_10 + 1); + i = as_type((as_type(x_10) + as_type(1))); } } return 1.0f; @@ -50,7 +50,7 @@ void main_1(thread float4* const tint_symbol_4) { float const x_39 = f_(); c.x = x_39; int const x_13 = i_1; - i_1 = (x_13 + 1); + i_1 = as_type((as_type(x_13) + as_type(1))); } } float4 const x_41 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl index 9694480410..1288d26b9f 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.spvasm.expected.msl @@ -37,7 +37,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float int const x_47 = x_47_phi; float const x_50 = x_6.injectionSwitch.y; x_39_phi = x_38; - if ((x_47 < (x_34 + int(x_50)))) { + if ((x_47 < as_type((as_type(x_34) + as_type(int(x_50)))))) { } else { break; } @@ -54,7 +54,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float x_66 = float4(x_65.x, x_42.y, x_42.z, x_65.y); x_45_phi = x_66; } else { - float const x_68 = float((x_34 + 1)); + float const x_68 = float(as_type((as_type(x_34) + as_type(1)))); float2 const x_69 = float2(x_68, x_68); x_70 = float4(x_69.x, x_42.y, x_42.z, x_69.y); x_45_phi = x_70; @@ -62,7 +62,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float x_45 = x_45_phi; } { - x_48 = (x_47 + 1); + x_48 = as_type((as_type(x_47) + as_type(1))); x_42_phi = x_45; x_47_phi = x_48; } diff --git a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl index 9694480410..1288d26b9f 100644 --- a/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/set-color-in-one-iteration-while-loop/0.wgsl.expected.msl @@ -37,7 +37,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float int const x_47 = x_47_phi; float const x_50 = x_6.injectionSwitch.y; x_39_phi = x_38; - if ((x_47 < (x_34 + int(x_50)))) { + if ((x_47 < as_type((as_type(x_34) + as_type(int(x_50)))))) { } else { break; } @@ -54,7 +54,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float x_66 = float4(x_65.x, x_42.y, x_42.z, x_65.y); x_45_phi = x_66; } else { - float const x_68 = float((x_34 + 1)); + float const x_68 = float(as_type((as_type(x_34) + as_type(1)))); float2 const x_69 = float2(x_68, x_68); x_70 = float4(x_69.x, x_42.y, x_42.z, x_69.y); x_45_phi = x_70; @@ -62,7 +62,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_5, thread float x_45 = x_45_phi; } { - x_48 = (x_47 + 1); + x_48 = as_type((as_type(x_47) + as_type(1))); x_42_phi = x_45; x_47_phi = x_48; } diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl index 3bfd32e28e..985ef75dbe 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.spvasm.expected.msl @@ -56,7 +56,7 @@ void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4 break; } int const x_12 = GLF_live5_looplimiter6; - GLF_live5_looplimiter6 = (x_12 + 1); + GLF_live5_looplimiter6 = as_type((as_type(x_12) + as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl index 3bfd32e28e..985ef75dbe 100644 --- a/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/similar-nested-ifs/0-opt.wgsl.expected.msl @@ -56,7 +56,7 @@ void main_1(constant buf0& x_7, thread float* const tint_symbol_5, thread float4 break; } int const x_12 = GLF_live5_looplimiter6; - GLF_live5_looplimiter6 = (x_12 + 1); + GLF_live5_looplimiter6 = as_type((as_type(x_12) + as_type(1))); } } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl index e1df0f21d4..0bff46416d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.spvasm.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ (*(tint_symbol_6)).arr[x_78] = 0; { int const x_80 = i; - i = (x_80 + 1); + i = as_type((as_type(x_80) + as_type(1))); } } p = int2(0, 0); @@ -57,7 +57,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ bool x_143_phi = false; bool x_163_phi = false; int const x_86 = v; - v = (x_86 + 1); + v = as_type((as_type(x_86) + as_type(1))); directions = 0; int const x_89 = p.x; bool const x_90 = (x_89 > 0); @@ -65,14 +65,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_90) { int const x_94 = p.x; int const x_97 = p.y; - int const x_101 = (*(tint_symbol_6)).arr[((x_94 - 2) + (x_97 * 16))]; + int const x_101 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_94) - as_type(2)))) + as_type(as_type((as_type(x_97) * as_type(16))))))]; x_102 = (x_101 == 0); x_103_phi = x_102; } bool const x_103 = x_103_phi; if (x_103) { int const x_106 = directions; - directions = (x_106 + 1); + directions = as_type((as_type(x_106) + as_type(1))); } int const x_109 = p.y; bool const x_110 = (x_109 > 0); @@ -80,14 +80,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_110) { int const x_114 = p.x; int const x_116 = p.y; - int const x_121 = (*(tint_symbol_6)).arr[(x_114 + ((x_116 - 2) * 16))]; + int const x_121 = (*(tint_symbol_6)).arr[as_type((as_type(x_114) + as_type(as_type((as_type(as_type((as_type(x_116) - as_type(2)))) * as_type(16))))))]; x_122 = (x_121 == 0); x_123_phi = x_122; } bool const x_123 = x_123_phi; if (x_123) { int const x_126 = directions; - directions = (x_126 + 1); + directions = as_type((as_type(x_126) + as_type(1))); } int const x_129 = p.x; bool const x_130 = (x_129 < 14); @@ -95,14 +95,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_130) { int const x_134 = p.x; int const x_137 = p.y; - int const x_141 = (*(tint_symbol_6)).arr[((x_134 + 2) + (x_137 * 16))]; + int const x_141 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_134) + as_type(2)))) + as_type(as_type((as_type(x_137) * as_type(16))))))]; x_142 = (x_141 == 0); x_143_phi = x_142; } bool const x_143 = x_143_phi; if (x_143) { int const x_146 = directions; - directions = (x_146 + 1); + directions = as_type((as_type(x_146) + as_type(1))); } int const x_149 = p.y; bool const x_150 = (x_149 < 14); @@ -110,14 +110,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_150) { int const x_154 = p.x; int const x_156 = p.y; - int const x_161 = (*(tint_symbol_6)).arr[(x_154 + ((x_156 + 2) * 16))]; + int const x_161 = (*(tint_symbol_6)).arr[as_type((as_type(x_154) + as_type(as_type((as_type(as_type((as_type(x_156) + as_type(2)))) * as_type(16))))))]; x_162 = (x_161 == 0); x_163_phi = x_162; } bool const x_163 = x_163_phi; if (x_163) { int const x_166 = directions; - directions = (x_166 + 1); + directions = as_type((as_type(x_166) + as_type(1))); } bool x_227 = false; bool x_240 = false; @@ -154,34 +154,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_187 = j; int const x_189 = i; - int const x_194 = (*(tint_symbol_6)).arr[((x_187 * 2) + ((x_189 * 2) * 16))]; + int const x_194 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_187) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_189) * as_type(2)))) * as_type(16))))))]; if ((x_194 == 0)) { int const x_198 = j; - p.x = (x_198 * 2); + p.x = as_type((as_type(x_198) * as_type(2))); int const x_201 = i; - p.y = (x_201 * 2); + p.y = as_type((as_type(x_201) * as_type(2))); canwalk = true; } { int const x_204 = j; - j = (x_204 + 1); + j = as_type((as_type(x_204) + as_type(1))); } } { int const x_206 = i; - i = (x_206 + 1); + i = as_type((as_type(x_206) + as_type(1))); } } int const x_209 = p.x; int const x_211 = p.y; - (*(tint_symbol_6)).arr[(x_209 + (x_211 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_209) + as_type(as_type((as_type(x_211) * as_type(16))))))] = 1; } else { int const x_215 = v; int const x_216 = directions; d = (x_215 % x_216); int const x_218 = directions; int const x_219 = v; - v = (x_219 + x_218); + v = as_type((as_type(x_219) + as_type(x_218))); int const x_221 = d; bool const x_222 = (x_221 >= 0); x_228_phi = x_222; @@ -195,25 +195,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_228) { int const x_232 = p.x; int const x_235 = p.y; - int const x_239 = (*(tint_symbol_6)).arr[((x_232 - 2) + (x_235 * 16))]; + int const x_239 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_232) - as_type(2)))) + as_type(as_type((as_type(x_235) * as_type(16))))))]; x_240 = (x_239 == 0); x_241_phi = x_240; } bool const x_241 = x_241_phi; if (x_241) { int const x_244 = d; - d = (x_244 - 1); + d = as_type((as_type(x_244) - as_type(1))); int const x_247 = p.x; int const x_249 = p.y; - (*(tint_symbol_6)).arr[(x_247 + (x_249 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_247) + as_type(as_type((as_type(x_249) * as_type(16))))))] = 1; int const x_254 = p.x; int const x_257 = p.y; - (*(tint_symbol_6)).arr[((x_254 - 1) + (x_257 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_254) - as_type(1)))) + as_type(as_type((as_type(x_257) * as_type(16))))))] = 1; int const x_262 = p.x; int const x_265 = p.y; - (*(tint_symbol_6)).arr[((x_262 - 2) + (x_265 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_262) - as_type(2)))) + as_type(as_type((as_type(x_265) * as_type(16))))))] = 1; int const x_270 = p.x; - p.x = (x_270 - 2); + p.x = as_type((as_type(x_270) - as_type(2))); } int const x_273 = d; bool const x_274 = (x_273 >= 0); @@ -228,25 +228,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_280) { int const x_284 = p.x; int const x_286 = p.y; - int const x_291 = (*(tint_symbol_6)).arr[(x_284 + ((x_286 - 2) * 16))]; + int const x_291 = (*(tint_symbol_6)).arr[as_type((as_type(x_284) + as_type(as_type((as_type(as_type((as_type(x_286) - as_type(2)))) * as_type(16))))))]; x_292 = (x_291 == 0); x_293_phi = x_292; } bool const x_293 = x_293_phi; if (x_293) { int const x_296 = d; - d = (x_296 - 1); + d = as_type((as_type(x_296) - as_type(1))); int const x_299 = p.x; int const x_301 = p.y; - (*(tint_symbol_6)).arr[(x_299 + (x_301 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_299) + as_type(as_type((as_type(x_301) * as_type(16))))))] = 1; int const x_306 = p.x; int const x_308 = p.y; - (*(tint_symbol_6)).arr[(x_306 + ((x_308 - 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_306) + as_type(as_type((as_type(as_type((as_type(x_308) - as_type(1)))) * as_type(16))))))] = 1; int const x_314 = p.x; int const x_316 = p.y; - (*(tint_symbol_6)).arr[(x_314 + ((x_316 - 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_314) + as_type(as_type((as_type(as_type((as_type(x_316) - as_type(2)))) * as_type(16))))))] = 1; int const x_322 = p.y; - p.y = (x_322 - 2); + p.y = as_type((as_type(x_322) - as_type(2))); } int const x_325 = d; bool const x_326 = (x_325 >= 0); @@ -261,25 +261,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_332) { int const x_336 = p.x; int const x_339 = p.y; - int const x_343 = (*(tint_symbol_6)).arr[((x_336 + 2) + (x_339 * 16))]; + int const x_343 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_336) + as_type(2)))) + as_type(as_type((as_type(x_339) * as_type(16))))))]; x_344 = (x_343 == 0); x_345_phi = x_344; } bool const x_345 = x_345_phi; if (x_345) { int const x_348 = d; - d = (x_348 - 1); + d = as_type((as_type(x_348) - as_type(1))); int const x_351 = p.x; int const x_353 = p.y; - (*(tint_symbol_6)).arr[(x_351 + (x_353 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_351) + as_type(as_type((as_type(x_353) * as_type(16))))))] = 1; int const x_358 = p.x; int const x_361 = p.y; - (*(tint_symbol_6)).arr[((x_358 + 1) + (x_361 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_358) + as_type(1)))) + as_type(as_type((as_type(x_361) * as_type(16))))))] = 1; int const x_366 = p.x; int const x_369 = p.y; - (*(tint_symbol_6)).arr[((x_366 + 2) + (x_369 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_366) + as_type(2)))) + as_type(as_type((as_type(x_369) * as_type(16))))))] = 1; int const x_374 = p.x; - p.x = (x_374 + 2); + p.x = as_type((as_type(x_374) + as_type(2))); } int const x_377 = d; bool const x_378 = (x_377 >= 0); @@ -294,30 +294,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_384) { int const x_388 = p.x; int const x_390 = p.y; - int const x_395 = (*(tint_symbol_6)).arr[(x_388 + ((x_390 + 2) * 16))]; + int const x_395 = (*(tint_symbol_6)).arr[as_type((as_type(x_388) + as_type(as_type((as_type(as_type((as_type(x_390) + as_type(2)))) * as_type(16))))))]; x_396 = (x_395 == 0); x_397_phi = x_396; } bool const x_397 = x_397_phi; if (x_397) { int const x_400 = d; - d = (x_400 - 1); + d = as_type((as_type(x_400) - as_type(1))); int const x_403 = p.x; int const x_405 = p.y; - (*(tint_symbol_6)).arr[(x_403 + (x_405 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_403) + as_type(as_type((as_type(x_405) * as_type(16))))))] = 1; int const x_410 = p.x; int const x_412 = p.y; - (*(tint_symbol_6)).arr[(x_410 + ((x_412 + 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_410) + as_type(as_type((as_type(as_type((as_type(x_412) + as_type(1)))) * as_type(16))))))] = 1; int const x_418 = p.x; int const x_420 = p.y; - (*(tint_symbol_6)).arr[(x_418 + ((x_420 + 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_418) + as_type(as_type((as_type(as_type((as_type(x_420) + as_type(2)))) * as_type(16))))))] = 1; int const x_426 = p.y; - p.y = (x_426 + 2); + p.y = as_type((as_type(x_426) + as_type(2))); } } int const x_430 = ipos.y; int const x_433 = ipos.x; - int const x_436 = (*(tint_symbol_6)).arr[((x_430 * 16) + x_433)]; + int const x_436 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_430) * as_type(16)))) + as_type(x_433)))]; if ((x_436 == 1)) { *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl index e1df0f21d4..0bff46416d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-access-chains/0-opt.wgsl.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ (*(tint_symbol_6)).arr[x_78] = 0; { int const x_80 = i; - i = (x_80 + 1); + i = as_type((as_type(x_80) + as_type(1))); } } p = int2(0, 0); @@ -57,7 +57,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ bool x_143_phi = false; bool x_163_phi = false; int const x_86 = v; - v = (x_86 + 1); + v = as_type((as_type(x_86) + as_type(1))); directions = 0; int const x_89 = p.x; bool const x_90 = (x_89 > 0); @@ -65,14 +65,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_90) { int const x_94 = p.x; int const x_97 = p.y; - int const x_101 = (*(tint_symbol_6)).arr[((x_94 - 2) + (x_97 * 16))]; + int const x_101 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_94) - as_type(2)))) + as_type(as_type((as_type(x_97) * as_type(16))))))]; x_102 = (x_101 == 0); x_103_phi = x_102; } bool const x_103 = x_103_phi; if (x_103) { int const x_106 = directions; - directions = (x_106 + 1); + directions = as_type((as_type(x_106) + as_type(1))); } int const x_109 = p.y; bool const x_110 = (x_109 > 0); @@ -80,14 +80,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_110) { int const x_114 = p.x; int const x_116 = p.y; - int const x_121 = (*(tint_symbol_6)).arr[(x_114 + ((x_116 - 2) * 16))]; + int const x_121 = (*(tint_symbol_6)).arr[as_type((as_type(x_114) + as_type(as_type((as_type(as_type((as_type(x_116) - as_type(2)))) * as_type(16))))))]; x_122 = (x_121 == 0); x_123_phi = x_122; } bool const x_123 = x_123_phi; if (x_123) { int const x_126 = directions; - directions = (x_126 + 1); + directions = as_type((as_type(x_126) + as_type(1))); } int const x_129 = p.x; bool const x_130 = (x_129 < 14); @@ -95,14 +95,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_130) { int const x_134 = p.x; int const x_137 = p.y; - int const x_141 = (*(tint_symbol_6)).arr[((x_134 + 2) + (x_137 * 16))]; + int const x_141 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_134) + as_type(2)))) + as_type(as_type((as_type(x_137) * as_type(16))))))]; x_142 = (x_141 == 0); x_143_phi = x_142; } bool const x_143 = x_143_phi; if (x_143) { int const x_146 = directions; - directions = (x_146 + 1); + directions = as_type((as_type(x_146) + as_type(1))); } int const x_149 = p.y; bool const x_150 = (x_149 < 14); @@ -110,14 +110,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_150) { int const x_154 = p.x; int const x_156 = p.y; - int const x_161 = (*(tint_symbol_6)).arr[(x_154 + ((x_156 + 2) * 16))]; + int const x_161 = (*(tint_symbol_6)).arr[as_type((as_type(x_154) + as_type(as_type((as_type(as_type((as_type(x_156) + as_type(2)))) * as_type(16))))))]; x_162 = (x_161 == 0); x_163_phi = x_162; } bool const x_163 = x_163_phi; if (x_163) { int const x_166 = directions; - directions = (x_166 + 1); + directions = as_type((as_type(x_166) + as_type(1))); } bool x_227 = false; bool x_240 = false; @@ -154,34 +154,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_187 = j; int const x_189 = i; - int const x_194 = (*(tint_symbol_6)).arr[((x_187 * 2) + ((x_189 * 2) * 16))]; + int const x_194 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_187) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_189) * as_type(2)))) * as_type(16))))))]; if ((x_194 == 0)) { int const x_198 = j; - p.x = (x_198 * 2); + p.x = as_type((as_type(x_198) * as_type(2))); int const x_201 = i; - p.y = (x_201 * 2); + p.y = as_type((as_type(x_201) * as_type(2))); canwalk = true; } { int const x_204 = j; - j = (x_204 + 1); + j = as_type((as_type(x_204) + as_type(1))); } } { int const x_206 = i; - i = (x_206 + 1); + i = as_type((as_type(x_206) + as_type(1))); } } int const x_209 = p.x; int const x_211 = p.y; - (*(tint_symbol_6)).arr[(x_209 + (x_211 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_209) + as_type(as_type((as_type(x_211) * as_type(16))))))] = 1; } else { int const x_215 = v; int const x_216 = directions; d = (x_215 % x_216); int const x_218 = directions; int const x_219 = v; - v = (x_219 + x_218); + v = as_type((as_type(x_219) + as_type(x_218))); int const x_221 = d; bool const x_222 = (x_221 >= 0); x_228_phi = x_222; @@ -195,25 +195,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_228) { int const x_232 = p.x; int const x_235 = p.y; - int const x_239 = (*(tint_symbol_6)).arr[((x_232 - 2) + (x_235 * 16))]; + int const x_239 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_232) - as_type(2)))) + as_type(as_type((as_type(x_235) * as_type(16))))))]; x_240 = (x_239 == 0); x_241_phi = x_240; } bool const x_241 = x_241_phi; if (x_241) { int const x_244 = d; - d = (x_244 - 1); + d = as_type((as_type(x_244) - as_type(1))); int const x_247 = p.x; int const x_249 = p.y; - (*(tint_symbol_6)).arr[(x_247 + (x_249 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_247) + as_type(as_type((as_type(x_249) * as_type(16))))))] = 1; int const x_254 = p.x; int const x_257 = p.y; - (*(tint_symbol_6)).arr[((x_254 - 1) + (x_257 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_254) - as_type(1)))) + as_type(as_type((as_type(x_257) * as_type(16))))))] = 1; int const x_262 = p.x; int const x_265 = p.y; - (*(tint_symbol_6)).arr[((x_262 - 2) + (x_265 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_262) - as_type(2)))) + as_type(as_type((as_type(x_265) * as_type(16))))))] = 1; int const x_270 = p.x; - p.x = (x_270 - 2); + p.x = as_type((as_type(x_270) - as_type(2))); } int const x_273 = d; bool const x_274 = (x_273 >= 0); @@ -228,25 +228,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_280) { int const x_284 = p.x; int const x_286 = p.y; - int const x_291 = (*(tint_symbol_6)).arr[(x_284 + ((x_286 - 2) * 16))]; + int const x_291 = (*(tint_symbol_6)).arr[as_type((as_type(x_284) + as_type(as_type((as_type(as_type((as_type(x_286) - as_type(2)))) * as_type(16))))))]; x_292 = (x_291 == 0); x_293_phi = x_292; } bool const x_293 = x_293_phi; if (x_293) { int const x_296 = d; - d = (x_296 - 1); + d = as_type((as_type(x_296) - as_type(1))); int const x_299 = p.x; int const x_301 = p.y; - (*(tint_symbol_6)).arr[(x_299 + (x_301 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_299) + as_type(as_type((as_type(x_301) * as_type(16))))))] = 1; int const x_306 = p.x; int const x_308 = p.y; - (*(tint_symbol_6)).arr[(x_306 + ((x_308 - 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_306) + as_type(as_type((as_type(as_type((as_type(x_308) - as_type(1)))) * as_type(16))))))] = 1; int const x_314 = p.x; int const x_316 = p.y; - (*(tint_symbol_6)).arr[(x_314 + ((x_316 - 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_314) + as_type(as_type((as_type(as_type((as_type(x_316) - as_type(2)))) * as_type(16))))))] = 1; int const x_322 = p.y; - p.y = (x_322 - 2); + p.y = as_type((as_type(x_322) - as_type(2))); } int const x_325 = d; bool const x_326 = (x_325 >= 0); @@ -261,25 +261,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_332) { int const x_336 = p.x; int const x_339 = p.y; - int const x_343 = (*(tint_symbol_6)).arr[((x_336 + 2) + (x_339 * 16))]; + int const x_343 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_336) + as_type(2)))) + as_type(as_type((as_type(x_339) * as_type(16))))))]; x_344 = (x_343 == 0); x_345_phi = x_344; } bool const x_345 = x_345_phi; if (x_345) { int const x_348 = d; - d = (x_348 - 1); + d = as_type((as_type(x_348) - as_type(1))); int const x_351 = p.x; int const x_353 = p.y; - (*(tint_symbol_6)).arr[(x_351 + (x_353 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_351) + as_type(as_type((as_type(x_353) * as_type(16))))))] = 1; int const x_358 = p.x; int const x_361 = p.y; - (*(tint_symbol_6)).arr[((x_358 + 1) + (x_361 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_358) + as_type(1)))) + as_type(as_type((as_type(x_361) * as_type(16))))))] = 1; int const x_366 = p.x; int const x_369 = p.y; - (*(tint_symbol_6)).arr[((x_366 + 2) + (x_369 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_366) + as_type(2)))) + as_type(as_type((as_type(x_369) * as_type(16))))))] = 1; int const x_374 = p.x; - p.x = (x_374 + 2); + p.x = as_type((as_type(x_374) + as_type(2))); } int const x_377 = d; bool const x_378 = (x_377 >= 0); @@ -294,30 +294,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_384) { int const x_388 = p.x; int const x_390 = p.y; - int const x_395 = (*(tint_symbol_6)).arr[(x_388 + ((x_390 + 2) * 16))]; + int const x_395 = (*(tint_symbol_6)).arr[as_type((as_type(x_388) + as_type(as_type((as_type(as_type((as_type(x_390) + as_type(2)))) * as_type(16))))))]; x_396 = (x_395 == 0); x_397_phi = x_396; } bool const x_397 = x_397_phi; if (x_397) { int const x_400 = d; - d = (x_400 - 1); + d = as_type((as_type(x_400) - as_type(1))); int const x_403 = p.x; int const x_405 = p.y; - (*(tint_symbol_6)).arr[(x_403 + (x_405 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_403) + as_type(as_type((as_type(x_405) * as_type(16))))))] = 1; int const x_410 = p.x; int const x_412 = p.y; - (*(tint_symbol_6)).arr[(x_410 + ((x_412 + 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_410) + as_type(as_type((as_type(as_type((as_type(x_412) + as_type(1)))) * as_type(16))))))] = 1; int const x_418 = p.x; int const x_420 = p.y; - (*(tint_symbol_6)).arr[(x_418 + ((x_420 + 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_418) + as_type(as_type((as_type(as_type((as_type(x_420) + as_type(2)))) * as_type(16))))))] = 1; int const x_426 = p.y; - p.y = (x_426 + 2); + p.y = as_type((as_type(x_426) + as_type(2))); } } int const x_430 = ipos.y; int const x_433 = ipos.x; - int const x_436 = (*(tint_symbol_6)).arr[((x_430 * 16) + x_433)]; + int const x_436 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_430) * as_type(16)))) + as_type(x_433)))]; if ((x_436 == 1)) { *(tint_symbol_7) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl index ad27d07298..50fbd98889 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.spvasm.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_59 = (x_58 + 1); + x_59 = as_type((as_type(x_58) + as_type(1))); x_55_phi = x_56; x_58_phi = x_59; } @@ -139,7 +139,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_96 = (x_95 + 1); + x_96 = as_type((as_type(x_95) + as_type(1))); x_92_phi = x_93; x_95_phi = x_96; } @@ -176,7 +176,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c[x_135_save] = (x_140 * x_141); } { - x_130 = (x_129 + 1); + x_130 = as_type((as_type(x_129) + as_type(1))); x_129_phi = x_130; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl index ccd7c33beb..e525067f34 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/0.wgsl.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_59 = (x_58 + 1); + x_59 = as_type((as_type(x_58) + as_type(1))); x_55_phi = x_56; x_58_phi = x_59; } @@ -139,7 +139,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_96 = (x_95 + 1); + x_96 = as_type((as_type(x_95) + as_type(1))); x_92_phi = x_93; x_95_phi = x_96; } @@ -176,7 +176,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c[x_135_save] = (x_140 * x_141); } { - x_130 = (x_129 + 1); + x_130 = as_type((as_type(x_129) + as_type(1))); x_129_phi = x_130; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl index 3a92f08998..b21c6f8c8a 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.spvasm.expected.msl @@ -74,7 +74,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_61 = (x_60 + 1); + x_61 = as_type((as_type(x_60) + as_type(1))); x_57_phi = x_58; x_60_phi = x_61; } @@ -144,7 +144,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_102 = (x_101 + 1); + x_102 = as_type((as_type(x_101) + as_type(1))); x_98_phi = x_99; x_101_phi = x_102; } @@ -181,7 +181,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c[x_141_save] = (x_146 * x_147); } { - x_136 = (x_135 + 1); + x_136 = as_type((as_type(x_135) + as_type(1))); x_135_phi = x_136; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl index 05e2aaa7ff..2aea05b188 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite-phi/1.wgsl.expected.msl @@ -74,7 +74,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_61 = (x_60 + 1); + x_61 = as_type((as_type(x_60) + as_type(1))); x_57_phi = x_58; x_60_phi = x_61; } @@ -144,7 +144,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_102 = (x_101 + 1); + x_102 = as_type((as_type(x_101) + as_type(1))); x_98_phi = x_99; x_101_phi = x_102; } @@ -181,7 +181,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c[x_141_save] = (x_146 * x_147); } { - x_136 = (x_135 + 1); + x_136 = as_type((as_type(x_135) + as_type(1))); x_135_phi = x_136; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl index f5bbeb84de..bc1b29b483 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.spvasm.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float4 const x_52 = *(tint_symbol_6); float2 const x_55 = x_6.resolution; float2 const x_56 = (float2(x_52.x, x_52.y) / x_55); - int const x_64 = (int((x_56.x * 10.0f)) + (int((x_56.y * 10.0f)) * 10)); + int const x_64 = as_type((as_type(int((x_56.x * 10.0f))) + as_type(as_type((as_type(int((x_56.y * 10.0f))) * as_type(10)))))); x_66_phi = 100; x_69_phi = 0; while (true) { @@ -35,8 +35,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } { - x_67 = (((4 * as_type(x_66)) * (1000 - as_type(x_66))) / 1000); - x_70 = (x_69 + 1); + x_67 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_66))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_66))))))) / 1000); + x_70 = as_type((as_type(x_69) + as_type(1))); x_66_phi = x_67; x_69_phi = x_70; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl index f5bbeb84de..bc1b29b483 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/0.wgsl.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float4 const x_52 = *(tint_symbol_6); float2 const x_55 = x_6.resolution; float2 const x_56 = (float2(x_52.x, x_52.y) / x_55); - int const x_64 = (int((x_56.x * 10.0f)) + (int((x_56.y * 10.0f)) * 10)); + int const x_64 = as_type((as_type(int((x_56.x * 10.0f))) + as_type(as_type((as_type(int((x_56.y * 10.0f))) * as_type(10)))))); x_66_phi = 100; x_69_phi = 0; while (true) { @@ -35,8 +35,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } { - x_67 = (((4 * as_type(x_66)) * (1000 - as_type(x_66))) / 1000); - x_70 = (x_69 + 1); + x_67 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_66))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_66))))))) / 1000); + x_70 = as_type((as_type(x_69) + as_type(1))); x_66_phi = x_67; x_69_phi = x_70; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl index 7c00279f15..0aeb0f5b81 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.spvasm.expected.msl @@ -23,7 +23,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_55 = float2(x_54.x, x_54.y); float2 const x_58 = x_6.resolution; float2 const x_59 = (x_55 / x_58); - int const x_70 = (int((x_59.x * float4(float4(0.0f, x_55, 0.5f).w, 10.0f, float2(0.0f, 0.0f)).y)) + (int((x_59.y * 10.0f)) * 10)); + int const x_70 = as_type((as_type(int((x_59.x * float4(float4(0.0f, x_55, 0.5f).w, 10.0f, float2(0.0f, 0.0f)).y))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); x_72_phi = 100; x_75_phi = 0; while (true) { @@ -36,8 +36,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } { - x_73 = (((4 * as_type(x_72)) * (1000 - as_type(x_72))) / 1000); - x_76 = (x_75 + 1); + x_73 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_72))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_72))))))) / 1000); + x_76 = as_type((as_type(x_75) + as_type(1))); x_72_phi = x_73; x_75_phi = x_76; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl index 7c00279f15..0aeb0f5b81 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composite2/1.wgsl.expected.msl @@ -23,7 +23,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_55 = float2(x_54.x, x_54.y); float2 const x_58 = x_6.resolution; float2 const x_59 = (x_55 / x_58); - int const x_70 = (int((x_59.x * float4(float4(0.0f, x_55, 0.5f).w, 10.0f, float2(0.0f, 0.0f)).y)) + (int((x_59.y * 10.0f)) * 10)); + int const x_70 = as_type((as_type(int((x_59.x * float4(float4(0.0f, x_55, 0.5f).w, 10.0f, float2(0.0f, 0.0f)).y))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); x_72_phi = 100; x_75_phi = 0; while (true) { @@ -36,8 +36,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } { - x_73 = (((4 * as_type(x_72)) * (1000 - as_type(x_72))) / 1000); - x_76 = (x_75 + 1); + x_73 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_72))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_72))))))) / 1000); + x_76 = as_type((as_type(x_75) + as_type(1))); x_72_phi = x_73; x_75_phi = x_76; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl index 4c8e61355e..f4067083ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.spvasm.expected.msl @@ -47,13 +47,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_195 = tint_symbol_4; int const x_222 = x_195.arr[x_216]; - bool const x_224 = (x_220 < (x_222 + 15)); + bool const x_224 = (x_220 < as_type((as_type(x_222) + as_type(15)))); x_231_phi = x_224; if (x_224) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_5; int const x_228 = x_196.arr[x_216]; - x_230 = (x_220 > (x_228 - 15)); + x_230 = (x_220 > as_type((as_type(x_228) - as_type(15)))); x_231_phi = x_230; } bool const x_231 = x_231_phi; @@ -61,14 +61,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_6; int const x_235 = x_197.arr[x_216]; - float const x_240 = ((15.0f - fabs(float((x_220 - x_235)))) * 0.06666667f); + float const x_240 = ((15.0f - fabs(float(as_type((as_type(x_220) - as_type(x_235)))))) * 0.06666667f); x_241 = float4(x_240, x_240, x_240, 1.0f); x_243_phi = x_241; x_244_phi = true; break; } int2 x_214_1 = x_213; - x_214_1.y = (x_216 + 1); + x_214_1.y = as_type((as_type(x_216) + as_type(1))); int2 const x_214 = x_214_1; { x_213_phi = x_214; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl index 4c8e61355e..f4067083ed 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/0.wgsl.expected.msl @@ -47,13 +47,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_195 = tint_symbol_4; int const x_222 = x_195.arr[x_216]; - bool const x_224 = (x_220 < (x_222 + 15)); + bool const x_224 = (x_220 < as_type((as_type(x_222) + as_type(15)))); x_231_phi = x_224; if (x_224) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_5; int const x_228 = x_196.arr[x_216]; - x_230 = (x_220 > (x_228 - 15)); + x_230 = (x_220 > as_type((as_type(x_228) - as_type(15)))); x_231_phi = x_230; } bool const x_231 = x_231_phi; @@ -61,14 +61,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_6; int const x_235 = x_197.arr[x_216]; - float const x_240 = ((15.0f - fabs(float((x_220 - x_235)))) * 0.06666667f); + float const x_240 = ((15.0f - fabs(float(as_type((as_type(x_220) - as_type(x_235)))))) * 0.06666667f); x_241 = float4(x_240, x_240, x_240, 1.0f); x_243_phi = x_241; x_244_phi = true; break; } int2 x_214_1 = x_213; - x_214_1.y = (x_216 + 1); + x_214_1.y = as_type((as_type(x_216) + as_type(1))); int2 const x_214 = x_214_1; { x_213_phi = x_214; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl index 805d16daee..6c9b126752 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -29,9 +34,9 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 const x_198 = *(tint_symbol_9); float2 const x_201 = x_6.resolution; float2 const x_202 = (float2(x_198.x, x_198.y) / x_201); - int const x_204 = -(82); + int const x_204 = tint_unary_minus(82); x_208 = float2(0.0f, float4(x_201, 15.0f, 15.0f).z); - int const x_209 = (120 - 0); + int const x_209 = as_type((as_type(120) - as_type(0))); x_214 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f))); switch(0u) { default: { @@ -51,13 +56,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_195 = tint_symbol_4; int const x_227 = x_195.arr[x_221]; - bool const x_229 = (x_225 < (x_227 + 15)); + bool const x_229 = (x_225 < as_type((as_type(x_227) + as_type(15)))); x_236_phi = x_229; if (x_229) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_5; int const x_233 = x_196.arr[x_221]; - x_235 = (x_225 > (x_233 - 15)); + x_235 = (x_225 > as_type((as_type(x_233) - as_type(15)))); x_236_phi = x_235; } bool const x_236 = x_236_phi; @@ -65,16 +70,16 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_6; int const x_240 = x_197.arr[x_221]; - int const x_244 = (91 + 244); + int const x_244 = as_type((as_type(91) + as_type(244))); buf0 const tint_symbol_7 = {.resolution=x_208}; - float const x_248 = ((tint_symbol_7.resolution.y - fabs(float((x_225 - x_240)))) * 0.06666667f); + float const x_248 = ((tint_symbol_7.resolution.y - fabs(float(as_type((as_type(x_225) - as_type(x_240)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; break; } int2 x_219_1 = x_218; - x_219_1.y = (x_221 + 1); + x_219_1.y = as_type((as_type(x_221) + as_type(1))); int2 const x_219 = x_219_1; { x_218_phi = x_219; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl index 805d16daee..6c9b126752 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-composites/1.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -29,9 +34,9 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float4 const x_198 = *(tint_symbol_9); float2 const x_201 = x_6.resolution; float2 const x_202 = (float2(x_198.x, x_198.y) / x_201); - int const x_204 = -(82); + int const x_204 = tint_unary_minus(82); x_208 = float2(0.0f, float4(x_201, 15.0f, 15.0f).z); - int const x_209 = (120 - 0); + int const x_209 = as_type((as_type(120) - as_type(0))); x_214 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f))); switch(0u) { default: { @@ -51,13 +56,13 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_195 = tint_symbol_4; int const x_227 = x_195.arr[x_221]; - bool const x_229 = (x_225 < (x_227 + 15)); + bool const x_229 = (x_225 < as_type((as_type(x_227) + as_type(15)))); x_236_phi = x_229; if (x_229) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_5; int const x_233 = x_196.arr[x_221]; - x_235 = (x_225 > (x_233 - 15)); + x_235 = (x_225 > as_type((as_type(x_233) - as_type(15)))); x_236_phi = x_235; } bool const x_236 = x_236_phi; @@ -65,16 +70,16 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_6; int const x_240 = x_197.arr[x_221]; - int const x_244 = (91 + 244); + int const x_244 = as_type((as_type(91) + as_type(244))); buf0 const tint_symbol_7 = {.resolution=x_208}; - float const x_248 = ((tint_symbol_7.resolution.y - fabs(float((x_225 - x_240)))) * 0.06666667f); + float const x_248 = ((tint_symbol_7.resolution.y - fabs(float(as_type((as_type(x_225) - as_type(x_240)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; break; } int2 x_219_1 = x_218; - x_219_1.y = (x_221 + 1); + x_219_1.y = as_type((as_type(x_221) + as_type(1))); int2 const x_219 = x_219_1; { x_218_phi = x_219; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl index 192b6aa28d..147da65973 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -26,7 +31,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ int d = 0; float4 const x_63 = *(tint_symbol_5); float2 const x_67 = x_7.resolution; - int const x_68 = -((256 - 14)); + int const x_68 = tint_unary_minus(as_type((as_type(256) - as_type(14)))); pos = (float2(x_63.x, x_63.y) / x_67); float const x_71 = pos.x; float const x_75 = pos.y; @@ -42,7 +47,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ (*(tint_symbol_6)).arr[x_86] = 0; { int const x_88 = i; - i = (x_88 + 1); + i = as_type((as_type(x_88) + as_type(1))); } } p = int2(0, 0); @@ -58,7 +63,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ bool x_151_phi = false; bool x_172_phi = false; int const x_94 = v; - v = (x_94 + 1); + v = as_type((as_type(x_94) + as_type(1))); directions = 0; int const x_97 = p.x; bool const x_98 = (x_97 > 0); @@ -66,14 +71,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_98) { int const x_102 = p.x; int const x_105 = p.y; - int const x_109 = (*(tint_symbol_6)).arr[((x_102 - 2) + (x_105 * 16))]; + int const x_109 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_102) - as_type(2)))) + as_type(as_type((as_type(x_105) * as_type(16))))))]; x_110 = (x_109 == 0); x_111_phi = x_110; } bool const x_111 = x_111_phi; if (x_111) { int const x_114 = directions; - directions = (x_114 + 1); + directions = as_type((as_type(x_114) + as_type(1))); } int const x_117 = p.y; bool const x_118 = (x_117 > 0); @@ -81,14 +86,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_118) { int const x_122 = p.x; int const x_124 = p.y; - int const x_129 = (*(tint_symbol_6)).arr[(x_122 + ((x_124 - 2) * 16))]; + int const x_129 = (*(tint_symbol_6)).arr[as_type((as_type(x_122) + as_type(as_type((as_type(as_type((as_type(x_124) - as_type(2)))) * as_type(16))))))]; x_130 = (x_129 == 0); x_131_phi = x_130; } bool const x_131 = x_131_phi; if (x_131) { int const x_134 = directions; - directions = (x_134 + 1); + directions = as_type((as_type(x_134) + as_type(1))); } int const x_137 = p.x; bool const x_138 = (x_137 < 14); @@ -96,30 +101,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_138) { int const x_142 = p.x; int const x_145 = p.y; - int const x_149 = (*(tint_symbol_6)).arr[((x_142 + 2) + (x_145 * 16))]; + int const x_149 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_142) + as_type(2)))) + as_type(as_type((as_type(x_145) * as_type(16))))))]; x_150 = (x_149 == 0); x_151_phi = x_150; } bool const x_151 = x_151_phi; if (x_151) { int const x_154 = directions; - directions = (x_154 + 1); + directions = as_type((as_type(x_154) + as_type(1))); } - int const x_156 = (256 - x_68); + int const x_156 = as_type((as_type(256) - as_type(x_68))); int const x_158 = p.y; bool const x_159 = (x_158 < 14); x_172_phi = x_159; if (x_159) { int const x_163 = p.x; int const x_165 = p.y; - int const x_170 = (*(tint_symbol_6)).arr[(x_163 + ((x_165 + 2) * 16))]; + int const x_170 = (*(tint_symbol_6)).arr[as_type((as_type(x_163) + as_type(as_type((as_type(as_type((as_type(x_165) + as_type(2)))) * as_type(16))))))]; x_171 = (x_170 == 0); x_172_phi = x_171; } bool const x_172 = x_172_phi; if (x_172) { int const x_175 = directions; - directions = (x_175 + 1); + directions = as_type((as_type(x_175) + as_type(1))); } bool x_237 = false; bool x_250 = false; @@ -148,12 +153,12 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ break; } j = 0; - int const x_189 = (x_156 - x_186); + int const x_189 = as_type((as_type(x_156) - as_type(x_186))); *(tint_symbol_7) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); if (false) { { int const x_216 = i; - i = (x_216 + 1); + i = as_type((as_type(x_216) + as_type(1))); } continue; } @@ -165,34 +170,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_197 = j; int const x_199 = i; - int const x_204 = (*(tint_symbol_6)).arr[((x_197 * 2) + ((x_199 * 2) * 16))]; + int const x_204 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_197) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_199) * as_type(2)))) * as_type(16))))))]; if ((x_204 == 0)) { int const x_208 = j; - p.x = (x_208 * 2); + p.x = as_type((as_type(x_208) * as_type(2))); int const x_211 = i; - p.y = (x_211 * 2); + p.y = as_type((as_type(x_211) * as_type(2))); canwalk = true; } { int const x_214 = j; - j = (x_214 + 1); + j = as_type((as_type(x_214) + as_type(1))); } } { int const x_216 = i; - i = (x_216 + 1); + i = as_type((as_type(x_216) + as_type(1))); } } int const x_219 = p.x; int const x_221 = p.y; - (*(tint_symbol_6)).arr[(x_219 + (x_221 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_219) + as_type(as_type((as_type(x_221) * as_type(16))))))] = 1; } else { int const x_225 = v; int const x_226 = directions; d = (x_225 % x_226); int const x_228 = directions; int const x_229 = v; - v = (x_229 + x_228); + v = as_type((as_type(x_229) + as_type(x_228))); int const x_231 = d; bool const x_232 = (x_231 >= 0); x_238_phi = x_232; @@ -206,25 +211,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_238) { int const x_242 = p.x; int const x_245 = p.y; - int const x_249 = (*(tint_symbol_6)).arr[((x_242 - 2) + (x_245 * 16))]; + int const x_249 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_242) - as_type(2)))) + as_type(as_type((as_type(x_245) * as_type(16))))))]; x_250 = (x_249 == 0); x_251_phi = x_250; } bool const x_251 = x_251_phi; if (x_251) { int const x_254 = d; - d = (x_254 - 1); + d = as_type((as_type(x_254) - as_type(1))); int const x_257 = p.x; int const x_259 = p.y; - (*(tint_symbol_6)).arr[(x_257 + (x_259 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_257) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_6)).arr[((x_264 - 1) + (x_267 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(1)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; int const x_275 = p.y; - (*(tint_symbol_6)).arr[((x_272 - 2) + (x_275 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_272) - as_type(2)))) + as_type(as_type((as_type(x_275) * as_type(16))))))] = 1; int const x_280 = p.x; - p.x = (x_280 - 2); + p.x = as_type((as_type(x_280) - as_type(2))); } int const x_283 = d; bool const x_284 = (x_283 >= 0); @@ -239,25 +244,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_290) { int const x_294 = p.x; int const x_296 = p.y; - int const x_301 = (*(tint_symbol_6)).arr[(x_294 + ((x_296 - 2) * 16))]; + int const x_301 = (*(tint_symbol_6)).arr[as_type((as_type(x_294) + as_type(as_type((as_type(as_type((as_type(x_296) - as_type(2)))) * as_type(16))))))]; x_302 = (x_301 == 0); x_303_phi = x_302; } bool const x_303 = x_303_phi; if (x_303) { int const x_306 = d; - d = (x_306 - 1); + d = as_type((as_type(x_306) - as_type(1))); int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_6)).arr[(x_309 + (x_311 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(x_311) * as_type(16))))))] = 1; int const x_316 = p.x; int const x_318 = p.y; - (*(tint_symbol_6)).arr[(x_316 + ((x_318 - 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_316) + as_type(as_type((as_type(as_type((as_type(x_318) - as_type(1)))) * as_type(16))))))] = 1; int const x_324 = p.x; int const x_326 = p.y; - (*(tint_symbol_6)).arr[(x_324 + ((x_326 - 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_324) + as_type(as_type((as_type(as_type((as_type(x_326) - as_type(2)))) * as_type(16))))))] = 1; int const x_332 = p.y; - p.y = (x_332 - 2); + p.y = as_type((as_type(x_332) - as_type(2))); } int const x_335 = d; bool const x_336 = (x_335 >= 0); @@ -272,25 +277,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_342) { int const x_346 = p.x; int const x_349 = p.y; - int const x_353 = (*(tint_symbol_6)).arr[((x_346 + 2) + (x_349 * 16))]; + int const x_353 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_346) + as_type(2)))) + as_type(as_type((as_type(x_349) * as_type(16))))))]; x_354 = (x_353 == 0); x_355_phi = x_354; } bool const x_355 = x_355_phi; if (x_355) { int const x_358 = d; - d = (x_358 - 1); + d = as_type((as_type(x_358) - as_type(1))); int const x_361 = p.x; int const x_363 = p.y; - (*(tint_symbol_6)).arr[(x_361 + (x_363 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_361) + as_type(as_type((as_type(x_363) * as_type(16))))))] = 1; int const x_368 = p.x; int const x_371 = p.y; - (*(tint_symbol_6)).arr[((x_368 + 1) + (x_371 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_368) + as_type(1)))) + as_type(as_type((as_type(x_371) * as_type(16))))))] = 1; int const x_376 = p.x; int const x_379 = p.y; - (*(tint_symbol_6)).arr[((x_376 + 2) + (x_379 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_376) + as_type(2)))) + as_type(as_type((as_type(x_379) * as_type(16))))))] = 1; int const x_384 = p.x; - p.x = (x_384 + 2); + p.x = as_type((as_type(x_384) + as_type(2))); } int const x_387 = d; bool const x_388 = (x_387 >= 0); @@ -305,30 +310,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_394) { int const x_398 = p.x; int const x_400 = p.y; - int const x_405 = (*(tint_symbol_6)).arr[(x_398 + ((x_400 + 2) * 16))]; + int const x_405 = (*(tint_symbol_6)).arr[as_type((as_type(x_398) + as_type(as_type((as_type(as_type((as_type(x_400) + as_type(2)))) * as_type(16))))))]; x_406 = (x_405 == 0); x_407_phi = x_406; } bool const x_407 = x_407_phi; if (x_407) { int const x_410 = d; - d = (x_410 - 1); + d = as_type((as_type(x_410) - as_type(1))); int const x_413 = p.x; int const x_415 = p.y; - (*(tint_symbol_6)).arr[(x_413 + (x_415 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_413) + as_type(as_type((as_type(x_415) * as_type(16))))))] = 1; int const x_420 = p.x; int const x_422 = p.y; - (*(tint_symbol_6)).arr[(x_420 + ((x_422 + 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_420) + as_type(as_type((as_type(as_type((as_type(x_422) + as_type(1)))) * as_type(16))))))] = 1; int const x_428 = p.x; int const x_430 = p.y; - (*(tint_symbol_6)).arr[(x_428 + ((x_430 + 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_428) + as_type(as_type((as_type(as_type((as_type(x_430) + as_type(2)))) * as_type(16))))))] = 1; int const x_436 = p.y; - p.y = (x_436 + 2); + p.y = as_type((as_type(x_436) + as_type(2))); } } int const x_440 = ipos.y; int const x_443 = ipos.x; - int const x_446 = (*(tint_symbol_6)).arr[((x_440 * 16) + x_443)]; + int const x_446 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_440) * as_type(16)))) + as_type(x_443)))]; if ((x_446 == 1)) { *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl index 192b6aa28d..147da65973 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-dead-break-and-unroll/1.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -26,7 +31,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ int d = 0; float4 const x_63 = *(tint_symbol_5); float2 const x_67 = x_7.resolution; - int const x_68 = -((256 - 14)); + int const x_68 = tint_unary_minus(as_type((as_type(256) - as_type(14)))); pos = (float2(x_63.x, x_63.y) / x_67); float const x_71 = pos.x; float const x_75 = pos.y; @@ -42,7 +47,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ (*(tint_symbol_6)).arr[x_86] = 0; { int const x_88 = i; - i = (x_88 + 1); + i = as_type((as_type(x_88) + as_type(1))); } } p = int2(0, 0); @@ -58,7 +63,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ bool x_151_phi = false; bool x_172_phi = false; int const x_94 = v; - v = (x_94 + 1); + v = as_type((as_type(x_94) + as_type(1))); directions = 0; int const x_97 = p.x; bool const x_98 = (x_97 > 0); @@ -66,14 +71,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_98) { int const x_102 = p.x; int const x_105 = p.y; - int const x_109 = (*(tint_symbol_6)).arr[((x_102 - 2) + (x_105 * 16))]; + int const x_109 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_102) - as_type(2)))) + as_type(as_type((as_type(x_105) * as_type(16))))))]; x_110 = (x_109 == 0); x_111_phi = x_110; } bool const x_111 = x_111_phi; if (x_111) { int const x_114 = directions; - directions = (x_114 + 1); + directions = as_type((as_type(x_114) + as_type(1))); } int const x_117 = p.y; bool const x_118 = (x_117 > 0); @@ -81,14 +86,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_118) { int const x_122 = p.x; int const x_124 = p.y; - int const x_129 = (*(tint_symbol_6)).arr[(x_122 + ((x_124 - 2) * 16))]; + int const x_129 = (*(tint_symbol_6)).arr[as_type((as_type(x_122) + as_type(as_type((as_type(as_type((as_type(x_124) - as_type(2)))) * as_type(16))))))]; x_130 = (x_129 == 0); x_131_phi = x_130; } bool const x_131 = x_131_phi; if (x_131) { int const x_134 = directions; - directions = (x_134 + 1); + directions = as_type((as_type(x_134) + as_type(1))); } int const x_137 = p.x; bool const x_138 = (x_137 < 14); @@ -96,30 +101,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_138) { int const x_142 = p.x; int const x_145 = p.y; - int const x_149 = (*(tint_symbol_6)).arr[((x_142 + 2) + (x_145 * 16))]; + int const x_149 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_142) + as_type(2)))) + as_type(as_type((as_type(x_145) * as_type(16))))))]; x_150 = (x_149 == 0); x_151_phi = x_150; } bool const x_151 = x_151_phi; if (x_151) { int const x_154 = directions; - directions = (x_154 + 1); + directions = as_type((as_type(x_154) + as_type(1))); } - int const x_156 = (256 - x_68); + int const x_156 = as_type((as_type(256) - as_type(x_68))); int const x_158 = p.y; bool const x_159 = (x_158 < 14); x_172_phi = x_159; if (x_159) { int const x_163 = p.x; int const x_165 = p.y; - int const x_170 = (*(tint_symbol_6)).arr[(x_163 + ((x_165 + 2) * 16))]; + int const x_170 = (*(tint_symbol_6)).arr[as_type((as_type(x_163) + as_type(as_type((as_type(as_type((as_type(x_165) + as_type(2)))) * as_type(16))))))]; x_171 = (x_170 == 0); x_172_phi = x_171; } bool const x_172 = x_172_phi; if (x_172) { int const x_175 = directions; - directions = (x_175 + 1); + directions = as_type((as_type(x_175) + as_type(1))); } bool x_237 = false; bool x_250 = false; @@ -148,12 +153,12 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ break; } j = 0; - int const x_189 = (x_156 - x_186); + int const x_189 = as_type((as_type(x_156) - as_type(x_186))); *(tint_symbol_7) = float2x4(float4(0.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 0.0f)); if (false) { { int const x_216 = i; - i = (x_216 + 1); + i = as_type((as_type(x_216) + as_type(1))); } continue; } @@ -165,34 +170,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ } int const x_197 = j; int const x_199 = i; - int const x_204 = (*(tint_symbol_6)).arr[((x_197 * 2) + ((x_199 * 2) * 16))]; + int const x_204 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_197) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_199) * as_type(2)))) * as_type(16))))))]; if ((x_204 == 0)) { int const x_208 = j; - p.x = (x_208 * 2); + p.x = as_type((as_type(x_208) * as_type(2))); int const x_211 = i; - p.y = (x_211 * 2); + p.y = as_type((as_type(x_211) * as_type(2))); canwalk = true; } { int const x_214 = j; - j = (x_214 + 1); + j = as_type((as_type(x_214) + as_type(1))); } } { int const x_216 = i; - i = (x_216 + 1); + i = as_type((as_type(x_216) + as_type(1))); } } int const x_219 = p.x; int const x_221 = p.y; - (*(tint_symbol_6)).arr[(x_219 + (x_221 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_219) + as_type(as_type((as_type(x_221) * as_type(16))))))] = 1; } else { int const x_225 = v; int const x_226 = directions; d = (x_225 % x_226); int const x_228 = directions; int const x_229 = v; - v = (x_229 + x_228); + v = as_type((as_type(x_229) + as_type(x_228))); int const x_231 = d; bool const x_232 = (x_231 >= 0); x_238_phi = x_232; @@ -206,25 +211,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_238) { int const x_242 = p.x; int const x_245 = p.y; - int const x_249 = (*(tint_symbol_6)).arr[((x_242 - 2) + (x_245 * 16))]; + int const x_249 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_242) - as_type(2)))) + as_type(as_type((as_type(x_245) * as_type(16))))))]; x_250 = (x_249 == 0); x_251_phi = x_250; } bool const x_251 = x_251_phi; if (x_251) { int const x_254 = d; - d = (x_254 - 1); + d = as_type((as_type(x_254) - as_type(1))); int const x_257 = p.x; int const x_259 = p.y; - (*(tint_symbol_6)).arr[(x_257 + (x_259 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_257) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_6)).arr[((x_264 - 1) + (x_267 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(1)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; int const x_275 = p.y; - (*(tint_symbol_6)).arr[((x_272 - 2) + (x_275 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_272) - as_type(2)))) + as_type(as_type((as_type(x_275) * as_type(16))))))] = 1; int const x_280 = p.x; - p.x = (x_280 - 2); + p.x = as_type((as_type(x_280) - as_type(2))); } int const x_283 = d; bool const x_284 = (x_283 >= 0); @@ -239,25 +244,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_290) { int const x_294 = p.x; int const x_296 = p.y; - int const x_301 = (*(tint_symbol_6)).arr[(x_294 + ((x_296 - 2) * 16))]; + int const x_301 = (*(tint_symbol_6)).arr[as_type((as_type(x_294) + as_type(as_type((as_type(as_type((as_type(x_296) - as_type(2)))) * as_type(16))))))]; x_302 = (x_301 == 0); x_303_phi = x_302; } bool const x_303 = x_303_phi; if (x_303) { int const x_306 = d; - d = (x_306 - 1); + d = as_type((as_type(x_306) - as_type(1))); int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_6)).arr[(x_309 + (x_311 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(x_311) * as_type(16))))))] = 1; int const x_316 = p.x; int const x_318 = p.y; - (*(tint_symbol_6)).arr[(x_316 + ((x_318 - 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_316) + as_type(as_type((as_type(as_type((as_type(x_318) - as_type(1)))) * as_type(16))))))] = 1; int const x_324 = p.x; int const x_326 = p.y; - (*(tint_symbol_6)).arr[(x_324 + ((x_326 - 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_324) + as_type(as_type((as_type(as_type((as_type(x_326) - as_type(2)))) * as_type(16))))))] = 1; int const x_332 = p.y; - p.y = (x_332 - 2); + p.y = as_type((as_type(x_332) - as_type(2))); } int const x_335 = d; bool const x_336 = (x_335 >= 0); @@ -272,25 +277,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_342) { int const x_346 = p.x; int const x_349 = p.y; - int const x_353 = (*(tint_symbol_6)).arr[((x_346 + 2) + (x_349 * 16))]; + int const x_353 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_346) + as_type(2)))) + as_type(as_type((as_type(x_349) * as_type(16))))))]; x_354 = (x_353 == 0); x_355_phi = x_354; } bool const x_355 = x_355_phi; if (x_355) { int const x_358 = d; - d = (x_358 - 1); + d = as_type((as_type(x_358) - as_type(1))); int const x_361 = p.x; int const x_363 = p.y; - (*(tint_symbol_6)).arr[(x_361 + (x_363 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_361) + as_type(as_type((as_type(x_363) * as_type(16))))))] = 1; int const x_368 = p.x; int const x_371 = p.y; - (*(tint_symbol_6)).arr[((x_368 + 1) + (x_371 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_368) + as_type(1)))) + as_type(as_type((as_type(x_371) * as_type(16))))))] = 1; int const x_376 = p.x; int const x_379 = p.y; - (*(tint_symbol_6)).arr[((x_376 + 2) + (x_379 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_376) + as_type(2)))) + as_type(as_type((as_type(x_379) * as_type(16))))))] = 1; int const x_384 = p.x; - p.x = (x_384 + 2); + p.x = as_type((as_type(x_384) + as_type(2))); } int const x_387 = d; bool const x_388 = (x_387 >= 0); @@ -305,30 +310,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread tint_ if (x_394) { int const x_398 = p.x; int const x_400 = p.y; - int const x_405 = (*(tint_symbol_6)).arr[(x_398 + ((x_400 + 2) * 16))]; + int const x_405 = (*(tint_symbol_6)).arr[as_type((as_type(x_398) + as_type(as_type((as_type(as_type((as_type(x_400) + as_type(2)))) * as_type(16))))))]; x_406 = (x_405 == 0); x_407_phi = x_406; } bool const x_407 = x_407_phi; if (x_407) { int const x_410 = d; - d = (x_410 - 1); + d = as_type((as_type(x_410) - as_type(1))); int const x_413 = p.x; int const x_415 = p.y; - (*(tint_symbol_6)).arr[(x_413 + (x_415 * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_413) + as_type(as_type((as_type(x_415) * as_type(16))))))] = 1; int const x_420 = p.x; int const x_422 = p.y; - (*(tint_symbol_6)).arr[(x_420 + ((x_422 + 1) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_420) + as_type(as_type((as_type(as_type((as_type(x_422) + as_type(1)))) * as_type(16))))))] = 1; int const x_428 = p.x; int const x_430 = p.y; - (*(tint_symbol_6)).arr[(x_428 + ((x_430 + 2) * 16))] = 1; + (*(tint_symbol_6)).arr[as_type((as_type(x_428) + as_type(as_type((as_type(as_type((as_type(x_430) + as_type(2)))) * as_type(16))))))] = 1; int const x_436 = p.y; - p.y = (x_436 + 2); + p.y = as_type((as_type(x_436) + as_type(2))); } } int const x_440 = ipos.y; int const x_443 = ipos.x; - int const x_446 = (*(tint_symbol_6)).arr[((x_440 * 16) + x_443)]; + int const x_446 = (*(tint_symbol_6)).arr[as_type((as_type(as_type((as_type(x_440) * as_type(16)))) + as_type(x_443)))]; if ((x_446 == 1)) { *(tint_symbol_8) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl index 8780c86dfe..d0724914fb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.spvasm.expected.msl @@ -83,12 +83,12 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_171 = i; tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; indexable_3 = tint_symbol_7; - float4 const x_177 = indexable_3.arr[((((int(x_164) * int(x_168)) + (x_171 * 9)) + 11) % 16)]; + float4 const x_177 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_164)) * as_type(int(x_168))))) + as_type(as_type((as_type(x_171) * as_type(9))))))) + as_type(11))) % 16)]; res = x_177; } { int const x_178 = i; - i = (x_178 + 1); + i = as_type((as_type(x_178) + as_type(1))); } } float4 const x_180 = res; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl index 8780c86dfe..d0724914fb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/0-opt.wgsl.expected.msl @@ -83,12 +83,12 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_171 = i; tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; indexable_3 = tint_symbol_7; - float4 const x_177 = indexable_3.arr[((((int(x_164) * int(x_168)) + (x_171 * 9)) + 11) % 16)]; + float4 const x_177 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_164)) * as_type(int(x_168))))) + as_type(as_type((as_type(x_171) * as_type(9))))))) + as_type(11))) % 16)]; res = x_177; } { int const x_178 = i; - i = (x_178 + 1); + i = as_type((as_type(x_178) + as_type(1))); } } float4 const x_180 = res; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl index 5b43db6ff9..d8c43f8ff4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.spvasm.expected.msl @@ -84,12 +84,12 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_175 = i; tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; indexable_3 = tint_symbol_7; - float4 const x_181 = indexable_3.arr[((((int(x_168) * int(x_172)) + (x_175 * 9)) + 11) % 16)]; + float4 const x_181 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_168)) * as_type(int(x_172))))) + as_type(as_type((as_type(x_175) * as_type(9))))))) + as_type(11))) % 16)]; res = x_181; } { int const x_182 = i; - i = (x_182 + 1); + i = as_type((as_type(x_182) + as_type(1))); } } float4 const x_184 = res; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl index 5b43db6ff9..d8c43f8ff4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-declare-bvec4/1.wgsl.expected.msl @@ -84,12 +84,12 @@ float4 match_vf2_(thread float2* const pos_1) { int const x_175 = i; tint_array_wrapper_2 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; indexable_3 = tint_symbol_7; - float4 const x_181 = indexable_3.arr[((((int(x_168) * int(x_172)) + (x_175 * 9)) + 11) % 16)]; + float4 const x_181 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_168)) * as_type(int(x_172))))) + as_type(as_type((as_type(x_175) * as_type(9))))))) + as_type(11))) % 16)]; res = x_181; } { int const x_182 = i; - i = (x_182 + 1); + i = as_type((as_type(x_182) + as_type(1))); } } float4 const x_184 = res; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl index 5c560fcb69..40421fe99b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl @@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_255 = *(from); i = x_255; int const x_256 = *(mid); - j = (x_256 + 1); + j = as_type((as_type(x_256) + as_type(1))); while (true) { int const x_262 = i; int const x_263 = *(mid); @@ -43,16 +43,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_275 = (*(tint_symbol_5)).arr[x_273]; if ((x_272 < x_275)) { int const x_280 = k; - k = (x_280 + 1); + k = as_type((as_type(x_280) + as_type(1))); int const x_282 = i; - i = (x_282 + 1); + i = as_type((as_type(x_282) + as_type(1))); int const x_285 = (*(tint_symbol_5)).arr[x_282]; (*(tint_symbol_6)).arr[x_280] = x_285; } else { int const x_287 = k; - k = (x_287 + 1); + k = as_type((as_type(x_287) + as_type(1))); int const x_289 = j; - j = (x_289 + 1); + j = as_type((as_type(x_289) + as_type(1))); int const x_292 = (*(tint_symbol_5)).arr[x_289]; (*(tint_symbol_6)).arr[x_287] = x_292; } @@ -66,9 +66,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_305 = k; - k = (x_305 + 1); + k = as_type((as_type(x_305) + as_type(1))); int const x_307 = i; - i = (x_307 + 1); + i = as_type((as_type(x_307) + as_type(1))); int const x_310 = (*(tint_symbol_5)).arr[x_307]; (*(tint_symbol_6)).arr[x_305] = x_310; } @@ -87,7 +87,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_321] = x_324; { int const x_326 = i_1; - i_1 = (x_326 + 1); + i_1 = as_type((as_type(x_326) + as_type(1))); } } return; @@ -127,11 +127,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_346; int const x_347 = i_2; int const x_348 = m; - mid_1 = ((x_347 + x_348) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_347) + as_type(x_348)))) - as_type(1))); int const x_351 = i_2; int const x_352 = m; int const x_356 = high; - to_1 = min(((x_351 + (2 * x_352)) - 1), x_356); + to_1 = min(as_type((as_type(as_type((as_type(x_351) + as_type(as_type((as_type(2) * as_type(x_352))))))) - as_type(1))), x_356); int const x_358 = from_1; param = x_358; int const x_359 = mid_1; @@ -142,12 +142,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_362 = m; int const x_364 = i_2; - i_2 = (x_364 + (2 * x_362)); + i_2 = as_type((as_type(x_364) + as_type(as_type((as_type(2) * as_type(x_362)))))); } } { int const x_366 = m; - m = (2 * x_366); + m = as_type((as_type(2) * as_type(x_366))); } } return; @@ -217,7 +217,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_125 = i_3; - i_3 = (x_125 + 1); + i_3 = as_type((as_type(x_125) + as_type(1))); { int const x_127 = i_3; if ((x_127 < 10)) { @@ -239,7 +239,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_136] = x_139; { int const x_141 = j_1; - j_1 = (x_141 + 1); + j_1 = as_type((as_type(x_141) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl index 6e7adb415a..aff7c99b52 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.wgsl.expected.msl @@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_255 = *(from); i = x_255; int const x_256 = *(mid); - j = (x_256 + 1); + j = as_type((as_type(x_256) + as_type(1))); while (true) { int const x_262 = i; int const x_263 = *(mid); @@ -43,16 +43,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_275 = (*(tint_symbol_5)).arr[x_273]; if ((x_272 < x_275)) { int const x_280 = k; - k = (x_280 + 1); + k = as_type((as_type(x_280) + as_type(1))); int const x_282 = i; - i = (x_282 + 1); + i = as_type((as_type(x_282) + as_type(1))); int const x_285 = (*(tint_symbol_5)).arr[x_282]; (*(tint_symbol_6)).arr[x_280] = x_285; } else { int const x_287 = k; - k = (x_287 + 1); + k = as_type((as_type(x_287) + as_type(1))); int const x_289 = j; - j = (x_289 + 1); + j = as_type((as_type(x_289) + as_type(1))); int const x_292 = (*(tint_symbol_5)).arr[x_289]; (*(tint_symbol_6)).arr[x_287] = x_292; } @@ -66,9 +66,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_305 = k; - k = (x_305 + 1); + k = as_type((as_type(x_305) + as_type(1))); int const x_307 = i; - i = (x_307 + 1); + i = as_type((as_type(x_307) + as_type(1))); int const x_310 = (*(tint_symbol_5)).arr[x_307]; (*(tint_symbol_6)).arr[x_305] = x_310; } @@ -87,7 +87,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_321] = x_324; { int const x_326 = i_1; - i_1 = (x_326 + 1); + i_1 = as_type((as_type(x_326) + as_type(1))); } } return; @@ -127,11 +127,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_346; int const x_347 = i_2; int const x_348 = m; - mid_1 = ((x_347 + x_348) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_347) + as_type(x_348)))) - as_type(1))); int const x_351 = i_2; int const x_352 = m; int const x_356 = high; - to_1 = min(((x_351 + (2 * x_352)) - 1), x_356); + to_1 = min(as_type((as_type(as_type((as_type(x_351) + as_type(as_type((as_type(2) * as_type(x_352))))))) - as_type(1))), x_356); int const x_358 = from_1; param = x_358; int const x_359 = mid_1; @@ -142,12 +142,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_362 = m; int const x_364 = i_2; - i_2 = (x_364 + (2 * x_362)); + i_2 = as_type((as_type(x_364) + as_type(as_type((as_type(2) * as_type(x_362)))))); } } { int const x_366 = m; - m = (2 * x_366); + m = as_type((as_type(2) * as_type(x_366))); } } return; @@ -217,7 +217,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_125 = i_3; - i_3 = (x_125 + 1); + i_3 = as_type((as_type(x_125) + as_type(1))); { int const x_127 = i_3; if ((x_127 < 10)) { @@ -239,7 +239,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_136] = x_139; { int const x_141 = j_1; - j_1 = (x_141 + 1); + j_1 = as_type((as_type(x_141) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl index 5676576ae8..39c99c466a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl @@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_256 = *(from); i = x_256; int const x_257 = *(mid); - j = (x_257 + 1); + j = as_type((as_type(x_257) + as_type(1))); while (true) { int const x_263 = i; int const x_264 = *(mid); @@ -43,16 +43,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_276 = (*(tint_symbol_5)).arr[x_274]; if ((x_273 < x_276)) { int const x_281 = k; - k = (x_281 + 1); + k = as_type((as_type(x_281) + as_type(1))); int const x_283 = i; - i = (x_283 + 1); + i = as_type((as_type(x_283) + as_type(1))); int const x_286 = (*(tint_symbol_5)).arr[x_283]; (*(tint_symbol_6)).arr[x_281] = x_286; } else { int const x_288 = k; - k = (x_288 + 1); + k = as_type((as_type(x_288) + as_type(1))); int const x_290 = j; - j = (x_290 + 1); + j = as_type((as_type(x_290) + as_type(1))); int const x_293 = (*(tint_symbol_5)).arr[x_290]; (*(tint_symbol_6)).arr[x_288] = x_293; } @@ -66,9 +66,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_306 = k; - k = (x_306 + 1); + k = as_type((as_type(x_306) + as_type(1))); int const x_308 = i; - i = (x_308 + 1); + i = as_type((as_type(x_308) + as_type(1))); int const x_311 = (*(tint_symbol_5)).arr[x_308]; (*(tint_symbol_6)).arr[x_306] = x_311; } @@ -87,7 +87,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_322] = x_325; { int const x_327 = i_1; - i_1 = (x_327 + 1); + i_1 = as_type((as_type(x_327) + as_type(1))); } } return; @@ -127,11 +127,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_347; int const x_348 = i_2; int const x_349 = m; - mid_1 = ((x_348 + x_349) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_348) + as_type(x_349)))) - as_type(1))); int const x_352 = i_2; int const x_353 = m; int const x_357 = high; - to_1 = min(((x_352 + (2 * x_353)) - 1), x_357); + to_1 = min(as_type((as_type(as_type((as_type(x_352) + as_type(as_type((as_type(2) * as_type(x_353))))))) - as_type(1))), x_357); int const x_359 = from_1; param = x_359; int const x_360 = mid_1; @@ -142,12 +142,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_363 = m; int const x_365 = i_2; - i_2 = (x_365 + (2 * x_363)); + i_2 = as_type((as_type(x_365) + as_type(as_type((as_type(2) * as_type(x_363)))))); } } { int const x_367 = m; - m = (2 * x_367); + m = as_type((as_type(2) * as_type(x_367))); } } return; @@ -228,7 +228,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_126 = i_3; - i_3 = (x_126 + 1); + i_3 = as_type((as_type(x_126) + as_type(1))); { int const x_128 = i_3; if ((x_128 < 10)) { @@ -250,7 +250,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_137] = x_140; { int const x_142 = j_1; - j_1 = (x_142 + 1); + j_1 = as_type((as_type(x_142) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl index 983295be0f..d17e4665fb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.wgsl.expected.msl @@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_256 = *(from); i = x_256; int const x_257 = *(mid); - j = (x_257 + 1); + j = as_type((as_type(x_257) + as_type(1))); while (true) { int const x_263 = i; int const x_264 = *(mid); @@ -43,16 +43,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_276 = (*(tint_symbol_5)).arr[x_274]; if ((x_273 < x_276)) { int const x_281 = k; - k = (x_281 + 1); + k = as_type((as_type(x_281) + as_type(1))); int const x_283 = i; - i = (x_283 + 1); + i = as_type((as_type(x_283) + as_type(1))); int const x_286 = (*(tint_symbol_5)).arr[x_283]; (*(tint_symbol_6)).arr[x_281] = x_286; } else { int const x_288 = k; - k = (x_288 + 1); + k = as_type((as_type(x_288) + as_type(1))); int const x_290 = j; - j = (x_290 + 1); + j = as_type((as_type(x_290) + as_type(1))); int const x_293 = (*(tint_symbol_5)).arr[x_290]; (*(tint_symbol_6)).arr[x_288] = x_293; } @@ -66,9 +66,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_306 = k; - k = (x_306 + 1); + k = as_type((as_type(x_306) + as_type(1))); int const x_308 = i; - i = (x_308 + 1); + i = as_type((as_type(x_308) + as_type(1))); int const x_311 = (*(tint_symbol_5)).arr[x_308]; (*(tint_symbol_6)).arr[x_306] = x_311; } @@ -87,7 +87,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_322] = x_325; { int const x_327 = i_1; - i_1 = (x_327 + 1); + i_1 = as_type((as_type(x_327) + as_type(1))); } } return; @@ -127,11 +127,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_347; int const x_348 = i_2; int const x_349 = m; - mid_1 = ((x_348 + x_349) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_348) + as_type(x_349)))) - as_type(1))); int const x_352 = i_2; int const x_353 = m; int const x_357 = high; - to_1 = min(((x_352 + (2 * x_353)) - 1), x_357); + to_1 = min(as_type((as_type(as_type((as_type(x_352) + as_type(as_type((as_type(2) * as_type(x_353))))))) - as_type(1))), x_357); int const x_359 = from_1; param = x_359; int const x_360 = mid_1; @@ -142,12 +142,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_363 = m; int const x_365 = i_2; - i_2 = (x_365 + (2 * x_363)); + i_2 = as_type((as_type(x_365) + as_type(as_type((as_type(2) * as_type(x_363)))))); } } { int const x_367 = m; - m = (2 * x_367); + m = as_type((as_type(2) * as_type(x_367))); } } return; @@ -228,7 +228,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_126 = i_3; - i_3 = (x_126 + 1); + i_3 = as_type((as_type(x_126) + as_type(1))); { int const x_128 = i_3; if ((x_128 < 10)) { @@ -250,7 +250,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_137] = x_140; { int const x_142 = j_1; - j_1 = (x_142 + 1); + j_1 = as_type((as_type(x_142) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl index 45769f1fe4..e54d7794f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.spvasm.expected.msl @@ -31,8 +31,8 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } { float const x_48 = x_9.injectionSwitch.y; - data.arr[x_40] = (float((10 - x_40)) * x_48); - x_41 = (x_40 + 1); + data.arr[x_40] = (float(as_type((as_type(10) - as_type(x_40)))) * x_48); + x_41 = as_type((as_type(x_40) + as_type(1))); x_40_phi = x_41; } } @@ -56,9 +56,9 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } else { break; } - if ((x_59 < (x_52 + 1))) { + if ((x_59 < as_type((as_type(x_52) + as_type(1))))) { { - x_60 = (x_59 + 1); + x_60 = as_type((as_type(x_59) + as_type(1))); x_59_phi = x_60; } continue; @@ -84,12 +84,12 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy data.arr[x_71_save] = x_87; } { - x_60 = (x_59 + 1); + x_60 = as_type((as_type(x_59) + as_type(1))); x_59_phi = x_60; } } { - x_53 = (x_52 + 1); + x_53 = as_type((as_type(x_52) + as_type(1))); x_52_phi = x_53; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl index 45769f1fe4..e54d7794f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/0.wgsl.expected.msl @@ -31,8 +31,8 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } { float const x_48 = x_9.injectionSwitch.y; - data.arr[x_40] = (float((10 - x_40)) * x_48); - x_41 = (x_40 + 1); + data.arr[x_40] = (float(as_type((as_type(10) - as_type(x_40)))) * x_48); + x_41 = as_type((as_type(x_40) + as_type(1))); x_40_phi = x_41; } } @@ -56,9 +56,9 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } else { break; } - if ((x_59 < (x_52 + 1))) { + if ((x_59 < as_type((as_type(x_52) + as_type(1))))) { { - x_60 = (x_59 + 1); + x_60 = as_type((as_type(x_59) + as_type(1))); x_59_phi = x_60; } continue; @@ -84,12 +84,12 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy data.arr[x_71_save] = x_87; } { - x_60 = (x_59 + 1); + x_60 = as_type((as_type(x_59) + as_type(1))); x_59_phi = x_60; } } { - x_53 = (x_52 + 1); + x_53 = as_type((as_type(x_52) + as_type(1))); x_52_phi = x_53; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl index 0bcea9e569..4539194636 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.spvasm.expected.msl @@ -31,8 +31,8 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } { float const x_49 = x_9.injectionSwitch.y; - data.arr[x_41] = (float((10 - x_41)) * x_49); - x_42 = (x_41 + 1); + data.arr[x_41] = (float(as_type((as_type(10) - as_type(x_41)))) * x_49); + x_42 = as_type((as_type(x_41) + as_type(1))); x_41_phi = x_42; } } @@ -56,9 +56,9 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } else { break; } - if ((x_60 < (x_53 + 1))) { + if ((x_60 < as_type((as_type(x_53) + as_type(1))))) { { - x_61 = (x_60 + 1); + x_61 = as_type((as_type(x_60) + as_type(1))); x_60_phi = x_61; } continue; @@ -84,12 +84,12 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy data.arr[x_72_save] = x_88; } { - x_61 = (x_60 + 1); + x_61 = as_type((as_type(x_60) + as_type(1))); x_60_phi = x_61; } } { - x_54 = (x_53 + 1); + x_54 = as_type((as_type(x_53) + as_type(1))); x_53_phi = x_54; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl index 0bcea9e569..4539194636 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block2/1.wgsl.expected.msl @@ -31,8 +31,8 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } { float const x_49 = x_9.injectionSwitch.y; - data.arr[x_41] = (float((10 - x_41)) * x_49); - x_42 = (x_41 + 1); + data.arr[x_41] = (float(as_type((as_type(10) - as_type(x_41)))) * x_49); + x_42 = as_type((as_type(x_41) + as_type(1))); x_41_phi = x_42; } } @@ -56,9 +56,9 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } else { break; } - if ((x_60 < (x_53 + 1))) { + if ((x_60 < as_type((as_type(x_53) + as_type(1))))) { { - x_61 = (x_60 + 1); + x_61 = as_type((as_type(x_60) + as_type(1))); x_60_phi = x_61; } continue; @@ -84,12 +84,12 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy data.arr[x_72_save] = x_88; } { - x_61 = (x_60 + 1); + x_61 = as_type((as_type(x_60) + as_type(1))); x_60_phi = x_61; } } { - x_54 = (x_53 + 1); + x_54 = as_type((as_type(x_53) + as_type(1))); x_53_phi = x_54; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl index 4bc98160e9..eefc29704f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl @@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_257 = *(from); i = x_257; int const x_258 = *(mid); - j = (x_258 + 1); + j = as_type((as_type(x_258) + as_type(1))); while (true) { int const x_264 = i; int const x_265 = *(mid); @@ -43,16 +43,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_277 = (*(tint_symbol_5)).arr[x_275]; if ((x_274 < x_277)) { int const x_282 = k; - k = (x_282 + 1); + k = as_type((as_type(x_282) + as_type(1))); int const x_284 = i; - i = (x_284 + 1); + i = as_type((as_type(x_284) + as_type(1))); int const x_287 = (*(tint_symbol_5)).arr[x_284]; (*(tint_symbol_6)).arr[x_282] = x_287; } else { int const x_289 = k; - k = (x_289 + 1); + k = as_type((as_type(x_289) + as_type(1))); int const x_291 = j; - j = (x_291 + 1); + j = as_type((as_type(x_291) + as_type(1))); int const x_294 = (*(tint_symbol_5)).arr[x_291]; (*(tint_symbol_6)).arr[x_289] = x_294; } @@ -70,9 +70,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_309 = k; - k = (x_309 + 1); + k = as_type((as_type(x_309) + as_type(1))); int const x_311 = i; - i = (x_311 + 1); + i = as_type((as_type(x_311) + as_type(1))); int const x_314 = (*(tint_symbol_5)).arr[x_311]; (*(tint_symbol_6)).arr[x_309] = x_314; } @@ -91,7 +91,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_325] = x_328; { int const x_330 = i_1; - i_1 = (x_330 + 1); + i_1 = as_type((as_type(x_330) + as_type(1))); } } return; @@ -131,11 +131,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_350; int const x_351 = i_2; int const x_352 = m; - mid_1 = ((x_351 + x_352) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_351) + as_type(x_352)))) - as_type(1))); int const x_355 = i_2; int const x_356 = m; int const x_360 = high; - to_1 = min(((x_355 + (2 * x_356)) - 1), x_360); + to_1 = min(as_type((as_type(as_type((as_type(x_355) + as_type(as_type((as_type(2) * as_type(x_356))))))) - as_type(1))), x_360); int const x_362 = from_1; param = x_362; int const x_363 = mid_1; @@ -146,12 +146,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_366 = m; int const x_368 = i_2; - i_2 = (x_368 + (2 * x_366)); + i_2 = as_type((as_type(x_368) + as_type(as_type((as_type(2) * as_type(x_366)))))); } } { int const x_370 = m; - m = (2 * x_370); + m = as_type((as_type(2) * as_type(x_370))); } } return; @@ -221,7 +221,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_127 = i_3; - i_3 = (x_127 + 1); + i_3 = as_type((as_type(x_127) + as_type(1))); { int const x_129 = i_3; if ((x_129 < 10)) { @@ -243,7 +243,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_138] = x_141; { int const x_143 = j_1; - j_1 = (x_143 + 1); + j_1 = as_type((as_type(x_143) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl index e2f24480fa..7455bc821f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.wgsl.expected.msl @@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_257 = *(from); i = x_257; int const x_258 = *(mid); - j = (x_258 + 1); + j = as_type((as_type(x_258) + as_type(1))); while (true) { int const x_264 = i; int const x_265 = *(mid); @@ -43,16 +43,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_277 = (*(tint_symbol_5)).arr[x_275]; if ((x_274 < x_277)) { int const x_282 = k; - k = (x_282 + 1); + k = as_type((as_type(x_282) + as_type(1))); int const x_284 = i; - i = (x_284 + 1); + i = as_type((as_type(x_284) + as_type(1))); int const x_287 = (*(tint_symbol_5)).arr[x_284]; (*(tint_symbol_6)).arr[x_282] = x_287; } else { int const x_289 = k; - k = (x_289 + 1); + k = as_type((as_type(x_289) + as_type(1))); int const x_291 = j; - j = (x_291 + 1); + j = as_type((as_type(x_291) + as_type(1))); int const x_294 = (*(tint_symbol_5)).arr[x_291]; (*(tint_symbol_6)).arr[x_289] = x_294; } @@ -70,9 +70,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_309 = k; - k = (x_309 + 1); + k = as_type((as_type(x_309) + as_type(1))); int const x_311 = i; - i = (x_311 + 1); + i = as_type((as_type(x_311) + as_type(1))); int const x_314 = (*(tint_symbol_5)).arr[x_311]; (*(tint_symbol_6)).arr[x_309] = x_314; } @@ -91,7 +91,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_325] = x_328; { int const x_330 = i_1; - i_1 = (x_330 + 1); + i_1 = as_type((as_type(x_330) + as_type(1))); } } return; @@ -131,11 +131,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_350; int const x_351 = i_2; int const x_352 = m; - mid_1 = ((x_351 + x_352) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_351) + as_type(x_352)))) - as_type(1))); int const x_355 = i_2; int const x_356 = m; int const x_360 = high; - to_1 = min(((x_355 + (2 * x_356)) - 1), x_360); + to_1 = min(as_type((as_type(as_type((as_type(x_355) + as_type(as_type((as_type(2) * as_type(x_356))))))) - as_type(1))), x_360); int const x_362 = from_1; param = x_362; int const x_363 = mid_1; @@ -146,12 +146,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_366 = m; int const x_368 = i_2; - i_2 = (x_368 + (2 * x_366)); + i_2 = as_type((as_type(x_368) + as_type(as_type((as_type(2) * as_type(x_366)))))); } } { int const x_370 = m; - m = (2 * x_370); + m = as_type((as_type(2) * as_type(x_370))); } } return; @@ -221,7 +221,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_127 = i_3; - i_3 = (x_127 + 1); + i_3 = as_type((as_type(x_127) + as_type(1))); { int const x_129 = i_3; if ((x_129 < 10)) { @@ -243,7 +243,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_138] = x_141; { int const x_143 = j_1; - j_1 = (x_143 + 1); + j_1 = as_type((as_type(x_143) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl index 94bc881457..320cbdbea3 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.spvasm.expected.msl @@ -658,7 +658,7 @@ void main_1(thread float4* const tint_symbol_23) { int const x_357 = x_357_phi; x_360 = x_360_phi; int const x_362 = x_362_phi; - int const x_365 = (6 - 15); + int const x_365 = as_type((as_type(6) - as_type(15))); if ((x_362 < 20)) { } else { break; @@ -720,7 +720,7 @@ void main_1(thread float4* const tint_symbol_23) { case 17: { x_402_phi = x_360; if ((x_358 == as_type(x_362))) { - x_401 = as_type((x_360 + as_type(1))); + x_401 = as_type(as_type((as_type(x_360) + as_type(as_type(1))))); x_402_phi = x_401; } x_402 = x_402_phi; @@ -730,7 +730,7 @@ void main_1(thread float4* const tint_symbol_23) { default: { x_407_phi = x_360; if ((x_358 == as_type(-1))) { - x_406 = as_type((x_360 + as_type(1))); + x_406 = as_type(as_type((as_type(x_360) + as_type(as_type(1))))); x_407_phi = x_406; } x_407 = x_407_phi; @@ -740,7 +740,7 @@ void main_1(thread float4* const tint_symbol_23) { } int const x_361 = x_361_phi; { - x_363 = (x_362 + 1); + x_363 = as_type((as_type(x_362) + as_type(1))); x_357_phi = x_358; x_360_phi = x_361; x_362_phi = x_363; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl index 94bc881457..320cbdbea3 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-load-from-frag-color/1.wgsl.expected.msl @@ -658,7 +658,7 @@ void main_1(thread float4* const tint_symbol_23) { int const x_357 = x_357_phi; x_360 = x_360_phi; int const x_362 = x_362_phi; - int const x_365 = (6 - 15); + int const x_365 = as_type((as_type(6) - as_type(15))); if ((x_362 < 20)) { } else { break; @@ -720,7 +720,7 @@ void main_1(thread float4* const tint_symbol_23) { case 17: { x_402_phi = x_360; if ((x_358 == as_type(x_362))) { - x_401 = as_type((x_360 + as_type(1))); + x_401 = as_type(as_type((as_type(x_360) + as_type(as_type(1))))); x_402_phi = x_401; } x_402 = x_402_phi; @@ -730,7 +730,7 @@ void main_1(thread float4* const tint_symbol_23) { default: { x_407_phi = x_360; if ((x_358 == as_type(-1))) { - x_406 = as_type((x_360 + as_type(1))); + x_406 = as_type(as_type((as_type(x_360) + as_type(as_type(1))))); x_407_phi = x_406; } x_407 = x_407_phi; @@ -740,7 +740,7 @@ void main_1(thread float4* const tint_symbol_23) { } int const x_361 = x_361_phi; { - x_363 = (x_362 + 1); + x_363 = as_type((as_type(x_362) + as_type(1))); x_357_phi = x_358; x_360_phi = x_361; x_362_phi = x_363; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl index ecbf92fc29..2d1262837f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.spvasm.expected.msl @@ -82,12 +82,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float const x_128 = x_79.arr[x_92].y; tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; x_80 = tint_symbol_7; - x_136 = x_80.arr[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)]; + x_136 = x_80.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_125)) * as_type(int(x_128))))) + as_type(as_type((as_type(x_92) * as_type(9))))))) + as_type(11))) % 16)]; x_90_phi = x_136; } float4 const x_90 = x_90_phi; { - x_93 = (x_92 + 1); + x_93 = as_type((as_type(x_92) + as_type(1))); x_89_phi = x_90; x_92_phi = x_93; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl index ecbf92fc29..2d1262837f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-null-in-phi-and-unroll/1.wgsl.expected.msl @@ -82,12 +82,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float const x_128 = x_79.arr[x_92].y; tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; x_80 = tint_symbol_7; - x_136 = x_80.arr[((((int(x_125) * int(x_128)) + (x_92 * 9)) + 11) % 16)]; + x_136 = x_80.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_125)) * as_type(int(x_128))))) + as_type(as_type((as_type(x_92) * as_type(9))))))) + as_type(11))) % 16)]; x_90_phi = x_136; } float4 const x_90 = x_90_phi; { - x_93 = (x_92 + 1); + x_93 = as_type((as_type(x_92) + as_type(1))); x_89_phi = x_90; x_92_phi = x_93; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl index d75eca0ec1..5761e9d70d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.spvasm.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float float4 const x_55 = *(tint_symbol_7); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); - int const x_67 = (int((x_59.x * 10.0f)) + (int((x_59.y * 10.0f)) * 10)); + int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); x_69_phi = 100; x_72_phi = 0; while (true) { @@ -35,8 +35,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float break; } { - x_70 = (((4 * as_type(x_69)) * (1000 - as_type(x_69))) / 1000); - x_73 = (x_72 + 1); + x_70 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_69))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_69))))))) / 1000); + x_73 = as_type((as_type(x_72) + as_type(1))); x_69_phi = x_70; x_72_phi = x_73; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl index d75eca0ec1..5761e9d70d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/1.wgsl.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float float4 const x_55 = *(tint_symbol_7); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); - int const x_67 = (int((x_59.x * 10.0f)) + (int((x_59.y * 10.0f)) * 10)); + int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); x_69_phi = 100; x_72_phi = 0; while (true) { @@ -35,8 +35,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float break; } { - x_70 = (((4 * as_type(x_69)) * (1000 - as_type(x_69))) / 1000); - x_73 = (x_72 + 1); + x_70 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_69))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_69))))))) / 1000); + x_73 = as_type((as_type(x_72) + as_type(1))); x_69_phi = x_70; x_72_phi = x_73; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl index f126328cb8..1a7dc718d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.spvasm.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float4 const x_55 = *(tint_symbol_6); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); - int const x_67 = (int((x_59.x * 10.0f)) + (int((x_59.y * 10.0f)) * 10)); + int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); x_69_phi = 100; x_72_phi = 0; while (true) { @@ -35,8 +35,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } { - x_70 = (((4 * as_type(x_69)) * (1000 - as_type(x_69))) / 1000); - x_73 = (x_72 + 1); + x_70 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_69))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_69))))))) / 1000); + x_73 = as_type((as_type(x_72) + as_type(1))); x_69_phi = x_70; x_72_phi = x_73; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl index f126328cb8..1a7dc718d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bifurcation-Os-mutate-var-vector-shuffle/2.wgsl.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float4 const x_55 = *(tint_symbol_6); float2 const x_58 = x_6.resolution; float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); - int const x_67 = (int((x_59.x * 10.0f)) + (int((x_59.y * 10.0f)) * 10)); + int const x_67 = as_type((as_type(int((x_59.x * 10.0f))) + as_type(as_type((as_type(int((x_59.y * 10.0f))) * as_type(10)))))); x_69_phi = 100; x_72_phi = 0; while (true) { @@ -35,8 +35,8 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } { - x_70 = (((4 * as_type(x_69)) * (1000 - as_type(x_69))) / 1000); - x_73 = (x_72 + 1); + x_70 = (as_type((as_type(as_type((as_type(4) * as_type(as_type(x_69))))) * as_type(as_type((as_type(1000) - as_type(as_type(x_69))))))) / 1000); + x_73 = as_type((as_type(x_72) + as_type(1))); x_69_phi = x_70; x_72_phi = x_73; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl index 08dcf56e46..c8ec7ecb6b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.spvasm.expected.msl @@ -53,10 +53,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s int const x_59 = i; int const x_60 = i; float const x_64 = x_13.injectionSwitch.y; - data.arr[x_59] = (float((10 - x_60)) * x_64); + data.arr[x_59] = (float(as_type((as_type(10) - as_type(x_60)))) * x_64); { int const x_67 = i; - i = (x_67 + 1); + i = as_type((as_type(x_67) + as_type(1))); } } i_1 = 0; @@ -75,10 +75,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } int const x_83 = j; int const x_84 = i_1; - if ((x_83 < (x_84 + 1))) { + if ((x_83 < as_type((as_type(x_84) + as_type(1))))) { { int const x_110 = j; - j = (x_110 + 1); + j = as_type((as_type(x_110) + as_type(1))); } continue; } @@ -105,12 +105,12 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } { int const x_110 = j; - j = (x_110 + 1); + j = as_type((as_type(x_110) + as_type(1))); } } { int const x_112 = i_1; - i_1 = (x_112 + 1); + i_1 = as_type((as_type(x_112) + as_type(1))); } } float const x_115 = (*(tint_symbol_6)).x; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl index 08dcf56e46..c8ec7ecb6b 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/0.wgsl.expected.msl @@ -53,10 +53,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s int const x_59 = i; int const x_60 = i; float const x_64 = x_13.injectionSwitch.y; - data.arr[x_59] = (float((10 - x_60)) * x_64); + data.arr[x_59] = (float(as_type((as_type(10) - as_type(x_60)))) * x_64); { int const x_67 = i; - i = (x_67 + 1); + i = as_type((as_type(x_67) + as_type(1))); } } i_1 = 0; @@ -75,10 +75,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } int const x_83 = j; int const x_84 = i_1; - if ((x_83 < (x_84 + 1))) { + if ((x_83 < as_type((as_type(x_84) + as_type(1))))) { { int const x_110 = j; - j = (x_110 + 1); + j = as_type((as_type(x_110) + as_type(1))); } continue; } @@ -105,12 +105,12 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } { int const x_110 = j; - j = (x_110 + 1); + j = as_type((as_type(x_110) + as_type(1))); } } { int const x_112 = i_1; - i_1 = (x_112 + 1); + i_1 = as_type((as_type(x_112) + as_type(1))); } } float const x_115 = (*(tint_symbol_6)).x; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl index 3475e4507b..9d9466971c 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.spvasm.expected.msl @@ -110,10 +110,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s int const x_62 = i; int const x_63 = i; float const x_67 = x_13.injectionSwitch.y; - data.arr[x_62] = (float((10 - x_63)) * x_67); + data.arr[x_62] = (float(as_type((as_type(10) - as_type(x_63)))) * x_67); { int const x_70 = i; - i = (x_70 + 1); + i = as_type((as_type(x_70) + as_type(1))); } } i_1 = 0; @@ -132,10 +132,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } int const x_86 = j; int const x_87 = i_1; - if ((x_86 < (x_87 + 1))) { + if ((x_86 < as_type((as_type(x_87) + as_type(1))))) { { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } continue; } @@ -162,12 +162,12 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } } { int const x_115 = i_1; - i_1 = (x_115 + 1); + i_1 = as_type((as_type(x_115) + as_type(1))); } } float const x_118 = (*(tint_symbol_6)).x; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl index 3475e4507b..9d9466971c 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-bubblesort-flag-complex-conditionals/1.wgsl.expected.msl @@ -110,10 +110,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s int const x_62 = i; int const x_63 = i; float const x_67 = x_13.injectionSwitch.y; - data.arr[x_62] = (float((10 - x_63)) * x_67); + data.arr[x_62] = (float(as_type((as_type(10) - as_type(x_63)))) * x_67); { int const x_70 = i; - i = (x_70 + 1); + i = as_type((as_type(x_70) + as_type(1))); } } i_1 = 0; @@ -132,10 +132,10 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } int const x_86 = j; int const x_87 = i_1; - if ((x_86 < (x_87 + 1))) { + if ((x_86 < as_type((as_type(x_87) + as_type(1))))) { { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } continue; } @@ -162,12 +162,12 @@ void main_1(constant buf0& x_13, constant buf1& x_9, thread float4* const tint_s } { int const x_113 = j; - j = (x_113 + 1); + j = as_type((as_type(x_113) + as_type(1))); } } { int const x_115 = i_1; - i_1 = (x_115 + 1); + i_1 = as_type((as_type(x_115) + as_type(1))); } } float const x_118 = (*(tint_symbol_6)).x; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl index c9c314f17f..561b2f20cf 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.spvasm.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float4 const x_51 = *(tint_symbol_6); float2 const x_54 = x_6.resolution; float2 const x_57 = floor(((float2(x_51.x, x_51.y) / x_54) * 8.0f)); - int const x_63 = ((int(x_57.x) * 8) + int(x_57.y)); + int const x_63 = as_type((as_type(as_type((as_type(int(x_57.x)) * as_type(8)))) + as_type(int(x_57.y)))); x_65_phi = 0; x_68_phi = x_63; while (true) { @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } if (((x_68 & 1) == 1)) { - x_79 = ((3 * x_68) + 1); + x_79 = as_type((as_type(as_type((as_type(3) * as_type(x_68)))) + as_type(1))); x_69_phi = x_79; } else { x_80 = (x_68 / 2); @@ -44,7 +44,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } int const x_69 = x_69_phi; { - x_65_phi = as_type((x_65 + as_type(1))); + x_65_phi = as_type(as_type((as_type(x_65) + as_type(as_type(1))))); x_68_phi = x_69; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl index c9c314f17f..561b2f20cf 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/0.wgsl.expected.msl @@ -22,7 +22,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float4 const x_51 = *(tint_symbol_6); float2 const x_54 = x_6.resolution; float2 const x_57 = floor(((float2(x_51.x, x_51.y) / x_54) * 8.0f)); - int const x_63 = ((int(x_57.x) * 8) + int(x_57.y)); + int const x_63 = as_type((as_type(as_type((as_type(int(x_57.x)) * as_type(8)))) + as_type(int(x_57.y)))); x_65_phi = 0; x_68_phi = x_63; while (true) { @@ -36,7 +36,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float break; } if (((x_68 & 1) == 1)) { - x_79 = ((3 * x_68) + 1); + x_79 = as_type((as_type(as_type((as_type(3) * as_type(x_68)))) + as_type(1))); x_69_phi = x_79; } else { x_80 = (x_68 / 2); @@ -44,7 +44,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } int const x_69 = x_69_phi; { - x_65_phi = as_type((x_65 + as_type(1))); + x_65_phi = as_type(as_type((as_type(x_65) + as_type(as_type(1))))); x_68_phi = x_69; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl index b1f84a6692..9a040b1588 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.spvasm.expected.msl @@ -24,7 +24,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float2 const x_58 = x_6.resolution; float2 const x_61 = ((x_55 / x_58) * 8.0f); float2 const x_62 = floor(x_61); - int const x_69 = ((int(x_62.x) * 8) + int(x_62.y)); + int const x_69 = as_type((as_type(as_type((as_type(int(x_62.x)) * as_type(8)))) + as_type(int(x_62.y)))); x_71_phi = 0; x_74_phi = x_69; while (true) { @@ -38,7 +38,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } if (((x_74 & 1) == 1)) { - x_85 = ((3 * x_74) + 1); + x_85 = as_type((as_type(as_type((as_type(3) * as_type(x_74)))) + as_type(1))); x_75_phi = x_85; } else { x_86 = (x_74 / 2); @@ -46,7 +46,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } int const x_75 = x_75_phi; { - x_71_phi = as_type((x_71 + as_type(1))); + x_71_phi = as_type(as_type((as_type(x_71) + as_type(as_type(1))))); x_74_phi = x_75; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl index b1f84a6692..9a040b1588 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-collatz-O-mutate-composite-construct-extract/1.wgsl.expected.msl @@ -24,7 +24,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float float2 const x_58 = x_6.resolution; float2 const x_61 = ((x_55 / x_58) * 8.0f); float2 const x_62 = floor(x_61); - int const x_69 = ((int(x_62.x) * 8) + int(x_62.y)); + int const x_69 = as_type((as_type(as_type((as_type(int(x_62.x)) * as_type(8)))) + as_type(int(x_62.y)))); x_71_phi = 0; x_74_phi = x_69; while (true) { @@ -38,7 +38,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float break; } if (((x_74 & 1) == 1)) { - x_85 = ((3 * x_74) + 1); + x_85 = as_type((as_type(as_type((as_type(3) * as_type(x_74)))) + as_type(1))); x_75_phi = x_85; } else { x_86 = (x_74 / 2); @@ -46,7 +46,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float } int const x_75 = x_75_phi; { - x_71_phi = as_type((x_71 + as_type(1))); + x_71_phi = as_type(as_type((as_type(x_71) + as_type(as_type(1))))); x_74_phi = x_75; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl index 6bbc2e7ae4..3576345639 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.spvasm.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_59 = (x_58 + 1); + x_59 = as_type((as_type(x_58) + as_type(1))); x_55_phi = x_56; x_58_phi = x_59; } @@ -139,7 +139,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_96 = (x_95 + 1); + x_96 = as_type((as_type(x_95) + as_type(1))); x_92_phi = x_93; x_95_phi = x_96; } @@ -176,7 +176,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c[x_135_save] = (x_140 * x_141); } { - x_130 = (x_129 + 1); + x_130 = as_type((as_type(x_129) + as_type(1))); x_129_phi = x_130; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl index 7df5ad79ef..e9867220c8 100755 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-colorgrid-modulo-O-move-block-down/1.wgsl.expected.msl @@ -72,7 +72,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_59 = (x_58 + 1); + x_59 = as_type((as_type(x_58) + as_type(1))); x_55_phi = x_56; x_58_phi = x_59; } @@ -139,7 +139,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float break; } { - x_96 = (x_95 + 1); + x_96 = as_type((as_type(x_95) + as_type(1))); x_92_phi = x_93; x_95_phi = x_96; } @@ -176,7 +176,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float c[x_135_save] = (x_140 * x_141); } { - x_130 = (x_129 + 1); + x_130 = as_type((as_type(x_129) + as_type(1))); x_129_phi = x_130; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl index 794863afd0..51be36d668 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.spvasm.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ (*(tint_symbol_9)).arr[x_80] = 0; { int const x_82 = i; - i = (x_82 + 1); + i = as_type((as_type(x_82) + as_type(1))); } } p = int2(0, 0); @@ -57,7 +57,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ bool x_145_phi = false; bool x_165_phi = false; int const x_88 = v; - v = (x_88 + 1); + v = as_type((as_type(x_88) + as_type(1))); directions = 0; int const x_91 = p.x; bool const x_92 = (x_91 > 0); @@ -65,14 +65,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_9)).arr[((x_96 - 2) + (x_99 * 16))]; + int const x_103 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } bool const x_105 = x_105_phi; if (x_105) { int const x_108 = directions; - directions = (x_108 + 1); + directions = as_type((as_type(x_108) + as_type(1))); } int const x_111 = p.y; bool const x_112 = (x_111 > 0); @@ -80,14 +80,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_9)).arr[(x_116 + ((x_118 - 2) * 16))]; + int const x_123 = (*(tint_symbol_9)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } bool const x_125 = x_125_phi; if (x_125) { int const x_128 = directions; - directions = (x_128 + 1); + directions = as_type((as_type(x_128) + as_type(1))); } int const x_131 = p.x; bool const x_132 = (x_131 < 14); @@ -95,14 +95,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_9)).arr[((x_136 + 2) + (x_139 * 16))]; + int const x_143 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } bool const x_145 = x_145_phi; if (x_145) { int const x_148 = directions; - directions = (x_148 + 1); + directions = as_type((as_type(x_148) + as_type(1))); } int const x_151 = p.y; bool const x_152 = (x_151 < 14); @@ -110,14 +110,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_9)).arr[(x_156 + ((x_158 + 2) * 16))]; + int const x_163 = (*(tint_symbol_9)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } bool const x_165 = x_165_phi; if (x_165) { int const x_168 = directions; - directions = (x_168 + 1); + directions = as_type((as_type(x_168) + as_type(1))); } bool x_229 = false; bool x_242 = false; @@ -164,34 +164,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_9)).arr[((x_189 * 2) + ((x_191 * 2) * 16))]; + int const x_196 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; - p.x = (x_200 * 2); + p.x = as_type((as_type(x_200) * as_type(2))); int const x_203 = i; - p.y = (x_203 * 2); + p.y = as_type((as_type(x_203) * as_type(2))); canwalk = true; } { int const x_206 = j; - j = (x_206 + 1); + j = as_type((as_type(x_206) + as_type(1))); } } { int const x_208 = i; - i = (x_208 + 1); + i = as_type((as_type(x_208) + as_type(1))); } } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_9)).arr[(x_211 + (x_213 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; d = (x_217 % x_218); int const x_220 = directions; int const x_221 = v; - v = (x_221 + x_220); + v = as_type((as_type(x_221) + as_type(x_220))); int const x_223 = d; bool const x_224 = (x_223 >= 0); x_230_phi = x_224; @@ -205,25 +205,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_9)).arr[((x_234 - 2) + (x_237 * 16))]; + int const x_241 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } bool const x_243 = x_243_phi; if (x_243) { int const x_246 = d; - d = (x_246 - 1); + d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_9)).arr[(x_249 + (x_251 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_9)).arr[((x_256 - 1) + (x_259 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_9)).arr[((x_264 - 2) + (x_267 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; - p.x = (x_272 - 2); + p.x = as_type((as_type(x_272) - as_type(2))); } int const x_275 = d; bool const x_276 = (x_275 >= 0); @@ -250,7 +250,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ x_297_phi = x_296; } int const x_297 = x_297_phi; - int const x_299 = ((x_297 - 2) * 16); + int const x_299 = as_type((as_type(as_type((as_type(x_297) - as_type(2)))) * as_type(16))); if (x_282) { x_303 = *(tint_symbol_9); x_305_phi = x_303; @@ -268,7 +268,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ *(tint_symbol_9) = x_305; } if (x_282) { - x_315 = (*(tint_symbol_9)).arr[(x_290 + x_299)]; + x_315 = (*(tint_symbol_9)).arr[as_type((as_type(x_290) + as_type(x_299)))]; x_317_phi = x_315; } else { x_316 = 0; @@ -278,22 +278,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ bool const x_318 = (x_317 == 0); if (select(x_282, x_318, x_282)) { int const x_323 = d; - d = (x_323 - 1); + d = as_type((as_type(x_323) - as_type(1))); int const x_326 = p.x; int const x_328 = p.y; - (*(tint_symbol_9)).arr[(x_326 + (x_328 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_326) + as_type(as_type((as_type(x_328) * as_type(16))))))] = 1; int const x_333 = p.x; int const x_335 = p.y; - (*(tint_symbol_9)).arr[(x_333 + ((x_335 - 1) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_333) + as_type(as_type((as_type(as_type((as_type(x_335) - as_type(1)))) * as_type(16))))))] = 1; int const x_341 = p.x; int const x_343 = p.y; tint_array_wrapper const x_345 = *(tint_symbol_9); tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_9) = tint_symbol_6; *(tint_symbol_9) = x_345; - (*(tint_symbol_9)).arr[(x_341 + ((x_343 - 2) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_341) + as_type(as_type((as_type(as_type((as_type(x_343) - as_type(2)))) * as_type(16))))))] = 1; int const x_350 = p.y; - p.y = (x_350 - 2); + p.y = as_type((as_type(x_350) - as_type(2))); } int const x_353 = d; bool const x_354 = (x_353 >= 0); @@ -308,25 +308,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_360) { int const x_364 = p.x; int const x_367 = p.y; - int const x_371 = (*(tint_symbol_9)).arr[((x_364 + 2) + (x_367 * 16))]; + int const x_371 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_364) + as_type(2)))) + as_type(as_type((as_type(x_367) * as_type(16))))))]; x_372 = (x_371 == 0); x_373_phi = x_372; } bool const x_373 = x_373_phi; if (x_373) { int const x_376 = d; - d = (x_376 - 1); + d = as_type((as_type(x_376) - as_type(1))); int const x_379 = p.x; int const x_381 = p.y; - (*(tint_symbol_9)).arr[(x_379 + (x_381 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_379) + as_type(as_type((as_type(x_381) * as_type(16))))))] = 1; int const x_386 = p.x; int const x_389 = p.y; - (*(tint_symbol_9)).arr[((x_386 + 1) + (x_389 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_386) + as_type(1)))) + as_type(as_type((as_type(x_389) * as_type(16))))))] = 1; int const x_394 = p.x; int const x_397 = p.y; - (*(tint_symbol_9)).arr[((x_394 + 2) + (x_397 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_394) + as_type(2)))) + as_type(as_type((as_type(x_397) * as_type(16))))))] = 1; int const x_402 = p.x; - p.x = (x_402 + 2); + p.x = as_type((as_type(x_402) + as_type(2))); } int const x_405 = d; bool const x_406 = (x_405 >= 0); @@ -341,30 +341,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_412) { int const x_416 = p.x; int const x_418 = p.y; - int const x_423 = (*(tint_symbol_9)).arr[(x_416 + ((x_418 + 2) * 16))]; + int const x_423 = (*(tint_symbol_9)).arr[as_type((as_type(x_416) + as_type(as_type((as_type(as_type((as_type(x_418) + as_type(2)))) * as_type(16))))))]; x_424 = (x_423 == 0); x_425_phi = x_424; } bool const x_425 = x_425_phi; if (x_425) { int const x_428 = d; - d = (x_428 - 1); + d = as_type((as_type(x_428) - as_type(1))); int const x_431 = p.x; int const x_433 = p.y; - (*(tint_symbol_9)).arr[(x_431 + (x_433 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_431) + as_type(as_type((as_type(x_433) * as_type(16))))))] = 1; int const x_438 = p.x; int const x_440 = p.y; - (*(tint_symbol_9)).arr[(x_438 + ((x_440 + 1) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_438) + as_type(as_type((as_type(as_type((as_type(x_440) + as_type(1)))) * as_type(16))))))] = 1; int const x_446 = p.x; int const x_448 = p.y; - (*(tint_symbol_9)).arr[(x_446 + ((x_448 + 2) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_446) + as_type(as_type((as_type(as_type((as_type(x_448) + as_type(2)))) * as_type(16))))))] = 1; int const x_454 = p.y; - p.y = (x_454 + 2); + p.y = as_type((as_type(x_454) + as_type(2))); } } int const x_458 = ipos.y; int const x_461 = ipos.x; - int const x_464 = (*(tint_symbol_9)).arr[((x_458 * 16) + x_461)]; + int const x_464 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_458) * as_type(16)))) + as_type(x_461)))]; if ((x_464 == 1)) { *(tint_symbol_10) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl index 794863afd0..51be36d668 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/1.wgsl.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ (*(tint_symbol_9)).arr[x_80] = 0; { int const x_82 = i; - i = (x_82 + 1); + i = as_type((as_type(x_82) + as_type(1))); } } p = int2(0, 0); @@ -57,7 +57,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ bool x_145_phi = false; bool x_165_phi = false; int const x_88 = v; - v = (x_88 + 1); + v = as_type((as_type(x_88) + as_type(1))); directions = 0; int const x_91 = p.x; bool const x_92 = (x_91 > 0); @@ -65,14 +65,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_9)).arr[((x_96 - 2) + (x_99 * 16))]; + int const x_103 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } bool const x_105 = x_105_phi; if (x_105) { int const x_108 = directions; - directions = (x_108 + 1); + directions = as_type((as_type(x_108) + as_type(1))); } int const x_111 = p.y; bool const x_112 = (x_111 > 0); @@ -80,14 +80,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_9)).arr[(x_116 + ((x_118 - 2) * 16))]; + int const x_123 = (*(tint_symbol_9)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } bool const x_125 = x_125_phi; if (x_125) { int const x_128 = directions; - directions = (x_128 + 1); + directions = as_type((as_type(x_128) + as_type(1))); } int const x_131 = p.x; bool const x_132 = (x_131 < 14); @@ -95,14 +95,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_9)).arr[((x_136 + 2) + (x_139 * 16))]; + int const x_143 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } bool const x_145 = x_145_phi; if (x_145) { int const x_148 = directions; - directions = (x_148 + 1); + directions = as_type((as_type(x_148) + as_type(1))); } int const x_151 = p.y; bool const x_152 = (x_151 < 14); @@ -110,14 +110,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_9)).arr[(x_156 + ((x_158 + 2) * 16))]; + int const x_163 = (*(tint_symbol_9)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } bool const x_165 = x_165_phi; if (x_165) { int const x_168 = directions; - directions = (x_168 + 1); + directions = as_type((as_type(x_168) + as_type(1))); } bool x_229 = false; bool x_242 = false; @@ -164,34 +164,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_9)).arr[((x_189 * 2) + ((x_191 * 2) * 16))]; + int const x_196 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; - p.x = (x_200 * 2); + p.x = as_type((as_type(x_200) * as_type(2))); int const x_203 = i; - p.y = (x_203 * 2); + p.y = as_type((as_type(x_203) * as_type(2))); canwalk = true; } { int const x_206 = j; - j = (x_206 + 1); + j = as_type((as_type(x_206) + as_type(1))); } } { int const x_208 = i; - i = (x_208 + 1); + i = as_type((as_type(x_208) + as_type(1))); } } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_9)).arr[(x_211 + (x_213 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; d = (x_217 % x_218); int const x_220 = directions; int const x_221 = v; - v = (x_221 + x_220); + v = as_type((as_type(x_221) + as_type(x_220))); int const x_223 = d; bool const x_224 = (x_223 >= 0); x_230_phi = x_224; @@ -205,25 +205,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_9)).arr[((x_234 - 2) + (x_237 * 16))]; + int const x_241 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } bool const x_243 = x_243_phi; if (x_243) { int const x_246 = d; - d = (x_246 - 1); + d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_9)).arr[(x_249 + (x_251 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_9)).arr[((x_256 - 1) + (x_259 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_9)).arr[((x_264 - 2) + (x_267 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; - p.x = (x_272 - 2); + p.x = as_type((as_type(x_272) - as_type(2))); } int const x_275 = d; bool const x_276 = (x_275 >= 0); @@ -250,7 +250,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ x_297_phi = x_296; } int const x_297 = x_297_phi; - int const x_299 = ((x_297 - 2) * 16); + int const x_299 = as_type((as_type(as_type((as_type(x_297) - as_type(2)))) * as_type(16))); if (x_282) { x_303 = *(tint_symbol_9); x_305_phi = x_303; @@ -268,7 +268,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ *(tint_symbol_9) = x_305; } if (x_282) { - x_315 = (*(tint_symbol_9)).arr[(x_290 + x_299)]; + x_315 = (*(tint_symbol_9)).arr[as_type((as_type(x_290) + as_type(x_299)))]; x_317_phi = x_315; } else { x_316 = 0; @@ -278,22 +278,22 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ bool const x_318 = (x_317 == 0); if (select(x_282, x_318, x_282)) { int const x_323 = d; - d = (x_323 - 1); + d = as_type((as_type(x_323) - as_type(1))); int const x_326 = p.x; int const x_328 = p.y; - (*(tint_symbol_9)).arr[(x_326 + (x_328 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_326) + as_type(as_type((as_type(x_328) * as_type(16))))))] = 1; int const x_333 = p.x; int const x_335 = p.y; - (*(tint_symbol_9)).arr[(x_333 + ((x_335 - 1) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_333) + as_type(as_type((as_type(as_type((as_type(x_335) - as_type(1)))) * as_type(16))))))] = 1; int const x_341 = p.x; int const x_343 = p.y; tint_array_wrapper const x_345 = *(tint_symbol_9); tint_array_wrapper const tint_symbol_6 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_9) = tint_symbol_6; *(tint_symbol_9) = x_345; - (*(tint_symbol_9)).arr[(x_341 + ((x_343 - 2) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_341) + as_type(as_type((as_type(as_type((as_type(x_343) - as_type(2)))) * as_type(16))))))] = 1; int const x_350 = p.y; - p.y = (x_350 - 2); + p.y = as_type((as_type(x_350) - as_type(2))); } int const x_353 = d; bool const x_354 = (x_353 >= 0); @@ -308,25 +308,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_360) { int const x_364 = p.x; int const x_367 = p.y; - int const x_371 = (*(tint_symbol_9)).arr[((x_364 + 2) + (x_367 * 16))]; + int const x_371 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_364) + as_type(2)))) + as_type(as_type((as_type(x_367) * as_type(16))))))]; x_372 = (x_371 == 0); x_373_phi = x_372; } bool const x_373 = x_373_phi; if (x_373) { int const x_376 = d; - d = (x_376 - 1); + d = as_type((as_type(x_376) - as_type(1))); int const x_379 = p.x; int const x_381 = p.y; - (*(tint_symbol_9)).arr[(x_379 + (x_381 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_379) + as_type(as_type((as_type(x_381) * as_type(16))))))] = 1; int const x_386 = p.x; int const x_389 = p.y; - (*(tint_symbol_9)).arr[((x_386 + 1) + (x_389 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_386) + as_type(1)))) + as_type(as_type((as_type(x_389) * as_type(16))))))] = 1; int const x_394 = p.x; int const x_397 = p.y; - (*(tint_symbol_9)).arr[((x_394 + 2) + (x_397 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_394) + as_type(2)))) + as_type(as_type((as_type(x_397) * as_type(16))))))] = 1; int const x_402 = p.x; - p.x = (x_402 + 2); + p.x = as_type((as_type(x_402) + as_type(2))); } int const x_405 = d; bool const x_406 = (x_405 >= 0); @@ -341,30 +341,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_8, thread tint_ if (x_412) { int const x_416 = p.x; int const x_418 = p.y; - int const x_423 = (*(tint_symbol_9)).arr[(x_416 + ((x_418 + 2) * 16))]; + int const x_423 = (*(tint_symbol_9)).arr[as_type((as_type(x_416) + as_type(as_type((as_type(as_type((as_type(x_418) + as_type(2)))) * as_type(16))))))]; x_424 = (x_423 == 0); x_425_phi = x_424; } bool const x_425 = x_425_phi; if (x_425) { int const x_428 = d; - d = (x_428 - 1); + d = as_type((as_type(x_428) - as_type(1))); int const x_431 = p.x; int const x_433 = p.y; - (*(tint_symbol_9)).arr[(x_431 + (x_433 * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_431) + as_type(as_type((as_type(x_433) * as_type(16))))))] = 1; int const x_438 = p.x; int const x_440 = p.y; - (*(tint_symbol_9)).arr[(x_438 + ((x_440 + 1) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_438) + as_type(as_type((as_type(as_type((as_type(x_440) + as_type(1)))) * as_type(16))))))] = 1; int const x_446 = p.x; int const x_448 = p.y; - (*(tint_symbol_9)).arr[(x_446 + ((x_448 + 2) * 16))] = 1; + (*(tint_symbol_9)).arr[as_type((as_type(x_446) + as_type(as_type((as_type(as_type((as_type(x_448) + as_type(2)))) * as_type(16))))))] = 1; int const x_454 = p.y; - p.y = (x_454 + 2); + p.y = as_type((as_type(x_454) + as_type(2))); } } int const x_458 = ipos.y; int const x_461 = ipos.x; - int const x_464 = (*(tint_symbol_9)).arr[((x_458 * 16) + x_461)]; + int const x_464 = (*(tint_symbol_9)).arr[as_type((as_type(as_type((as_type(x_458) * as_type(16)))) + as_type(x_461)))]; if ((x_464 == 1)) { *(tint_symbol_10) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl index b60fe95824..22486d281e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.spvasm.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ (*(tint_symbol_8)).arr[x_80] = 0; { int const x_82 = i; - i = (x_82 + 1); + i = as_type((as_type(x_82) + as_type(1))); } } p = int2(0, 0); @@ -57,7 +57,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ bool x_145_phi = false; bool x_165_phi = false; int const x_88 = v; - v = (x_88 + 1); + v = as_type((as_type(x_88) + as_type(1))); directions = 0; int const x_91 = p.x; bool const x_92 = (x_91 > 0); @@ -65,14 +65,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_8)).arr[((x_96 - 2) + (x_99 * 16))]; + int const x_103 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } bool const x_105 = x_105_phi; if (x_105) { int const x_108 = directions; - directions = (x_108 + 1); + directions = as_type((as_type(x_108) + as_type(1))); } int const x_111 = p.y; bool const x_112 = (x_111 > 0); @@ -80,14 +80,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_8)).arr[(x_116 + ((x_118 - 2) * 16))]; + int const x_123 = (*(tint_symbol_8)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } bool const x_125 = x_125_phi; if (x_125) { int const x_128 = directions; - directions = (x_128 + 1); + directions = as_type((as_type(x_128) + as_type(1))); } int const x_131 = p.x; bool const x_132 = (x_131 < 14); @@ -95,14 +95,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_8)).arr[((x_136 + 2) + (x_139 * 16))]; + int const x_143 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } bool const x_145 = x_145_phi; if (x_145) { int const x_148 = directions; - directions = (x_148 + 1); + directions = as_type((as_type(x_148) + as_type(1))); } int const x_151 = p.y; bool const x_152 = (x_151 < 14); @@ -110,14 +110,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_8)).arr[(x_156 + ((x_158 + 2) * 16))]; + int const x_163 = (*(tint_symbol_8)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } bool const x_165 = x_165_phi; if (x_165) { int const x_168 = directions; - directions = (x_168 + 1); + directions = as_type((as_type(x_168) + as_type(1))); } bool x_229 = false; bool x_242 = false; @@ -154,34 +154,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_8)).arr[((x_189 * 2) + ((x_191 * 2) * 16))]; + int const x_196 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; - p.x = (x_200 * 2); + p.x = as_type((as_type(x_200) * as_type(2))); int const x_203 = i; - p.y = (x_203 * 2); + p.y = as_type((as_type(x_203) * as_type(2))); canwalk = true; } { int const x_206 = j; - j = (x_206 + 1); + j = as_type((as_type(x_206) + as_type(1))); } } { int const x_208 = i; - i = (x_208 + 1); + i = as_type((as_type(x_208) + as_type(1))); } } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_8)).arr[(x_211 + (x_213 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; d = (x_217 % x_218); int const x_220 = directions; int const x_221 = v; - v = (x_221 + x_220); + v = as_type((as_type(x_221) + as_type(x_220))); int const x_223 = d; bool const x_224 = (x_223 >= 0); x_230_phi = x_224; @@ -195,25 +195,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_8)).arr[((x_234 - 2) + (x_237 * 16))]; + int const x_241 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } bool const x_243 = x_243_phi; if (x_243) { int const x_246 = d; - d = (x_246 - 1); + d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_8)).arr[(x_249 + (x_251 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_8)).arr[((x_256 - 1) + (x_259 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_8)).arr[((x_264 - 2) + (x_267 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; - p.x = (x_272 - 2); + p.x = as_type((as_type(x_272) - as_type(2))); } int const x_275 = d; bool const x_276 = (x_275 >= 0); @@ -232,29 +232,29 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_8) = tint_symbol_4; *(tint_symbol_8) = x_291; - int const x_294 = (*(tint_symbol_8)).arr[(x_286 + ((x_288 - 2) * 16))]; + int const x_294 = (*(tint_symbol_8)).arr[as_type((as_type(x_286) + as_type(as_type((as_type(as_type((as_type(x_288) - as_type(2)))) * as_type(16))))))]; x_295 = (x_294 == 0); x_296_phi = x_295; } bool const x_296 = x_296_phi; if (x_296) { int const x_299 = d; - d = (x_299 - 1); + d = as_type((as_type(x_299) - as_type(1))); int const x_302 = p.x; int const x_304 = p.y; - (*(tint_symbol_8)).arr[(x_302 + (x_304 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_302) + as_type(as_type((as_type(x_304) * as_type(16))))))] = 1; int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_8)).arr[(x_309 + ((x_311 - 1) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(as_type((as_type(x_311) - as_type(1)))) * as_type(16))))))] = 1; int const x_317 = p.x; int const x_319 = p.y; tint_array_wrapper const x_321 = *(tint_symbol_8); tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_8) = tint_symbol_5; *(tint_symbol_8) = x_321; - (*(tint_symbol_8)).arr[(x_317 + ((x_319 - 2) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_317) + as_type(as_type((as_type(as_type((as_type(x_319) - as_type(2)))) * as_type(16))))))] = 1; int const x_326 = p.y; - p.y = (x_326 - 2); + p.y = as_type((as_type(x_326) - as_type(2))); } int const x_329 = d; bool const x_330 = (x_329 >= 0); @@ -269,25 +269,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_336) { int const x_340 = p.x; int const x_343 = p.y; - int const x_347 = (*(tint_symbol_8)).arr[((x_340 + 2) + (x_343 * 16))]; + int const x_347 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_340) + as_type(2)))) + as_type(as_type((as_type(x_343) * as_type(16))))))]; x_348 = (x_347 == 0); x_349_phi = x_348; } bool const x_349 = x_349_phi; if (x_349) { int const x_352 = d; - d = (x_352 - 1); + d = as_type((as_type(x_352) - as_type(1))); int const x_355 = p.x; int const x_357 = p.y; - (*(tint_symbol_8)).arr[(x_355 + (x_357 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_355) + as_type(as_type((as_type(x_357) * as_type(16))))))] = 1; int const x_362 = p.x; int const x_365 = p.y; - (*(tint_symbol_8)).arr[((x_362 + 1) + (x_365 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_362) + as_type(1)))) + as_type(as_type((as_type(x_365) * as_type(16))))))] = 1; int const x_370 = p.x; int const x_373 = p.y; - (*(tint_symbol_8)).arr[((x_370 + 2) + (x_373 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_370) + as_type(2)))) + as_type(as_type((as_type(x_373) * as_type(16))))))] = 1; int const x_378 = p.x; - p.x = (x_378 + 2); + p.x = as_type((as_type(x_378) + as_type(2))); } int const x_381 = d; bool const x_382 = (x_381 >= 0); @@ -302,30 +302,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_388) { int const x_392 = p.x; int const x_394 = p.y; - int const x_399 = (*(tint_symbol_8)).arr[(x_392 + ((x_394 + 2) * 16))]; + int const x_399 = (*(tint_symbol_8)).arr[as_type((as_type(x_392) + as_type(as_type((as_type(as_type((as_type(x_394) + as_type(2)))) * as_type(16))))))]; x_400 = (x_399 == 0); x_401_phi = x_400; } bool const x_401 = x_401_phi; if (x_401) { int const x_404 = d; - d = (x_404 - 1); + d = as_type((as_type(x_404) - as_type(1))); int const x_407 = p.x; int const x_409 = p.y; - (*(tint_symbol_8)).arr[(x_407 + (x_409 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_407) + as_type(as_type((as_type(x_409) * as_type(16))))))] = 1; int const x_414 = p.x; int const x_416 = p.y; - (*(tint_symbol_8)).arr[(x_414 + ((x_416 + 1) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_414) + as_type(as_type((as_type(as_type((as_type(x_416) + as_type(1)))) * as_type(16))))))] = 1; int const x_422 = p.x; int const x_424 = p.y; - (*(tint_symbol_8)).arr[(x_422 + ((x_424 + 2) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_422) + as_type(as_type((as_type(as_type((as_type(x_424) + as_type(2)))) * as_type(16))))))] = 1; int const x_430 = p.y; - p.y = (x_430 + 2); + p.y = as_type((as_type(x_430) + as_type(2))); } } int const x_434 = ipos.y; int const x_437 = ipos.x; - int const x_440 = (*(tint_symbol_8)).arr[((x_434 * 16) + x_437)]; + int const x_440 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_434) * as_type(16)))) + as_type(x_437)))]; if ((x_440 == 1)) { *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl index b60fe95824..22486d281e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-maze-flatten-copy-composite/2.wgsl.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ (*(tint_symbol_8)).arr[x_80] = 0; { int const x_82 = i; - i = (x_82 + 1); + i = as_type((as_type(x_82) + as_type(1))); } } p = int2(0, 0); @@ -57,7 +57,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ bool x_145_phi = false; bool x_165_phi = false; int const x_88 = v; - v = (x_88 + 1); + v = as_type((as_type(x_88) + as_type(1))); directions = 0; int const x_91 = p.x; bool const x_92 = (x_91 > 0); @@ -65,14 +65,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_92) { int const x_96 = p.x; int const x_99 = p.y; - int const x_103 = (*(tint_symbol_8)).arr[((x_96 - 2) + (x_99 * 16))]; + int const x_103 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_96) - as_type(2)))) + as_type(as_type((as_type(x_99) * as_type(16))))))]; x_104 = (x_103 == 0); x_105_phi = x_104; } bool const x_105 = x_105_phi; if (x_105) { int const x_108 = directions; - directions = (x_108 + 1); + directions = as_type((as_type(x_108) + as_type(1))); } int const x_111 = p.y; bool const x_112 = (x_111 > 0); @@ -80,14 +80,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_112) { int const x_116 = p.x; int const x_118 = p.y; - int const x_123 = (*(tint_symbol_8)).arr[(x_116 + ((x_118 - 2) * 16))]; + int const x_123 = (*(tint_symbol_8)).arr[as_type((as_type(x_116) + as_type(as_type((as_type(as_type((as_type(x_118) - as_type(2)))) * as_type(16))))))]; x_124 = (x_123 == 0); x_125_phi = x_124; } bool const x_125 = x_125_phi; if (x_125) { int const x_128 = directions; - directions = (x_128 + 1); + directions = as_type((as_type(x_128) + as_type(1))); } int const x_131 = p.x; bool const x_132 = (x_131 < 14); @@ -95,14 +95,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_132) { int const x_136 = p.x; int const x_139 = p.y; - int const x_143 = (*(tint_symbol_8)).arr[((x_136 + 2) + (x_139 * 16))]; + int const x_143 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_136) + as_type(2)))) + as_type(as_type((as_type(x_139) * as_type(16))))))]; x_144 = (x_143 == 0); x_145_phi = x_144; } bool const x_145 = x_145_phi; if (x_145) { int const x_148 = directions; - directions = (x_148 + 1); + directions = as_type((as_type(x_148) + as_type(1))); } int const x_151 = p.y; bool const x_152 = (x_151 < 14); @@ -110,14 +110,14 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_152) { int const x_156 = p.x; int const x_158 = p.y; - int const x_163 = (*(tint_symbol_8)).arr[(x_156 + ((x_158 + 2) * 16))]; + int const x_163 = (*(tint_symbol_8)).arr[as_type((as_type(x_156) + as_type(as_type((as_type(as_type((as_type(x_158) + as_type(2)))) * as_type(16))))))]; x_164 = (x_163 == 0); x_165_phi = x_164; } bool const x_165 = x_165_phi; if (x_165) { int const x_168 = directions; - directions = (x_168 + 1); + directions = as_type((as_type(x_168) + as_type(1))); } bool x_229 = false; bool x_242 = false; @@ -154,34 +154,34 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ } int const x_189 = j; int const x_191 = i; - int const x_196 = (*(tint_symbol_8)).arr[((x_189 * 2) + ((x_191 * 2) * 16))]; + int const x_196 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_189) * as_type(2)))) + as_type(as_type((as_type(as_type((as_type(x_191) * as_type(2)))) * as_type(16))))))]; if ((x_196 == 0)) { int const x_200 = j; - p.x = (x_200 * 2); + p.x = as_type((as_type(x_200) * as_type(2))); int const x_203 = i; - p.y = (x_203 * 2); + p.y = as_type((as_type(x_203) * as_type(2))); canwalk = true; } { int const x_206 = j; - j = (x_206 + 1); + j = as_type((as_type(x_206) + as_type(1))); } } { int const x_208 = i; - i = (x_208 + 1); + i = as_type((as_type(x_208) + as_type(1))); } } int const x_211 = p.x; int const x_213 = p.y; - (*(tint_symbol_8)).arr[(x_211 + (x_213 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_211) + as_type(as_type((as_type(x_213) * as_type(16))))))] = 1; } else { int const x_217 = v; int const x_218 = directions; d = (x_217 % x_218); int const x_220 = directions; int const x_221 = v; - v = (x_221 + x_220); + v = as_type((as_type(x_221) + as_type(x_220))); int const x_223 = d; bool const x_224 = (x_223 >= 0); x_230_phi = x_224; @@ -195,25 +195,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_230) { int const x_234 = p.x; int const x_237 = p.y; - int const x_241 = (*(tint_symbol_8)).arr[((x_234 - 2) + (x_237 * 16))]; + int const x_241 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_234) - as_type(2)))) + as_type(as_type((as_type(x_237) * as_type(16))))))]; x_242 = (x_241 == 0); x_243_phi = x_242; } bool const x_243 = x_243_phi; if (x_243) { int const x_246 = d; - d = (x_246 - 1); + d = as_type((as_type(x_246) - as_type(1))); int const x_249 = p.x; int const x_251 = p.y; - (*(tint_symbol_8)).arr[(x_249 + (x_251 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_249) + as_type(as_type((as_type(x_251) * as_type(16))))))] = 1; int const x_256 = p.x; int const x_259 = p.y; - (*(tint_symbol_8)).arr[((x_256 - 1) + (x_259 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_256) - as_type(1)))) + as_type(as_type((as_type(x_259) * as_type(16))))))] = 1; int const x_264 = p.x; int const x_267 = p.y; - (*(tint_symbol_8)).arr[((x_264 - 2) + (x_267 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_264) - as_type(2)))) + as_type(as_type((as_type(x_267) * as_type(16))))))] = 1; int const x_272 = p.x; - p.x = (x_272 - 2); + p.x = as_type((as_type(x_272) - as_type(2))); } int const x_275 = d; bool const x_276 = (x_275 >= 0); @@ -232,29 +232,29 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_8) = tint_symbol_4; *(tint_symbol_8) = x_291; - int const x_294 = (*(tint_symbol_8)).arr[(x_286 + ((x_288 - 2) * 16))]; + int const x_294 = (*(tint_symbol_8)).arr[as_type((as_type(x_286) + as_type(as_type((as_type(as_type((as_type(x_288) - as_type(2)))) * as_type(16))))))]; x_295 = (x_294 == 0); x_296_phi = x_295; } bool const x_296 = x_296_phi; if (x_296) { int const x_299 = d; - d = (x_299 - 1); + d = as_type((as_type(x_299) - as_type(1))); int const x_302 = p.x; int const x_304 = p.y; - (*(tint_symbol_8)).arr[(x_302 + (x_304 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_302) + as_type(as_type((as_type(x_304) * as_type(16))))))] = 1; int const x_309 = p.x; int const x_311 = p.y; - (*(tint_symbol_8)).arr[(x_309 + ((x_311 - 1) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_309) + as_type(as_type((as_type(as_type((as_type(x_311) - as_type(1)))) * as_type(16))))))] = 1; int const x_317 = p.x; int const x_319 = p.y; tint_array_wrapper const x_321 = *(tint_symbol_8); tint_array_wrapper const tint_symbol_5 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_8) = tint_symbol_5; *(tint_symbol_8) = x_321; - (*(tint_symbol_8)).arr[(x_317 + ((x_319 - 2) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_317) + as_type(as_type((as_type(as_type((as_type(x_319) - as_type(2)))) * as_type(16))))))] = 1; int const x_326 = p.y; - p.y = (x_326 - 2); + p.y = as_type((as_type(x_326) - as_type(2))); } int const x_329 = d; bool const x_330 = (x_329 >= 0); @@ -269,25 +269,25 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_336) { int const x_340 = p.x; int const x_343 = p.y; - int const x_347 = (*(tint_symbol_8)).arr[((x_340 + 2) + (x_343 * 16))]; + int const x_347 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_340) + as_type(2)))) + as_type(as_type((as_type(x_343) * as_type(16))))))]; x_348 = (x_347 == 0); x_349_phi = x_348; } bool const x_349 = x_349_phi; if (x_349) { int const x_352 = d; - d = (x_352 - 1); + d = as_type((as_type(x_352) - as_type(1))); int const x_355 = p.x; int const x_357 = p.y; - (*(tint_symbol_8)).arr[(x_355 + (x_357 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_355) + as_type(as_type((as_type(x_357) * as_type(16))))))] = 1; int const x_362 = p.x; int const x_365 = p.y; - (*(tint_symbol_8)).arr[((x_362 + 1) + (x_365 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_362) + as_type(1)))) + as_type(as_type((as_type(x_365) * as_type(16))))))] = 1; int const x_370 = p.x; int const x_373 = p.y; - (*(tint_symbol_8)).arr[((x_370 + 2) + (x_373 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_370) + as_type(2)))) + as_type(as_type((as_type(x_373) * as_type(16))))))] = 1; int const x_378 = p.x; - p.x = (x_378 + 2); + p.x = as_type((as_type(x_378) + as_type(2))); } int const x_381 = d; bool const x_382 = (x_381 >= 0); @@ -302,30 +302,30 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_7, thread tint_ if (x_388) { int const x_392 = p.x; int const x_394 = p.y; - int const x_399 = (*(tint_symbol_8)).arr[(x_392 + ((x_394 + 2) * 16))]; + int const x_399 = (*(tint_symbol_8)).arr[as_type((as_type(x_392) + as_type(as_type((as_type(as_type((as_type(x_394) + as_type(2)))) * as_type(16))))))]; x_400 = (x_399 == 0); x_401_phi = x_400; } bool const x_401 = x_401_phi; if (x_401) { int const x_404 = d; - d = (x_404 - 1); + d = as_type((as_type(x_404) - as_type(1))); int const x_407 = p.x; int const x_409 = p.y; - (*(tint_symbol_8)).arr[(x_407 + (x_409 * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_407) + as_type(as_type((as_type(x_409) * as_type(16))))))] = 1; int const x_414 = p.x; int const x_416 = p.y; - (*(tint_symbol_8)).arr[(x_414 + ((x_416 + 1) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_414) + as_type(as_type((as_type(as_type((as_type(x_416) + as_type(1)))) * as_type(16))))))] = 1; int const x_422 = p.x; int const x_424 = p.y; - (*(tint_symbol_8)).arr[(x_422 + ((x_424 + 2) * 16))] = 1; + (*(tint_symbol_8)).arr[as_type((as_type(x_422) + as_type(as_type((as_type(as_type((as_type(x_424) + as_type(2)))) * as_type(16))))))] = 1; int const x_430 = p.y; - p.y = (x_430 + 2); + p.y = as_type((as_type(x_430) + as_type(2))); } } int const x_434 = ipos.y; int const x_437 = ipos.x; - int const x_440 = (*(tint_symbol_8)).arr[((x_434 * 16) + x_437)]; + int const x_440 = (*(tint_symbol_8)).arr[as_type((as_type(as_type((as_type(x_434) * as_type(16)))) + as_type(x_437)))]; if ((x_440 == 1)) { *(tint_symbol_9) = float4(1.0f, 1.0f, 1.0f, 1.0f); return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl index 27feeef9c8..13fa0cff56 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl @@ -43,66 +43,66 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; data = tint_symbol_4; data = x_68; - int const x_69 = (x_63 + 1); + int const x_69 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_69; switch(x_63) { case 9: { data.arr[x_63] = -5; - x_100 = (x_63 + 1); + x_100 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_100; break; } case 8: { data.arr[x_63] = -4; - x_98 = (x_63 + 1); + x_98 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_98; break; } case 7: { data.arr[x_63] = -3; - x_96 = (x_63 + 1); + x_96 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_96; break; } case 6: { data.arr[x_63] = -2; - x_94 = (x_63 + 1); + x_94 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_94; break; } case 5: { data.arr[x_63] = -1; - x_92 = (x_63 + 1); + x_92 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_92; break; } case 4: { data.arr[x_63] = 0; - x_90 = (x_63 + 1); + x_90 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_90; break; } case 3: { data.arr[x_63] = 1; - x_88 = (x_63 + 1); + x_88 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_88; break; } case 2: { data.arr[x_63] = 2; - x_86 = (x_63 + 1); + x_86 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_86; break; } case 1: { data.arr[x_63] = 3; - x_84 = (x_63 + 1); + x_84 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_84; break; } case 0: { data.arr[x_63] = 4; - x_82 = (x_63 + 1); + x_82 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_82; break; } @@ -130,7 +130,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float { int const x_109 = data.arr[x_103]; temp.arr[x_103] = x_109; - x_104 = (x_103 + 1); + x_104 = as_type((as_type(x_103) + as_type(1))); x_103_phi = x_104; } } @@ -158,10 +158,10 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float } else { break; } - int const x_125 = (x_119 + x_112); - int const x_126 = (x_125 - 1); - int const x_120 = (x_119 + (2 * x_112)); - int const x_129 = min((x_120 - 1), 9); + int const x_125 = as_type((as_type(x_119) + as_type(x_112))); + int const x_126 = as_type((as_type(x_125) - as_type(1))); + int const x_120 = as_type((as_type(x_119) + as_type(as_type((as_type(2) * as_type(x_112)))))); + int const x_129 = min(as_type((as_type(x_120) - as_type(1))), 9); x_131_phi = x_119; x_134_phi = x_125; x_136_phi = x_119; @@ -181,15 +181,15 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float int const x_144 = data.arr[x_143_save]; int const x_145_save = x_134; int const x_146 = data.arr[x_145_save]; - int const x_132 = as_type((x_131 + as_type(1))); + int const x_132 = as_type(as_type((as_type(x_131) + as_type(as_type(1))))); if ((x_144 < x_146)) { - x_151 = as_type((x_136 + as_type(1))); + x_151 = as_type(as_type((as_type(x_136) + as_type(as_type(1))))); int const x_152 = data.arr[x_143_save]; temp.arr[x_131] = x_152; x_135_phi = x_134; x_137_phi = x_151; } else { - x_154 = (x_134 + 1); + x_154 = as_type((as_type(x_134) + as_type(1))); int const x_155 = data.arr[x_145_save]; temp.arr[x_131] = x_155; x_135_phi = x_154; @@ -215,8 +215,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float break; } { - x_159 = (x_158 + 1); - x_162 = (x_161 + 1); + x_159 = as_type((as_type(x_158) + as_type(1))); + x_162 = as_type((as_type(x_161) + as_type(1))); int const x_168 = data.arr[x_161]; temp.arr[x_158] = x_168; x_158_phi = x_159; @@ -234,7 +234,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float { int const x_177 = temp.arr[x_171]; data.arr[x_171] = x_177; - x_172 = (x_171 + 1); + x_172 = as_type((as_type(x_171) + as_type(1))); x_171_phi = x_172; } } @@ -243,7 +243,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float } } { - x_113 = (2 * x_112); + x_113 = as_type((as_type(2) * as_type(x_112))); x_112_phi = x_113; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl index e8a7ca8cee..261784f1f8 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.wgsl.expected.msl @@ -43,66 +43,66 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; data = tint_symbol_4; data = x_68; - int const x_69 = (x_63 + 1); + int const x_69 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_69; switch(x_63) { case 9: { data.arr[x_63] = -5; - x_100 = (x_63 + 1); + x_100 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_100; break; } case 8: { data.arr[x_63] = -4; - x_98 = (x_63 + 1); + x_98 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_98; break; } case 7: { data.arr[x_63] = -3; - x_96 = (x_63 + 1); + x_96 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_96; break; } case 6: { data.arr[x_63] = -2; - x_94 = (x_63 + 1); + x_94 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_94; break; } case 5: { data.arr[x_63] = -1; - x_92 = (x_63 + 1); + x_92 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_92; break; } case 4: { data.arr[x_63] = 0; - x_90 = (x_63 + 1); + x_90 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_90; break; } case 3: { data.arr[x_63] = 1; - x_88 = (x_63 + 1); + x_88 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_88; break; } case 2: { data.arr[x_63] = 2; - x_86 = (x_63 + 1); + x_86 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_86; break; } case 1: { data.arr[x_63] = 3; - x_84 = (x_63 + 1); + x_84 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_84; break; } case 0: { data.arr[x_63] = 4; - x_82 = (x_63 + 1); + x_82 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_82; break; } @@ -130,7 +130,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float { int const x_109 = data.arr[x_103]; temp.arr[x_103] = x_109; - x_104 = (x_103 + 1); + x_104 = as_type((as_type(x_103) + as_type(1))); x_103_phi = x_104; } } @@ -158,10 +158,10 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float } else { break; } - int const x_125 = (x_119 + x_112); - int const x_126 = (x_125 - 1); - int const x_120 = (x_119 + (2 * x_112)); - int const x_129 = min((x_120 - 1), 9); + int const x_125 = as_type((as_type(x_119) + as_type(x_112))); + int const x_126 = as_type((as_type(x_125) - as_type(1))); + int const x_120 = as_type((as_type(x_119) + as_type(as_type((as_type(2) * as_type(x_112)))))); + int const x_129 = min(as_type((as_type(x_120) - as_type(1))), 9); x_131_phi = x_119; x_134_phi = x_125; x_136_phi = x_119; @@ -181,15 +181,15 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float int const x_144 = data.arr[x_143_save]; int const x_145_save = x_134; int const x_146 = data.arr[x_145_save]; - int const x_132 = as_type((x_131 + as_type(1))); + int const x_132 = as_type(as_type((as_type(x_131) + as_type(as_type(1))))); if ((x_144 < x_146)) { - x_151 = as_type((x_136 + as_type(1))); + x_151 = as_type(as_type((as_type(x_136) + as_type(as_type(1))))); int const x_152 = data.arr[x_143_save]; temp.arr[x_131] = x_152; x_135_phi = x_134; x_137_phi = x_151; } else { - x_154 = (x_134 + 1); + x_154 = as_type((as_type(x_134) + as_type(1))); int const x_155 = data.arr[x_145_save]; temp.arr[x_131] = x_155; x_135_phi = x_154; @@ -215,8 +215,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float break; } { - x_159 = (x_158 + 1); - x_162 = (x_161 + 1); + x_159 = as_type((as_type(x_158) + as_type(1))); + x_162 = as_type((as_type(x_161) + as_type(1))); int const x_168 = data.arr[x_161]; temp.arr[x_158] = x_168; x_158_phi = x_159; @@ -234,7 +234,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float { int const x_177 = temp.arr[x_171]; data.arr[x_171] = x_177; - x_172 = (x_171 + 1); + x_172 = as_type((as_type(x_171) + as_type(1))); x_171_phi = x_172; } } @@ -243,7 +243,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_6, thread float } } { - x_113 = (2 * x_112); + x_113 = as_type((as_type(2) * as_type(x_112))); x_112_phi = x_113; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl index 14e0ab3213..3feada0531 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl @@ -39,66 +39,66 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float int x_81 = 0; int x_64_phi = 0; int const x_63 = x_63_phi; - int const x_68 = (x_63 + 1); + int const x_68 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_68; switch(x_63) { case 9: { data.arr[x_63] = -5; - x_99 = (x_63 + 1); + x_99 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_99; break; } case 8: { data.arr[x_63] = -4; - x_97 = (x_63 + 1); + x_97 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_97; break; } case 7: { data.arr[x_63] = -3; - x_95 = (x_63 + 1); + x_95 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_95; break; } case 6: { data.arr[x_63] = -2; - x_93 = (x_63 + 1); + x_93 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_93; break; } case 5: { data.arr[x_63] = -1; - x_91 = (x_63 + 1); + x_91 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_91; break; } case 4: { data.arr[x_63] = 0; - x_89 = (x_63 + 1); + x_89 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_89; break; } case 3: { data.arr[x_63] = 1; - x_87 = (x_63 + 1); + x_87 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_87; break; } case 2: { data.arr[x_63] = 2; - x_85 = (x_63 + 1); + x_85 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_85; break; } case 1: { data.arr[x_63] = 3; - x_83 = (x_63 + 1); + x_83 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_83; break; } case 0: { data.arr[x_63] = 4; - x_81 = (x_63 + 1); + x_81 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_81; break; } @@ -126,7 +126,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_108 = data.arr[x_102]; temp.arr[x_102] = x_108; - x_103 = (x_102 + 1); + x_103 = as_type((as_type(x_102) + as_type(1))); x_102_phi = x_103; } } @@ -154,10 +154,10 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - int const x_124 = (x_118 + x_111); - int const x_125 = (x_124 - 1); - int const x_119 = (x_118 + (2 * x_111)); - int const x_128 = min((x_119 - 1), 9); + int const x_124 = as_type((as_type(x_118) + as_type(x_111))); + int const x_125 = as_type((as_type(x_124) - as_type(1))); + int const x_119 = as_type((as_type(x_118) + as_type(as_type((as_type(2) * as_type(x_111)))))); + int const x_128 = min(as_type((as_type(x_119) - as_type(1))), 9); x_130_phi = x_118; x_133_phi = x_124; x_135_phi = x_118; @@ -177,15 +177,15 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float int const x_143 = data.arr[x_142_save]; int const x_144_save = x_133; int const x_145 = data.arr[x_144_save]; - int const x_131 = as_type((x_130 + as_type(1))); + int const x_131 = as_type(as_type((as_type(x_130) + as_type(as_type(1))))); if ((x_143 < x_145)) { - x_150 = as_type((x_135 + as_type(1))); + x_150 = as_type(as_type((as_type(x_135) + as_type(as_type(1))))); int const x_151 = data.arr[x_142_save]; temp.arr[x_130] = x_151; x_134_phi = x_133; x_136_phi = x_150; } else { - x_153 = (x_133 + 1); + x_153 = as_type((as_type(x_133) + as_type(1))); int const x_154 = data.arr[x_144_save]; temp.arr[x_130] = x_154; x_134_phi = x_153; @@ -211,8 +211,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } { - x_158 = (x_157 + 1); - x_161 = (x_160 + 1); + x_158 = as_type((as_type(x_157) + as_type(1))); + x_161 = as_type((as_type(x_160) + as_type(1))); int const x_167 = data.arr[x_160]; temp.arr[x_157] = x_167; x_157_phi = x_158; @@ -230,7 +230,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_176 = temp.arr[x_170]; data.arr[x_170] = x_176; - x_171 = (x_170 + 1); + x_171 = as_type((as_type(x_170) + as_type(1))); x_170_phi = x_171; } } @@ -239,7 +239,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } } { - x_112 = (2 * x_111); + x_112 = as_type((as_type(2) * as_type(x_111))); x_111_phi = x_112; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl index 64e598bb88..13ce0fd8e4 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.wgsl.expected.msl @@ -39,66 +39,66 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float int x_81 = 0; int x_64_phi = 0; int const x_63 = x_63_phi; - int const x_68 = (x_63 + 1); + int const x_68 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_68; switch(x_63) { case 9: { data.arr[x_63] = -5; - x_99 = (x_63 + 1); + x_99 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_99; break; } case 8: { data.arr[x_63] = -4; - x_97 = (x_63 + 1); + x_97 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_97; break; } case 7: { data.arr[x_63] = -3; - x_95 = (x_63 + 1); + x_95 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_95; break; } case 6: { data.arr[x_63] = -2; - x_93 = (x_63 + 1); + x_93 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_93; break; } case 5: { data.arr[x_63] = -1; - x_91 = (x_63 + 1); + x_91 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_91; break; } case 4: { data.arr[x_63] = 0; - x_89 = (x_63 + 1); + x_89 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_89; break; } case 3: { data.arr[x_63] = 1; - x_87 = (x_63 + 1); + x_87 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_87; break; } case 2: { data.arr[x_63] = 2; - x_85 = (x_63 + 1); + x_85 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_85; break; } case 1: { data.arr[x_63] = 3; - x_83 = (x_63 + 1); + x_83 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_83; break; } case 0: { data.arr[x_63] = 4; - x_81 = (x_63 + 1); + x_81 = as_type((as_type(x_63) + as_type(1))); x_64_phi = x_81; break; } @@ -126,7 +126,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_108 = data.arr[x_102]; temp.arr[x_102] = x_108; - x_103 = (x_102 + 1); + x_103 = as_type((as_type(x_102) + as_type(1))); x_102_phi = x_103; } } @@ -154,10 +154,10 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - int const x_124 = (x_118 + x_111); - int const x_125 = (x_124 - 1); - int const x_119 = (x_118 + (2 * x_111)); - int const x_128 = min((x_119 - 1), 9); + int const x_124 = as_type((as_type(x_118) + as_type(x_111))); + int const x_125 = as_type((as_type(x_124) - as_type(1))); + int const x_119 = as_type((as_type(x_118) + as_type(as_type((as_type(2) * as_type(x_111)))))); + int const x_128 = min(as_type((as_type(x_119) - as_type(1))), 9); x_130_phi = x_118; x_133_phi = x_124; x_135_phi = x_118; @@ -177,15 +177,15 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float int const x_143 = data.arr[x_142_save]; int const x_144_save = x_133; int const x_145 = data.arr[x_144_save]; - int const x_131 = as_type((x_130 + as_type(1))); + int const x_131 = as_type(as_type((as_type(x_130) + as_type(as_type(1))))); if ((x_143 < x_145)) { - x_150 = as_type((x_135 + as_type(1))); + x_150 = as_type(as_type((as_type(x_135) + as_type(as_type(1))))); int const x_151 = data.arr[x_142_save]; temp.arr[x_130] = x_151; x_134_phi = x_133; x_136_phi = x_150; } else { - x_153 = (x_133 + 1); + x_153 = as_type((as_type(x_133) + as_type(1))); int const x_154 = data.arr[x_144_save]; temp.arr[x_130] = x_154; x_134_phi = x_153; @@ -211,8 +211,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } { - x_158 = (x_157 + 1); - x_161 = (x_160 + 1); + x_158 = as_type((as_type(x_157) + as_type(1))); + x_161 = as_type((as_type(x_160) + as_type(1))); int const x_167 = data.arr[x_160]; temp.arr[x_157] = x_167; x_157_phi = x_158; @@ -230,7 +230,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_176 = temp.arr[x_170]; data.arr[x_170] = x_176; - x_171 = (x_170 + 1); + x_171 = as_type((as_type(x_170) + as_type(1))); x_170_phi = x_171; } } @@ -239,7 +239,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } } { - x_112 = (2 * x_111); + x_112 = as_type((as_type(2) * as_type(x_111))); x_111_phi = x_112; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl index fd9f3b9506..240379695d 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_252 = *(from); i = x_252; int const x_253 = *(mid); - j = (x_253 + 1); + j = as_type((as_type(x_253) + as_type(1))); while (true) { int const x_259 = i; int const x_260 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_272 = (*(tint_symbol_5)).arr[x_270]; if ((x_269 < x_272)) { int const x_277 = k; - k = (x_277 + 1); + k = as_type((as_type(x_277) + as_type(1))); int const x_279 = i; - i = (x_279 + 1); + i = as_type((as_type(x_279) + as_type(1))); int const x_282 = (*(tint_symbol_5)).arr[x_279]; (*(tint_symbol_6)).arr[x_277] = x_282; } else { int const x_284 = k; - k = (x_284 + 1); + k = as_type((as_type(x_284) + as_type(1))); int const x_286 = j; - j = (x_286 + 1); + j = as_type((as_type(x_286) + as_type(1))); int const x_289 = (*(tint_symbol_5)).arr[x_286]; (*(tint_symbol_6)).arr[x_284] = x_289; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_302 = k; - k = (x_302 + 1); + k = as_type((as_type(x_302) + as_type(1))); int const x_304 = i; - i = (x_304 + 1); + i = as_type((as_type(x_304) + as_type(1))); int const x_307 = (*(tint_symbol_5)).arr[x_304]; (*(tint_symbol_6)).arr[x_302] = x_307; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_318] = x_321; { int const x_323 = i_1; - i_1 = (x_323 + 1); + i_1 = as_type((as_type(x_323) + as_type(1))); } } return; @@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_343; int const x_344 = i_2; int const x_345 = m; - mid_1 = ((x_344 + x_345) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_344) + as_type(x_345)))) - as_type(1))); int const x_348 = i_2; int const x_349 = m; int const x_353 = high; - to_1 = min(((x_348 + (2 * x_349)) - 1), x_353); + to_1 = min(as_type((as_type(as_type((as_type(x_348) + as_type(as_type((as_type(2) * as_type(x_349))))))) - as_type(1))), x_353); int const x_355 = from_1; param = x_355; int const x_356 = mid_1; @@ -139,12 +139,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_359 = m; int const x_361 = i_2; - i_2 = (x_361 + (2 * x_359)); + i_2 = as_type((as_type(x_361) + as_type(as_type((as_type(2) * as_type(x_359)))))); } } { int const x_363 = m; - m = (2 * x_363); + m = as_type((as_type(2) * as_type(x_363))); } } return; @@ -214,7 +214,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_122 = i_3; - i_3 = (x_122 + 1); + i_3 = as_type((as_type(x_122) + as_type(1))); { int const x_124 = i_3; if ((x_124 < 10)) { @@ -236,7 +236,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_133] = x_136; { int const x_138 = j_1; - j_1 = (x_138 + 1); + j_1 = as_type((as_type(x_138) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl index 6340b475e4..7d925d1afa 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_252 = *(from); i = x_252; int const x_253 = *(mid); - j = (x_253 + 1); + j = as_type((as_type(x_253) + as_type(1))); while (true) { int const x_259 = i; int const x_260 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_272 = (*(tint_symbol_5)).arr[x_270]; if ((x_269 < x_272)) { int const x_277 = k; - k = (x_277 + 1); + k = as_type((as_type(x_277) + as_type(1))); int const x_279 = i; - i = (x_279 + 1); + i = as_type((as_type(x_279) + as_type(1))); int const x_282 = (*(tint_symbol_5)).arr[x_279]; (*(tint_symbol_6)).arr[x_277] = x_282; } else { int const x_284 = k; - k = (x_284 + 1); + k = as_type((as_type(x_284) + as_type(1))); int const x_286 = j; - j = (x_286 + 1); + j = as_type((as_type(x_286) + as_type(1))); int const x_289 = (*(tint_symbol_5)).arr[x_286]; (*(tint_symbol_6)).arr[x_284] = x_289; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_302 = k; - k = (x_302 + 1); + k = as_type((as_type(x_302) + as_type(1))); int const x_304 = i; - i = (x_304 + 1); + i = as_type((as_type(x_304) + as_type(1))); int const x_307 = (*(tint_symbol_5)).arr[x_304]; (*(tint_symbol_6)).arr[x_302] = x_307; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_318] = x_321; { int const x_323 = i_1; - i_1 = (x_323 + 1); + i_1 = as_type((as_type(x_323) + as_type(1))); } } return; @@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_343; int const x_344 = i_2; int const x_345 = m; - mid_1 = ((x_344 + x_345) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_344) + as_type(x_345)))) - as_type(1))); int const x_348 = i_2; int const x_349 = m; int const x_353 = high; - to_1 = min(((x_348 + (2 * x_349)) - 1), x_353); + to_1 = min(as_type((as_type(as_type((as_type(x_348) + as_type(as_type((as_type(2) * as_type(x_349))))))) - as_type(1))), x_353); int const x_355 = from_1; param = x_355; int const x_356 = mid_1; @@ -139,12 +139,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_359 = m; int const x_361 = i_2; - i_2 = (x_361 + (2 * x_359)); + i_2 = as_type((as_type(x_361) + as_type(as_type((as_type(2) * as_type(x_359)))))); } } { int const x_363 = m; - m = (2 * x_363); + m = as_type((as_type(2) * as_type(x_363))); } } return; @@ -214,7 +214,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_122 = i_3; - i_3 = (x_122 + 1); + i_3 = as_type((as_type(x_122) + as_type(1))); { int const x_124 = i_3; if ((x_124 < 10)) { @@ -236,7 +236,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_133] = x_136; { int const x_138 = j_1; - j_1 = (x_138 + 1); + j_1 = as_type((as_type(x_138) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl index 83c23548ae..dcb5f467d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_263 = *(from); i = x_263; int const x_264 = *(mid); - j = (x_264 + 1); + j = as_type((as_type(x_264) + as_type(1))); while (true) { int const x_270 = i; int const x_271 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_283 = (*(tint_symbol_5)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; - k = (x_288 + 1); + k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; - i = (x_290 + 1); + i = as_type((as_type(x_290) + as_type(1))); int const x_293 = (*(tint_symbol_5)).arr[x_290]; (*(tint_symbol_6)).arr[x_288] = x_293; } else { int const x_295 = k; - k = (x_295 + 1); + k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; - j = (x_297 + 1); + j = as_type((as_type(x_297) + as_type(1))); int const x_300 = (*(tint_symbol_5)).arr[x_297]; (*(tint_symbol_6)).arr[x_295] = x_300; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_313 = k; - k = (x_313 + 1); + k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; - i = (x_315 + 1); + i = as_type((as_type(x_315) + as_type(1))); int const x_318 = (*(tint_symbol_5)).arr[x_315]; (*(tint_symbol_6)).arr[x_313] = x_318; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_329] = x_332; { int const x_334 = i_1; - i_1 = (x_334 + 1); + i_1 = as_type((as_type(x_334) + as_type(1))); } } return; @@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_354; int const x_355 = i_2; int const x_356 = m; - mid_1 = ((x_355 + x_356) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_355) + as_type(x_356)))) - as_type(1))); int const x_359 = i_2; int const x_360 = m; int const x_364 = high; - to_1 = min(((x_359 + (2 * x_360)) - 1), x_364); + to_1 = min(as_type((as_type(as_type((as_type(x_359) + as_type(as_type((as_type(2) * as_type(x_360))))))) - as_type(1))), x_364); int const x_366 = from_1; param = x_366; int const x_367 = mid_1; @@ -139,12 +139,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_370 = m; int const x_372 = i_2; - i_2 = (x_372 + (2 * x_370)); + i_2 = as_type((as_type(x_372) + as_type(as_type((as_type(2) * as_type(x_370)))))); } } { int const x_374 = m; - m = (2 * x_374); + m = as_type((as_type(2) * as_type(x_374))); } } return; @@ -214,7 +214,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_124 = i_3; - i_3 = (x_124 + 1); + i_3 = as_type((as_type(x_124) + as_type(1))); { int const x_126 = i_3; if ((x_126 < 10)) { @@ -241,7 +241,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_140] = x_143; { int const x_145 = j_1; - j_1 = (x_145 + 1); + j_1 = as_type((as_type(x_145) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl index 941121e54e..45b927b40f 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_263 = *(from); i = x_263; int const x_264 = *(mid); - j = (x_264 + 1); + j = as_type((as_type(x_264) + as_type(1))); while (true) { int const x_270 = i; int const x_271 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_283 = (*(tint_symbol_5)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; - k = (x_288 + 1); + k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; - i = (x_290 + 1); + i = as_type((as_type(x_290) + as_type(1))); int const x_293 = (*(tint_symbol_5)).arr[x_290]; (*(tint_symbol_6)).arr[x_288] = x_293; } else { int const x_295 = k; - k = (x_295 + 1); + k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; - j = (x_297 + 1); + j = as_type((as_type(x_297) + as_type(1))); int const x_300 = (*(tint_symbol_5)).arr[x_297]; (*(tint_symbol_6)).arr[x_295] = x_300; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_313 = k; - k = (x_313 + 1); + k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; - i = (x_315 + 1); + i = as_type((as_type(x_315) + as_type(1))); int const x_318 = (*(tint_symbol_5)).arr[x_315]; (*(tint_symbol_6)).arr[x_313] = x_318; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_329] = x_332; { int const x_334 = i_1; - i_1 = (x_334 + 1); + i_1 = as_type((as_type(x_334) + as_type(1))); } } return; @@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_354; int const x_355 = i_2; int const x_356 = m; - mid_1 = ((x_355 + x_356) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_355) + as_type(x_356)))) - as_type(1))); int const x_359 = i_2; int const x_360 = m; int const x_364 = high; - to_1 = min(((x_359 + (2 * x_360)) - 1), x_364); + to_1 = min(as_type((as_type(as_type((as_type(x_359) + as_type(as_type((as_type(2) * as_type(x_360))))))) - as_type(1))), x_364); int const x_366 = from_1; param = x_366; int const x_367 = mid_1; @@ -139,12 +139,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_370 = m; int const x_372 = i_2; - i_2 = (x_372 + (2 * x_370)); + i_2 = as_type((as_type(x_372) + as_type(as_type((as_type(2) * as_type(x_370)))))); } } { int const x_374 = m; - m = (2 * x_374); + m = as_type((as_type(2) * as_type(x_374))); } } return; @@ -214,7 +214,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_124 = i_3; - i_3 = (x_124 + 1); + i_3 = as_type((as_type(x_124) + as_type(1))); { int const x_126 = i_3; if ((x_126 < 10)) { @@ -241,7 +241,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_140] = x_143; { int const x_145 = j_1; - j_1 = (x_145 + 1); + j_1 = as_type((as_type(x_145) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl index d184fe6f47..e9de4dfa78 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_256 = *(from); i = x_256; int const x_257 = *(mid); - j = (x_257 + 1); + j = as_type((as_type(x_257) + as_type(1))); while (true) { int x_285 = 0; int x_286 = 0; @@ -70,7 +70,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_287_phi = x_286; } int const x_287 = x_287_phi; - int const x_288 = (x_287 + 1); + int const x_288 = as_type((as_type(x_287) + as_type(1))); if (x_280) { k = x_288; float const x_293 = x_28.injectionSwitch.x; @@ -95,7 +95,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_307 = x_307_phi; int const x_309 = select(x_300, x_307, x_280); if (x_280) { - i = (x_309 + 1); + i = as_type((as_type(x_309) + as_type(1))); } int const x_315 = 0; if (x_280) { @@ -128,7 +128,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_340 = x_340_phi; if (x_280) { } else { - k = (x_340 + 1); + k = as_type((as_type(x_340) + as_type(1))); } float const x_345 = x_28.injectionSwitch.x; if (!((1.0f <= x_345))) { @@ -147,7 +147,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_357 = select(x_353, x_355, x_280); if (x_280) { } else { - j = (x_357 + 1); + j = as_type((as_type(x_357) + as_type(1))); } if (x_280) { x_366 = 0; @@ -171,9 +171,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_383 = k; - k = (x_383 + 1); + k = as_type((as_type(x_383) + as_type(1))); int const x_385 = i; - i = (x_385 + 1); + i = as_type((as_type(x_385) + as_type(1))); int const x_388 = (*(tint_symbol_5)).arr[x_385]; (*(tint_symbol_6)).arr[x_383] = x_388; } @@ -192,7 +192,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co (*(tint_symbol_5)).arr[x_399] = x_402; { int const x_404 = i_1; - i_1 = (x_404 + 1); + i_1 = as_type((as_type(x_404) + as_type(1))); } } return; @@ -232,11 +232,11 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo from_1 = x_424; int const x_425 = i_2; int const x_426 = m; - mid_1 = ((x_425 + x_426) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_425) + as_type(x_426)))) - as_type(1))); int const x_429 = i_2; int const x_430 = m; int const x_434 = high; - to_1 = min(((x_429 + (2 * x_430)) - 1), x_434); + to_1 = min(as_type((as_type(as_type((as_type(x_429) + as_type(as_type((as_type(2) * as_type(x_430))))))) - as_type(1))), x_434); int const x_436 = from_1; param = x_436; int const x_437 = mid_1; @@ -247,12 +247,12 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo { int const x_440 = m; int const x_442 = i_2; - i_2 = (x_442 + (2 * x_440)); + i_2 = as_type((as_type(x_442) + as_type(as_type((as_type(2) * as_type(x_440)))))); } } { int const x_444 = m; - m = (2 * x_444); + m = as_type((as_type(2) * as_type(x_444))); } } return; @@ -322,7 +322,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_126 = i_3; - i_3 = (x_126 + 1); + i_3 = as_type((as_type(x_126) + as_type(1))); { int const x_128 = i_3; if ((x_128 < 10)) { @@ -344,7 +344,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_137] = x_140; { int const x_142 = j_1; - j_1 = (x_142 + 1); + j_1 = as_type((as_type(x_142) + as_type(1))); } } mergeSort_(x_28, tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl index a023050028..95f51be3b1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_256 = *(from); i = x_256; int const x_257 = *(mid); - j = (x_257 + 1); + j = as_type((as_type(x_257) + as_type(1))); while (true) { int x_285 = 0; int x_286 = 0; @@ -70,7 +70,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_287_phi = x_286; } int const x_287 = x_287_phi; - int const x_288 = (x_287 + 1); + int const x_288 = as_type((as_type(x_287) + as_type(1))); if (x_280) { k = x_288; float const x_293 = x_28.injectionSwitch.x; @@ -95,7 +95,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_307 = x_307_phi; int const x_309 = select(x_300, x_307, x_280); if (x_280) { - i = (x_309 + 1); + i = as_type((as_type(x_309) + as_type(1))); } int const x_315 = 0; if (x_280) { @@ -128,7 +128,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_340 = x_340_phi; if (x_280) { } else { - k = (x_340 + 1); + k = as_type((as_type(x_340) + as_type(1))); } float const x_345 = x_28.injectionSwitch.x; if (!((1.0f <= x_345))) { @@ -147,7 +147,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_357 = select(x_353, x_355, x_280); if (x_280) { } else { - j = (x_357 + 1); + j = as_type((as_type(x_357) + as_type(1))); } if (x_280) { x_366 = 0; @@ -171,9 +171,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_383 = k; - k = (x_383 + 1); + k = as_type((as_type(x_383) + as_type(1))); int const x_385 = i; - i = (x_385 + 1); + i = as_type((as_type(x_385) + as_type(1))); int const x_388 = (*(tint_symbol_5)).arr[x_385]; (*(tint_symbol_6)).arr[x_383] = x_388; } @@ -192,7 +192,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co (*(tint_symbol_5)).arr[x_399] = x_402; { int const x_404 = i_1; - i_1 = (x_404 + 1); + i_1 = as_type((as_type(x_404) + as_type(1))); } } return; @@ -232,11 +232,11 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo from_1 = x_424; int const x_425 = i_2; int const x_426 = m; - mid_1 = ((x_425 + x_426) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_425) + as_type(x_426)))) - as_type(1))); int const x_429 = i_2; int const x_430 = m; int const x_434 = high; - to_1 = min(((x_429 + (2 * x_430)) - 1), x_434); + to_1 = min(as_type((as_type(as_type((as_type(x_429) + as_type(as_type((as_type(2) * as_type(x_430))))))) - as_type(1))), x_434); int const x_436 = from_1; param = x_436; int const x_437 = mid_1; @@ -247,12 +247,12 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo { int const x_440 = m; int const x_442 = i_2; - i_2 = (x_442 + (2 * x_440)); + i_2 = as_type((as_type(x_442) + as_type(as_type((as_type(2) * as_type(x_440)))))); } } { int const x_444 = m; - m = (2 * x_444); + m = as_type((as_type(2) * as_type(x_444))); } } return; @@ -322,7 +322,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_126 = i_3; - i_3 = (x_126 + 1); + i_3 = as_type((as_type(x_126) + as_type(1))); { int const x_128 = i_3; if ((x_128 < 10)) { @@ -344,7 +344,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_137] = x_140; { int const x_142 = j_1; - j_1 = (x_142 + 1); + j_1 = as_type((as_type(x_142) + as_type(1))); } } mergeSort_(x_28, tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl index 3c42a4163a..a814f01299 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_256 = *(from); i = x_256; int const x_257 = *(mid); - j = (x_257 + 1); + j = as_type((as_type(x_257) + as_type(1))); while (true) { int x_283 = 0; int x_284 = 0; @@ -69,7 +69,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_285_phi = x_284; } int const x_285 = x_285_phi; - int const x_286 = (x_285 + 1); + int const x_286 = as_type((as_type(x_285) + as_type(1))); if (x_278) { k = x_286; float const x_291 = x_28.injectionSwitch.x; @@ -94,7 +94,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_305 = x_305_phi; int const x_307 = select(x_298, x_305, x_278); if (x_278) { - i = (x_307 + 1); + i = as_type((as_type(x_307) + as_type(1))); } int const x_313 = 0; if (x_278) { @@ -127,7 +127,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_338 = x_338_phi; if (x_278) { } else { - k = (x_338 + 1); + k = as_type((as_type(x_338) + as_type(1))); } float const x_343 = x_28.injectionSwitch.x; if (!((1.0f <= x_343))) { @@ -146,7 +146,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_355 = select(x_351, x_353, x_278); if (x_278) { } else { - j = (x_355 + 1); + j = as_type((as_type(x_355) + as_type(1))); } if (x_278) { x_364 = 0; @@ -170,9 +170,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_381 = k; - k = (x_381 + 1); + k = as_type((as_type(x_381) + as_type(1))); int const x_383 = i; - i = (x_383 + 1); + i = as_type((as_type(x_383) + as_type(1))); int const x_386 = (*(tint_symbol_5)).arr[x_383]; (*(tint_symbol_6)).arr[x_381] = x_386; } @@ -191,7 +191,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co (*(tint_symbol_5)).arr[x_397] = x_400; { int const x_402 = i_1; - i_1 = (x_402 + 1); + i_1 = as_type((as_type(x_402) + as_type(1))); } } return; @@ -231,11 +231,11 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo from_1 = x_422; int const x_423 = i_2; int const x_424 = m; - mid_1 = ((x_423 + x_424) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_423) + as_type(x_424)))) - as_type(1))); int const x_427 = i_2; int const x_428 = m; int const x_432 = high; - to_1 = min(((x_427 + (2 * x_428)) - 1), x_432); + to_1 = min(as_type((as_type(as_type((as_type(x_427) + as_type(as_type((as_type(2) * as_type(x_428))))))) - as_type(1))), x_432); int const x_434 = from_1; param = x_434; int const x_435 = mid_1; @@ -246,12 +246,12 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo { int const x_438 = m; int const x_440 = i_2; - i_2 = (x_440 + (2 * x_438)); + i_2 = as_type((as_type(x_440) + as_type(as_type((as_type(2) * as_type(x_438)))))); } } { int const x_442 = m; - m = (2 * x_442); + m = as_type((as_type(2) * as_type(x_442))); } } return; @@ -321,7 +321,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_126 = i_3; - i_3 = (x_126 + 1); + i_3 = as_type((as_type(x_126) + as_type(1))); { int const x_128 = i_3; if ((x_128 < 10)) { @@ -343,7 +343,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_137] = x_140; { int const x_142 = j_1; - j_1 = (x_142 + 1); + j_1 = as_type((as_type(x_142) + as_type(1))); } } mergeSort_(x_28, tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl index c3a165b3f5..ce84bf66e1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_256 = *(from); i = x_256; int const x_257 = *(mid); - j = (x_257 + 1); + j = as_type((as_type(x_257) + as_type(1))); while (true) { int x_283 = 0; int x_284 = 0; @@ -69,7 +69,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co x_285_phi = x_284; } int const x_285 = x_285_phi; - int const x_286 = (x_285 + 1); + int const x_286 = as_type((as_type(x_285) + as_type(1))); if (x_278) { k = x_286; float const x_291 = x_28.injectionSwitch.x; @@ -94,7 +94,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_305 = x_305_phi; int const x_307 = select(x_298, x_305, x_278); if (x_278) { - i = (x_307 + 1); + i = as_type((as_type(x_307) + as_type(1))); } int const x_313 = 0; if (x_278) { @@ -127,7 +127,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_338 = x_338_phi; if (x_278) { } else { - k = (x_338 + 1); + k = as_type((as_type(x_338) + as_type(1))); } float const x_343 = x_28.injectionSwitch.x; if (!((1.0f <= x_343))) { @@ -146,7 +146,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co int const x_355 = select(x_351, x_353, x_278); if (x_278) { } else { - j = (x_355 + 1); + j = as_type((as_type(x_355) + as_type(1))); } if (x_278) { x_364 = 0; @@ -170,9 +170,9 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co break; } int const x_381 = k; - k = (x_381 + 1); + k = as_type((as_type(x_381) + as_type(1))); int const x_383 = i; - i = (x_383 + 1); + i = as_type((as_type(x_383) + as_type(1))); int const x_386 = (*(tint_symbol_5)).arr[x_383]; (*(tint_symbol_6)).arr[x_381] = x_386; } @@ -191,7 +191,7 @@ void merge_i1_i1_i1_(constant buf0& x_28, thread int* const from, thread int* co (*(tint_symbol_5)).arr[x_397] = x_400; { int const x_402 = i_1; - i_1 = (x_402 + 1); + i_1 = as_type((as_type(x_402) + as_type(1))); } } return; @@ -231,11 +231,11 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo from_1 = x_422; int const x_423 = i_2; int const x_424 = m; - mid_1 = ((x_423 + x_424) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_423) + as_type(x_424)))) - as_type(1))); int const x_427 = i_2; int const x_428 = m; int const x_432 = high; - to_1 = min(((x_427 + (2 * x_428)) - 1), x_432); + to_1 = min(as_type((as_type(as_type((as_type(x_427) + as_type(as_type((as_type(2) * as_type(x_428))))))) - as_type(1))), x_432); int const x_434 = from_1; param = x_434; int const x_435 = mid_1; @@ -246,12 +246,12 @@ void mergeSort_(constant buf0& x_28, thread tint_array_wrapper* const tint_symbo { int const x_438 = m; int const x_440 = i_2; - i_2 = (x_440 + (2 * x_438)); + i_2 = as_type((as_type(x_440) + as_type(as_type((as_type(2) * as_type(x_438)))))); } } { int const x_442 = m; - m = (2 * x_442); + m = as_type((as_type(2) * as_type(x_442))); } } return; @@ -321,7 +321,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_126 = i_3; - i_3 = (x_126 + 1); + i_3 = as_type((as_type(x_126) + as_type(1))); { int const x_128 = i_3; if ((x_128 < 10)) { @@ -343,7 +343,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_137] = x_140; { int const x_142 = j_1; - j_1 = (x_142 + 1); + j_1 = as_type((as_type(x_142) + as_type(1))); } } mergeSort_(x_28, tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl index e99a3a30cb..4f62633df6 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_304 = *(from); i = x_304; int const x_305 = *(mid); - j = (x_305 + 1); + j = as_type((as_type(x_305) + as_type(1))); while (true) { int const x_311 = i; int const x_312 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_324 = (*(tint_symbol_6)).arr[x_322]; if ((x_321 < x_324)) { int const x_329 = k; - k = (x_329 + 1); + k = as_type((as_type(x_329) + as_type(1))); int const x_331 = i; - i = (x_331 + 1); + i = as_type((as_type(x_331) + as_type(1))); int const x_334 = (*(tint_symbol_6)).arr[x_331]; (*(tint_symbol_7)).arr[x_329] = x_334; } else { int const x_336 = k; - k = (x_336 + 1); + k = as_type((as_type(x_336) + as_type(1))); int const x_338 = j; - j = (x_338 + 1); + j = as_type((as_type(x_338) + as_type(1))); int const x_341 = (*(tint_symbol_6)).arr[x_338]; (*(tint_symbol_7)).arr[x_336] = x_341; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_354 = k; - k = (x_354 + 1); + k = as_type((as_type(x_354) + as_type(1))); int const x_356 = i; - i = (x_356 + 1); + i = as_type((as_type(x_356) + as_type(1))); int const x_359 = (*(tint_symbol_6)).arr[x_356]; (*(tint_symbol_7)).arr[x_354] = x_359; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_6)).arr[x_370] = x_373; { int const x_375 = i_1; - i_1 = (x_375 + 1); + i_1 = as_type((as_type(x_375) + as_type(1))); } } return; @@ -164,7 +164,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, } } int const x_134 = i_3; - i_3 = (x_134 + 1); + i_3 = as_type((as_type(x_134) + as_type(1))); { int const x_136 = i_3; if ((x_136 < 10)) { @@ -186,7 +186,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, (*(tint_symbol_9)).arr[x_145] = x_148; { int const x_150 = j_1; - j_1 = (x_150 + 1); + j_1 = as_type((as_type(x_150) + as_type(1))); } } x_94 = 0; @@ -216,11 +216,11 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_8) = tint_symbol_4; *(tint_symbol_8) = x_173; - x_89 = ((x_170 + x_171) - 1); + x_89 = as_type((as_type(as_type((as_type(x_170) + as_type(x_171)))) - as_type(1))); int const x_175 = x_91; int const x_176 = x_92; int const x_180 = x_93; - x_88 = min(((x_175 + (2 * x_176)) - 1), x_180); + x_88 = min(as_type((as_type(as_type((as_type(x_175) + as_type(as_type((as_type(2) * as_type(x_176))))))) - as_type(1))), x_180); int const x_182 = x_90; x_87 = x_182; int const x_183 = x_89; @@ -231,12 +231,12 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, { int const x_186 = x_92; int const x_188 = x_91; - x_91 = (x_188 + (2 * x_186)); + x_91 = as_type((as_type(x_188) + as_type(as_type((as_type(2) * as_type(x_186)))))); } } { int const x_190 = x_92; - x_92 = (2 * x_190); + x_92 = as_type((as_type(2) * as_type(x_190))); } } float const x_194 = (*(tint_symbol_10)).y; @@ -345,11 +345,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_arr from_1 = x_395; int const x_396 = i_2; int const x_397 = m; - mid_1 = ((x_396 + x_397) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_396) + as_type(x_397)))) - as_type(1))); int const x_400 = i_2; int const x_401 = m; int const x_405 = high; - to_1 = min(((x_400 + (2 * x_401)) - 1), x_405); + to_1 = min(as_type((as_type(as_type((as_type(x_400) + as_type(as_type((as_type(2) * as_type(x_401))))))) - as_type(1))), x_405); int const x_407 = from_1; param = x_407; int const x_408 = mid_1; @@ -360,12 +360,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_arr { int const x_411 = m; int const x_413 = i_2; - i_2 = (x_413 + (2 * x_411)); + i_2 = as_type((as_type(x_413) + as_type(as_type((as_type(2) * as_type(x_411)))))); } } { int const x_415 = m; - m = (2 * x_415); + m = as_type((as_type(2) * as_type(x_415))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl index 6506890d21..13c53829af 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_304 = *(from); i = x_304; int const x_305 = *(mid); - j = (x_305 + 1); + j = as_type((as_type(x_305) + as_type(1))); while (true) { int const x_311 = i; int const x_312 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_324 = (*(tint_symbol_6)).arr[x_322]; if ((x_321 < x_324)) { int const x_329 = k; - k = (x_329 + 1); + k = as_type((as_type(x_329) + as_type(1))); int const x_331 = i; - i = (x_331 + 1); + i = as_type((as_type(x_331) + as_type(1))); int const x_334 = (*(tint_symbol_6)).arr[x_331]; (*(tint_symbol_7)).arr[x_329] = x_334; } else { int const x_336 = k; - k = (x_336 + 1); + k = as_type((as_type(x_336) + as_type(1))); int const x_338 = j; - j = (x_338 + 1); + j = as_type((as_type(x_338) + as_type(1))); int const x_341 = (*(tint_symbol_6)).arr[x_338]; (*(tint_symbol_7)).arr[x_336] = x_341; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_354 = k; - k = (x_354 + 1); + k = as_type((as_type(x_354) + as_type(1))); int const x_356 = i; - i = (x_356 + 1); + i = as_type((as_type(x_356) + as_type(1))); int const x_359 = (*(tint_symbol_6)).arr[x_356]; (*(tint_symbol_7)).arr[x_354] = x_359; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_6)).arr[x_370] = x_373; { int const x_375 = i_1; - i_1 = (x_375 + 1); + i_1 = as_type((as_type(x_375) + as_type(1))); } } return; @@ -164,7 +164,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, } } int const x_134 = i_3; - i_3 = (x_134 + 1); + i_3 = as_type((as_type(x_134) + as_type(1))); { int const x_136 = i_3; if ((x_136 < 10)) { @@ -186,7 +186,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, (*(tint_symbol_9)).arr[x_145] = x_148; { int const x_150 = j_1; - j_1 = (x_150 + 1); + j_1 = as_type((as_type(x_150) + as_type(1))); } } x_94 = 0; @@ -216,11 +216,11 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, tint_array_wrapper const tint_symbol_4 = {.arr={0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}; *(tint_symbol_8) = tint_symbol_4; *(tint_symbol_8) = x_173; - x_89 = ((x_170 + x_171) - 1); + x_89 = as_type((as_type(as_type((as_type(x_170) + as_type(x_171)))) - as_type(1))); int const x_175 = x_91; int const x_176 = x_92; int const x_180 = x_93; - x_88 = min(((x_175 + (2 * x_176)) - 1), x_180); + x_88 = min(as_type((as_type(as_type((as_type(x_175) + as_type(as_type((as_type(2) * as_type(x_176))))))) - as_type(1))), x_180); int const x_182 = x_90; x_87 = x_182; int const x_183 = x_89; @@ -231,12 +231,12 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_8, { int const x_186 = x_92; int const x_188 = x_91; - x_91 = (x_188 + (2 * x_186)); + x_91 = as_type((as_type(x_188) + as_type(as_type((as_type(2) * as_type(x_186)))))); } } { int const x_190 = x_92; - x_92 = (2 * x_190); + x_92 = as_type((as_type(2) * as_type(x_190))); } } float const x_194 = (*(tint_symbol_10)).y; @@ -345,11 +345,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_arr from_1 = x_395; int const x_396 = i_2; int const x_397 = m; - mid_1 = ((x_396 + x_397) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_396) + as_type(x_397)))) - as_type(1))); int const x_400 = i_2; int const x_401 = m; int const x_405 = high; - to_1 = min(((x_400 + (2 * x_401)) - 1), x_405); + to_1 = min(as_type((as_type(as_type((as_type(x_400) + as_type(as_type((as_type(2) * as_type(x_401))))))) - as_type(1))), x_405); int const x_407 = from_1; param = x_407; int const x_408 = mid_1; @@ -360,12 +360,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_16, thread tint_arr { int const x_411 = m; int const x_413 = i_2; - i_2 = (x_413 + (2 * x_411)); + i_2 = as_type((as_type(x_413) + as_type(as_type((as_type(2) * as_type(x_411)))))); } } { int const x_415 = m; - m = (2 * x_415); + m = as_type((as_type(2) * as_type(x_415))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl index 12cf733cc6..865de8fa50 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_303 = *(from); i = x_303; int const x_304 = *(mid); - j = (x_304 + 1); + j = as_type((as_type(x_304) + as_type(1))); while (true) { int const x_310 = i; int const x_311 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_323 = (*(tint_symbol_5)).arr[x_321]; if ((x_320 < x_323)) { int const x_328 = k; - k = (x_328 + 1); + k = as_type((as_type(x_328) + as_type(1))); int const x_330 = i; - i = (x_330 + 1); + i = as_type((as_type(x_330) + as_type(1))); int const x_333 = (*(tint_symbol_5)).arr[x_330]; (*(tint_symbol_6)).arr[x_328] = x_333; } else { int const x_335 = k; - k = (x_335 + 1); + k = as_type((as_type(x_335) + as_type(1))); int const x_337 = j; - j = (x_337 + 1); + j = as_type((as_type(x_337) + as_type(1))); int const x_340 = (*(tint_symbol_5)).arr[x_337]; (*(tint_symbol_6)).arr[x_335] = x_340; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_353 = k; - k = (x_353 + 1); + k = as_type((as_type(x_353) + as_type(1))); int const x_355 = i; - i = (x_355 + 1); + i = as_type((as_type(x_355) + as_type(1))); int const x_358 = (*(tint_symbol_5)).arr[x_355]; (*(tint_symbol_6)).arr[x_353] = x_358; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_369] = x_372; { int const x_374 = i_1; - i_1 = (x_374 + 1); + i_1 = as_type((as_type(x_374) + as_type(1))); } } return; @@ -164,7 +164,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, } } int const x_134 = i_3; - i_3 = (x_134 + 1); + i_3 = as_type((as_type(x_134) + as_type(1))); { int const x_136 = i_3; if ((x_136 < 10)) { @@ -186,7 +186,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, (*(tint_symbol_8)).arr[x_145] = x_148; { int const x_150 = j_1; - j_1 = (x_150 + 1); + j_1 = as_type((as_type(x_150) + as_type(1))); } } x_94 = 0; @@ -212,11 +212,11 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, x_90 = x_169; int const x_170 = x_91; int const x_171 = x_92; - x_89 = ((x_170 + x_171) - 1); + x_89 = as_type((as_type(as_type((as_type(x_170) + as_type(x_171)))) - as_type(1))); int const x_174 = x_91; int const x_175 = x_92; int const x_179 = x_93; - x_88 = min(((x_174 + (2 * x_175)) - 1), x_179); + x_88 = min(as_type((as_type(as_type((as_type(x_174) + as_type(as_type((as_type(2) * as_type(x_175))))))) - as_type(1))), x_179); int const x_181 = x_90; x_87 = x_181; int const x_182 = x_89; @@ -227,12 +227,12 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, { int const x_185 = x_92; int const x_187 = x_91; - x_91 = (x_187 + (2 * x_185)); + x_91 = as_type((as_type(x_187) + as_type(as_type((as_type(2) * as_type(x_185)))))); } } { int const x_189 = x_92; - x_92 = (2 * x_189); + x_92 = as_type((as_type(2) * as_type(x_189))); } } float const x_193 = (*(tint_symbol_9)).y; @@ -341,11 +341,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_arr from_1 = x_394; int const x_395 = i_2; int const x_396 = m; - mid_1 = ((x_395 + x_396) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_395) + as_type(x_396)))) - as_type(1))); int const x_399 = i_2; int const x_400 = m; int const x_404 = high; - to_1 = min(((x_399 + (2 * x_400)) - 1), x_404); + to_1 = min(as_type((as_type(as_type((as_type(x_399) + as_type(as_type((as_type(2) * as_type(x_400))))))) - as_type(1))), x_404); int const x_406 = from_1; param = x_406; int const x_407 = mid_1; @@ -356,12 +356,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_arr { int const x_410 = m; int const x_412 = i_2; - i_2 = (x_412 + (2 * x_410)); + i_2 = as_type((as_type(x_412) + as_type(as_type((as_type(2) * as_type(x_410)))))); } } { int const x_414 = m; - m = (2 * x_414); + m = as_type((as_type(2) * as_type(x_414))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl index a550d0fd12..c9c9307a3a 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_303 = *(from); i = x_303; int const x_304 = *(mid); - j = (x_304 + 1); + j = as_type((as_type(x_304) + as_type(1))); while (true) { int const x_310 = i; int const x_311 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_323 = (*(tint_symbol_5)).arr[x_321]; if ((x_320 < x_323)) { int const x_328 = k; - k = (x_328 + 1); + k = as_type((as_type(x_328) + as_type(1))); int const x_330 = i; - i = (x_330 + 1); + i = as_type((as_type(x_330) + as_type(1))); int const x_333 = (*(tint_symbol_5)).arr[x_330]; (*(tint_symbol_6)).arr[x_328] = x_333; } else { int const x_335 = k; - k = (x_335 + 1); + k = as_type((as_type(x_335) + as_type(1))); int const x_337 = j; - j = (x_337 + 1); + j = as_type((as_type(x_337) + as_type(1))); int const x_340 = (*(tint_symbol_5)).arr[x_337]; (*(tint_symbol_6)).arr[x_335] = x_340; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_353 = k; - k = (x_353 + 1); + k = as_type((as_type(x_353) + as_type(1))); int const x_355 = i; - i = (x_355 + 1); + i = as_type((as_type(x_355) + as_type(1))); int const x_358 = (*(tint_symbol_5)).arr[x_355]; (*(tint_symbol_6)).arr[x_353] = x_358; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_369] = x_372; { int const x_374 = i_1; - i_1 = (x_374 + 1); + i_1 = as_type((as_type(x_374) + as_type(1))); } } return; @@ -164,7 +164,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, } } int const x_134 = i_3; - i_3 = (x_134 + 1); + i_3 = as_type((as_type(x_134) + as_type(1))); { int const x_136 = i_3; if ((x_136 < 10)) { @@ -186,7 +186,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, (*(tint_symbol_8)).arr[x_145] = x_148; { int const x_150 = j_1; - j_1 = (x_150 + 1); + j_1 = as_type((as_type(x_150) + as_type(1))); } } x_94 = 0; @@ -212,11 +212,11 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, x_90 = x_169; int const x_170 = x_91; int const x_171 = x_92; - x_89 = ((x_170 + x_171) - 1); + x_89 = as_type((as_type(as_type((as_type(x_170) + as_type(x_171)))) - as_type(1))); int const x_174 = x_91; int const x_175 = x_92; int const x_179 = x_93; - x_88 = min(((x_174 + (2 * x_175)) - 1), x_179); + x_88 = min(as_type((as_type(as_type((as_type(x_174) + as_type(as_type((as_type(2) * as_type(x_175))))))) - as_type(1))), x_179); int const x_181 = x_90; x_87 = x_181; int const x_182 = x_89; @@ -227,12 +227,12 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_7, { int const x_185 = x_92; int const x_187 = x_91; - x_91 = (x_187 + (2 * x_185)); + x_91 = as_type((as_type(x_187) + as_type(as_type((as_type(2) * as_type(x_185)))))); } } { int const x_189 = x_92; - x_92 = (2 * x_189); + x_92 = as_type((as_type(2) * as_type(x_189))); } } float const x_193 = (*(tint_symbol_9)).y; @@ -341,11 +341,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_arr from_1 = x_394; int const x_395 = i_2; int const x_396 = m; - mid_1 = ((x_395 + x_396) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_395) + as_type(x_396)))) - as_type(1))); int const x_399 = i_2; int const x_400 = m; int const x_404 = high; - to_1 = min(((x_399 + (2 * x_400)) - 1), x_404); + to_1 = min(as_type((as_type(as_type((as_type(x_399) + as_type(as_type((as_type(2) * as_type(x_400))))))) - as_type(1))), x_404); int const x_406 = from_1; param = x_406; int const x_407 = mid_1; @@ -356,12 +356,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_15, thread tint_arr { int const x_410 = m; int const x_412 = i_2; - i_2 = (x_412 + (2 * x_410)); + i_2 = as_type((as_type(x_412) + as_type(as_type((as_type(2) * as_type(x_410)))))); } } { int const x_414 = m; - m = (2 * x_414); + m = as_type((as_type(2) * as_type(x_414))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl index 426677694e..f711d31c26 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_60 = (float2(x_56.x, x_56.y) / x_59); int const x_63 = int((x_60.x * 8.0f)); int const x_66 = int((x_60.y * 8.0f)); - int2 const x_75 = int2(((((x_63 & 5) | (x_66 & 10)) * 8) + ((x_66 & 5) | (x_63 & 10))), 0); + int2 const x_75 = int2(as_type((as_type(as_type((as_type(((x_63 & 5) | (x_66 & 10))) * as_type(8)))) + as_type(((x_66 & 5) | (x_63 & 10))))), 0); x_77_phi = x_75; x_80_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_92_phi = x_77; if ((x_77.x > 0)) { x_91 = x_77; - x_91.y = (x_77.y - 1); + x_91.y = as_type((as_type(x_77.y) - as_type(1))); x_92_phi = x_91; } int2 const x_92 = x_92_phi; x_100_phi = x_92; if ((x_92.x < 0)) { x_99 = x_92; - x_99.y = (x_92.y + 1); + x_99.y = as_type((as_type(x_92.y) + as_type(1))); x_100_phi = x_99; } int2 const x_100 = x_100_phi; int2 x_78_1 = x_100; - x_78_1.x = (x_100.x + (x_100.y / 2)); + x_78_1.x = as_type((as_type(x_100.x) + as_type((x_100.y / 2)))); int2 const x_78 = x_78_1; { - x_81 = (x_80 + 1); + x_81 = as_type((as_type(x_80) + as_type(1))); x_77_phi = x_78; x_80_phi = x_81; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_111_phi = x_77; if ((x_105 < 0)) { x_110 = int2(0, 0); - x_110.x = -(x_105); + x_110.x = tint_unary_minus(x_105); x_111_phi = x_110; } int2 const x_111 = x_111_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } { x_114 = int2(0, 0); - x_114.x = as_type((x_116 - as_type(16))); + x_114.x = as_type(as_type((as_type(x_116) - as_type(as_type(16))))); x_113_phi = x_114; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl index 426677694e..f711d31c26 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/0.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_60 = (float2(x_56.x, x_56.y) / x_59); int const x_63 = int((x_60.x * 8.0f)); int const x_66 = int((x_60.y * 8.0f)); - int2 const x_75 = int2(((((x_63 & 5) | (x_66 & 10)) * 8) + ((x_66 & 5) | (x_63 & 10))), 0); + int2 const x_75 = int2(as_type((as_type(as_type((as_type(((x_63 & 5) | (x_66 & 10))) * as_type(8)))) + as_type(((x_66 & 5) | (x_63 & 10))))), 0); x_77_phi = x_75; x_80_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_92_phi = x_77; if ((x_77.x > 0)) { x_91 = x_77; - x_91.y = (x_77.y - 1); + x_91.y = as_type((as_type(x_77.y) - as_type(1))); x_92_phi = x_91; } int2 const x_92 = x_92_phi; x_100_phi = x_92; if ((x_92.x < 0)) { x_99 = x_92; - x_99.y = (x_92.y + 1); + x_99.y = as_type((as_type(x_92.y) + as_type(1))); x_100_phi = x_99; } int2 const x_100 = x_100_phi; int2 x_78_1 = x_100; - x_78_1.x = (x_100.x + (x_100.y / 2)); + x_78_1.x = as_type((as_type(x_100.x) + as_type((x_100.y / 2)))); int2 const x_78 = x_78_1; { - x_81 = (x_80 + 1); + x_81 = as_type((as_type(x_80) + as_type(1))); x_77_phi = x_78; x_80_phi = x_81; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_111_phi = x_77; if ((x_105 < 0)) { x_110 = int2(0, 0); - x_110.x = -(x_105); + x_110.x = tint_unary_minus(x_105); x_111_phi = x_110; } int2 const x_111 = x_111_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } { x_114 = int2(0, 0); - x_114.x = as_type((x_116 - as_type(16))); + x_114.x = as_type(as_type((as_type(x_116) - as_type(as_type(16))))); x_113_phi = x_114; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl index 0e7d8641b9..49c5889e46 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float float2 const x_63 = (float2(x_59.x, x_59.y) / x_62); int const x_66 = int((x_63.x * 8.0f)); int const x_69 = int((x_63.y * 8.0f)); - int2 const x_78 = int2(((((x_66 & 5) | (x_69 & 10)) * 8) + ((x_69 & 5) | (x_66 & 10))), 0); + int2 const x_78 = int2(as_type((as_type(as_type((as_type(((x_66 & 5) | (x_69 & 10))) * as_type(8)))) + as_type(((x_69 & 5) | (x_66 & 10))))), 0); x_80_phi = x_78; x_83_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_95_phi = x_80; if ((x_80.x > 0)) { x_94 = x_80; - x_94.y = (x_80.y - 1); + x_94.y = as_type((as_type(x_80.y) - as_type(1))); x_95_phi = x_94; } int2 const x_95 = x_95_phi; x_103_phi = x_95; if ((x_95.x < 0)) { x_102 = x_95; - x_102.y = (x_95.y + 1); + x_102.y = as_type((as_type(x_95.y) + as_type(1))); x_103_phi = x_102; } int2 const x_103 = x_103_phi; int2 x_81_1 = x_103; - x_81_1.x = (x_103.x + (x_103.y / 2)); + x_81_1.x = as_type((as_type(x_103.x) + as_type((x_103.y / 2)))); int2 const x_81 = x_81_1; { - x_84 = (x_83 + 1); + x_84 = as_type((as_type(x_83) + as_type(1))); x_80_phi = x_81; x_83_phi = x_84; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_114_phi = x_80; if ((x_108 < 0)) { x_113 = int2(0, 0); - x_113.x = -(x_108); + x_113.x = tint_unary_minus(x_108); x_114_phi = x_113; } int2 const x_114 = x_114_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float } { x_117 = int2(0, 0); - x_117.x = as_type((x_119 - as_type(16))); + x_117.x = as_type(as_type((as_type(x_119) - as_type(as_type(16))))); x_116_phi = x_117; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl index 0e7d8641b9..49c5889e46 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-O-mutate-variable/1.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float float2 const x_63 = (float2(x_59.x, x_59.y) / x_62); int const x_66 = int((x_63.x * 8.0f)); int const x_69 = int((x_63.y * 8.0f)); - int2 const x_78 = int2(((((x_66 & 5) | (x_69 & 10)) * 8) + ((x_69 & 5) | (x_66 & 10))), 0); + int2 const x_78 = int2(as_type((as_type(as_type((as_type(((x_66 & 5) | (x_69 & 10))) * as_type(8)))) + as_type(((x_69 & 5) | (x_66 & 10))))), 0); x_80_phi = x_78; x_83_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_95_phi = x_80; if ((x_80.x > 0)) { x_94 = x_80; - x_94.y = (x_80.y - 1); + x_94.y = as_type((as_type(x_80.y) - as_type(1))); x_95_phi = x_94; } int2 const x_95 = x_95_phi; x_103_phi = x_95; if ((x_95.x < 0)) { x_102 = x_95; - x_102.y = (x_95.y + 1); + x_102.y = as_type((as_type(x_95.y) + as_type(1))); x_103_phi = x_102; } int2 const x_103 = x_103_phi; int2 x_81_1 = x_103; - x_81_1.x = (x_103.x + (x_103.y / 2)); + x_81_1.x = as_type((as_type(x_103.x) + as_type((x_103.y / 2)))); int2 const x_81 = x_81_1; { - x_84 = (x_83 + 1); + x_84 = as_type((as_type(x_83) + as_type(1))); x_80_phi = x_81; x_83_phi = x_84; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_114_phi = x_80; if ((x_108 < 0)) { x_113 = int2(0, 0); - x_113.x = -(x_108); + x_113.x = tint_unary_minus(x_108); x_114_phi = x_113; } int2 const x_114 = x_114_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float } { x_117 = int2(0, 0); - x_117.x = as_type((x_119 - as_type(16))); + x_117.x = as_type(as_type((as_type(x_119) - as_type(as_type(16))))); x_116_phi = x_117; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl index e35ddd7bab..15febd0dca 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_62 = int((x_59.x * 8.0f)); int const x_65 = int((x_59.y * 8.0f)); - int2 const x_74 = int2(((((x_62 & 5) | (x_65 & 10)) * 8) + ((x_65 & 5) | (x_62 & 10))), 0); + int2 const x_74 = int2(as_type((as_type(as_type((as_type(((x_62 & 5) | (x_65 & 10))) * as_type(8)))) + as_type(((x_65 & 5) | (x_62 & 10))))), 0); x_76_phi = x_74; x_79_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_91_phi = x_76; if ((x_76.x > 0)) { x_90 = x_76; - x_90.y = (x_76.y - 1); + x_90.y = as_type((as_type(x_76.y) - as_type(1))); x_91_phi = x_90; } int2 const x_91 = x_91_phi; x_99_phi = x_91; if ((x_91.x < 0)) { x_98 = x_91; - x_98.y = (x_91.y + 1); + x_98.y = as_type((as_type(x_91.y) + as_type(1))); x_99_phi = x_98; } int2 const x_99 = x_99_phi; int2 x_77_1 = x_99; - x_77_1.x = (x_99.x + (x_99.y / 2)); + x_77_1.x = as_type((as_type(x_99.x) + as_type((x_99.y / 2)))); int2 const x_77 = x_77_1; { - x_80 = (x_79 + 1); + x_80 = as_type((as_type(x_79) + as_type(1))); x_76_phi = x_77; x_79_phi = x_80; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_110_phi = x_76; if ((x_104 < 0)) { x_109 = x_76; - x_109.x = -(x_104); + x_109.x = tint_unary_minus(x_104); x_110_phi = x_109; } int2 const x_110 = x_110_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } { x_113 = x_112; - x_113.x = as_type((x_115 - as_type(16))); + x_113.x = as_type(as_type((as_type(x_115) - as_type(as_type(16))))); x_112_phi = x_113; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl index e35ddd7bab..15febd0dca 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/0.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_59 = (float2(x_55.x, x_55.y) / x_58); int const x_62 = int((x_59.x * 8.0f)); int const x_65 = int((x_59.y * 8.0f)); - int2 const x_74 = int2(((((x_62 & 5) | (x_65 & 10)) * 8) + ((x_65 & 5) | (x_62 & 10))), 0); + int2 const x_74 = int2(as_type((as_type(as_type((as_type(((x_62 & 5) | (x_65 & 10))) * as_type(8)))) + as_type(((x_65 & 5) | (x_62 & 10))))), 0); x_76_phi = x_74; x_79_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_91_phi = x_76; if ((x_76.x > 0)) { x_90 = x_76; - x_90.y = (x_76.y - 1); + x_90.y = as_type((as_type(x_76.y) - as_type(1))); x_91_phi = x_90; } int2 const x_91 = x_91_phi; x_99_phi = x_91; if ((x_91.x < 0)) { x_98 = x_91; - x_98.y = (x_91.y + 1); + x_98.y = as_type((as_type(x_91.y) + as_type(1))); x_99_phi = x_98; } int2 const x_99 = x_99_phi; int2 x_77_1 = x_99; - x_77_1.x = (x_99.x + (x_99.y / 2)); + x_77_1.x = as_type((as_type(x_99.x) + as_type((x_99.y / 2)))); int2 const x_77 = x_77_1; { - x_80 = (x_79 + 1); + x_80 = as_type((as_type(x_79) + as_type(1))); x_76_phi = x_77; x_79_phi = x_80; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_110_phi = x_76; if ((x_104 < 0)) { x_109 = x_76; - x_109.x = -(x_104); + x_109.x = tint_unary_minus(x_104); x_110_phi = x_109; } int2 const x_110 = x_110_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } { x_113 = x_112; - x_113.x = as_type((x_115 - as_type(16))); + x_113.x = as_type(as_type((as_type(x_115) - as_type(as_type(16))))); x_112_phi = x_113; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl index 6b28e63809..c082298214 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); int const x_69 = int((x_62.y * 8.0f)); - int2 const x_78 = int2(((((x_65 & 5) | (x_69 & 10)) * 8) + ((x_69 & 5) | (x_65 & 10))), 0); + int2 const x_78 = int2(as_type((as_type(as_type((as_type(((x_65 & 5) | (x_69 & 10))) * as_type(8)))) + as_type(((x_69 & 5) | (x_65 & 10))))), 0); x_80_phi = x_78; x_83_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_95_phi = x_80; if ((x_80.x > 0)) { x_94 = x_80; - x_94.y = (x_80.y - 1); + x_94.y = as_type((as_type(x_80.y) - as_type(1))); x_95_phi = x_94; } int2 const x_95 = x_95_phi; x_103_phi = x_95; if ((x_95.x < 0)) { x_102 = x_95; - x_102.y = (x_95.y + 1); + x_102.y = as_type((as_type(x_95.y) + as_type(1))); x_103_phi = x_102; } int2 const x_103 = x_103_phi; int2 x_81_1 = x_103; - x_81_1.x = (x_103.x + (x_103.y / 2)); + x_81_1.x = as_type((as_type(x_103.x) + as_type((x_103.y / 2)))); int2 const x_81 = x_81_1; { - x_84 = (x_83 + 1); + x_84 = as_type((as_type(x_83) + as_type(1))); x_80_phi = x_81; x_83_phi = x_84; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_114_phi = x_80; if ((x_108 < 0)) { x_113 = x_80; - x_113.x = -(x_108); + x_113.x = tint_unary_minus(x_108); x_114_phi = x_113; } int2 const x_114 = x_114_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float } { x_117 = x_116; - x_117.x = as_type((x_119 - as_type(16))); + x_117.x = as_type(as_type((as_type(x_119) - as_type(as_type(16))))); x_116_phi = x_117; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl index 6b28e63809..c082298214 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/1.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); int const x_69 = int((x_62.y * 8.0f)); - int2 const x_78 = int2(((((x_65 & 5) | (x_69 & 10)) * 8) + ((x_69 & 5) | (x_65 & 10))), 0); + int2 const x_78 = int2(as_type((as_type(as_type((as_type(((x_65 & 5) | (x_69 & 10))) * as_type(8)))) + as_type(((x_69 & 5) | (x_65 & 10))))), 0); x_80_phi = x_78; x_83_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_95_phi = x_80; if ((x_80.x > 0)) { x_94 = x_80; - x_94.y = (x_80.y - 1); + x_94.y = as_type((as_type(x_80.y) - as_type(1))); x_95_phi = x_94; } int2 const x_95 = x_95_phi; x_103_phi = x_95; if ((x_95.x < 0)) { x_102 = x_95; - x_102.y = (x_95.y + 1); + x_102.y = as_type((as_type(x_95.y) + as_type(1))); x_103_phi = x_102; } int2 const x_103 = x_103_phi; int2 x_81_1 = x_103; - x_81_1.x = (x_103.x + (x_103.y / 2)); + x_81_1.x = as_type((as_type(x_103.x) + as_type((x_103.y / 2)))); int2 const x_81 = x_81_1; { - x_84 = (x_83 + 1); + x_84 = as_type((as_type(x_83) + as_type(1))); x_80_phi = x_81; x_83_phi = x_84; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float x_114_phi = x_80; if ((x_108 < 0)) { x_113 = x_80; - x_113.x = -(x_108); + x_113.x = tint_unary_minus(x_108); x_114_phi = x_113; } int2 const x_114 = x_114_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_7, thread float } { x_117 = x_116; - x_117.x = as_type((x_119 - as_type(16))); + x_117.x = as_type(as_type((as_type(x_119) - as_type(as_type(16))))); x_116_phi = x_117; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl index 14e3c2f75a..ca93b97976 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); int const x_69 = int((x_62.y * 8.0f)); - int2 const x_78 = int2(((((x_65 & 5) | (x_69 & 10)) * 8) + ((x_69 & 5) | (x_65 & 10))), 0); + int2 const x_78 = int2(as_type((as_type(as_type((as_type(((x_65 & 5) | (x_69 & 10))) * as_type(8)))) + as_type(((x_69 & 5) | (x_65 & 10))))), 0); x_80_phi = x_78; x_83_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_95_phi = x_80; if ((x_80.x > 0)) { x_94 = x_80; - x_94.y = (x_80.y - 1); + x_94.y = as_type((as_type(x_80.y) - as_type(1))); x_95_phi = x_94; } int2 const x_95 = x_95_phi; x_103_phi = x_95; if ((x_95.x < 0)) { x_102 = x_95; - x_102.y = (x_95.y + 1); + x_102.y = as_type((as_type(x_95.y) + as_type(1))); x_103_phi = x_102; } int2 const x_103 = x_103_phi; int2 x_81_1 = x_103; - x_81_1.x = (x_103.x + (x_103.y / 2)); + x_81_1.x = as_type((as_type(x_103.x) + as_type((x_103.y / 2)))); int2 const x_81 = x_81_1; { - x_84 = (x_83 + 1); + x_84 = as_type((as_type(x_83) + as_type(1))); x_80_phi = x_81; x_83_phi = x_84; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_114_phi = x_80; if ((x_108 < 0)) { x_113 = x_80; - x_113.x = -(x_108); + x_113.x = tint_unary_minus(x_108); x_114_phi = x_113; } int2 const x_114 = x_114_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } { x_117 = x_116; - x_117.x = as_type((x_119 - as_type(16))); + x_117.x = as_type(as_type((as_type(x_119) - as_type(as_type(16))))); x_116_phi = x_117; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl index 14e3c2f75a..ca93b97976 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-orbit-Os-access-chain-mutate-pointer/2.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct buf0 { /* 0x0000 */ packed_float2 resolution; }; @@ -28,7 +33,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float float2 const x_62 = (float2(x_58.x, x_58.y) / x_61); int const x_65 = int((x_62.x * 8.0f)); int const x_69 = int((x_62.y * 8.0f)); - int2 const x_78 = int2(((((x_65 & 5) | (x_69 & 10)) * 8) + ((x_69 & 5) | (x_65 & 10))), 0); + int2 const x_78 = int2(as_type((as_type(as_type((as_type(((x_65 & 5) | (x_69 & 10))) * as_type(8)))) + as_type(((x_69 & 5) | (x_65 & 10))))), 0); x_80_phi = x_78; x_83_phi = 0; while (true) { @@ -46,22 +51,22 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_95_phi = x_80; if ((x_80.x > 0)) { x_94 = x_80; - x_94.y = (x_80.y - 1); + x_94.y = as_type((as_type(x_80.y) - as_type(1))); x_95_phi = x_94; } int2 const x_95 = x_95_phi; x_103_phi = x_95; if ((x_95.x < 0)) { x_102 = x_95; - x_102.y = (x_95.y + 1); + x_102.y = as_type((as_type(x_95.y) + as_type(1))); x_103_phi = x_102; } int2 const x_103 = x_103_phi; int2 x_81_1 = x_103; - x_81_1.x = (x_103.x + (x_103.y / 2)); + x_81_1.x = as_type((as_type(x_103.x) + as_type((x_103.y / 2)))); int2 const x_81 = x_81_1; { - x_84 = (x_83 + 1); + x_84 = as_type((as_type(x_83) + as_type(1))); x_80_phi = x_81; x_83_phi = x_84; } @@ -70,7 +75,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float x_114_phi = x_80; if ((x_108 < 0)) { x_113 = x_80; - x_113.x = -(x_108); + x_113.x = tint_unary_minus(x_108); x_114_phi = x_113; } int2 const x_114 = x_114_phi; @@ -85,7 +90,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_6, thread float } { x_117 = x_116; - x_117.x = as_type((x_119 - as_type(16))); + x_117.x = as_type(as_type((as_type(x_119) - as_type(as_type(16))))); x_116_phi = x_117; } } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl index 72762dcdfe..bd5afe6dbb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.spvasm.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_4; int const x_223 = x_196.arr[x_217]; - bool const x_225 = (x_221 < (x_223 + 15)); + bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_5; @@ -62,7 +62,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float x_235_phi = x_234; } int const x_235 = x_235_phi; - bool const x_237 = (x_221 > (x_235 - 15)); + bool const x_237 = (x_221 > as_type((as_type(x_235) - as_type(15)))); if (x_225) { x_241_phi = x_237; } else { @@ -73,14 +73,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_198 = tint_symbol_6; int const x_245 = x_198.arr[x_217]; - float const x_250 = ((15.0f - fabs(float((x_221 - x_245)))) * 0.06666667f); + float const x_250 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_245)))))) * 0.06666667f); x_251 = float4(x_250, x_250, x_250, 1.0f); x_253_phi = x_251; x_254_phi = true; break; } int2 x_215_1 = x_214; - x_215_1.y = (x_217 + 1); + x_215_1.y = as_type((as_type(x_217) + as_type(1))); int2 const x_215 = x_215_1; { x_214_phi = x_215; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl index 72762dcdfe..bd5afe6dbb 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/1.wgsl.expected.msl @@ -49,7 +49,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_4; int const x_223 = x_196.arr[x_217]; - bool const x_225 = (x_221 < (x_223 + 15)); + bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_5; @@ -62,7 +62,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float x_235_phi = x_234; } int const x_235 = x_235_phi; - bool const x_237 = (x_221 > (x_235 - 15)); + bool const x_237 = (x_221 > as_type((as_type(x_235) - as_type(15)))); if (x_225) { x_241_phi = x_237; } else { @@ -73,14 +73,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_198 = tint_symbol_6; int const x_245 = x_198.arr[x_217]; - float const x_250 = ((15.0f - fabs(float((x_221 - x_245)))) * 0.06666667f); + float const x_250 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_245)))))) * 0.06666667f); x_251 = float4(x_250, x_250, x_250, 1.0f); x_253_phi = x_251; x_254_phi = true; break; } int2 x_215_1 = x_214; - x_215_1.y = (x_217 + 1); + x_215_1.y = as_type((as_type(x_217) + as_type(1))); int2 const x_215 = x_215_1; { x_214_phi = x_215; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl index 0b8a803b52..da2762d9fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.spvasm.expected.msl @@ -48,7 +48,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_4; int const x_223 = x_196.arr[x_217]; - bool const x_225 = (x_221 < (x_223 + 15)); + bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_5; @@ -61,19 +61,19 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float x_235_phi = x_234; } int const x_235 = x_235_phi; - bool const x_237 = (x_221 > (x_235 - 15)); + bool const x_237 = (x_221 > as_type((as_type(x_235) - as_type(15)))); if (select(x_225, x_237, x_225)) { tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_198 = tint_symbol_6; int const x_243 = x_198.arr[x_217]; - float const x_248 = ((15.0f - fabs(float((x_221 - x_243)))) * 0.06666667f); + float const x_248 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_243)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; break; } int2 x_215_1 = x_214; - x_215_1.y = (x_217 + 1); + x_215_1.y = as_type((as_type(x_217) + as_type(1))); int2 const x_215 = x_215_1; { x_214_phi = x_215; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl index 0b8a803b52..da2762d9fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-O-op-select-to-op-phi/2.wgsl.expected.msl @@ -48,7 +48,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_196 = tint_symbol_4; int const x_223 = x_196.arr[x_217]; - bool const x_225 = (x_221 < (x_223 + 15)); + bool const x_225 = (x_221 < as_type((as_type(x_223) + as_type(15)))); if (x_225) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_197 = tint_symbol_5; @@ -61,19 +61,19 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8, thread float x_235_phi = x_234; } int const x_235 = x_235_phi; - bool const x_237 = (x_221 > (x_235 - 15)); + bool const x_237 = (x_221 > as_type((as_type(x_235) - as_type(15)))); if (select(x_225, x_237, x_225)) { tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; x_198 = tint_symbol_6; int const x_243 = x_198.arr[x_217]; - float const x_248 = ((15.0f - fabs(float((x_221 - x_243)))) * 0.06666667f); + float const x_248 = ((15.0f - fabs(float(as_type((as_type(x_221) - as_type(x_243)))))) * 0.06666667f); x_249 = float4(x_248, x_248, x_248, 1.0f); x_251_phi = x_249; x_252_phi = true; break; } int2 x_215_1 = x_214; - x_215_1.y = (x_217 + 1); + x_215_1.y = as_type((as_type(x_217) + as_type(1))); int2 const x_215 = x_215_1; { x_214_phi = x_215; diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl index f95df19c11..3ed9534ff7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.spvasm.expected.msl @@ -32,7 +32,7 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable = tint_symbol_4; int const x_235 = indexable.arr[x_233]; - bool const x_237 = (x_231 < (x_235 + 15)); + bool const x_237 = (x_231 < as_type((as_type(x_235) + as_type(15)))); x_248_phi = x_237; if (x_237) { int const x_241 = (*(pos)).x; @@ -40,7 +40,7 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_1 = tint_symbol_5; int const x_245 = indexable_1.arr[x_243]; - x_247 = (x_241 > (x_245 - 15)); + x_247 = (x_241 > as_type((as_type(x_245) - as_type(15)))); x_248_phi = x_247; } bool const x_248 = x_248_phi; @@ -50,14 +50,14 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_2 = tint_symbol_6; int const x_256 = indexable_2.arr[x_254]; - p = ((15.0f - fabs(float((x_252 - x_256)))) / 15.0f); + p = ((15.0f - fabs(float(as_type((as_type(x_252) - as_type(x_256)))))) / 15.0f); float const x_262 = p; float const x_263 = p; float const x_264 = p; return float4(x_262, x_263, x_264, 1.0f); } int const x_267 = (*(pos)).y; - (*(pos)).y = (x_267 + 1); + (*(pos)).y = as_type((as_type(x_267) + as_type(1))); } return float4(0.0f, 0.0f, 0.0f, 1.0f); } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl index f95df19c11..3ed9534ff7 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/0.wgsl.expected.msl @@ -32,7 +32,7 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_4 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable = tint_symbol_4; int const x_235 = indexable.arr[x_233]; - bool const x_237 = (x_231 < (x_235 + 15)); + bool const x_237 = (x_231 < as_type((as_type(x_235) + as_type(15)))); x_248_phi = x_237; if (x_237) { int const x_241 = (*(pos)).x; @@ -40,7 +40,7 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_5 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_1 = tint_symbol_5; int const x_245 = indexable_1.arr[x_243]; - x_247 = (x_241 > (x_245 - 15)); + x_247 = (x_241 > as_type((as_type(x_245) - as_type(15)))); x_248_phi = x_247; } bool const x_248 = x_248_phi; @@ -50,14 +50,14 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_2 = tint_symbol_6; int const x_256 = indexable_2.arr[x_254]; - p = ((15.0f - fabs(float((x_252 - x_256)))) / 15.0f); + p = ((15.0f - fabs(float(as_type((as_type(x_252) - as_type(x_256)))))) / 15.0f); float const x_262 = p; float const x_263 = p; float const x_264 = p; return float4(x_262, x_263, x_264, 1.0f); } int const x_267 = (*(pos)).y; - (*(pos)).y = (x_267 + 1); + (*(pos)).y = as_type((as_type(x_267) + as_type(1))); } return float4(0.0f, 0.0f, 0.0f, 1.0f); } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl index aa07b66433..7ecfd1f5f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.spvasm.expected.msl @@ -39,7 +39,7 @@ float4 trace_vi2_(thread int2* const pos) { (*(pos)).y = 0; (*(pos)).y = x_239; indexable = x_238; - bool const x_241 = (x_233 < (x_237 + 15)); + bool const x_241 = (x_233 < as_type((as_type(x_237) + as_type(15)))); x_252_phi = x_241; if (x_241) { int const x_245 = (*(pos)).x; @@ -47,7 +47,7 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_1 = tint_symbol_6; int const x_249 = indexable_1.arr[x_247]; - x_251 = (x_245 > (x_249 - 15)); + x_251 = (x_245 > as_type((as_type(x_249) - as_type(15)))); x_252_phi = x_251; } bool const x_252 = x_252_phi; @@ -57,14 +57,14 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_7 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_2 = tint_symbol_7; int const x_260 = indexable_2.arr[x_258]; - p = ((15.0f - fabs(float((x_256 - x_260)))) / 15.0f); + p = ((15.0f - fabs(float(as_type((as_type(x_256) - as_type(x_260)))))) / 15.0f); float const x_266 = p; float const x_267 = p; float const x_268 = p; return float4(x_266, x_267, x_268, 1.0f); } int const x_271 = (*(pos)).y; - (*(pos)).y = (x_271 + 1); + (*(pos)).y = as_type((as_type(x_271) + as_type(1))); } return float4(0.0f, 0.0f, 0.0f, 1.0f); } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl index aa07b66433..7ecfd1f5f1 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-pillars-volatile-nontemporal-store/1.wgsl.expected.msl @@ -39,7 +39,7 @@ float4 trace_vi2_(thread int2* const pos) { (*(pos)).y = 0; (*(pos)).y = x_239; indexable = x_238; - bool const x_241 = (x_233 < (x_237 + 15)); + bool const x_241 = (x_233 < as_type((as_type(x_237) + as_type(15)))); x_252_phi = x_241; if (x_241) { int const x_245 = (*(pos)).x; @@ -47,7 +47,7 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_6 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_1 = tint_symbol_6; int const x_249 = indexable_1.arr[x_247]; - x_251 = (x_245 > (x_249 - 15)); + x_251 = (x_245 > as_type((as_type(x_249) - as_type(15)))); x_252_phi = x_251; } bool const x_252 = x_252_phi; @@ -57,14 +57,14 @@ float4 trace_vi2_(thread int2* const pos) { tint_array_wrapper const tint_symbol_7 = {.arr={115, 133, 150, 164, 176, 184, 190, 192, 191, 187, 181, 172, 163, 153, 143, 134, 126, 120, 116, 114, 114, 117, 121, 127, 134, 141, 148, 154, 159, 162, 163, 161, 157, 151, 143, 134, 124, 113, 103, 94, 87, 82, 79, 80, 84, 91, 101, 114, 130, 146, 164, 182, 199, 215, 229, 240, 249, 254, 256, 254, 250, 243, 233, 223, 212, 200, 190, 180, 172, 166, 163, 161, 162, 164, 169, 174, 179, 185, 190, 193, 195, 195, 192, 188, 180, 171, 161, 149, 137, 125, 114, 105, 97, 93, 91, 93, 98, 106, 117, 130, 145, 161, 177, 193, 208, 221, 231, 239, 243, 244, 242, 236, 228, 218, 207, 194, 181, 169, 158, 148, 141, 135, 132, 131, 132, 135, 138, 143, 147, 151, 154, 155, 155, 152, 146, 139, 129, 118, 106, 93, 80, 68, 58, 49, 43, 40, 41, 44, 51, 61, 73, 87, 103, 119, 134, 149, 162, 173, 181, 186, 188, 186, 181, 174, 164, 153, 141, 128, 116, 104, 94, 86, 81, 77, 76, 77, 80, 84, 89, 94, 98, 102, 104, 104, 102, 98, 92, 83, 73, 62, 50, 38, 26, 16, 8, 2, 0, 0, 4, 11, 21, 33, 48, 64, 81, 98, 114, 129, 141, 151, 158, 161, 161, 158, 152, 144, 134, 123, 112, 100, 90, 81, 73, 68, 65, 65, 67, 70, 75, 81, 87, 92, 97, 101, 103, 102, 100, 95, 88, 79, 69, 58, 47, 36, 26, 18, 13, 11, 11, 15, 22, 32, 45, 60, 77, 94}}; indexable_2 = tint_symbol_7; int const x_260 = indexable_2.arr[x_258]; - p = ((15.0f - fabs(float((x_256 - x_260)))) / 15.0f); + p = ((15.0f - fabs(float(as_type((as_type(x_256) - as_type(x_260)))))) / 15.0f); float const x_266 = p; float const x_267 = p; float const x_268 = p; return float4(x_266, x_267, x_268, 1.0f); } int const x_271 = (*(pos)).y; - (*(pos)).y = (x_271 + 1); + (*(pos)).y = as_type((as_type(x_271) + as_type(1))); } return float4(0.0f, 0.0f, 0.0f, 1.0f); } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl index 7cd8892031..19624f7014 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.spvasm.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_239 = (*(tint_symbol_6)).numbers.arr[x_237]; pivot = x_239; int const x_240 = *(l); - i_1 = (x_240 - 1); + i_1 = as_type((as_type(x_240) - as_type(1))); int const x_242 = *(l); j_1 = x_242; while (true) { int const x_247 = j_1; int const x_248 = *(h); - if ((x_247 <= (x_248 - 1))) { + if ((x_247 <= as_type((as_type(x_248) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_255 = pivot; if ((x_254 <= x_255)) { int const x_259 = i_1; - i_1 = (x_259 + 1); + i_1 = as_type((as_type(x_259) + as_type(1))); int const x_261 = i_1; param = x_261; int const x_262 = j_1; @@ -68,11 +68,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_264 = j_1; - j_1 = (x_264 + 1); + j_1 = as_type((as_type(x_264) + as_type(1))); } } int const x_266 = i_1; - i_1 = (x_266 + 1); + i_1 = as_type((as_type(x_266) + as_type(1))); int const x_268 = i_1; param_2 = x_268; int const x_269 = *(h); @@ -94,12 +94,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { h_1 = 9; top = -1; int const x_273 = top; - int const x_274 = (x_273 + 1); + int const x_274 = as_type((as_type(x_273) + as_type(1))); top = x_274; int const x_275 = l_1; stack.arr[x_274] = x_275; int const x_277 = top; - int const x_278 = (x_277 + 1); + int const x_278 = as_type((as_type(x_277) + as_type(1))); top = x_278; int const x_279 = h_1; stack.arr[x_278] = x_279; @@ -110,11 +110,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { break; } int const x_288 = top; - top = (x_288 - 1); + top = as_type((as_type(x_288) - as_type(1))); int const x_291 = stack.arr[x_288]; h_1 = x_291; int const x_292 = top; - top = (x_292 - 1); + top = as_type((as_type(x_292) - as_type(1))); int const x_295 = stack.arr[x_292]; l_1 = x_295; int const x_296 = l_1; @@ -125,28 +125,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { p = x_298; int const x_299 = p; int const x_301 = l_1; - if (((x_299 - 1) > x_301)) { + if ((as_type((as_type(x_299) - as_type(1))) > x_301)) { int const x_305 = top; - int const x_306 = (x_305 + 1); + int const x_306 = as_type((as_type(x_305) + as_type(1))); top = x_306; int const x_307 = l_1; stack.arr[x_306] = x_307; int const x_309 = top; - int const x_310 = (x_309 + 1); + int const x_310 = as_type((as_type(x_309) + as_type(1))); top = x_310; int const x_311 = p; - stack.arr[x_310] = (x_311 - 1); + stack.arr[x_310] = as_type((as_type(x_311) - as_type(1))); } int const x_314 = p; int const x_316 = h_1; - if (((x_314 + 1) < x_316)) { + if ((as_type((as_type(x_314) + as_type(1))) < x_316)) { int const x_320 = top; - int const x_321 = (x_320 + 1); + int const x_321 = as_type((as_type(x_320) + as_type(1))); top = x_321; int const x_322 = p; - stack.arr[x_321] = (x_322 + 1); + stack.arr[x_321] = as_type((as_type(x_322) + as_type(1))); int const x_325 = top; - int const x_326 = (x_325 + 1); + int const x_326 = as_type((as_type(x_325) + as_type(1))); top = x_326; int const x_327 = h_1; stack.arr[x_326] = x_327; @@ -168,16 +168,16 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_88 = i_2; int const x_89 = i_2; - (*(tint_symbol_8)).numbers.arr[x_88] = (10 - x_89); + (*(tint_symbol_8)).numbers.arr[x_88] = as_type((as_type(10) - as_type(x_89))); int const x_92 = i_2; int const x_93 = i_2; int const x_95 = (*(tint_symbol_8)).numbers.arr[x_93]; int const x_96 = i_2; int const x_98 = (*(tint_symbol_8)).numbers.arr[x_96]; - (*(tint_symbol_8)).numbers.arr[x_92] = (x_95 * x_98); + (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(x_95) * as_type(x_98))); { int const x_101 = i_2; - i_2 = (x_101 + 1); + i_2 = as_type((as_type(x_101) + as_type(1))); } } quicksort_(tint_symbol_8); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl index 7cd8892031..19624f7014 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-dontinline/0-opt.wgsl.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_239 = (*(tint_symbol_6)).numbers.arr[x_237]; pivot = x_239; int const x_240 = *(l); - i_1 = (x_240 - 1); + i_1 = as_type((as_type(x_240) - as_type(1))); int const x_242 = *(l); j_1 = x_242; while (true) { int const x_247 = j_1; int const x_248 = *(h); - if ((x_247 <= (x_248 - 1))) { + if ((x_247 <= as_type((as_type(x_248) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_255 = pivot; if ((x_254 <= x_255)) { int const x_259 = i_1; - i_1 = (x_259 + 1); + i_1 = as_type((as_type(x_259) + as_type(1))); int const x_261 = i_1; param = x_261; int const x_262 = j_1; @@ -68,11 +68,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_264 = j_1; - j_1 = (x_264 + 1); + j_1 = as_type((as_type(x_264) + as_type(1))); } } int const x_266 = i_1; - i_1 = (x_266 + 1); + i_1 = as_type((as_type(x_266) + as_type(1))); int const x_268 = i_1; param_2 = x_268; int const x_269 = *(h); @@ -94,12 +94,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { h_1 = 9; top = -1; int const x_273 = top; - int const x_274 = (x_273 + 1); + int const x_274 = as_type((as_type(x_273) + as_type(1))); top = x_274; int const x_275 = l_1; stack.arr[x_274] = x_275; int const x_277 = top; - int const x_278 = (x_277 + 1); + int const x_278 = as_type((as_type(x_277) + as_type(1))); top = x_278; int const x_279 = h_1; stack.arr[x_278] = x_279; @@ -110,11 +110,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { break; } int const x_288 = top; - top = (x_288 - 1); + top = as_type((as_type(x_288) - as_type(1))); int const x_291 = stack.arr[x_288]; h_1 = x_291; int const x_292 = top; - top = (x_292 - 1); + top = as_type((as_type(x_292) - as_type(1))); int const x_295 = stack.arr[x_292]; l_1 = x_295; int const x_296 = l_1; @@ -125,28 +125,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { p = x_298; int const x_299 = p; int const x_301 = l_1; - if (((x_299 - 1) > x_301)) { + if ((as_type((as_type(x_299) - as_type(1))) > x_301)) { int const x_305 = top; - int const x_306 = (x_305 + 1); + int const x_306 = as_type((as_type(x_305) + as_type(1))); top = x_306; int const x_307 = l_1; stack.arr[x_306] = x_307; int const x_309 = top; - int const x_310 = (x_309 + 1); + int const x_310 = as_type((as_type(x_309) + as_type(1))); top = x_310; int const x_311 = p; - stack.arr[x_310] = (x_311 - 1); + stack.arr[x_310] = as_type((as_type(x_311) - as_type(1))); } int const x_314 = p; int const x_316 = h_1; - if (((x_314 + 1) < x_316)) { + if ((as_type((as_type(x_314) + as_type(1))) < x_316)) { int const x_320 = top; - int const x_321 = (x_320 + 1); + int const x_321 = as_type((as_type(x_320) + as_type(1))); top = x_321; int const x_322 = p; - stack.arr[x_321] = (x_322 + 1); + stack.arr[x_321] = as_type((as_type(x_322) + as_type(1))); int const x_325 = top; - int const x_326 = (x_325 + 1); + int const x_326 = as_type((as_type(x_325) + as_type(1))); top = x_326; int const x_327 = h_1; stack.arr[x_326] = x_327; @@ -168,16 +168,16 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_88 = i_2; int const x_89 = i_2; - (*(tint_symbol_8)).numbers.arr[x_88] = (10 - x_89); + (*(tint_symbol_8)).numbers.arr[x_88] = as_type((as_type(10) - as_type(x_89))); int const x_92 = i_2; int const x_93 = i_2; int const x_95 = (*(tint_symbol_8)).numbers.arr[x_93]; int const x_96 = i_2; int const x_98 = (*(tint_symbol_8)).numbers.arr[x_96]; - (*(tint_symbol_8)).numbers.arr[x_92] = (x_95 * x_98); + (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(x_95) * as_type(x_98))); { int const x_101 = i_2; - i_2 = (x_101 + 1); + i_2 = as_type((as_type(x_101) + as_type(1))); } } quicksort_(tint_symbol_8); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl index a97ee25fb1..73e23fffff 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.spvasm.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); - i_1 = (x_245 - 1); + i_1 = as_type((as_type(x_245) - as_type(1))); int const x_247 = *(l); j_1 = x_247; while (true) { int const x_252 = j_1; int const x_253 = *(h); - if ((x_252 <= (x_253 - 1))) { + if ((x_252 <= as_type((as_type(x_253) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; - i_1 = (x_264 + 1); + i_1 = as_type((as_type(x_264) + as_type(1))); int const x_266 = i_1; param = x_266; int const x_267 = j_1; @@ -68,11 +68,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_269 = j_1; - j_1 = (x_269 + 1); + j_1 = as_type((as_type(x_269) + as_type(1))); } } int const x_271 = i_1; - i_1 = (x_271 + 1); + i_1 = as_type((as_type(x_271) + as_type(1))); int const x_273 = i_1; param_2 = x_273; int const x_274 = *(h); @@ -94,12 +94,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { h_1 = 9; top = -1; int const x_278 = top; - int const x_279 = (x_278 + 1); + int const x_279 = as_type((as_type(x_278) + as_type(1))); top = x_279; int const x_280 = l_1; stack.arr[x_279] = x_280; int const x_282 = top; - int const x_283 = (x_282 + 1); + int const x_283 = as_type((as_type(x_282) + as_type(1))); top = x_283; int const x_284 = h_1; stack.arr[x_283] = x_284; @@ -110,11 +110,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { break; } int const x_293 = top; - top = (x_293 - 1); + top = as_type((as_type(x_293) - as_type(1))); int const x_296 = stack.arr[x_293]; h_1 = x_296; int const x_297 = top; - top = (x_297 - 1); + top = as_type((as_type(x_297) - as_type(1))); int const x_300 = stack.arr[x_297]; l_1 = x_300; int const x_301 = l_1; @@ -125,28 +125,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { p = x_303; int const x_304 = p; int const x_306 = l_1; - if (((x_304 - 1) > x_306)) { + if ((as_type((as_type(x_304) - as_type(1))) > x_306)) { int const x_310 = top; - int const x_311 = (x_310 + 1); + int const x_311 = as_type((as_type(x_310) + as_type(1))); top = x_311; int const x_312 = l_1; stack.arr[x_311] = x_312; int const x_314 = top; - int const x_315 = (x_314 + 1); + int const x_315 = as_type((as_type(x_314) + as_type(1))); top = x_315; int const x_316 = p; - stack.arr[x_315] = (x_316 - 1); + stack.arr[x_315] = as_type((as_type(x_316) - as_type(1))); } int const x_319 = p; int const x_321 = h_1; - if (((x_319 + 1) < x_321)) { + if ((as_type((as_type(x_319) + as_type(1))) < x_321)) { int const x_325 = top; - int const x_326 = (x_325 + 1); + int const x_326 = as_type((as_type(x_325) + as_type(1))); top = x_326; int const x_327 = p; - stack.arr[x_326] = (x_327 + 1); + stack.arr[x_326] = as_type((as_type(x_327) + as_type(1))); int const x_330 = top; - int const x_331 = (x_330 + 1); + int const x_331 = as_type((as_type(x_330) + as_type(1))); top = x_331; int const x_332 = h_1; stack.arr[x_331] = x_332; @@ -168,16 +168,16 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_92 = i_2; int const x_93 = i_2; - (*(tint_symbol_8)).numbers.arr[x_92] = (10 - x_93); + (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(10) - as_type(x_93))); int const x_96 = i_2; int const x_97 = i_2; int const x_99 = (*(tint_symbol_8)).numbers.arr[x_97]; int const x_100 = i_2; int const x_102 = (*(tint_symbol_8)).numbers.arr[x_100]; - (*(tint_symbol_8)).numbers.arr[x_96] = (x_99 * x_102); + (*(tint_symbol_8)).numbers.arr[x_96] = as_type((as_type(x_99) * as_type(x_102))); { int const x_105 = i_2; - i_2 = (x_105 + 1); + i_2 = as_type((as_type(x_105) + as_type(1))); } } quicksort_(tint_symbol_8); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl index a97ee25fb1..73e23fffff 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-quicksort-mat-func-param/1.wgsl.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); - i_1 = (x_245 - 1); + i_1 = as_type((as_type(x_245) - as_type(1))); int const x_247 = *(l); j_1 = x_247; while (true) { int const x_252 = j_1; int const x_253 = *(h); - if ((x_252 <= (x_253 - 1))) { + if ((x_252 <= as_type((as_type(x_253) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; - i_1 = (x_264 + 1); + i_1 = as_type((as_type(x_264) + as_type(1))); int const x_266 = i_1; param = x_266; int const x_267 = j_1; @@ -68,11 +68,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_269 = j_1; - j_1 = (x_269 + 1); + j_1 = as_type((as_type(x_269) + as_type(1))); } } int const x_271 = i_1; - i_1 = (x_271 + 1); + i_1 = as_type((as_type(x_271) + as_type(1))); int const x_273 = i_1; param_2 = x_273; int const x_274 = *(h); @@ -94,12 +94,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { h_1 = 9; top = -1; int const x_278 = top; - int const x_279 = (x_278 + 1); + int const x_279 = as_type((as_type(x_278) + as_type(1))); top = x_279; int const x_280 = l_1; stack.arr[x_279] = x_280; int const x_282 = top; - int const x_283 = (x_282 + 1); + int const x_283 = as_type((as_type(x_282) + as_type(1))); top = x_283; int const x_284 = h_1; stack.arr[x_283] = x_284; @@ -110,11 +110,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { break; } int const x_293 = top; - top = (x_293 - 1); + top = as_type((as_type(x_293) - as_type(1))); int const x_296 = stack.arr[x_293]; h_1 = x_296; int const x_297 = top; - top = (x_297 - 1); + top = as_type((as_type(x_297) - as_type(1))); int const x_300 = stack.arr[x_297]; l_1 = x_300; int const x_301 = l_1; @@ -125,28 +125,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_7) { p = x_303; int const x_304 = p; int const x_306 = l_1; - if (((x_304 - 1) > x_306)) { + if ((as_type((as_type(x_304) - as_type(1))) > x_306)) { int const x_310 = top; - int const x_311 = (x_310 + 1); + int const x_311 = as_type((as_type(x_310) + as_type(1))); top = x_311; int const x_312 = l_1; stack.arr[x_311] = x_312; int const x_314 = top; - int const x_315 = (x_314 + 1); + int const x_315 = as_type((as_type(x_314) + as_type(1))); top = x_315; int const x_316 = p; - stack.arr[x_315] = (x_316 - 1); + stack.arr[x_315] = as_type((as_type(x_316) - as_type(1))); } int const x_319 = p; int const x_321 = h_1; - if (((x_319 + 1) < x_321)) { + if ((as_type((as_type(x_319) + as_type(1))) < x_321)) { int const x_325 = top; - int const x_326 = (x_325 + 1); + int const x_326 = as_type((as_type(x_325) + as_type(1))); top = x_326; int const x_327 = p; - stack.arr[x_326] = (x_327 + 1); + stack.arr[x_326] = as_type((as_type(x_327) + as_type(1))); int const x_330 = top; - int const x_331 = (x_330 + 1); + int const x_331 = as_type((as_type(x_330) + as_type(1))); top = x_331; int const x_332 = h_1; stack.arr[x_331] = x_332; @@ -168,16 +168,16 @@ void main_1(constant buf0& x_32, thread QuicksortObject* const tint_symbol_8, th } int const x_92 = i_2; int const x_93 = i_2; - (*(tint_symbol_8)).numbers.arr[x_92] = (10 - x_93); + (*(tint_symbol_8)).numbers.arr[x_92] = as_type((as_type(10) - as_type(x_93))); int const x_96 = i_2; int const x_97 = i_2; int const x_99 = (*(tint_symbol_8)).numbers.arr[x_97]; int const x_100 = i_2; int const x_102 = (*(tint_symbol_8)).numbers.arr[x_100]; - (*(tint_symbol_8)).numbers.arr[x_96] = (x_99 * x_102); + (*(tint_symbol_8)).numbers.arr[x_96] = as_type((as_type(x_99) * as_type(x_102))); { int const x_105 = i_2; - i_2 = (x_105 + 1); + i_2 = as_type((as_type(x_105) + as_type(1))); } } quicksort_(tint_symbol_8); diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl index c69c232baa..f6b0d6f45e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.spvasm.expected.msl @@ -89,12 +89,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa x_81 = x_135; tint_array_wrapper_1 const tint_symbol_8 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; x_85 = tint_symbol_8; - x_143 = x_85.arr[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; + x_143 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_143; } float4 const x_96 = x_96_phi; { - x_99 = (x_98 + 1); + x_99 = as_type((as_type(x_98) + as_type(1))); x_95_phi = x_96; x_98_phi = x_99; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl index c69c232baa..f6b0d6f45e 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/1.wgsl.expected.msl @@ -89,12 +89,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_10, thread floa x_81 = x_135; tint_array_wrapper_1 const tint_symbol_8 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; x_85 = tint_symbol_8; - x_143 = x_85.arr[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; + x_143 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_143; } float4 const x_96 = x_96_phi; { - x_99 = (x_98 + 1); + x_99 = as_type((as_type(x_98) + as_type(1))); x_95_phi = x_96; x_98_phi = x_99; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl index f5eb2e7cb4..dd850d81fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.spvasm.expected.msl @@ -85,12 +85,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float const x_134 = x_84.arr[x_98].y; tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; x_85 = tint_symbol_7; - x_142 = x_85.arr[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; + x_142 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_142; } float4 const x_96 = x_96_phi; { - x_99 = (x_98 + 1); + x_99 = as_type((as_type(x_98) + as_type(1))); x_95_phi = x_96; x_98_phi = x_99; } diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl index f5eb2e7cb4..dd850d81fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-rects-Os-mutate-var-push-through-var/2.wgsl.expected.msl @@ -85,12 +85,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_9, thread float float const x_134 = x_84.arr[x_98].y; tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; x_85 = tint_symbol_7; - x_142 = x_85.arr[((((int(x_131) * int(x_134)) + (x_98 * 9)) + 11) % 16)]; + x_142 = x_85.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_131)) * as_type(int(x_134))))) + as_type(as_type((as_type(x_98) * as_type(9))))))) + as_type(11))) % 16)]; x_96_phi = x_142; } float4 const x_96 = x_96_phi; { - x_99 = (x_98 + 1); + x_99 = as_type((as_type(x_98) + as_type(1))); x_95_phi = x_96; x_98_phi = x_99; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl index 752c6ed0be..1f650e516a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.spvasm.expected.msl @@ -718,7 +718,7 @@ void main_1(thread float4* const tint_symbol_23) { case 17: { x_391_phi = x_356; if ((x_354 == as_type(x_358))) { - x_390 = as_type((x_356 + as_type(1))); + x_390 = as_type(as_type((as_type(x_356) + as_type(as_type(1))))); x_391_phi = x_390; } x_391 = x_391_phi; @@ -728,7 +728,7 @@ void main_1(thread float4* const tint_symbol_23) { default: { x_396_phi = x_356; if ((x_354 == as_type(-1))) { - x_395 = as_type((x_356 + as_type(1))); + x_395 = as_type(as_type((as_type(x_356) + as_type(as_type(1))))); x_396_phi = x_395; } x_396 = x_396_phi; @@ -738,7 +738,7 @@ void main_1(thread float4* const tint_symbol_23) { } int const x_357 = x_357_phi; { - x_359 = (x_358 + 1); + x_359 = as_type((as_type(x_358) + as_type(1))); x_353_phi = x_354; x_356_phi = x_357; x_358_phi = x_359; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl index 752c6ed0be..1f650e516a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/0.wgsl.expected.msl @@ -718,7 +718,7 @@ void main_1(thread float4* const tint_symbol_23) { case 17: { x_391_phi = x_356; if ((x_354 == as_type(x_358))) { - x_390 = as_type((x_356 + as_type(1))); + x_390 = as_type(as_type((as_type(x_356) + as_type(as_type(1))))); x_391_phi = x_390; } x_391 = x_391_phi; @@ -728,7 +728,7 @@ void main_1(thread float4* const tint_symbol_23) { default: { x_396_phi = x_356; if ((x_354 == as_type(-1))) { - x_395 = as_type((x_356 + as_type(1))); + x_395 = as_type(as_type((as_type(x_356) + as_type(as_type(1))))); x_396_phi = x_395; } x_396 = x_396_phi; @@ -738,7 +738,7 @@ void main_1(thread float4* const tint_symbol_23) { } int const x_357 = x_357_phi; { - x_359 = (x_358 + 1); + x_359 = as_type((as_type(x_358) + as_type(1))); x_353_phi = x_354; x_356_phi = x_357; x_358_phi = x_359; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl index 5025022f26..7b8839896d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.spvasm.expected.msl @@ -258,7 +258,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa } } { - x_120 = (x_119 + 1); + x_120 = as_type((as_type(x_119) + as_type(1))); x_119_phi = x_120; } } @@ -1070,7 +1070,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa case 17: { x_607_phi = x_572; if ((x_570 == as_type(x_574))) { - x_606 = as_type((x_572 + as_type(1))); + x_606 = as_type(as_type((as_type(x_572) + as_type(as_type(1))))); x_607_phi = x_606; } x_607 = x_607_phi; @@ -1080,7 +1080,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa default: { x_612_phi = x_572; if ((x_570 == as_type(-1))) { - x_611 = as_type((x_572 + as_type(1))); + x_611 = as_type(as_type((as_type(x_572) + as_type(as_type(1))))); x_612_phi = x_611; } x_612 = x_612_phi; @@ -1090,7 +1090,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa } int const x_573 = x_573_phi; { - x_575 = (x_574 + 1); + x_575 = as_type((as_type(x_574) + as_type(1))); x_569_phi = x_570; x_572_phi = x_573; x_574_phi = x_575; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl index 5025022f26..7b8839896d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-false-if-discard-loop/1.wgsl.expected.msl @@ -258,7 +258,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa } } { - x_120 = (x_119 + 1); + x_120 = as_type((as_type(x_119) + as_type(1))); x_119_phi = x_120; } } @@ -1070,7 +1070,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa case 17: { x_607_phi = x_572; if ((x_570 == as_type(x_574))) { - x_606 = as_type((x_572 + as_type(1))); + x_606 = as_type(as_type((as_type(x_572) + as_type(as_type(1))))); x_607_phi = x_606; } x_607 = x_607_phi; @@ -1080,7 +1080,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa default: { x_612_phi = x_572; if ((x_570 == as_type(-1))) { - x_611 = as_type((x_572 + as_type(1))); + x_611 = as_type(as_type((as_type(x_572) + as_type(as_type(1))))); x_612_phi = x_611; } x_612 = x_612_phi; @@ -1090,7 +1090,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa } int const x_573 = x_573_phi; { - x_575 = (x_574 + 1); + x_575 = as_type((as_type(x_574) + as_type(1))); x_569_phi = x_570; x_572_phi = x_573; x_574_phi = x_575; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl index f509724732..0ddc6e7729 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.spvasm.expected.msl @@ -162,55 +162,55 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const BST const x_86 = param_4; (*(tint_symbol_6)).arr[0] = x_86; int const x_88 = treeIndex_1; - treeIndex_1 = (x_88 + 1); + treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); int const x_92 = treeIndex_1; - treeIndex_1 = (x_92 + 1); + treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); int const x_96 = treeIndex_1; - treeIndex_1 = (x_96 + 1); + treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); int const x_100 = treeIndex_1; - treeIndex_1 = (x_100 + 1); + treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); int const x_104 = treeIndex_1; - treeIndex_1 = (x_104 + 1); + treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); int const x_108 = treeIndex_1; - treeIndex_1 = (x_108 + 1); + treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); int const x_112 = treeIndex_1; - treeIndex_1 = (x_112 + 1); + treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); int const x_120 = treeIndex_1; - treeIndex_1 = (x_120 + 1); + treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; @@ -243,7 +243,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_144 = i; if ((x_143 == x_144)) { int const x_148 = count; - count = (x_148 + 1); + count = as_type((as_type(x_148) + as_type(1))); } break; } @@ -251,14 +251,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_137 = result; if ((x_137 == -1)) { int const x_141 = count; - count = (x_141 + 1); + count = as_type((as_type(x_141) + as_type(1))); } break; } } { int const x_150 = i; - i = (x_150 + 1); + i = as_type((as_type(x_150) + as_type(1))); } } int const x_152 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl index f509724732..0ddc6e7729 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/0.wgsl.expected.msl @@ -162,55 +162,55 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const BST const x_86 = param_4; (*(tint_symbol_6)).arr[0] = x_86; int const x_88 = treeIndex_1; - treeIndex_1 = (x_88 + 1); + treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); int const x_92 = treeIndex_1; - treeIndex_1 = (x_92 + 1); + treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); int const x_96 = treeIndex_1; - treeIndex_1 = (x_96 + 1); + treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); int const x_100 = treeIndex_1; - treeIndex_1 = (x_100 + 1); + treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); int const x_104 = treeIndex_1; - treeIndex_1 = (x_104 + 1); + treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); int const x_108 = treeIndex_1; - treeIndex_1 = (x_108 + 1); + treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); int const x_112 = treeIndex_1; - treeIndex_1 = (x_112 + 1); + treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); int const x_120 = treeIndex_1; - treeIndex_1 = (x_120 + 1); + treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; @@ -243,7 +243,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_144 = i; if ((x_143 == x_144)) { int const x_148 = count; - count = (x_148 + 1); + count = as_type((as_type(x_148) + as_type(1))); } break; } @@ -251,14 +251,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_137 = result; if ((x_137 == -1)) { int const x_141 = count; - count = (x_141 + 1); + count = as_type((as_type(x_141) + as_type(1))); } break; } } { int const x_150 = i; - i = (x_150 + 1); + i = as_type((as_type(x_150) + as_type(1))); } } int const x_152 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl index 80d83c81fa..8a78d71f8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.spvasm.expected.msl @@ -162,55 +162,55 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const BST const x_90 = param_4; (*(tint_symbol_7)).arr[0] = x_90; int const x_92 = treeIndex_1; - treeIndex_1 = (x_92 + 1); + treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_6 = x_94; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); int const x_96 = treeIndex_1; - treeIndex_1 = (x_96 + 1); + treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_8 = x_98; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); int const x_100 = treeIndex_1; - treeIndex_1 = (x_100 + 1); + treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_10 = x_102; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); int const x_104 = treeIndex_1; - treeIndex_1 = (x_104 + 1); + treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_12 = x_106; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); int const x_108 = treeIndex_1; - treeIndex_1 = (x_108 + 1); + treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_14 = x_110; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); int const x_112 = treeIndex_1; - treeIndex_1 = (x_112 + 1); + treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_16 = x_114; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_18 = x_118; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); int const x_120 = treeIndex_1; - treeIndex_1 = (x_120 + 1); + treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_20 = x_122; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); int const x_124 = treeIndex_1; - treeIndex_1 = (x_124 + 1); + treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_22 = x_126; param_23 = 13; @@ -253,7 +253,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const bool const x_156 = x_156_phi; if (x_156) { int const x_159 = count; - count = (x_159 + 1); + count = as_type((as_type(x_159) + as_type(1))); } break; } @@ -261,14 +261,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const int const x_141 = result; if ((x_141 == -1)) { int const x_145 = count; - count = (x_145 + 1); + count = as_type((as_type(x_145) + as_type(1))); } break; } } { int const x_161 = i; - i = (x_161 + 1); + i = as_type((as_type(x_161) + as_type(1))); } } int const x_163 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl index 80d83c81fa..8a78d71f8e 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-fragcoord-less-than-zero/1.wgsl.expected.msl @@ -162,55 +162,55 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const BST const x_90 = param_4; (*(tint_symbol_7)).arr[0] = x_90; int const x_92 = treeIndex_1; - treeIndex_1 = (x_92 + 1); + treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_6 = x_94; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); int const x_96 = treeIndex_1; - treeIndex_1 = (x_96 + 1); + treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_8 = x_98; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); int const x_100 = treeIndex_1; - treeIndex_1 = (x_100 + 1); + treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_10 = x_102; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); int const x_104 = treeIndex_1; - treeIndex_1 = (x_104 + 1); + treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_12 = x_106; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); int const x_108 = treeIndex_1; - treeIndex_1 = (x_108 + 1); + treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_14 = x_110; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); int const x_112 = treeIndex_1; - treeIndex_1 = (x_112 + 1); + treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_16 = x_114; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_18 = x_118; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); int const x_120 = treeIndex_1; - treeIndex_1 = (x_120 + 1); + treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_20 = x_122; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); int const x_124 = treeIndex_1; - treeIndex_1 = (x_124 + 1); + treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_22 = x_126; param_23 = 13; @@ -253,7 +253,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const bool const x_156 = x_156_phi; if (x_156) { int const x_159 = count; - count = (x_159 + 1); + count = as_type((as_type(x_159) + as_type(1))); } break; } @@ -261,14 +261,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_7, thread float4* const int const x_141 = result; if ((x_141 == -1)) { int const x_145 = count; - count = (x_145 + 1); + count = as_type((as_type(x_145) + as_type(1))); } break; } } { int const x_161 = i; - i = (x_161 + 1); + i = as_type((as_type(x_161) + as_type(1))); } } int const x_163 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl index 17bc280ecd..30f0bea18f 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.spvasm.expected.msl @@ -187,55 +187,55 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, BST const x_93 = param_4; (*(tint_symbol_6)).arr[0] = x_93; int const x_95 = treeIndex_1; - treeIndex_1 = (x_95 + 1); + treeIndex_1 = as_type((as_type(x_95) + as_type(1))); int const x_97 = treeIndex_1; param_6 = x_97; param_7 = 5; insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_6); int const x_99 = treeIndex_1; - treeIndex_1 = (x_99 + 1); + treeIndex_1 = as_type((as_type(x_99) + as_type(1))); int const x_101 = treeIndex_1; param_8 = x_101; param_9 = 12; insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_6); int const x_103 = treeIndex_1; - treeIndex_1 = (x_103 + 1); + treeIndex_1 = as_type((as_type(x_103) + as_type(1))); int const x_105 = treeIndex_1; param_10 = x_105; param_11 = 15; insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_6); int const x_107 = treeIndex_1; - treeIndex_1 = (x_107 + 1); + treeIndex_1 = as_type((as_type(x_107) + as_type(1))); int const x_109 = treeIndex_1; param_12 = x_109; param_13 = 7; insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_6); int const x_111 = treeIndex_1; - treeIndex_1 = (x_111 + 1); + treeIndex_1 = as_type((as_type(x_111) + as_type(1))); int const x_113 = treeIndex_1; param_14 = x_113; param_15 = 8; insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_6); int const x_115 = treeIndex_1; - treeIndex_1 = (x_115 + 1); + treeIndex_1 = as_type((as_type(x_115) + as_type(1))); int const x_117 = treeIndex_1; param_16 = x_117; param_17 = 2; insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_6); int const x_119 = treeIndex_1; - treeIndex_1 = (x_119 + 1); + treeIndex_1 = as_type((as_type(x_119) + as_type(1))); int const x_121 = treeIndex_1; param_18 = x_121; param_19 = 6; insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_6); int const x_123 = treeIndex_1; - treeIndex_1 = (x_123 + 1); + treeIndex_1 = as_type((as_type(x_123) + as_type(1))); int const x_125 = treeIndex_1; param_20 = x_125; param_21 = 17; insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_6); int const x_127 = treeIndex_1; - treeIndex_1 = (x_127 + 1); + treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_22 = x_129; param_23 = 13; @@ -268,7 +268,7 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, int const x_151 = i; if ((x_150 == x_151)) { int const x_155 = count; - count = (x_155 + 1); + count = as_type((as_type(x_155) + as_type(1))); } break; } @@ -276,14 +276,14 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, int const x_144 = result; if ((x_144 == -1)) { int const x_148 = count; - count = (x_148 + 1); + count = as_type((as_type(x_148) + as_type(1))); } break; } } { int const x_157 = i; - i = (x_157 + 1); + i = as_type((as_type(x_157) + as_type(1))); } } int const x_159 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl index 17bc280ecd..30f0bea18f 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-nested-if-and-conditional/1.wgsl.expected.msl @@ -187,55 +187,55 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, BST const x_93 = param_4; (*(tint_symbol_6)).arr[0] = x_93; int const x_95 = treeIndex_1; - treeIndex_1 = (x_95 + 1); + treeIndex_1 = as_type((as_type(x_95) + as_type(1))); int const x_97 = treeIndex_1; param_6 = x_97; param_7 = 5; insert_i1_i1_(x_16, &(param_6), &(param_7), tint_symbol_6); int const x_99 = treeIndex_1; - treeIndex_1 = (x_99 + 1); + treeIndex_1 = as_type((as_type(x_99) + as_type(1))); int const x_101 = treeIndex_1; param_8 = x_101; param_9 = 12; insert_i1_i1_(x_16, &(param_8), &(param_9), tint_symbol_6); int const x_103 = treeIndex_1; - treeIndex_1 = (x_103 + 1); + treeIndex_1 = as_type((as_type(x_103) + as_type(1))); int const x_105 = treeIndex_1; param_10 = x_105; param_11 = 15; insert_i1_i1_(x_16, &(param_10), &(param_11), tint_symbol_6); int const x_107 = treeIndex_1; - treeIndex_1 = (x_107 + 1); + treeIndex_1 = as_type((as_type(x_107) + as_type(1))); int const x_109 = treeIndex_1; param_12 = x_109; param_13 = 7; insert_i1_i1_(x_16, &(param_12), &(param_13), tint_symbol_6); int const x_111 = treeIndex_1; - treeIndex_1 = (x_111 + 1); + treeIndex_1 = as_type((as_type(x_111) + as_type(1))); int const x_113 = treeIndex_1; param_14 = x_113; param_15 = 8; insert_i1_i1_(x_16, &(param_14), &(param_15), tint_symbol_6); int const x_115 = treeIndex_1; - treeIndex_1 = (x_115 + 1); + treeIndex_1 = as_type((as_type(x_115) + as_type(1))); int const x_117 = treeIndex_1; param_16 = x_117; param_17 = 2; insert_i1_i1_(x_16, &(param_16), &(param_17), tint_symbol_6); int const x_119 = treeIndex_1; - treeIndex_1 = (x_119 + 1); + treeIndex_1 = as_type((as_type(x_119) + as_type(1))); int const x_121 = treeIndex_1; param_18 = x_121; param_19 = 6; insert_i1_i1_(x_16, &(param_18), &(param_19), tint_symbol_6); int const x_123 = treeIndex_1; - treeIndex_1 = (x_123 + 1); + treeIndex_1 = as_type((as_type(x_123) + as_type(1))); int const x_125 = treeIndex_1; param_20 = x_125; param_21 = 17; insert_i1_i1_(x_16, &(param_20), &(param_21), tint_symbol_6); int const x_127 = treeIndex_1; - treeIndex_1 = (x_127 + 1); + treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_22 = x_129; param_23 = 13; @@ -268,7 +268,7 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, int const x_151 = i; if ((x_150 == x_151)) { int const x_155 = count; - count = (x_155 + 1); + count = as_type((as_type(x_155) + as_type(1))); } break; } @@ -276,14 +276,14 @@ void main_1(constant buf0& x_16, thread tint_array_wrapper* const tint_symbol_6, int const x_144 = result; if ((x_144 == -1)) { int const x_148 = count; - count = (x_148 + 1); + count = as_type((as_type(x_148) + as_type(1))); } break; } } { int const x_157 = i; - i = (x_157 + 1); + i = as_type((as_type(x_157) + as_type(1))); } } int const x_159 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl index 02ef450e82..3679d6014d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.spvasm.expected.msl @@ -162,55 +162,55 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const BST const x_86 = param_4; (*(tint_symbol_6)).arr[0] = x_86; int const x_88 = treeIndex_1; - treeIndex_1 = (x_88 + 1); + treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); int const x_92 = treeIndex_1; - treeIndex_1 = (x_92 + 1); + treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); int const x_96 = treeIndex_1; - treeIndex_1 = (x_96 + 1); + treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); int const x_100 = treeIndex_1; - treeIndex_1 = (x_100 + 1); + treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); int const x_104 = treeIndex_1; - treeIndex_1 = (x_104 + 1); + treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); int const x_108 = treeIndex_1; - treeIndex_1 = (x_108 + 1); + treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); int const x_112 = treeIndex_1; - treeIndex_1 = (x_112 + 1); + treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); int const x_120 = treeIndex_1; - treeIndex_1 = (x_120 + 1); + treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; @@ -243,7 +243,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_144 = i; if ((x_143 == x_144)) { int const x_148 = count; - count = (x_148 + 1); + count = as_type((as_type(x_148) + as_type(1))); } break; } @@ -251,14 +251,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_137 = result; if ((x_137 == -1)) { int const x_141 = count; - count = (x_141 + 1); + count = as_type((as_type(x_141) + as_type(1))); } break; } } { int const x_150 = i; - i = (x_150 + 1); + i = as_type((as_type(x_150) + as_type(1))); } } int const x_152 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl index 02ef450e82..3679d6014d 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/0-opt.wgsl.expected.msl @@ -162,55 +162,55 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const BST const x_86 = param_4; (*(tint_symbol_6)).arr[0] = x_86; int const x_88 = treeIndex_1; - treeIndex_1 = (x_88 + 1); + treeIndex_1 = as_type((as_type(x_88) + as_type(1))); int const x_90 = treeIndex_1; param_6 = x_90; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_6); int const x_92 = treeIndex_1; - treeIndex_1 = (x_92 + 1); + treeIndex_1 = as_type((as_type(x_92) + as_type(1))); int const x_94 = treeIndex_1; param_8 = x_94; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_6); int const x_96 = treeIndex_1; - treeIndex_1 = (x_96 + 1); + treeIndex_1 = as_type((as_type(x_96) + as_type(1))); int const x_98 = treeIndex_1; param_10 = x_98; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_6); int const x_100 = treeIndex_1; - treeIndex_1 = (x_100 + 1); + treeIndex_1 = as_type((as_type(x_100) + as_type(1))); int const x_102 = treeIndex_1; param_12 = x_102; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_6); int const x_104 = treeIndex_1; - treeIndex_1 = (x_104 + 1); + treeIndex_1 = as_type((as_type(x_104) + as_type(1))); int const x_106 = treeIndex_1; param_14 = x_106; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_6); int const x_108 = treeIndex_1; - treeIndex_1 = (x_108 + 1); + treeIndex_1 = as_type((as_type(x_108) + as_type(1))); int const x_110 = treeIndex_1; param_16 = x_110; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_6); int const x_112 = treeIndex_1; - treeIndex_1 = (x_112 + 1); + treeIndex_1 = as_type((as_type(x_112) + as_type(1))); int const x_114 = treeIndex_1; param_18 = x_114; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_6); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); int const x_118 = treeIndex_1; param_20 = x_118; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_6); int const x_120 = treeIndex_1; - treeIndex_1 = (x_120 + 1); + treeIndex_1 = as_type((as_type(x_120) + as_type(1))); int const x_122 = treeIndex_1; param_22 = x_122; param_23 = 13; @@ -243,7 +243,7 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_144 = i; if ((x_143 == x_144)) { int const x_148 = count; - count = (x_148 + 1); + count = as_type((as_type(x_148) + as_type(1))); } break; } @@ -251,14 +251,14 @@ void main_1(thread tint_array_wrapper* const tint_symbol_6, thread float4* const int const x_137 = result; if ((x_137 == -1)) { int const x_141 = count; - count = (x_141 + 1); + count = as_type((as_type(x_141) + as_type(1))); } break; } } { int const x_150 = i; - i = (x_150 + 1); + i = as_type((as_type(x_150) + as_type(1))); } } int const x_152 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl index c0e8e435e4..f4569b5b0a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.spvasm.expected.msl @@ -183,55 +183,55 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ BST const x_103 = param_4; (*(tint_symbol_7)).arr[0] = x_103; int const x_105 = treeIndex_1; - treeIndex_1 = (x_105 + 1); + treeIndex_1 = as_type((as_type(x_105) + as_type(1))); int const x_107 = treeIndex_1; param_6 = x_107; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); int const x_109 = treeIndex_1; - treeIndex_1 = (x_109 + 1); + treeIndex_1 = as_type((as_type(x_109) + as_type(1))); int const x_111 = treeIndex_1; param_8 = x_111; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); int const x_113 = treeIndex_1; - treeIndex_1 = (x_113 + 1); + treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); int const x_117 = treeIndex_1; - treeIndex_1 = (x_117 + 1); + treeIndex_1 = as_type((as_type(x_117) + as_type(1))); int const x_119 = treeIndex_1; param_12 = x_119; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); int const x_121 = treeIndex_1; - treeIndex_1 = (x_121 + 1); + treeIndex_1 = as_type((as_type(x_121) + as_type(1))); int const x_123 = treeIndex_1; param_14 = x_123; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); int const x_125 = treeIndex_1; - treeIndex_1 = (x_125 + 1); + treeIndex_1 = as_type((as_type(x_125) + as_type(1))); int const x_127 = treeIndex_1; param_16 = x_127; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); int const x_129 = treeIndex_1; - treeIndex_1 = (x_129 + 1); + treeIndex_1 = as_type((as_type(x_129) + as_type(1))); int const x_131 = treeIndex_1; param_18 = x_131; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); int const x_133 = treeIndex_1; - treeIndex_1 = (x_133 + 1); + treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); int const x_137 = treeIndex_1; - treeIndex_1 = (x_137 + 1); + treeIndex_1 = as_type((as_type(x_137) + as_type(1))); int const x_139 = treeIndex_1; param_22 = x_139; param_23 = 13; @@ -249,16 +249,16 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ float const x_150 = x_50.injectionSwitch.y; if ((x_148 >= int(x_150))) { float const x_156 = x_50.injectionSwitch.y; - param_24 = (1 + int(x_156)); + param_24 = as_type((as_type(1) + as_type(int(x_156)))); int const x_159 = identity_i1_(&(param_24), tint_symbol_8); pp = x_159; break; } int const x_160 = looplimiter0; - looplimiter0 = (x_160 + 1); + looplimiter0 = as_type((as_type(x_160) + as_type(1))); { int const x_162 = i; - i = (x_162 + 1); + i = as_type((as_type(x_162) + as_type(1))); } } int const x_164 = pp; @@ -293,7 +293,7 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ int const x_188 = i_1; if ((x_187 == x_188)) { int const x_192 = count; - count = (x_192 + 1); + count = as_type((as_type(x_192) + as_type(1))); } break; } @@ -301,14 +301,14 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ int const x_181 = result; if ((x_181 == -1)) { int const x_185 = count; - count = (x_185 + 1); + count = as_type((as_type(x_185) + as_type(1))); } break; } } { int const x_194 = i_1; - i_1 = (x_194 + 1); + i_1 = as_type((as_type(x_194) + as_type(1))); } } int const x_196 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl index c0e8e435e4..f4569b5b0a 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-binarysearch-tree-with-loop-read-write-global/1.wgsl.expected.msl @@ -183,55 +183,55 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ BST const x_103 = param_4; (*(tint_symbol_7)).arr[0] = x_103; int const x_105 = treeIndex_1; - treeIndex_1 = (x_105 + 1); + treeIndex_1 = as_type((as_type(x_105) + as_type(1))); int const x_107 = treeIndex_1; param_6 = x_107; param_7 = 5; insert_i1_i1_(&(param_6), &(param_7), tint_symbol_7); int const x_109 = treeIndex_1; - treeIndex_1 = (x_109 + 1); + treeIndex_1 = as_type((as_type(x_109) + as_type(1))); int const x_111 = treeIndex_1; param_8 = x_111; param_9 = 12; insert_i1_i1_(&(param_8), &(param_9), tint_symbol_7); int const x_113 = treeIndex_1; - treeIndex_1 = (x_113 + 1); + treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 15; insert_i1_i1_(&(param_10), &(param_11), tint_symbol_7); int const x_117 = treeIndex_1; - treeIndex_1 = (x_117 + 1); + treeIndex_1 = as_type((as_type(x_117) + as_type(1))); int const x_119 = treeIndex_1; param_12 = x_119; param_13 = 7; insert_i1_i1_(&(param_12), &(param_13), tint_symbol_7); int const x_121 = treeIndex_1; - treeIndex_1 = (x_121 + 1); + treeIndex_1 = as_type((as_type(x_121) + as_type(1))); int const x_123 = treeIndex_1; param_14 = x_123; param_15 = 8; insert_i1_i1_(&(param_14), &(param_15), tint_symbol_7); int const x_125 = treeIndex_1; - treeIndex_1 = (x_125 + 1); + treeIndex_1 = as_type((as_type(x_125) + as_type(1))); int const x_127 = treeIndex_1; param_16 = x_127; param_17 = 2; insert_i1_i1_(&(param_16), &(param_17), tint_symbol_7); int const x_129 = treeIndex_1; - treeIndex_1 = (x_129 + 1); + treeIndex_1 = as_type((as_type(x_129) + as_type(1))); int const x_131 = treeIndex_1; param_18 = x_131; param_19 = 6; insert_i1_i1_(&(param_18), &(param_19), tint_symbol_7); int const x_133 = treeIndex_1; - treeIndex_1 = (x_133 + 1); + treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 17; insert_i1_i1_(&(param_20), &(param_21), tint_symbol_7); int const x_137 = treeIndex_1; - treeIndex_1 = (x_137 + 1); + treeIndex_1 = as_type((as_type(x_137) + as_type(1))); int const x_139 = treeIndex_1; param_22 = x_139; param_23 = 13; @@ -249,16 +249,16 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ float const x_150 = x_50.injectionSwitch.y; if ((x_148 >= int(x_150))) { float const x_156 = x_50.injectionSwitch.y; - param_24 = (1 + int(x_156)); + param_24 = as_type((as_type(1) + as_type(int(x_156)))); int const x_159 = identity_i1_(&(param_24), tint_symbol_8); pp = x_159; break; } int const x_160 = looplimiter0; - looplimiter0 = (x_160 + 1); + looplimiter0 = as_type((as_type(x_160) + as_type(1))); { int const x_162 = i; - i = (x_162 + 1); + i = as_type((as_type(x_162) + as_type(1))); } } int const x_164 = pp; @@ -293,7 +293,7 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ int const x_188 = i_1; if ((x_187 == x_188)) { int const x_192 = count; - count = (x_192 + 1); + count = as_type((as_type(x_192) + as_type(1))); } break; } @@ -301,14 +301,14 @@ void main_1(constant buf0& x_50, thread tint_array_wrapper_1* const tint_symbol_ int const x_181 = result; if ((x_181 == -1)) { int const x_185 = count; - count = (x_185 + 1); + count = as_type((as_type(x_185) + as_type(1))); } break; } } { int const x_194 = i_1; - i_1 = (x_194 + 1); + i_1 = as_type((as_type(x_194) + as_type(1))); } } int const x_196 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl index 94420a4897..e563769aac 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.spvasm.expected.msl @@ -26,13 +26,13 @@ int collatz_i1_(thread int* const v) { int const x_92 = *(v); if (((x_92 & 1) == 1)) { int const x_98 = *(v); - *(v) = ((3 * x_98) + 1); + *(v) = as_type((as_type(as_type((as_type(3) * as_type(x_98)))) + as_type(1))); } else { int const x_101 = *(v); *(v) = (x_101 / 2); } int const x_103 = count; - count = (x_103 + 1); + count = as_type((as_type(x_103) + as_type(1))); } int const x_105 = count; return x_105; @@ -50,7 +50,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa lin = floor((x_68 * 8.0f)); float const x_72 = lin.x; float const x_76 = lin.y; - v_1 = ((int(x_72) * 8) + int(x_76)); + v_1 = as_type((as_type(as_type((as_type(int(x_72)) * as_type(8)))) + as_type(int(x_76)))); int const x_79 = v_1; param = x_79; int const x_80 = collatz_i1_(&(param)); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl index 94420a4897..e563769aac 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-collatz-push-constant-with-nested-min-max/0.wgsl.expected.msl @@ -26,13 +26,13 @@ int collatz_i1_(thread int* const v) { int const x_92 = *(v); if (((x_92 & 1) == 1)) { int const x_98 = *(v); - *(v) = ((3 * x_98) + 1); + *(v) = as_type((as_type(as_type((as_type(3) * as_type(x_98)))) + as_type(1))); } else { int const x_101 = *(v); *(v) = (x_101 / 2); } int const x_103 = count; - count = (x_103 + 1); + count = as_type((as_type(x_103) + as_type(1))); } int const x_105 = count; return x_105; @@ -50,7 +50,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa lin = floor((x_68 * 8.0f)); float const x_72 = lin.x; float const x_76 = lin.y; - v_1 = ((int(x_72) * 8) + int(x_76)); + v_1 = as_type((as_type(as_type((as_type(int(x_72)) * as_type(8)))) + as_type(int(x_76)))); int const x_79 = v_1; param = x_79; int const x_80 = collatz_i1_(&(param)); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl index 3f4d5cb25f..a7377e3750 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.spvasm.expected.msl @@ -80,7 +80,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy break; } { - x_62 = (x_61 + 1); + x_62 = as_type((as_type(x_61) + as_type(1))); x_58_phi = x_59; x_61_phi = x_62; } @@ -152,7 +152,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy break; } { - x_106 = (x_105 + 1); + x_106 = as_type((as_type(x_105) + as_type(1))); x_102_phi = x_103; x_105_phi = x_106; } @@ -194,7 +194,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } } { - x_147 = (x_146 + 1); + x_147 = as_type((as_type(x_146) + as_type(1))); x_146_phi = x_147; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl index b5f9f63341..fc69ea6bd1 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-double-always-false-discard/1.wgsl.expected.msl @@ -80,7 +80,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy break; } { - x_62 = (x_61 + 1); + x_62 = as_type((as_type(x_61) + as_type(1))); x_58_phi = x_59; x_61_phi = x_62; } @@ -152,7 +152,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy break; } { - x_106 = (x_105 + 1); + x_106 = as_type((as_type(x_105) + as_type(1))); x_102_phi = x_103; x_105_phi = x_106; } @@ -194,7 +194,7 @@ void main_1(constant buf0& x_9, constant buf1& x_6, thread float4* const tint_sy } } { - x_147 = (x_146 + 1); + x_147 = as_type((as_type(x_146) + as_type(1))); x_146_phi = x_147; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl index b31b105aad..258c77bd85 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.spvasm.expected.msl @@ -42,7 +42,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_139 = i; - i = (x_139 + 1); + i = as_type((as_type(x_139) + as_type(1))); } } float const x_141 = result; @@ -94,7 +94,7 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } { int const x_97 = i_1; - i_1 = (x_97 + 1); + i_1 = as_type((as_type(x_97) + as_type(1))); } } float3 const x_99 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl index 8d2c08a78f..18723da312 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-float-mat-determinant-clamp/0.wgsl.expected.msl @@ -42,7 +42,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_139 = i; - i = (x_139 + 1); + i = as_type((as_type(x_139) + as_type(1))); } } float const x_141 = result; @@ -94,7 +94,7 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } { int const x_97 = i_1; - i_1 = (x_97 + 1); + i_1 = as_type((as_type(x_97) + as_type(1))); } } float3 const x_99 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl index e87d98f009..0021c5071c 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.spvasm.expected.msl @@ -45,7 +45,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_153 = i; - i = (x_153 + 1); + i = as_type((as_type(x_153) + as_type(1))); } } float const x_155 = result; @@ -98,7 +98,7 @@ void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_ } { int const x_101 = i_1; - i_1 = (x_101 + 1); + i_1 = as_type((as_type(x_101) + as_type(1))); } } float const x_104 = x_20.injectionSwitch.x; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl index 2877362bdc..70aae88760 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-injected-conditional-true/1.wgsl.expected.msl @@ -45,7 +45,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_153 = i; - i = (x_153 + 1); + i = as_type((as_type(x_153) + as_type(1))); } } float const x_155 = result; @@ -98,7 +98,7 @@ void main_1(constant buf0& x_13, constant buf1& x_20, thread float4* const tint_ } { int const x_101 = i_1; - i_1 = (x_101 + 1); + i_1 = as_type((as_type(x_101) + as_type(1))); } } float const x_104 = x_20.injectionSwitch.x; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl index 27db58e544..5d64b7813c 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.spvasm.expected.msl @@ -50,7 +50,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_92; } { - x_95 = (x_94 + 1); + x_95 = as_type((as_type(x_94) + as_type(1))); x_91_phi = x_92; x_94_phi = x_95; } @@ -97,7 +97,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread floa c[x_74_save] = (x_79 * x_80); } { - x_69 = (x_68 + 1); + x_69 = as_type((as_type(x_68) + as_type(1))); x_68_phi = x_69; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl index bd3bd6fa98..4635d6f056 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/0-opt.wgsl.expected.msl @@ -50,7 +50,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_92; } { - x_95 = (x_94 + 1); + x_95 = as_type((as_type(x_94) + as_type(1))); x_91_phi = x_92; x_94_phi = x_95; } @@ -97,7 +97,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_5, thread floa c[x_74_save] = (x_79 * x_80); } { - x_69 = (x_68 + 1); + x_69 = as_type((as_type(x_68) + as_type(1))); x_68_phi = x_69; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl index a3146588a6..cd4c8e2308 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.spvasm.expected.msl @@ -53,7 +53,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_105; } { - x_108 = (x_107 + 1); + x_108 = as_type((as_type(x_107) + as_type(1))); x_104_phi = x_105; x_107_phi = x_108; } @@ -108,7 +108,7 @@ void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_ c[x_80_save] = (x_92 * x_93); } { - x_75 = (x_74 + 1); + x_75 = as_type((as_type(x_74) + as_type(1))); x_74_phi = x_75; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl index d609e54ce4..04458e7667 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-divided-1/1.wgsl.expected.msl @@ -53,7 +53,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty return x_105; } { - x_108 = (x_107 + 1); + x_108 = as_type((as_type(x_107) + as_type(1))); x_104_phi = x_105; x_107_phi = x_108; } @@ -108,7 +108,7 @@ void main_1(constant buf0& x_10, constant buf1& x_16, thread float4* const tint_ c[x_80_save] = (x_92 * x_93); } { - x_75 = (x_74 + 1); + x_75 = as_type((as_type(x_74) + as_type(1))); x_74_phi = x_75; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl index ac14c85637..025db52dac 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.spvasm.expected.msl @@ -45,7 +45,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_172 = i; - i = (x_172 + 1); + i = as_type((as_type(x_172) + as_type(1))); } } float const x_174 = result; @@ -123,7 +123,7 @@ void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_ } { int const x_130 = i_1; - i_1 = (x_130 + 1); + i_1 = as_type((as_type(x_130) + as_type(1))); } } float3 const x_132 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl index e9ded5d70f..5515f82086 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-true-conditional-simple-loop/1.wgsl.expected.msl @@ -45,7 +45,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_172 = i; - i = (x_172 + 1); + i = as_type((as_type(x_172) + as_type(1))); } } float const x_174 = result; @@ -123,7 +123,7 @@ void main_1(constant buf0& x_13, constant buf1& x_19, thread float4* const tint_ } { int const x_130 = i_1; - i_1 = (x_130 + 1); + i_1 = as_type((as_type(x_130) + as_type(1))); } } float3 const x_132 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl index f0268f37b4..0af13fc244 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.spvasm.expected.msl @@ -42,7 +42,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_164 = i; - i = (x_164 + 1); + i = as_type((as_type(x_164) + as_type(1))); } } float const x_166 = result; @@ -99,7 +99,7 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } { int const x_122 = i_1; - i_1 = (x_122 + 1); + i_1 = as_type((as_type(x_122) + as_type(1))); } } float3 const x_124 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl index 2d76e0ba49..4324befe62 100755 --- a/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-colorgrid-modulo-vec3-values-from-matrix/1.wgsl.expected.msl @@ -42,7 +42,7 @@ float compute_value_f1_f1_(thread float* const limit, thread float* const thirty } { int const x_164 = i; - i = (x_164 + 1); + i = as_type((as_type(x_164) + as_type(1))); } } float const x_166 = result; @@ -99,7 +99,7 @@ void main_1(constant buf0& x_13, thread float4* const tint_symbol_5, thread floa } { int const x_122 = i_1; - i_1 = (x_122 + 1); + i_1 = as_type((as_type(x_122) + as_type(1))); } } float3 const x_124 = c; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl index f5841d15fa..f9b3b82ea8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_261 = *(from); i = x_261; int const x_262 = *(mid); - j = (x_262 + 1); + j = as_type((as_type(x_262) + as_type(1))); while (true) { int const x_268 = i; int const x_269 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_281 = (*(tint_symbol_5)).arr[x_279]; if ((x_278 < x_281)) { int const x_286 = k; - k = (x_286 + 1); + k = as_type((as_type(x_286) + as_type(1))); int const x_288 = i; - i = (x_288 + 1); + i = as_type((as_type(x_288) + as_type(1))); int const x_291 = (*(tint_symbol_5)).arr[x_288]; (*(tint_symbol_6)).arr[x_286] = x_291; } else { int const x_293 = k; - k = (x_293 + 1); + k = as_type((as_type(x_293) + as_type(1))); int const x_295 = j; - j = (x_295 + 1); + j = as_type((as_type(x_295) + as_type(1))); int const x_298 = (*(tint_symbol_5)).arr[x_295]; (*(tint_symbol_6)).arr[x_293] = x_298; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_311 = k; - k = (x_311 + 1); + k = as_type((as_type(x_311) + as_type(1))); int const x_313 = i; - i = (x_313 + 1); + i = as_type((as_type(x_313) + as_type(1))); int const x_316 = (*(tint_symbol_5)).arr[x_313]; (*(tint_symbol_6)).arr[x_311] = x_316; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_327] = x_330; { int const x_332 = i_1; - i_1 = (x_332 + 1); + i_1 = as_type((as_type(x_332) + as_type(1))); } } return; @@ -98,12 +98,12 @@ int func_i1_i1_(thread int* const m, thread int* const high, thread float4* cons if ((x_338 >= 0.0f)) { if (false) { int const x_346 = *(high); - x_336 = (x_346 << as_type(0)); + x_336 = as_type((as_type(x_346) << as_type(0))); } else { x_336 = 4; } int const x_348 = x_336; - x_335 = (1 << as_type(x_348)); + x_335 = as_type((as_type(1) << as_type(x_348))); } else { x_335 = 1; } @@ -115,7 +115,7 @@ int func_i1_i1_(thread int* const m, thread int* const high, thread float4* cons int const x_355 = *(m); int const x_357 = *(m); int const x_359 = x; - return clamp((2 * x_353), (2 * x_355), ((2 * x_357) / x_359)); + return clamp(as_type((as_type(2) * as_type(x_353))), as_type((as_type(2) * as_type(x_355))), (as_type((as_type(2) * as_type(x_357))) / x_359)); } void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { @@ -154,11 +154,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra from_1 = x_380; int const x_381 = i_2; int const x_382 = m_1; - mid_1 = ((x_381 + x_382) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_381) + as_type(x_382)))) - as_type(1))); int const x_385 = i_2; int const x_386 = m_1; int const x_390 = high_1; - to_1 = min(((x_385 + (2 * x_386)) - 1), x_390); + to_1 = min(as_type((as_type(as_type((as_type(x_385) + as_type(as_type((as_type(2) * as_type(x_386))))))) - as_type(1))), x_390); int const x_392 = from_1; param = x_392; int const x_393 = mid_1; @@ -173,12 +173,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra param_4 = x_397; int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_10); int const x_399 = i_2; - i_2 = (x_399 + x_398); + i_2 = as_type((as_type(x_399) + as_type(x_398))); } } { int const x_401 = m_1; - m_1 = (2 * x_401); + m_1 = as_type((as_type(2) * as_type(x_401))); } } return; @@ -248,7 +248,7 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 } } int const x_131 = i_3; - i_3 = (x_131 + 1); + i_3 = as_type((as_type(x_131) + as_type(1))); { int const x_133 = i_3; if ((x_133 < 10)) { @@ -270,7 +270,7 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 (*(tint_symbol_12)).arr[x_142] = x_145; { int const x_147 = j_1; - j_1 = (x_147 + 1); + j_1 = as_type((as_type(x_147) + as_type(1))); } } mergeSort_(tint_symbol_11, tint_symbol_12, tint_symbol_13); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl index eb075ffaee..20eced1b76 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_261 = *(from); i = x_261; int const x_262 = *(mid); - j = (x_262 + 1); + j = as_type((as_type(x_262) + as_type(1))); while (true) { int const x_268 = i; int const x_269 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_281 = (*(tint_symbol_5)).arr[x_279]; if ((x_278 < x_281)) { int const x_286 = k; - k = (x_286 + 1); + k = as_type((as_type(x_286) + as_type(1))); int const x_288 = i; - i = (x_288 + 1); + i = as_type((as_type(x_288) + as_type(1))); int const x_291 = (*(tint_symbol_5)).arr[x_288]; (*(tint_symbol_6)).arr[x_286] = x_291; } else { int const x_293 = k; - k = (x_293 + 1); + k = as_type((as_type(x_293) + as_type(1))); int const x_295 = j; - j = (x_295 + 1); + j = as_type((as_type(x_295) + as_type(1))); int const x_298 = (*(tint_symbol_5)).arr[x_295]; (*(tint_symbol_6)).arr[x_293] = x_298; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_311 = k; - k = (x_311 + 1); + k = as_type((as_type(x_311) + as_type(1))); int const x_313 = i; - i = (x_313 + 1); + i = as_type((as_type(x_313) + as_type(1))); int const x_316 = (*(tint_symbol_5)).arr[x_313]; (*(tint_symbol_6)).arr[x_311] = x_316; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_327] = x_330; { int const x_332 = i_1; - i_1 = (x_332 + 1); + i_1 = as_type((as_type(x_332) + as_type(1))); } } return; @@ -98,12 +98,12 @@ int func_i1_i1_(thread int* const m, thread int* const high, thread float4* cons if ((x_338 >= 0.0f)) { if (false) { int const x_346 = *(high); - x_336 = (x_346 << as_type(0)); + x_336 = as_type((as_type(x_346) << as_type(0))); } else { x_336 = 4; } int const x_348 = x_336; - x_335 = (1 << as_type(x_348)); + x_335 = as_type((as_type(1) << as_type(x_348))); } else { x_335 = 1; } @@ -115,7 +115,7 @@ int func_i1_i1_(thread int* const m, thread int* const high, thread float4* cons int const x_355 = *(m); int const x_357 = *(m); int const x_359 = x; - return clamp((2 * x_353), (2 * x_355), ((2 * x_357) / x_359)); + return clamp(as_type((as_type(2) * as_type(x_353))), as_type((as_type(2) * as_type(x_355))), (as_type((as_type(2) * as_type(x_357))) / x_359)); } void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_array_wrapper* const tint_symbol_9, thread float4* const tint_symbol_10) { @@ -154,11 +154,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra from_1 = x_380; int const x_381 = i_2; int const x_382 = m_1; - mid_1 = ((x_381 + x_382) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_381) + as_type(x_382)))) - as_type(1))); int const x_385 = i_2; int const x_386 = m_1; int const x_390 = high_1; - to_1 = min(((x_385 + (2 * x_386)) - 1), x_390); + to_1 = min(as_type((as_type(as_type((as_type(x_385) + as_type(as_type((as_type(2) * as_type(x_386))))))) - as_type(1))), x_390); int const x_392 = from_1; param = x_392; int const x_393 = mid_1; @@ -173,12 +173,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_8, thread tint_arra param_4 = x_397; int const x_398 = func_i1_i1_(&(param_3), &(param_4), tint_symbol_10); int const x_399 = i_2; - i_2 = (x_399 + x_398); + i_2 = as_type((as_type(x_399) + as_type(x_398))); } } { int const x_401 = m_1; - m_1 = (2 * x_401); + m_1 = as_type((as_type(2) * as_type(x_401))); } } return; @@ -248,7 +248,7 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 } } int const x_131 = i_3; - i_3 = (x_131 + 1); + i_3 = as_type((as_type(x_131) + as_type(1))); { int const x_133 = i_3; if ((x_133 < 10)) { @@ -270,7 +270,7 @@ void main_1(constant buf0& x_34, thread tint_array_wrapper* const tint_symbol_11 (*(tint_symbol_12)).arr[x_142] = x_145; { int const x_147 = j_1; - j_1 = (x_147 + 1); + j_1 = as_type((as_type(x_147) + as_type(1))); } } mergeSort_(tint_symbol_11, tint_symbol_12, tint_symbol_13); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl index 80b6ad8db9..f04cff38ee 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl @@ -73,7 +73,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } } - int const x_66 = (x_65 + 1); + int const x_66 = as_type((as_type(x_65) + as_type(1))); { x_65_phi = x_66; if ((x_66 < 10)) { @@ -93,7 +93,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_99 = data.arr[x_93]; temp.arr[x_93] = x_99; - x_94 = (x_93 + 1); + x_94 = as_type((as_type(x_93) + as_type(1))); x_93_phi = x_94; } } @@ -121,10 +121,10 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - int const x_115 = (x_109 + x_102); - int const x_116 = (x_115 - 1); - int const x_110 = (x_109 + (2 * x_102)); - int const x_119 = min((x_110 - 1), 9); + int const x_115 = as_type((as_type(x_109) + as_type(x_102))); + int const x_116 = as_type((as_type(x_115) - as_type(1))); + int const x_110 = as_type((as_type(x_109) + as_type(as_type((as_type(2) * as_type(x_102)))))); + int const x_119 = min(as_type((as_type(x_110) - as_type(1))), 9); x_121_phi = x_109; x_124_phi = x_115; x_126_phi = x_109; @@ -144,15 +144,15 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float int const x_134 = data.arr[x_133_save]; int const x_135_save = x_124; int const x_136 = data.arr[x_135_save]; - int const x_122 = as_type((x_121 + as_type(1))); + int const x_122 = as_type(as_type((as_type(x_121) + as_type(as_type(1))))); if ((x_134 < x_136)) { - x_141 = as_type((x_126 + as_type(1))); + x_141 = as_type(as_type((as_type(x_126) + as_type(as_type(1))))); int const x_142 = data.arr[x_133_save]; temp.arr[x_121] = x_142; x_125_phi = x_124; x_127_phi = x_141; } else { - x_144 = (x_124 + 1); + x_144 = as_type((as_type(x_124) + as_type(1))); int const x_145 = data.arr[x_135_save]; temp.arr[x_121] = x_145; x_125_phi = x_144; @@ -178,8 +178,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } { - x_149 = (x_148 + 1); - x_152 = (x_151 + 1); + x_149 = as_type((as_type(x_148) + as_type(1))); + x_152 = as_type((as_type(x_151) + as_type(1))); int const x_158 = data.arr[x_151]; temp.arr[x_148] = x_158; x_148_phi = x_149; @@ -197,7 +197,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_167 = temp.arr[x_161]; data.arr[x_161] = x_167; - x_162 = (x_161 + 1); + x_162 = as_type((as_type(x_161) + as_type(1))); x_161_phi = x_162; } } @@ -206,7 +206,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } } { - x_103 = (2 * x_102); + x_103 = as_type((as_type(2) * as_type(x_102))); x_102_phi = x_103; } } @@ -317,7 +317,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float x_257_1.x = (x_273.x + x_273.y); float2 const x_257 = x_257_1; { - x_260 = (x_259 + 1); + x_260 = as_type((as_type(x_259) + as_type(1))); x_256_phi = x_257; x_259_phi = x_260; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl index ae3ef06377..3236547436 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.wgsl.expected.msl @@ -73,7 +73,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } } - int const x_66 = (x_65 + 1); + int const x_66 = as_type((as_type(x_65) + as_type(1))); { x_65_phi = x_66; if ((x_66 < 10)) { @@ -93,7 +93,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_99 = data.arr[x_93]; temp.arr[x_93] = x_99; - x_94 = (x_93 + 1); + x_94 = as_type((as_type(x_93) + as_type(1))); x_93_phi = x_94; } } @@ -121,10 +121,10 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } else { break; } - int const x_115 = (x_109 + x_102); - int const x_116 = (x_115 - 1); - int const x_110 = (x_109 + (2 * x_102)); - int const x_119 = min((x_110 - 1), 9); + int const x_115 = as_type((as_type(x_109) + as_type(x_102))); + int const x_116 = as_type((as_type(x_115) - as_type(1))); + int const x_110 = as_type((as_type(x_109) + as_type(as_type((as_type(2) * as_type(x_102)))))); + int const x_119 = min(as_type((as_type(x_110) - as_type(1))), 9); x_121_phi = x_109; x_124_phi = x_115; x_126_phi = x_109; @@ -144,15 +144,15 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float int const x_134 = data.arr[x_133_save]; int const x_135_save = x_124; int const x_136 = data.arr[x_135_save]; - int const x_122 = as_type((x_121 + as_type(1))); + int const x_122 = as_type(as_type((as_type(x_121) + as_type(as_type(1))))); if ((x_134 < x_136)) { - x_141 = as_type((x_126 + as_type(1))); + x_141 = as_type(as_type((as_type(x_126) + as_type(as_type(1))))); int const x_142 = data.arr[x_133_save]; temp.arr[x_121] = x_142; x_125_phi = x_124; x_127_phi = x_141; } else { - x_144 = (x_124 + 1); + x_144 = as_type((as_type(x_124) + as_type(1))); int const x_145 = data.arr[x_135_save]; temp.arr[x_121] = x_145; x_125_phi = x_144; @@ -178,8 +178,8 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } { - x_149 = (x_148 + 1); - x_152 = (x_151 + 1); + x_149 = as_type((as_type(x_148) + as_type(1))); + x_152 = as_type((as_type(x_151) + as_type(1))); int const x_158 = data.arr[x_151]; temp.arr[x_148] = x_158; x_148_phi = x_149; @@ -197,7 +197,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float { int const x_167 = temp.arr[x_161]; data.arr[x_161] = x_167; - x_162 = (x_161 + 1); + x_162 = as_type((as_type(x_161) + as_type(1))); x_161_phi = x_162; } } @@ -206,7 +206,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } } { - x_103 = (2 * x_102); + x_103 = as_type((as_type(2) * as_type(x_102))); x_102_phi = x_103; } } @@ -317,7 +317,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float x_257_1.x = (x_273.x + x_273.y); float2 const x_257 = x_257_1; { - x_260 = (x_259 + 1); + x_260 = as_type((as_type(x_259) + as_type(1))); x_256_phi = x_257; x_259_phi = x_260; } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl index 0e73bb3be3..ad390280e3 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_263 = *(from); i = x_263; int const x_264 = *(mid); - j = (x_264 + 1); + j = as_type((as_type(x_264) + as_type(1))); while (true) { int const x_270 = i; int const x_271 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_283 = (*(tint_symbol_5)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; - k = (x_288 + 1); + k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; - i = (x_290 + 1); + i = as_type((as_type(x_290) + as_type(1))); int const x_293 = (*(tint_symbol_5)).arr[x_290]; (*(tint_symbol_6)).arr[x_288] = x_293; } else { int const x_295 = k; - k = (x_295 + 1); + k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; - j = (x_297 + 1); + j = as_type((as_type(x_297) + as_type(1))); int const x_300 = (*(tint_symbol_5)).arr[x_297]; (*(tint_symbol_6)).arr[x_295] = x_300; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_313 = k; - k = (x_313 + 1); + k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; - i = (x_315 + 1); + i = as_type((as_type(x_315) + as_type(1))); int const x_318 = (*(tint_symbol_5)).arr[x_315]; (*(tint_symbol_6)).arr[x_313] = x_318; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_329] = x_332; { int const x_334 = i_1; - i_1 = (x_334 + 1); + i_1 = as_type((as_type(x_334) + as_type(1))); } } return; @@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_354; int const x_355 = i_2; int const x_356 = m; - mid_1 = ((x_355 + x_356) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_355) + as_type(x_356)))) - as_type(1))); int const x_359 = i_2; int const x_360 = m; int const x_364 = high; - to_1 = min(((x_359 + (2 * x_360)) - 1), x_364); + to_1 = min(as_type((as_type(as_type((as_type(x_359) + as_type(as_type((as_type(2) * as_type(x_360))))))) - as_type(1))), x_364); int const x_366 = from_1; param = x_366; int const x_367 = mid_1; @@ -139,12 +139,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_370 = m; int const x_372 = i_2; - i_2 = (x_372 + (2 * x_370)); + i_2 = as_type((as_type(x_372) + as_type(as_type((as_type(2) * as_type(x_370)))))); } } { int const x_374 = m; - m = (2 * x_374); + m = as_type((as_type(2) * as_type(x_374))); } } return; @@ -215,7 +215,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_123 = i_3; - i_3 = (x_123 + 1); + i_3 = as_type((as_type(x_123) + as_type(1))); { int const x_125 = i_3; if ((x_125 < 10)) { @@ -237,7 +237,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_134] = x_137; { int const x_139 = j_1; - j_1 = (x_139 + 1); + j_1 = as_type((as_type(x_139) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl index 23be1b2f01..ba34077b88 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.wgsl.expected.msl @@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_263 = *(from); i = x_263; int const x_264 = *(mid); - j = (x_264 + 1); + j = as_type((as_type(x_264) + as_type(1))); while (true) { int const x_270 = i; int const x_271 = *(mid); @@ -40,16 +40,16 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* int const x_283 = (*(tint_symbol_5)).arr[x_281]; if ((x_280 < x_283)) { int const x_288 = k; - k = (x_288 + 1); + k = as_type((as_type(x_288) + as_type(1))); int const x_290 = i; - i = (x_290 + 1); + i = as_type((as_type(x_290) + as_type(1))); int const x_293 = (*(tint_symbol_5)).arr[x_290]; (*(tint_symbol_6)).arr[x_288] = x_293; } else { int const x_295 = k; - k = (x_295 + 1); + k = as_type((as_type(x_295) + as_type(1))); int const x_297 = j; - j = (x_297 + 1); + j = as_type((as_type(x_297) + as_type(1))); int const x_300 = (*(tint_symbol_5)).arr[x_297]; (*(tint_symbol_6)).arr[x_295] = x_300; } @@ -63,9 +63,9 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* break; } int const x_313 = k; - k = (x_313 + 1); + k = as_type((as_type(x_313) + as_type(1))); int const x_315 = i; - i = (x_315 + 1); + i = as_type((as_type(x_315) + as_type(1))); int const x_318 = (*(tint_symbol_5)).arr[x_315]; (*(tint_symbol_6)).arr[x_313] = x_318; } @@ -84,7 +84,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int* (*(tint_symbol_5)).arr[x_329] = x_332; { int const x_334 = i_1; - i_1 = (x_334 + 1); + i_1 = as_type((as_type(x_334) + as_type(1))); } } return; @@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra from_1 = x_354; int const x_355 = i_2; int const x_356 = m; - mid_1 = ((x_355 + x_356) - 1); + mid_1 = as_type((as_type(as_type((as_type(x_355) + as_type(x_356)))) - as_type(1))); int const x_359 = i_2; int const x_360 = m; int const x_364 = high; - to_1 = min(((x_359 + (2 * x_360)) - 1), x_364); + to_1 = min(as_type((as_type(as_type((as_type(x_359) + as_type(as_type((as_type(2) * as_type(x_360))))))) - as_type(1))), x_364); int const x_366 = from_1; param = x_366; int const x_367 = mid_1; @@ -139,12 +139,12 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra { int const x_370 = m; int const x_372 = i_2; - i_2 = (x_372 + (2 * x_370)); + i_2 = as_type((as_type(x_372) + as_type(as_type((as_type(2) * as_type(x_370)))))); } } { int const x_374 = m; - m = (2 * x_374); + m = as_type((as_type(2) * as_type(x_374))); } } return; @@ -215,7 +215,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, } } int const x_123 = i_3; - i_3 = (x_123 + 1); + i_3 = as_type((as_type(x_123) + as_type(1))); { int const x_125 = i_3; if ((x_125 < 10)) { @@ -237,7 +237,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9, (*(tint_symbol_10)).arr[x_134] = x_137; { int const x_139 = j_1; - j_1 = (x_139 + 1); + j_1 = as_type((as_type(x_139) + as_type(1))); } } mergeSort_(tint_symbol_9, tint_symbol_10); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl index 825cedb9e1..fe68f0996b 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.spvasm.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); - i_1 = (x_245 - 1); + i_1 = as_type((as_type(x_245) - as_type(1))); int const x_247 = *(l); j_1 = x_247; while (true) { int const x_252 = j_1; int const x_253 = *(h); - if ((x_252 <= (x_253 - 1))) { + if ((x_252 <= as_type((as_type(x_253) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; - i_1 = (x_264 + 1); + i_1 = as_type((as_type(x_264) + as_type(1))); int const x_266 = i_1; param = x_266; int const x_267 = j_1; @@ -68,11 +68,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_269 = j_1; - j_1 = (x_269 + 1); + j_1 = as_type((as_type(x_269) + as_type(1))); } } int const x_271 = i_1; - i_1 = (x_271 + 1); + i_1 = as_type((as_type(x_271) + as_type(1))); int const x_273 = i_1; param_2 = x_273; int const x_274 = *(h); @@ -98,7 +98,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons h_1 = 9; top = -1; int const x_280 = top; - int const x_281 = (x_280 + 1); + int const x_281 = as_type((as_type(x_280) + as_type(1))); top = x_281; int const x_282 = l_1; stack.arr[x_281] = x_282; @@ -109,7 +109,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons x_279 = 1; } else { int const x_294 = h_1; - x_279 = (x_294 << as_type(0)); + x_279 = as_type((as_type(x_294) << as_type(0))); } int const x_296 = x_279; x_278 = (x_290 | x_296); @@ -123,7 +123,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons int const x_301 = int_a; clamp_a = clamp(x_299, x_300, x_301); int const x_303 = top; - int const x_304 = (x_303 + 1); + int const x_304 = as_type((as_type(x_303) + as_type(1))); top = x_304; int const x_305 = clamp_a; stack.arr[x_304] = (x_305 / 1); @@ -134,11 +134,11 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons break; } int const x_315 = top; - top = (x_315 - 1); + top = as_type((as_type(x_315) - as_type(1))); int const x_318 = stack.arr[x_315]; h_1 = x_318; int const x_319 = top; - top = (x_319 - 1); + top = as_type((as_type(x_319) - as_type(1))); int const x_322 = stack.arr[x_319]; l_1 = x_322; int const x_323 = l_1; @@ -149,28 +149,28 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons p = x_325; int const x_326 = p; int const x_328 = l_1; - if (((x_326 - 1) > x_328)) { + if ((as_type((as_type(x_326) - as_type(1))) > x_328)) { int const x_332 = top; - int const x_333 = (x_332 + 1); + int const x_333 = as_type((as_type(x_332) + as_type(1))); top = x_333; int const x_334 = l_1; stack.arr[x_333] = x_334; int const x_336 = top; - int const x_337 = (x_336 + 1); + int const x_337 = as_type((as_type(x_336) + as_type(1))); top = x_337; int const x_338 = p; - stack.arr[x_337] = (x_338 - 1); + stack.arr[x_337] = as_type((as_type(x_338) - as_type(1))); } int const x_341 = p; int const x_343 = h_1; - if (((x_341 + 1) < x_343)) { + if ((as_type((as_type(x_341) + as_type(1))) < x_343)) { int const x_347 = top; - int const x_348 = (x_347 + 1); + int const x_348 = as_type((as_type(x_347) + as_type(1))); top = x_348; int const x_349 = p; - stack.arr[x_348] = (x_349 + 1); + stack.arr[x_348] = as_type((as_type(x_349) + as_type(1))); int const x_352 = top; - int const x_353 = (x_352 + 1); + int const x_353 = as_type((as_type(x_352) + as_type(1))); top = x_353; int const x_354 = h_1; stack.arr[x_353] = x_354; @@ -192,16 +192,16 @@ void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, th } int const x_93 = i_2; int const x_94 = i_2; - (*(tint_symbol_9)).numbers.arr[x_93] = (10 - x_94); + (*(tint_symbol_9)).numbers.arr[x_93] = as_type((as_type(10) - as_type(x_94))); int const x_97 = i_2; int const x_98 = i_2; int const x_100 = (*(tint_symbol_9)).numbers.arr[x_98]; int const x_101 = i_2; int const x_103 = (*(tint_symbol_9)).numbers.arr[x_101]; - (*(tint_symbol_9)).numbers.arr[x_97] = (x_100 * x_103); + (*(tint_symbol_9)).numbers.arr[x_97] = as_type((as_type(x_100) * as_type(x_103))); { int const x_106 = i_2; - i_2 = (x_106 + 1); + i_2 = as_type((as_type(x_106) + as_type(1))); } } quicksort_(tint_symbol_10, tint_symbol_9); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl index 825cedb9e1..fe68f0996b 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-conditional-bitwise-or-clamp/1.wgsl.expected.msl @@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_244 = (*(tint_symbol_6)).numbers.arr[x_242]; pivot = x_244; int const x_245 = *(l); - i_1 = (x_245 - 1); + i_1 = as_type((as_type(x_245) - as_type(1))); int const x_247 = *(l); j_1 = x_247; while (true) { int const x_252 = j_1; int const x_253 = *(h); - if ((x_252 <= (x_253 - 1))) { + if ((x_252 <= as_type((as_type(x_253) - as_type(1))))) { } else { break; } @@ -59,7 +59,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_260 = pivot; if ((x_259 <= x_260)) { int const x_264 = i_1; - i_1 = (x_264 + 1); + i_1 = as_type((as_type(x_264) + as_type(1))); int const x_266 = i_1; param = x_266; int const x_267 = j_1; @@ -68,11 +68,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_269 = j_1; - j_1 = (x_269 + 1); + j_1 = as_type((as_type(x_269) + as_type(1))); } } int const x_271 = i_1; - i_1 = (x_271 + 1); + i_1 = as_type((as_type(x_271) + as_type(1))); int const x_273 = i_1; param_2 = x_273; int const x_274 = *(h); @@ -98,7 +98,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons h_1 = 9; top = -1; int const x_280 = top; - int const x_281 = (x_280 + 1); + int const x_281 = as_type((as_type(x_280) + as_type(1))); top = x_281; int const x_282 = l_1; stack.arr[x_281] = x_282; @@ -109,7 +109,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons x_279 = 1; } else { int const x_294 = h_1; - x_279 = (x_294 << as_type(0)); + x_279 = as_type((as_type(x_294) << as_type(0))); } int const x_296 = x_279; x_278 = (x_290 | x_296); @@ -123,7 +123,7 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons int const x_301 = int_a; clamp_a = clamp(x_299, x_300, x_301); int const x_303 = top; - int const x_304 = (x_303 + 1); + int const x_304 = as_type((as_type(x_303) + as_type(1))); top = x_304; int const x_305 = clamp_a; stack.arr[x_304] = (x_305 / 1); @@ -134,11 +134,11 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons break; } int const x_315 = top; - top = (x_315 - 1); + top = as_type((as_type(x_315) - as_type(1))); int const x_318 = stack.arr[x_315]; h_1 = x_318; int const x_319 = top; - top = (x_319 - 1); + top = as_type((as_type(x_319) - as_type(1))); int const x_322 = stack.arr[x_319]; l_1 = x_322; int const x_323 = l_1; @@ -149,28 +149,28 @@ void quicksort_(thread float4* const tint_symbol_7, thread QuicksortObject* cons p = x_325; int const x_326 = p; int const x_328 = l_1; - if (((x_326 - 1) > x_328)) { + if ((as_type((as_type(x_326) - as_type(1))) > x_328)) { int const x_332 = top; - int const x_333 = (x_332 + 1); + int const x_333 = as_type((as_type(x_332) + as_type(1))); top = x_333; int const x_334 = l_1; stack.arr[x_333] = x_334; int const x_336 = top; - int const x_337 = (x_336 + 1); + int const x_337 = as_type((as_type(x_336) + as_type(1))); top = x_337; int const x_338 = p; - stack.arr[x_337] = (x_338 - 1); + stack.arr[x_337] = as_type((as_type(x_338) - as_type(1))); } int const x_341 = p; int const x_343 = h_1; - if (((x_341 + 1) < x_343)) { + if ((as_type((as_type(x_341) + as_type(1))) < x_343)) { int const x_347 = top; - int const x_348 = (x_347 + 1); + int const x_348 = as_type((as_type(x_347) + as_type(1))); top = x_348; int const x_349 = p; - stack.arr[x_348] = (x_349 + 1); + stack.arr[x_348] = as_type((as_type(x_349) + as_type(1))); int const x_352 = top; - int const x_353 = (x_352 + 1); + int const x_353 = as_type((as_type(x_352) + as_type(1))); top = x_353; int const x_354 = h_1; stack.arr[x_353] = x_354; @@ -192,16 +192,16 @@ void main_1(constant buf0& x_34, thread QuicksortObject* const tint_symbol_9, th } int const x_93 = i_2; int const x_94 = i_2; - (*(tint_symbol_9)).numbers.arr[x_93] = (10 - x_94); + (*(tint_symbol_9)).numbers.arr[x_93] = as_type((as_type(10) - as_type(x_94))); int const x_97 = i_2; int const x_98 = i_2; int const x_100 = (*(tint_symbol_9)).numbers.arr[x_98]; int const x_101 = i_2; int const x_103 = (*(tint_symbol_9)).numbers.arr[x_101]; - (*(tint_symbol_9)).numbers.arr[x_97] = (x_100 * x_103); + (*(tint_symbol_9)).numbers.arr[x_97] = as_type((as_type(x_100) * as_type(x_103))); { int const x_106 = i_2; - i_2 = (x_106 + 1); + i_2 = as_type((as_type(x_106) + as_type(1))); } } quicksort_(tint_symbol_10, tint_symbol_9); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl index f82023bf05..ea7fc7adbf 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.spvasm.expected.msl @@ -49,13 +49,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_253 = (*(tint_symbol_7)).numbers.arr[x_251]; pivot = x_253; int const x_254 = *(l); - i_1 = (x_254 - 1); + i_1 = as_type((as_type(x_254) - as_type(1))); int const x_256 = *(l); j_1 = x_256; while (true) { int const x_261 = j_1; int const x_262 = *(h); - if ((x_261 <= (x_262 - 1))) { + if ((x_261 <= as_type((as_type(x_262) - as_type(1))))) { } else { break; } @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_269 = pivot; if ((x_268 <= x_269)) { int const x_273 = i_1; - i_1 = (x_273 + 1); + i_1 = as_type((as_type(x_273) + as_type(1))); int const x_275 = i_1; param = x_275; int const x_276 = j_1; @@ -73,16 +73,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_278 = j_1; - j_1 = (x_278 + 1); + j_1 = as_type((as_type(x_278) + as_type(1))); } } int const x_280 = i_1; - param_2 = (x_280 + 1); + param_2 = as_type((as_type(x_280) + as_type(1))); int const x_282 = *(h); param_3 = x_282; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); int const x_284 = i_1; - return (x_284 + 1); + return as_type((as_type(x_284) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_8) { @@ -97,12 +97,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { h_1 = 9; top = -1; int const x_287 = top; - int const x_288 = (x_287 + 1); + int const x_288 = as_type((as_type(x_287) + as_type(1))); top = x_288; int const x_289 = l_1; stack.arr[x_288] = x_289; int const x_291 = top; - int const x_292 = (x_291 + 1); + int const x_292 = as_type((as_type(x_291) + as_type(1))); top = x_292; int const x_293 = h_1; stack.arr[x_292] = x_293; @@ -113,11 +113,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { break; } int const x_302 = top; - top = (x_302 - 1); + top = as_type((as_type(x_302) - as_type(1))); int const x_305 = stack.arr[x_302]; h_1 = x_305; int const x_306 = top; - top = (x_306 - 1); + top = as_type((as_type(x_306) - as_type(1))); int const x_309 = stack.arr[x_306]; l_1 = x_309; int const x_310 = l_1; @@ -128,28 +128,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { p = x_312; int const x_313 = p; int const x_315 = l_1; - if (((x_313 - 1) > x_315)) { + if ((as_type((as_type(x_313) - as_type(1))) > x_315)) { int const x_319 = top; - int const x_320 = (x_319 + 1); + int const x_320 = as_type((as_type(x_319) + as_type(1))); top = x_320; int const x_321 = l_1; stack.arr[x_320] = x_321; int const x_323 = top; - int const x_324 = (x_323 + 1); + int const x_324 = as_type((as_type(x_323) + as_type(1))); top = x_324; int const x_325 = p; - stack.arr[x_324] = (x_325 - 1); + stack.arr[x_324] = as_type((as_type(x_325) - as_type(1))); } int const x_328 = p; int const x_330 = h_1; - if (((x_328 + 1) < x_330)) { + if ((as_type((as_type(x_328) + as_type(1))) < x_330)) { int const x_334 = top; - int const x_335 = (x_334 + 1); + int const x_335 = as_type((as_type(x_334) + as_type(1))); top = x_335; int const x_336 = p; - stack.arr[x_335] = (x_336 + 1); + stack.arr[x_335] = as_type((as_type(x_336) + as_type(1))); int const x_339 = top; - int const x_340 = (x_339 + 1); + int const x_340 = as_type((as_type(x_339) + as_type(1))); top = x_340; int const x_341 = h_1; stack.arr[x_340] = x_341; @@ -173,16 +173,16 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread floa } int const x_100 = i_2; int const x_101 = i_2; - (*(tint_symbol_11)).numbers.arr[x_100] = (10 - x_101); + (*(tint_symbol_11)).numbers.arr[x_100] = as_type((as_type(10) - as_type(x_101))); int const x_104 = i_2; int const x_105 = i_2; int const x_107 = (*(tint_symbol_11)).numbers.arr[x_105]; int const x_108 = i_2; int const x_110 = (*(tint_symbol_11)).numbers.arr[x_108]; - (*(tint_symbol_11)).numbers.arr[x_104] = (x_107 * x_110); + (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(x_107) * as_type(x_110))); { int const x_113 = i_2; - i_2 = (x_113 + 1); + i_2 = as_type((as_type(x_113) + as_type(1))); } } quicksort_(tint_symbol_11); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl index f82023bf05..ea7fc7adbf 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/0-opt.wgsl.expected.msl @@ -49,13 +49,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_253 = (*(tint_symbol_7)).numbers.arr[x_251]; pivot = x_253; int const x_254 = *(l); - i_1 = (x_254 - 1); + i_1 = as_type((as_type(x_254) - as_type(1))); int const x_256 = *(l); j_1 = x_256; while (true) { int const x_261 = j_1; int const x_262 = *(h); - if ((x_261 <= (x_262 - 1))) { + if ((x_261 <= as_type((as_type(x_262) - as_type(1))))) { } else { break; } @@ -64,7 +64,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_269 = pivot; if ((x_268 <= x_269)) { int const x_273 = i_1; - i_1 = (x_273 + 1); + i_1 = as_type((as_type(x_273) + as_type(1))); int const x_275 = i_1; param = x_275; int const x_276 = j_1; @@ -73,16 +73,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_278 = j_1; - j_1 = (x_278 + 1); + j_1 = as_type((as_type(x_278) + as_type(1))); } } int const x_280 = i_1; - param_2 = (x_280 + 1); + param_2 = as_type((as_type(x_280) + as_type(1))); int const x_282 = *(h); param_3 = x_282; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); int const x_284 = i_1; - return (x_284 + 1); + return as_type((as_type(x_284) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_8) { @@ -97,12 +97,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { h_1 = 9; top = -1; int const x_287 = top; - int const x_288 = (x_287 + 1); + int const x_288 = as_type((as_type(x_287) + as_type(1))); top = x_288; int const x_289 = l_1; stack.arr[x_288] = x_289; int const x_291 = top; - int const x_292 = (x_291 + 1); + int const x_292 = as_type((as_type(x_291) + as_type(1))); top = x_292; int const x_293 = h_1; stack.arr[x_292] = x_293; @@ -113,11 +113,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { break; } int const x_302 = top; - top = (x_302 - 1); + top = as_type((as_type(x_302) - as_type(1))); int const x_305 = stack.arr[x_302]; h_1 = x_305; int const x_306 = top; - top = (x_306 - 1); + top = as_type((as_type(x_306) - as_type(1))); int const x_309 = stack.arr[x_306]; l_1 = x_309; int const x_310 = l_1; @@ -128,28 +128,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { p = x_312; int const x_313 = p; int const x_315 = l_1; - if (((x_313 - 1) > x_315)) { + if ((as_type((as_type(x_313) - as_type(1))) > x_315)) { int const x_319 = top; - int const x_320 = (x_319 + 1); + int const x_320 = as_type((as_type(x_319) + as_type(1))); top = x_320; int const x_321 = l_1; stack.arr[x_320] = x_321; int const x_323 = top; - int const x_324 = (x_323 + 1); + int const x_324 = as_type((as_type(x_323) + as_type(1))); top = x_324; int const x_325 = p; - stack.arr[x_324] = (x_325 - 1); + stack.arr[x_324] = as_type((as_type(x_325) - as_type(1))); } int const x_328 = p; int const x_330 = h_1; - if (((x_328 + 1) < x_330)) { + if ((as_type((as_type(x_328) + as_type(1))) < x_330)) { int const x_334 = top; - int const x_335 = (x_334 + 1); + int const x_335 = as_type((as_type(x_334) + as_type(1))); top = x_335; int const x_336 = p; - stack.arr[x_335] = (x_336 + 1); + stack.arr[x_335] = as_type((as_type(x_336) + as_type(1))); int const x_339 = top; - int const x_340 = (x_339 + 1); + int const x_340 = as_type((as_type(x_339) + as_type(1))); top = x_340; int const x_341 = h_1; stack.arr[x_340] = x_341; @@ -173,16 +173,16 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_9, thread floa } int const x_100 = i_2; int const x_101 = i_2; - (*(tint_symbol_11)).numbers.arr[x_100] = (10 - x_101); + (*(tint_symbol_11)).numbers.arr[x_100] = as_type((as_type(10) - as_type(x_101))); int const x_104 = i_2; int const x_105 = i_2; int const x_107 = (*(tint_symbol_11)).numbers.arr[x_105]; int const x_108 = i_2; int const x_110 = (*(tint_symbol_11)).numbers.arr[x_108]; - (*(tint_symbol_11)).numbers.arr[x_104] = (x_107 * x_110); + (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(x_107) * as_type(x_110))); { int const x_113 = i_2; - i_2 = (x_113 + 1); + i_2 = as_type((as_type(x_113) + as_type(1))); } } quicksort_(tint_symbol_11); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl index fae0fc6dcb..865d47202b 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.spvasm.expected.msl @@ -52,13 +52,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_264 = (*(tint_symbol_7)).numbers.arr[x_262]; pivot = x_264; int const x_265 = *(l); - i_1 = (x_265 - 1); + i_1 = as_type((as_type(x_265) - as_type(1))); int const x_267 = *(l); j_1 = x_267; while (true) { int const x_272 = j_1; int const x_273 = *(h); - if ((x_272 <= (x_273 - 1))) { + if ((x_272 <= as_type((as_type(x_273) - as_type(1))))) { } else { break; } @@ -67,7 +67,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_280 = pivot; if ((x_279 <= x_280)) { int const x_284 = i_1; - i_1 = (x_284 + 1); + i_1 = as_type((as_type(x_284) + as_type(1))); int const x_286 = i_1; param = x_286; int const x_287 = j_1; @@ -76,16 +76,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_289 = j_1; - j_1 = (x_289 + 1); + j_1 = as_type((as_type(x_289) + as_type(1))); } } int const x_291 = i_1; - param_2 = (x_291 + 1); + param_2 = as_type((as_type(x_291) + as_type(1))); int const x_293 = *(h); param_3 = x_293; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); int const x_295 = i_1; - return (x_295 + 1); + return as_type((as_type(x_295) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_8) { @@ -100,12 +100,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { h_1 = 9; top = -1; int const x_298 = top; - int const x_299 = (x_298 + 1); + int const x_299 = as_type((as_type(x_298) + as_type(1))); top = x_299; int const x_300 = l_1; stack.arr[x_299] = x_300; int const x_302 = top; - int const x_303 = (x_302 + 1); + int const x_303 = as_type((as_type(x_302) + as_type(1))); top = x_303; int const x_304 = h_1; stack.arr[x_303] = x_304; @@ -116,11 +116,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { break; } int const x_313 = top; - top = (x_313 - 1); + top = as_type((as_type(x_313) - as_type(1))); int const x_316 = stack.arr[x_313]; h_1 = x_316; int const x_317 = top; - top = (x_317 - 1); + top = as_type((as_type(x_317) - as_type(1))); int const x_320 = stack.arr[x_317]; l_1 = x_320; int const x_321 = l_1; @@ -131,28 +131,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { p = x_323; int const x_324 = p; int const x_326 = l_1; - if (((x_324 - 1) > x_326)) { + if ((as_type((as_type(x_324) - as_type(1))) > x_326)) { int const x_330 = top; - int const x_331 = (x_330 + 1); + int const x_331 = as_type((as_type(x_330) + as_type(1))); top = x_331; int const x_332 = l_1; stack.arr[x_331] = x_332; int const x_334 = top; - int const x_335 = (x_334 + 1); + int const x_335 = as_type((as_type(x_334) + as_type(1))); top = x_335; int const x_336 = p; - stack.arr[x_335] = (x_336 - 1); + stack.arr[x_335] = as_type((as_type(x_336) - as_type(1))); } int const x_339 = p; int const x_341 = h_1; - if (((x_339 + 1) < x_341)) { + if ((as_type((as_type(x_339) + as_type(1))) < x_341)) { int const x_345 = top; - int const x_346 = (x_345 + 1); + int const x_346 = as_type((as_type(x_345) + as_type(1))); top = x_346; int const x_347 = p; - stack.arr[x_346] = (x_347 + 1); + stack.arr[x_346] = as_type((as_type(x_347) + as_type(1))); int const x_350 = top; - int const x_351 = (x_350 + 1); + int const x_351 = as_type((as_type(x_350) + as_type(1))); top = x_351; int const x_352 = h_1; stack.arr[x_351] = x_352; @@ -176,7 +176,7 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = (10 - x_105); + (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); float const x_109 = x_33.injectionSwitch.x; float const x_111 = x_33.injectionSwitch.y; if ((x_109 > x_111)) { @@ -187,10 +187,10 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ int const x_118 = (*(tint_symbol_11)).numbers.arr[x_116]; int const x_119 = i_2; int const x_121 = (*(tint_symbol_11)).numbers.arr[x_119]; - (*(tint_symbol_11)).numbers.arr[x_115] = (x_118 * x_121); + (*(tint_symbol_11)).numbers.arr[x_115] = as_type((as_type(x_118) * as_type(x_121))); { int const x_124 = i_2; - i_2 = (x_124 + 1); + i_2 = as_type((as_type(x_124) + as_type(1))); } } quicksort_(tint_symbol_11); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl index fae0fc6dcb..865d47202b 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-for-loop-with-injection/2-opt.wgsl.expected.msl @@ -52,13 +52,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_264 = (*(tint_symbol_7)).numbers.arr[x_262]; pivot = x_264; int const x_265 = *(l); - i_1 = (x_265 - 1); + i_1 = as_type((as_type(x_265) - as_type(1))); int const x_267 = *(l); j_1 = x_267; while (true) { int const x_272 = j_1; int const x_273 = *(h); - if ((x_272 <= (x_273 - 1))) { + if ((x_272 <= as_type((as_type(x_273) - as_type(1))))) { } else { break; } @@ -67,7 +67,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_280 = pivot; if ((x_279 <= x_280)) { int const x_284 = i_1; - i_1 = (x_284 + 1); + i_1 = as_type((as_type(x_284) + as_type(1))); int const x_286 = i_1; param = x_286; int const x_287 = j_1; @@ -76,16 +76,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_289 = j_1; - j_1 = (x_289 + 1); + j_1 = as_type((as_type(x_289) + as_type(1))); } } int const x_291 = i_1; - param_2 = (x_291 + 1); + param_2 = as_type((as_type(x_291) + as_type(1))); int const x_293 = *(h); param_3 = x_293; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); int const x_295 = i_1; - return (x_295 + 1); + return as_type((as_type(x_295) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_8) { @@ -100,12 +100,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { h_1 = 9; top = -1; int const x_298 = top; - int const x_299 = (x_298 + 1); + int const x_299 = as_type((as_type(x_298) + as_type(1))); top = x_299; int const x_300 = l_1; stack.arr[x_299] = x_300; int const x_302 = top; - int const x_303 = (x_302 + 1); + int const x_303 = as_type((as_type(x_302) + as_type(1))); top = x_303; int const x_304 = h_1; stack.arr[x_303] = x_304; @@ -116,11 +116,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { break; } int const x_313 = top; - top = (x_313 - 1); + top = as_type((as_type(x_313) - as_type(1))); int const x_316 = stack.arr[x_313]; h_1 = x_316; int const x_317 = top; - top = (x_317 - 1); + top = as_type((as_type(x_317) - as_type(1))); int const x_320 = stack.arr[x_317]; l_1 = x_320; int const x_321 = l_1; @@ -131,28 +131,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { p = x_323; int const x_324 = p; int const x_326 = l_1; - if (((x_324 - 1) > x_326)) { + if ((as_type((as_type(x_324) - as_type(1))) > x_326)) { int const x_330 = top; - int const x_331 = (x_330 + 1); + int const x_331 = as_type((as_type(x_330) + as_type(1))); top = x_331; int const x_332 = l_1; stack.arr[x_331] = x_332; int const x_334 = top; - int const x_335 = (x_334 + 1); + int const x_335 = as_type((as_type(x_334) + as_type(1))); top = x_335; int const x_336 = p; - stack.arr[x_335] = (x_336 - 1); + stack.arr[x_335] = as_type((as_type(x_336) - as_type(1))); } int const x_339 = p; int const x_341 = h_1; - if (((x_339 + 1) < x_341)) { + if ((as_type((as_type(x_339) + as_type(1))) < x_341)) { int const x_345 = top; - int const x_346 = (x_345 + 1); + int const x_346 = as_type((as_type(x_345) + as_type(1))); top = x_346; int const x_347 = p; - stack.arr[x_346] = (x_347 + 1); + stack.arr[x_346] = as_type((as_type(x_347) + as_type(1))); int const x_350 = top; - int const x_351 = (x_350 + 1); + int const x_351 = as_type((as_type(x_350) + as_type(1))); top = x_351; int const x_352 = h_1; stack.arr[x_351] = x_352; @@ -176,7 +176,7 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = (10 - x_105); + (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); float const x_109 = x_33.injectionSwitch.x; float const x_111 = x_33.injectionSwitch.y; if ((x_109 > x_111)) { @@ -187,10 +187,10 @@ void main_1(constant buf0& x_33, constant buf1& x_36, thread float4* const tint_ int const x_118 = (*(tint_symbol_11)).numbers.arr[x_116]; int const x_119 = i_2; int const x_121 = (*(tint_symbol_11)).numbers.arr[x_119]; - (*(tint_symbol_11)).numbers.arr[x_115] = (x_118 * x_121); + (*(tint_symbol_11)).numbers.arr[x_115] = as_type((as_type(x_118) * as_type(x_121))); { int const x_124 = i_2; - i_2 = (x_124 + 1); + i_2 = as_type((as_type(x_124) + as_type(1))); } } quicksort_(tint_symbol_11); diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl index 45ba09a9e3..c34f5933dd 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.spvasm.expected.msl @@ -54,28 +54,28 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa } int const x_117 = i_2; int const x_118 = i_2; - (*(tint_symbol_8)).numbers.arr[x_117] = (10 - x_118); + (*(tint_symbol_8)).numbers.arr[x_117] = as_type((as_type(10) - as_type(x_118))); int const x_121 = i_2; int const x_122 = i_2; int const x_124 = (*(tint_symbol_8)).numbers.arr[x_122]; int const x_125 = i_2; int const x_127 = (*(tint_symbol_8)).numbers.arr[x_125]; - (*(tint_symbol_8)).numbers.arr[x_121] = (x_124 * x_127); + (*(tint_symbol_8)).numbers.arr[x_121] = as_type((as_type(x_124) * as_type(x_127))); { int const x_130 = i_2; - i_2 = (x_130 + 1); + i_2 = as_type((as_type(x_130) + as_type(1))); } } x_100 = 0; x_101 = 9; x_102 = -1; int const x_132 = x_102; - int const x_133 = (x_132 + 1); + int const x_133 = as_type((as_type(x_132) + as_type(1))); x_102 = x_133; int const x_134 = x_100; x_103.arr[x_133] = x_134; int const x_136 = x_102; - int const x_137 = (x_136 + 1); + int const x_137 = as_type((as_type(x_136) + as_type(1))); x_102 = x_137; int const x_138 = x_101; x_103.arr[x_137] = x_138; @@ -86,11 +86,11 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa break; } int const x_147 = x_102; - x_102 = (x_147 - 1); + x_102 = as_type((as_type(x_147) - as_type(1))); int const x_150 = x_103.arr[x_147]; x_101 = x_150; int const x_151 = x_102; - x_102 = (x_151 - 1); + x_102 = as_type((as_type(x_151) - as_type(1))); int const x_154 = x_103.arr[x_151]; x_100 = x_154; int const x_155 = x_100; @@ -101,13 +101,13 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_159 = (*(tint_symbol_8)).numbers.arr[x_157]; x_92 = x_159; int const x_160 = x_105; - x_93 = (x_160 - 1); + x_93 = as_type((as_type(x_160) - as_type(1))); int const x_162 = x_105; x_94 = x_162; while (true) { int const x_167 = x_94; int const x_168 = x_106; - if ((x_167 <= (x_168 - 1))) { + if ((x_167 <= as_type((as_type(x_168) - as_type(1))))) { } else { break; } @@ -116,7 +116,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_175 = x_92; if ((x_174 <= x_175)) { int const x_179 = x_93; - x_93 = (x_179 + 1); + x_93 = as_type((as_type(x_179) + as_type(1))); int const x_181 = x_93; x_95 = x_181; int const x_182 = x_94; @@ -134,11 +134,11 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa } { int const x_194 = x_94; - x_94 = (x_194 + 1); + x_94 = as_type((as_type(x_194) + as_type(1))); } } int const x_196 = x_93; - x_97 = (x_196 + 1); + x_97 = as_type((as_type(x_196) + as_type(1))); int const x_198 = x_106; x_98 = x_198; int const x_199 = x_97; @@ -152,33 +152,33 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_208 = x_90; (*(tint_symbol_8)).numbers.arr[x_207] = x_208; int const x_210 = x_93; - x_99 = (x_210 + 1); + x_99 = as_type((as_type(x_210) + as_type(1))); int const x_212 = x_99; x_104 = x_212; int const x_213 = x_104; int const x_215 = x_100; - if (((x_213 - 1) > x_215)) { + if ((as_type((as_type(x_213) - as_type(1))) > x_215)) { int const x_219 = x_102; - int const x_220 = (x_219 + 1); + int const x_220 = as_type((as_type(x_219) + as_type(1))); x_102 = x_220; int const x_221 = x_100; x_103.arr[x_220] = x_221; int const x_223 = x_102; - int const x_224 = (x_223 + 1); + int const x_224 = as_type((as_type(x_223) + as_type(1))); x_102 = x_224; int const x_225 = x_104; - x_103.arr[x_224] = (x_225 - 1); + x_103.arr[x_224] = as_type((as_type(x_225) - as_type(1))); } int const x_228 = x_104; int const x_230 = x_101; - if (((x_228 + 1) < x_230)) { + if ((as_type((as_type(x_228) + as_type(1))) < x_230)) { int const x_234 = x_102; - int const x_235 = (x_234 + 1); + int const x_235 = as_type((as_type(x_234) + as_type(1))); x_102 = x_235; int const x_236 = x_104; - x_103.arr[x_235] = (x_236 + 1); + x_103.arr[x_235] = as_type((as_type(x_236) + as_type(1))); int const x_239 = x_102; - int const x_240 = (x_239 + 1); + int const x_240 = as_type((as_type(x_239) + as_type(1))); x_102 = x_240; int const x_241 = x_101; x_103.arr[x_240] = x_241; @@ -289,13 +289,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_380 = (*(tint_symbol_17)).numbers.arr[x_378]; pivot = x_380; int const x_381 = *(l); - i_1 = (x_381 - 1); + i_1 = as_type((as_type(x_381) - as_type(1))); int const x_383 = *(l); j_1 = x_383; while (true) { int const x_388 = j_1; int const x_389 = *(h); - if ((x_388 <= (x_389 - 1))) { + if ((x_388 <= as_type((as_type(x_389) - as_type(1))))) { } else { break; } @@ -304,7 +304,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_396 = pivot; if ((x_395 <= x_396)) { int const x_400 = i_1; - i_1 = (x_400 + 1); + i_1 = as_type((as_type(x_400) + as_type(1))); int const x_402 = i_1; param = x_402; int const x_403 = j_1; @@ -313,16 +313,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_405 = j_1; - j_1 = (x_405 + 1); + j_1 = as_type((as_type(x_405) + as_type(1))); } } int const x_407 = i_1; - param_2 = (x_407 + 1); + param_2 = as_type((as_type(x_407) + as_type(1))); int const x_409 = *(h); param_3 = x_409; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_17); int const x_411 = i_1; - return (x_411 + 1); + return as_type((as_type(x_411) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_18) { @@ -337,12 +337,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { h_1 = 9; top = -1; int const x_414 = top; - int const x_415 = (x_414 + 1); + int const x_415 = as_type((as_type(x_414) + as_type(1))); top = x_415; int const x_416 = l_1; stack.arr[x_415] = x_416; int const x_418 = top; - int const x_419 = (x_418 + 1); + int const x_419 = as_type((as_type(x_418) + as_type(1))); top = x_419; int const x_420 = h_1; stack.arr[x_419] = x_420; @@ -353,11 +353,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { break; } int const x_429 = top; - top = (x_429 - 1); + top = as_type((as_type(x_429) - as_type(1))); int const x_432 = stack.arr[x_429]; h_1 = x_432; int const x_433 = top; - top = (x_433 - 1); + top = as_type((as_type(x_433) - as_type(1))); int const x_436 = stack.arr[x_433]; l_1 = x_436; int const x_437 = l_1; @@ -368,28 +368,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { p = x_439; int const x_440 = p; int const x_442 = l_1; - if (((x_440 - 1) > x_442)) { + if ((as_type((as_type(x_440) - as_type(1))) > x_442)) { int const x_446 = top; - int const x_447 = (x_446 + 1); + int const x_447 = as_type((as_type(x_446) + as_type(1))); top = x_447; int const x_448 = l_1; stack.arr[x_447] = x_448; int const x_450 = top; - int const x_451 = (x_450 + 1); + int const x_451 = as_type((as_type(x_450) + as_type(1))); top = x_451; int const x_452 = p; - stack.arr[x_451] = (x_452 - 1); + stack.arr[x_451] = as_type((as_type(x_452) - as_type(1))); } int const x_455 = p; int const x_457 = h_1; - if (((x_455 + 1) < x_457)) { + if ((as_type((as_type(x_455) + as_type(1))) < x_457)) { int const x_461 = top; - int const x_462 = (x_461 + 1); + int const x_462 = as_type((as_type(x_461) + as_type(1))); top = x_462; int const x_463 = p; - stack.arr[x_462] = (x_463 + 1); + stack.arr[x_462] = as_type((as_type(x_463) + as_type(1))); int const x_466 = top; - int const x_467 = (x_466 + 1); + int const x_467 = as_type((as_type(x_466) + as_type(1))); top = x_467; int const x_468 = h_1; stack.arr[x_467] = x_468; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl index 45ba09a9e3..c34f5933dd 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/0.wgsl.expected.msl @@ -54,28 +54,28 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa } int const x_117 = i_2; int const x_118 = i_2; - (*(tint_symbol_8)).numbers.arr[x_117] = (10 - x_118); + (*(tint_symbol_8)).numbers.arr[x_117] = as_type((as_type(10) - as_type(x_118))); int const x_121 = i_2; int const x_122 = i_2; int const x_124 = (*(tint_symbol_8)).numbers.arr[x_122]; int const x_125 = i_2; int const x_127 = (*(tint_symbol_8)).numbers.arr[x_125]; - (*(tint_symbol_8)).numbers.arr[x_121] = (x_124 * x_127); + (*(tint_symbol_8)).numbers.arr[x_121] = as_type((as_type(x_124) * as_type(x_127))); { int const x_130 = i_2; - i_2 = (x_130 + 1); + i_2 = as_type((as_type(x_130) + as_type(1))); } } x_100 = 0; x_101 = 9; x_102 = -1; int const x_132 = x_102; - int const x_133 = (x_132 + 1); + int const x_133 = as_type((as_type(x_132) + as_type(1))); x_102 = x_133; int const x_134 = x_100; x_103.arr[x_133] = x_134; int const x_136 = x_102; - int const x_137 = (x_136 + 1); + int const x_137 = as_type((as_type(x_136) + as_type(1))); x_102 = x_137; int const x_138 = x_101; x_103.arr[x_137] = x_138; @@ -86,11 +86,11 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa break; } int const x_147 = x_102; - x_102 = (x_147 - 1); + x_102 = as_type((as_type(x_147) - as_type(1))); int const x_150 = x_103.arr[x_147]; x_101 = x_150; int const x_151 = x_102; - x_102 = (x_151 - 1); + x_102 = as_type((as_type(x_151) - as_type(1))); int const x_154 = x_103.arr[x_151]; x_100 = x_154; int const x_155 = x_100; @@ -101,13 +101,13 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_159 = (*(tint_symbol_8)).numbers.arr[x_157]; x_92 = x_159; int const x_160 = x_105; - x_93 = (x_160 - 1); + x_93 = as_type((as_type(x_160) - as_type(1))); int const x_162 = x_105; x_94 = x_162; while (true) { int const x_167 = x_94; int const x_168 = x_106; - if ((x_167 <= (x_168 - 1))) { + if ((x_167 <= as_type((as_type(x_168) - as_type(1))))) { } else { break; } @@ -116,7 +116,7 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_175 = x_92; if ((x_174 <= x_175)) { int const x_179 = x_93; - x_93 = (x_179 + 1); + x_93 = as_type((as_type(x_179) + as_type(1))); int const x_181 = x_93; x_95 = x_181; int const x_182 = x_94; @@ -134,11 +134,11 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa } { int const x_194 = x_94; - x_94 = (x_194 + 1); + x_94 = as_type((as_type(x_194) + as_type(1))); } } int const x_196 = x_93; - x_97 = (x_196 + 1); + x_97 = as_type((as_type(x_196) + as_type(1))); int const x_198 = x_106; x_98 = x_198; int const x_199 = x_97; @@ -152,33 +152,33 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_6, thread floa int const x_208 = x_90; (*(tint_symbol_8)).numbers.arr[x_207] = x_208; int const x_210 = x_93; - x_99 = (x_210 + 1); + x_99 = as_type((as_type(x_210) + as_type(1))); int const x_212 = x_99; x_104 = x_212; int const x_213 = x_104; int const x_215 = x_100; - if (((x_213 - 1) > x_215)) { + if ((as_type((as_type(x_213) - as_type(1))) > x_215)) { int const x_219 = x_102; - int const x_220 = (x_219 + 1); + int const x_220 = as_type((as_type(x_219) + as_type(1))); x_102 = x_220; int const x_221 = x_100; x_103.arr[x_220] = x_221; int const x_223 = x_102; - int const x_224 = (x_223 + 1); + int const x_224 = as_type((as_type(x_223) + as_type(1))); x_102 = x_224; int const x_225 = x_104; - x_103.arr[x_224] = (x_225 - 1); + x_103.arr[x_224] = as_type((as_type(x_225) - as_type(1))); } int const x_228 = x_104; int const x_230 = x_101; - if (((x_228 + 1) < x_230)) { + if ((as_type((as_type(x_228) + as_type(1))) < x_230)) { int const x_234 = x_102; - int const x_235 = (x_234 + 1); + int const x_235 = as_type((as_type(x_234) + as_type(1))); x_102 = x_235; int const x_236 = x_104; - x_103.arr[x_235] = (x_236 + 1); + x_103.arr[x_235] = as_type((as_type(x_236) + as_type(1))); int const x_239 = x_102; - int const x_240 = (x_239 + 1); + int const x_240 = as_type((as_type(x_239) + as_type(1))); x_102 = x_240; int const x_241 = x_101; x_103.arr[x_240] = x_241; @@ -289,13 +289,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_380 = (*(tint_symbol_17)).numbers.arr[x_378]; pivot = x_380; int const x_381 = *(l); - i_1 = (x_381 - 1); + i_1 = as_type((as_type(x_381) - as_type(1))); int const x_383 = *(l); j_1 = x_383; while (true) { int const x_388 = j_1; int const x_389 = *(h); - if ((x_388 <= (x_389 - 1))) { + if ((x_388 <= as_type((as_type(x_389) - as_type(1))))) { } else { break; } @@ -304,7 +304,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_396 = pivot; if ((x_395 <= x_396)) { int const x_400 = i_1; - i_1 = (x_400 + 1); + i_1 = as_type((as_type(x_400) + as_type(1))); int const x_402 = i_1; param = x_402; int const x_403 = j_1; @@ -313,16 +313,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_405 = j_1; - j_1 = (x_405 + 1); + j_1 = as_type((as_type(x_405) + as_type(1))); } } int const x_407 = i_1; - param_2 = (x_407 + 1); + param_2 = as_type((as_type(x_407) + as_type(1))); int const x_409 = *(h); param_3 = x_409; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_17); int const x_411 = i_1; - return (x_411 + 1); + return as_type((as_type(x_411) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_18) { @@ -337,12 +337,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { h_1 = 9; top = -1; int const x_414 = top; - int const x_415 = (x_414 + 1); + int const x_415 = as_type((as_type(x_414) + as_type(1))); top = x_415; int const x_416 = l_1; stack.arr[x_415] = x_416; int const x_418 = top; - int const x_419 = (x_418 + 1); + int const x_419 = as_type((as_type(x_418) + as_type(1))); top = x_419; int const x_420 = h_1; stack.arr[x_419] = x_420; @@ -353,11 +353,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { break; } int const x_429 = top; - top = (x_429 - 1); + top = as_type((as_type(x_429) - as_type(1))); int const x_432 = stack.arr[x_429]; h_1 = x_432; int const x_433 = top; - top = (x_433 - 1); + top = as_type((as_type(x_433) - as_type(1))); int const x_436 = stack.arr[x_433]; l_1 = x_436; int const x_437 = l_1; @@ -368,28 +368,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { p = x_439; int const x_440 = p; int const x_442 = l_1; - if (((x_440 - 1) > x_442)) { + if ((as_type((as_type(x_440) - as_type(1))) > x_442)) { int const x_446 = top; - int const x_447 = (x_446 + 1); + int const x_447 = as_type((as_type(x_446) + as_type(1))); top = x_447; int const x_448 = l_1; stack.arr[x_447] = x_448; int const x_450 = top; - int const x_451 = (x_450 + 1); + int const x_451 = as_type((as_type(x_450) + as_type(1))); top = x_451; int const x_452 = p; - stack.arr[x_451] = (x_452 - 1); + stack.arr[x_451] = as_type((as_type(x_452) - as_type(1))); } int const x_455 = p; int const x_457 = h_1; - if (((x_455 + 1) < x_457)) { + if ((as_type((as_type(x_455) + as_type(1))) < x_457)) { int const x_461 = top; - int const x_462 = (x_461 + 1); + int const x_462 = as_type((as_type(x_461) + as_type(1))); top = x_462; int const x_463 = p; - stack.arr[x_462] = (x_463 + 1); + stack.arr[x_462] = as_type((as_type(x_463) + as_type(1))); int const x_466 = top; - int const x_467 = (x_466 + 1); + int const x_467 = as_type((as_type(x_466) + as_type(1))); top = x_467; int const x_468 = h_1; stack.arr[x_467] = x_468; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl index f6f5a8ad0b..c4cabb8f27 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.spvasm.expected.msl @@ -36,13 +36,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_318 = (*(tint_symbol_6)).numbers.arr[x_316]; pivot = x_318; int const x_319 = *(l); - i_1 = (x_319 - 1); + i_1 = as_type((as_type(x_319) - as_type(1))); int const x_321 = *(l); j_1 = x_321; while (true) { int const x_326 = j_1; int const x_327 = *(h); - if ((x_326 <= (x_327 - 1))) { + if ((x_326 <= as_type((as_type(x_327) - as_type(1))))) { } else { break; } @@ -51,7 +51,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_334 = pivot; if ((x_333 <= x_334)) { int const x_338 = i_1; - i_1 = (x_338 + 1); + i_1 = as_type((as_type(x_338) + as_type(1))); int const x_340 = i_1; param = x_340; int const x_341 = j_1; @@ -69,11 +69,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_353 = j_1; - j_1 = (x_353 + 1); + j_1 = as_type((as_type(x_353) + as_type(1))); } } int const x_355 = i_1; - param_2 = (x_355 + 1); + param_2 = as_type((as_type(x_355) + as_type(1))); int const x_357 = *(h); param_3 = x_357; int const x_358 = param_2; @@ -89,7 +89,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui if (false) { } else { int const x_372 = i_1; - return (x_372 + 1); + return as_type((as_type(x_372) + as_type(1))); } return 0; } @@ -116,28 +116,28 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa } int const x_108 = i_2; int const x_109 = i_2; - (*(tint_symbol_9)).numbers.arr[x_108] = (10 - x_109); + (*(tint_symbol_9)).numbers.arr[x_108] = as_type((as_type(10) - as_type(x_109))); int const x_112 = i_2; int const x_113 = i_2; int const x_115 = (*(tint_symbol_9)).numbers.arr[x_113]; int const x_116 = i_2; int const x_118 = (*(tint_symbol_9)).numbers.arr[x_116]; - (*(tint_symbol_9)).numbers.arr[x_112] = (x_115 * x_118); + (*(tint_symbol_9)).numbers.arr[x_112] = as_type((as_type(x_115) * as_type(x_118))); { int const x_121 = i_2; - i_2 = (x_121 + 1); + i_2 = as_type((as_type(x_121) + as_type(1))); } } x_91 = 0; x_92 = 9; x_93 = -1; int const x_123 = x_93; - int const x_124 = (x_123 + 1); + int const x_124 = as_type((as_type(x_123) + as_type(1))); x_93 = x_124; int const x_125 = x_91; x_94.arr[x_124] = x_125; int const x_127 = x_93; - int const x_128 = (x_127 + 1); + int const x_128 = as_type((as_type(x_127) + as_type(1))); x_93 = x_128; int const x_129 = x_92; x_94.arr[x_128] = x_129; @@ -148,11 +148,11 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa break; } int const x_138 = x_93; - x_93 = (x_138 - 1); + x_93 = as_type((as_type(x_138) - as_type(1))); int const x_141 = x_94.arr[x_138]; x_92 = x_141; int const x_142 = x_93; - x_93 = (x_142 - 1); + x_93 = as_type((as_type(x_142) - as_type(1))); int const x_145 = x_94.arr[x_142]; x_91 = x_145; int const x_146 = x_91; @@ -163,28 +163,28 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa x_95 = x_148; int const x_149 = x_95; int const x_151 = x_91; - if (((x_149 - 1) > x_151)) { + if ((as_type((as_type(x_149) - as_type(1))) > x_151)) { int const x_155 = x_93; - int const x_156 = (x_155 + 1); + int const x_156 = as_type((as_type(x_155) + as_type(1))); x_93 = x_156; int const x_157 = x_91; x_94.arr[x_156] = x_157; int const x_159 = x_93; - int const x_160 = (x_159 + 1); + int const x_160 = as_type((as_type(x_159) + as_type(1))); x_93 = x_160; int const x_161 = x_95; - x_94.arr[x_160] = (x_161 - 1); + x_94.arr[x_160] = as_type((as_type(x_161) - as_type(1))); } int const x_164 = x_95; int const x_166 = x_92; - if (((x_164 + 1) < x_166)) { + if ((as_type((as_type(x_164) + as_type(1))) < x_166)) { int const x_170 = x_93; - int const x_171 = (x_170 + 1); + int const x_171 = as_type((as_type(x_170) + as_type(1))); x_93 = x_171; int const x_172 = x_95; - x_94.arr[x_171] = (x_172 + 1); + x_94.arr[x_171] = as_type((as_type(x_172) + as_type(1))); int const x_175 = x_93; - int const x_176 = (x_175 + 1); + int const x_176 = as_type((as_type(x_175) + as_type(1))); x_93 = x_176; int const x_177 = x_92; x_94.arr[x_176] = x_177; @@ -295,12 +295,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { h_1 = 9; top = -1; int const x_376 = top; - int const x_377 = (x_376 + 1); + int const x_377 = as_type((as_type(x_376) + as_type(1))); top = x_377; int const x_378 = l_1; stack.arr[x_377] = x_378; int const x_380 = top; - int const x_381 = (x_380 + 1); + int const x_381 = as_type((as_type(x_380) + as_type(1))); top = x_381; int const x_382 = h_1; stack.arr[x_381] = x_382; @@ -311,11 +311,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { break; } int const x_391 = top; - top = (x_391 - 1); + top = as_type((as_type(x_391) - as_type(1))); int const x_394 = stack.arr[x_391]; h_1 = x_394; int const x_395 = top; - top = (x_395 - 1); + top = as_type((as_type(x_395) - as_type(1))); int const x_398 = stack.arr[x_395]; l_1 = x_398; int const x_399 = l_1; @@ -326,28 +326,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { p = x_401; int const x_402 = p; int const x_404 = l_1; - if (((x_402 - 1) > x_404)) { + if ((as_type((as_type(x_402) - as_type(1))) > x_404)) { int const x_408 = top; - int const x_409 = (x_408 + 1); + int const x_409 = as_type((as_type(x_408) + as_type(1))); top = x_409; int const x_410 = l_1; stack.arr[x_409] = x_410; int const x_412 = top; - int const x_413 = (x_412 + 1); + int const x_413 = as_type((as_type(x_412) + as_type(1))); top = x_413; int const x_414 = p; - stack.arr[x_413] = (x_414 - 1); + stack.arr[x_413] = as_type((as_type(x_414) - as_type(1))); } int const x_417 = p; int const x_419 = h_1; - if (((x_417 + 1) < x_419)) { + if ((as_type((as_type(x_417) + as_type(1))) < x_419)) { int const x_423 = top; - int const x_424 = (x_423 + 1); + int const x_424 = as_type((as_type(x_423) + as_type(1))); top = x_424; int const x_425 = p; - stack.arr[x_424] = (x_425 + 1); + stack.arr[x_424] = as_type((as_type(x_425) + as_type(1))); int const x_428 = top; - int const x_429 = (x_428 + 1); + int const x_429 = as_type((as_type(x_428) + as_type(1))); top = x_429; int const x_430 = h_1; stack.arr[x_429] = x_430; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl index f6f5a8ad0b..c4cabb8f27 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-if-false-else-return/2.wgsl.expected.msl @@ -36,13 +36,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_318 = (*(tint_symbol_6)).numbers.arr[x_316]; pivot = x_318; int const x_319 = *(l); - i_1 = (x_319 - 1); + i_1 = as_type((as_type(x_319) - as_type(1))); int const x_321 = *(l); j_1 = x_321; while (true) { int const x_326 = j_1; int const x_327 = *(h); - if ((x_326 <= (x_327 - 1))) { + if ((x_326 <= as_type((as_type(x_327) - as_type(1))))) { } else { break; } @@ -51,7 +51,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_334 = pivot; if ((x_333 <= x_334)) { int const x_338 = i_1; - i_1 = (x_338 + 1); + i_1 = as_type((as_type(x_338) + as_type(1))); int const x_340 = i_1; param = x_340; int const x_341 = j_1; @@ -69,11 +69,11 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_353 = j_1; - j_1 = (x_353 + 1); + j_1 = as_type((as_type(x_353) + as_type(1))); } } int const x_355 = i_1; - param_2 = (x_355 + 1); + param_2 = as_type((as_type(x_355) + as_type(1))); int const x_357 = *(h); param_3 = x_357; int const x_358 = param_2; @@ -89,7 +89,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui if (false) { } else { int const x_372 = i_1; - return (x_372 + 1); + return as_type((as_type(x_372) + as_type(1))); } return 0; } @@ -116,28 +116,28 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa } int const x_108 = i_2; int const x_109 = i_2; - (*(tint_symbol_9)).numbers.arr[x_108] = (10 - x_109); + (*(tint_symbol_9)).numbers.arr[x_108] = as_type((as_type(10) - as_type(x_109))); int const x_112 = i_2; int const x_113 = i_2; int const x_115 = (*(tint_symbol_9)).numbers.arr[x_113]; int const x_116 = i_2; int const x_118 = (*(tint_symbol_9)).numbers.arr[x_116]; - (*(tint_symbol_9)).numbers.arr[x_112] = (x_115 * x_118); + (*(tint_symbol_9)).numbers.arr[x_112] = as_type((as_type(x_115) * as_type(x_118))); { int const x_121 = i_2; - i_2 = (x_121 + 1); + i_2 = as_type((as_type(x_121) + as_type(1))); } } x_91 = 0; x_92 = 9; x_93 = -1; int const x_123 = x_93; - int const x_124 = (x_123 + 1); + int const x_124 = as_type((as_type(x_123) + as_type(1))); x_93 = x_124; int const x_125 = x_91; x_94.arr[x_124] = x_125; int const x_127 = x_93; - int const x_128 = (x_127 + 1); + int const x_128 = as_type((as_type(x_127) + as_type(1))); x_93 = x_128; int const x_129 = x_92; x_94.arr[x_128] = x_129; @@ -148,11 +148,11 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa break; } int const x_138 = x_93; - x_93 = (x_138 - 1); + x_93 = as_type((as_type(x_138) - as_type(1))); int const x_141 = x_94.arr[x_138]; x_92 = x_141; int const x_142 = x_93; - x_93 = (x_142 - 1); + x_93 = as_type((as_type(x_142) - as_type(1))); int const x_145 = x_94.arr[x_142]; x_91 = x_145; int const x_146 = x_91; @@ -163,28 +163,28 @@ void main_1(constant buf0& x_34, thread float4* const tint_symbol_7, thread floa x_95 = x_148; int const x_149 = x_95; int const x_151 = x_91; - if (((x_149 - 1) > x_151)) { + if ((as_type((as_type(x_149) - as_type(1))) > x_151)) { int const x_155 = x_93; - int const x_156 = (x_155 + 1); + int const x_156 = as_type((as_type(x_155) + as_type(1))); x_93 = x_156; int const x_157 = x_91; x_94.arr[x_156] = x_157; int const x_159 = x_93; - int const x_160 = (x_159 + 1); + int const x_160 = as_type((as_type(x_159) + as_type(1))); x_93 = x_160; int const x_161 = x_95; - x_94.arr[x_160] = (x_161 - 1); + x_94.arr[x_160] = as_type((as_type(x_161) - as_type(1))); } int const x_164 = x_95; int const x_166 = x_92; - if (((x_164 + 1) < x_166)) { + if ((as_type((as_type(x_164) + as_type(1))) < x_166)) { int const x_170 = x_93; - int const x_171 = (x_170 + 1); + int const x_171 = as_type((as_type(x_170) + as_type(1))); x_93 = x_171; int const x_172 = x_95; - x_94.arr[x_171] = (x_172 + 1); + x_94.arr[x_171] = as_type((as_type(x_172) + as_type(1))); int const x_175 = x_93; - int const x_176 = (x_175 + 1); + int const x_176 = as_type((as_type(x_175) + as_type(1))); x_93 = x_176; int const x_177 = x_92; x_94.arr[x_176] = x_177; @@ -295,12 +295,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { h_1 = 9; top = -1; int const x_376 = top; - int const x_377 = (x_376 + 1); + int const x_377 = as_type((as_type(x_376) + as_type(1))); top = x_377; int const x_378 = l_1; stack.arr[x_377] = x_378; int const x_380 = top; - int const x_381 = (x_380 + 1); + int const x_381 = as_type((as_type(x_380) + as_type(1))); top = x_381; int const x_382 = h_1; stack.arr[x_381] = x_382; @@ -311,11 +311,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { break; } int const x_391 = top; - top = (x_391 - 1); + top = as_type((as_type(x_391) - as_type(1))); int const x_394 = stack.arr[x_391]; h_1 = x_394; int const x_395 = top; - top = (x_395 - 1); + top = as_type((as_type(x_395) - as_type(1))); int const x_398 = stack.arr[x_395]; l_1 = x_398; int const x_399 = l_1; @@ -326,28 +326,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_18) { p = x_401; int const x_402 = p; int const x_404 = l_1; - if (((x_402 - 1) > x_404)) { + if ((as_type((as_type(x_402) - as_type(1))) > x_404)) { int const x_408 = top; - int const x_409 = (x_408 + 1); + int const x_409 = as_type((as_type(x_408) + as_type(1))); top = x_409; int const x_410 = l_1; stack.arr[x_409] = x_410; int const x_412 = top; - int const x_413 = (x_412 + 1); + int const x_413 = as_type((as_type(x_412) + as_type(1))); top = x_413; int const x_414 = p; - stack.arr[x_413] = (x_414 - 1); + stack.arr[x_413] = as_type((as_type(x_414) - as_type(1))); } int const x_417 = p; int const x_419 = h_1; - if (((x_417 + 1) < x_419)) { + if ((as_type((as_type(x_417) + as_type(1))) < x_419)) { int const x_423 = top; - int const x_424 = (x_423 + 1); + int const x_424 = as_type((as_type(x_423) + as_type(1))); top = x_424; int const x_425 = p; - stack.arr[x_424] = (x_425 + 1); + stack.arr[x_424] = as_type((as_type(x_425) + as_type(1))); int const x_428 = top; - int const x_429 = (x_428 + 1); + int const x_429 = as_type((as_type(x_428) + as_type(1))); top = x_429; int const x_430 = h_1; stack.arr[x_429] = x_430; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl index 99d503991c..f8dc575a9c 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.spvasm.expected.msl @@ -52,13 +52,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_271 = (*(tint_symbol_7)).numbers.arr[x_269]; pivot = x_271; int const x_272 = *(l); - i_1 = (x_272 - 1); + i_1 = as_type((as_type(x_272) - as_type(1))); int const x_274 = *(l); j_1 = x_274; while (true) { int const x_279 = j_1; int const x_280 = *(h); - if ((x_279 <= (x_280 - 1))) { + if ((x_279 <= as_type((as_type(x_280) - as_type(1))))) { } else { break; } @@ -67,7 +67,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_287 = pivot; if ((x_286 <= x_287)) { int const x_291 = i_1; - i_1 = (x_291 + 1); + i_1 = as_type((as_type(x_291) + as_type(1))); int const x_293 = i_1; param = x_293; int const x_294 = j_1; @@ -76,16 +76,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_296 = j_1; - j_1 = (x_296 + 1); + j_1 = as_type((as_type(x_296) + as_type(1))); } } int const x_298 = i_1; - param_2 = (x_298 + 1); + param_2 = as_type((as_type(x_298) + as_type(1))); int const x_300 = *(h); param_3 = x_300; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); int const x_302 = i_1; - return (x_302 + 1); + return as_type((as_type(x_302) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_8) { @@ -100,12 +100,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { h_1 = 9; top = -1; int const x_305 = top; - int const x_306 = (x_305 + 1); + int const x_306 = as_type((as_type(x_305) + as_type(1))); top = x_306; int const x_307 = l_1; stack.arr[x_306] = x_307; int const x_309 = top; - int const x_310 = (x_309 + 1); + int const x_310 = as_type((as_type(x_309) + as_type(1))); top = x_310; int const x_311 = h_1; stack.arr[x_310] = x_311; @@ -116,11 +116,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { break; } int const x_320 = top; - top = (x_320 - 1); + top = as_type((as_type(x_320) - as_type(1))); int const x_323 = stack.arr[x_320]; h_1 = x_323; int const x_324 = top; - top = (x_324 - 1); + top = as_type((as_type(x_324) - as_type(1))); int const x_327 = stack.arr[x_324]; l_1 = x_327; int const x_328 = l_1; @@ -131,28 +131,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { p = x_330; int const x_331 = p; int const x_333 = l_1; - if (((x_331 - 1) > x_333)) { + if ((as_type((as_type(x_331) - as_type(1))) > x_333)) { int const x_337 = top; - int const x_338 = (x_337 + 1); + int const x_338 = as_type((as_type(x_337) + as_type(1))); top = x_338; int const x_339 = l_1; stack.arr[x_338] = x_339; int const x_341 = top; - int const x_342 = (x_341 + 1); + int const x_342 = as_type((as_type(x_341) + as_type(1))); top = x_342; int const x_343 = p; - stack.arr[x_342] = (x_343 - 1); + stack.arr[x_342] = as_type((as_type(x_343) - as_type(1))); } int const x_346 = p; int const x_348 = h_1; - if (((x_346 + 1) < x_348)) { + if ((as_type((as_type(x_346) + as_type(1))) < x_348)) { int const x_352 = top; - int const x_353 = (x_352 + 1); + int const x_353 = as_type((as_type(x_352) + as_type(1))); top = x_353; int const x_354 = p; - stack.arr[x_353] = (x_354 + 1); + stack.arr[x_353] = as_type((as_type(x_354) + as_type(1))); int const x_357 = top; - int const x_358 = (x_357 + 1); + int const x_358 = as_type((as_type(x_357) + as_type(1))); top = x_358; int const x_359 = h_1; stack.arr[x_358] = x_359; @@ -176,16 +176,16 @@ void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = (10 - x_105); + (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); int const x_108 = i_2; int const x_109 = i_2; int const x_111 = (*(tint_symbol_11)).numbers.arr[x_109]; int const x_112 = i_2; int const x_114 = (*(tint_symbol_11)).numbers.arr[x_112]; - (*(tint_symbol_11)).numbers.arr[x_108] = (x_111 * x_114); + (*(tint_symbol_11)).numbers.arr[x_108] = as_type((as_type(x_111) * as_type(x_114))); { int const x_117 = i_2; - i_2 = (x_117 + 1); + i_2 = as_type((as_type(x_117) + as_type(1))); } } quicksort_(tint_symbol_11); @@ -205,9 +205,9 @@ void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_ float const x_145 = uv.x; if ((x_145 > 0.5f)) { float const x_150 = x_37.injectionSwitch.y; - int const x_155 = (*(tint_symbol_11)).numbers.arr[max((2 * int(x_150)), 2)]; + int const x_155 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_150)))), 2)]; float const x_158 = x_37.injectionSwitch.y; - int const x_163 = (*(tint_symbol_11)).numbers.arr[max((2 * int(x_158)), 2)]; + int const x_163 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_158)))), 2)]; float const x_167 = color.y; color.y = (x_167 + fmax(float(x_155), float(x_163))); } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl index 99d503991c..f8dc575a9c 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-quicksort-max-value-as-index/2-opt.wgsl.expected.msl @@ -52,13 +52,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_271 = (*(tint_symbol_7)).numbers.arr[x_269]; pivot = x_271; int const x_272 = *(l); - i_1 = (x_272 - 1); + i_1 = as_type((as_type(x_272) - as_type(1))); int const x_274 = *(l); j_1 = x_274; while (true) { int const x_279 = j_1; int const x_280 = *(h); - if ((x_279 <= (x_280 - 1))) { + if ((x_279 <= as_type((as_type(x_280) - as_type(1))))) { } else { break; } @@ -67,7 +67,7 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui int const x_287 = pivot; if ((x_286 <= x_287)) { int const x_291 = i_1; - i_1 = (x_291 + 1); + i_1 = as_type((as_type(x_291) + as_type(1))); int const x_293 = i_1; param = x_293; int const x_294 = j_1; @@ -76,16 +76,16 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui } { int const x_296 = j_1; - j_1 = (x_296 + 1); + j_1 = as_type((as_type(x_296) + as_type(1))); } } int const x_298 = i_1; - param_2 = (x_298 + 1); + param_2 = as_type((as_type(x_298) + as_type(1))); int const x_300 = *(h); param_3 = x_300; swap_i1_i1_(&(param_2), &(param_3), tint_symbol_7); int const x_302 = i_1; - return (x_302 + 1); + return as_type((as_type(x_302) + as_type(1))); } void quicksort_(thread QuicksortObject* const tint_symbol_8) { @@ -100,12 +100,12 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { h_1 = 9; top = -1; int const x_305 = top; - int const x_306 = (x_305 + 1); + int const x_306 = as_type((as_type(x_305) + as_type(1))); top = x_306; int const x_307 = l_1; stack.arr[x_306] = x_307; int const x_309 = top; - int const x_310 = (x_309 + 1); + int const x_310 = as_type((as_type(x_309) + as_type(1))); top = x_310; int const x_311 = h_1; stack.arr[x_310] = x_311; @@ -116,11 +116,11 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { break; } int const x_320 = top; - top = (x_320 - 1); + top = as_type((as_type(x_320) - as_type(1))); int const x_323 = stack.arr[x_320]; h_1 = x_323; int const x_324 = top; - top = (x_324 - 1); + top = as_type((as_type(x_324) - as_type(1))); int const x_327 = stack.arr[x_324]; l_1 = x_327; int const x_328 = l_1; @@ -131,28 +131,28 @@ void quicksort_(thread QuicksortObject* const tint_symbol_8) { p = x_330; int const x_331 = p; int const x_333 = l_1; - if (((x_331 - 1) > x_333)) { + if ((as_type((as_type(x_331) - as_type(1))) > x_333)) { int const x_337 = top; - int const x_338 = (x_337 + 1); + int const x_338 = as_type((as_type(x_337) + as_type(1))); top = x_338; int const x_339 = l_1; stack.arr[x_338] = x_339; int const x_341 = top; - int const x_342 = (x_341 + 1); + int const x_342 = as_type((as_type(x_341) + as_type(1))); top = x_342; int const x_343 = p; - stack.arr[x_342] = (x_343 - 1); + stack.arr[x_342] = as_type((as_type(x_343) - as_type(1))); } int const x_346 = p; int const x_348 = h_1; - if (((x_346 + 1) < x_348)) { + if ((as_type((as_type(x_346) + as_type(1))) < x_348)) { int const x_352 = top; - int const x_353 = (x_352 + 1); + int const x_353 = as_type((as_type(x_352) + as_type(1))); top = x_353; int const x_354 = p; - stack.arr[x_353] = (x_354 + 1); + stack.arr[x_353] = as_type((as_type(x_354) + as_type(1))); int const x_357 = top; - int const x_358 = (x_357 + 1); + int const x_358 = as_type((as_type(x_357) + as_type(1))); top = x_358; int const x_359 = h_1; stack.arr[x_358] = x_359; @@ -176,16 +176,16 @@ void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_ } int const x_104 = i_2; int const x_105 = i_2; - (*(tint_symbol_11)).numbers.arr[x_104] = (10 - x_105); + (*(tint_symbol_11)).numbers.arr[x_104] = as_type((as_type(10) - as_type(x_105))); int const x_108 = i_2; int const x_109 = i_2; int const x_111 = (*(tint_symbol_11)).numbers.arr[x_109]; int const x_112 = i_2; int const x_114 = (*(tint_symbol_11)).numbers.arr[x_112]; - (*(tint_symbol_11)).numbers.arr[x_108] = (x_111 * x_114); + (*(tint_symbol_11)).numbers.arr[x_108] = as_type((as_type(x_111) * as_type(x_114))); { int const x_117 = i_2; - i_2 = (x_117 + 1); + i_2 = as_type((as_type(x_117) + as_type(1))); } } quicksort_(tint_symbol_11); @@ -205,9 +205,9 @@ void main_1(constant buf1& x_34, constant buf0& x_37, thread float4* const tint_ float const x_145 = uv.x; if ((x_145 > 0.5f)) { float const x_150 = x_37.injectionSwitch.y; - int const x_155 = (*(tint_symbol_11)).numbers.arr[max((2 * int(x_150)), 2)]; + int const x_155 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_150)))), 2)]; float const x_158 = x_37.injectionSwitch.y; - int const x_163 = (*(tint_symbol_11)).numbers.arr[max((2 * int(x_158)), 2)]; + int const x_163 = (*(tint_symbol_11)).numbers.arr[max(as_type((as_type(2) * as_type(int(x_158)))), 2)]; float const x_167 = color.y; color.y = (x_167 + fmax(float(x_155), float(x_163))); } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl index 840a67c981..29a6f013c9 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.spvasm.expected.msl @@ -97,12 +97,12 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 int const x_190 = i; tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; indexable_3 = tint_symbol_7; - float4 const x_196 = indexable_3.arr[((((int(x_183) * int(x_187)) + (x_190 * 9)) + 11) % 16)]; + float4 const x_196 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_183)) * as_type(int(x_187))))) + as_type(as_type((as_type(x_190) * as_type(9))))))) + as_type(11))) % 16)]; res = x_196; } { int const x_197 = i; - i = (x_197 + 1); + i = as_type((as_type(x_197) + as_type(1))); } } float4 const x_199 = res; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl index 840a67c981..29a6f013c9 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-rects-vec4-clamp-conditional-min-mix/1.wgsl.expected.msl @@ -97,12 +97,12 @@ float4 match_vf2_(thread float2* const pos_1, thread float4* const tint_symbol_9 int const x_190 = i; tint_array_wrapper_1 const tint_symbol_7 = {.arr={float4(0.0f, 0.0f, 0.0f, 1.0f), float4(0.5f, 0.0f, 0.0f, 1.0f), float4(0.0f, 0.5f, 0.0f, 1.0f), float4(0.5f, 0.5f, 0.0f, 1.0f), float4(0.0f, 0.0f, 0.5f, 1.0f), float4(0.5f, 0.0f, 0.5f, 1.0f), float4(0.0f, 0.5f, 0.5f, 1.0f), float4(0.5f, 0.5f, 0.5f, 1.0f), float4(0.0f, 0.0f, 0.0f, 1.0f), float4(1.0f, 0.0f, 0.0f, 1.0f), float4(0.0f, 1.0f, 0.0f, 1.0f), float4(1.0f, 1.0f, 0.0f, 1.0f), float4(0.0f, 0.0f, 1.0f, 1.0f), float4(1.0f, 0.0f, 1.0f, 1.0f), float4(0.0f, 1.0f, 1.0f, 1.0f), float4(1.0f, 1.0f, 1.0f, 1.0f)}}; indexable_3 = tint_symbol_7; - float4 const x_196 = indexable_3.arr[((((int(x_183) * int(x_187)) + (x_190 * 9)) + 11) % 16)]; + float4 const x_196 = indexable_3.arr[(as_type((as_type(as_type((as_type(as_type((as_type(int(x_183)) * as_type(int(x_187))))) + as_type(as_type((as_type(x_190) * as_type(9))))))) + as_type(11))) % 16)]; res = x_196; } { int const x_197 = i; - i = (x_197 + 1); + i = as_type((as_type(x_197) + as_type(1))); } } float4 const x_199 = res; diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl index a726115f16..40e2a56bc8 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl @@ -92,12 +92,12 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p } *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); { - x_165 = (x_164 + 1); + x_165 = as_type((as_type(x_164) + as_type(1))); x_164_phi = x_165; } } { - x_154 = (x_153 + 1); + x_154 = as_type((as_type(x_153) + as_type(1))); x_153_phi = x_154; } } diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl index 6537e89975..17d0242df0 100644 --- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.wgsl.expected.msl @@ -92,12 +92,12 @@ int pointInTriangle_vf2_vf2_vf2_vf2_(constant buf1& x_11, thread float2* const p } *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); { - x_165 = (x_164 + 1); + x_165 = as_type((as_type(x_164) + as_type(1))); x_164_phi = x_165; } } { - x_154 = (x_153 + 1); + x_154 = as_type((as_type(x_153) + as_type(1))); x_153_phi = x_154; } } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl index c9860b9633..61dfc81055 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.spvasm.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { S const x_13 = ll; S const x_50 = ll; S x_51_1 = x_50; - x_51_1.f0 = (x_13.f0 + 1); + x_51_1.f0 = as_type((as_type(x_13.f0) + as_type(1))); S const x_51 = x_51_1; ll = x_51; } diff --git a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl index c9860b9633..61dfc81055 100644 --- a/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/struct-controlled-loop/0-opt.wgsl.expected.msl @@ -35,7 +35,7 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5) { S const x_13 = ll; S const x_50 = ll; S x_51_1 = x_50; - x_51_1.f0 = (x_13.f0 + 1); + x_51_1.f0 = as_type((as_type(x_13.f0) + as_type(1))); S const x_51 = x_51_1; ll = x_51; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl index dbb6a91819..b2d8ae508d 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.spvasm.expected.msl @@ -20,12 +20,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 0: { while (true) { int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); int const x_11 = i; switch(x_11) { case 2: { int const x_12 = i; - i = (x_12 + 5); + i = as_type((as_type(x_12) + as_type(5))); break; } case 1: { @@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } default: { int const x_14 = i; - i = (x_14 + 7); + i = as_type((as_type(x_14) + as_type(7))); break; } } @@ -56,14 +56,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_17 = i; if ((x_17 > 100)) { int const x_18 = i; - i = (x_18 - 2); + i = as_type((as_type(x_18) - as_type(2))); break; } /* fallthrough */ } default: { int const x_20 = i; - i = (x_20 - 3); + i = as_type((as_type(x_20) - as_type(3))); break; } } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl index dbb6a91819..b2d8ae508d 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-loop-switch-if/0-opt.wgsl.expected.msl @@ -20,12 +20,12 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 0: { while (true) { int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); int const x_11 = i; switch(x_11) { case 2: { int const x_12 = i; - i = (x_12 + 5); + i = as_type((as_type(x_12) + as_type(5))); break; } case 1: { @@ -41,7 +41,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { } default: { int const x_14 = i; - i = (x_14 + 7); + i = as_type((as_type(x_14) + as_type(7))); break; } } @@ -56,14 +56,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { int const x_17 = i; if ((x_17 > 100)) { int const x_18 = i; - i = (x_18 - 2); + i = as_type((as_type(x_18) - as_type(2))); break; } /* fallthrough */ } default: { int const x_20 = i; - i = (x_20 - 3); + i = as_type((as_type(x_20) - as_type(3))); break; } } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl index 084529b486..3f25a16688 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.spvasm.expected.msl @@ -21,7 +21,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { while (true) { int const x_31 = x_31_phi; float const x_37 = x_6.injectionSwitch.x; - if ((x_31 < (2 + int(x_37)))) { + if ((x_31 < as_type((as_type(2) + as_type(int(x_37)))))) { } else { break; } @@ -51,14 +51,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 2: { float const x_46 = x_46_phi; if ((x_46 == 1.0f)) { - *(tint_symbol_4) = float4(float((x_31 + 1)), 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(float(as_type((as_type(x_31) + as_type(1)))), 0.0f, 0.0f, 1.0f); return; } break; } } { - int const x_32 = (x_31 + 1); + int const x_32 = as_type((as_type(x_31) + as_type(1))); i = x_32; x_31_phi = x_32; } diff --git a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl index 084529b486..3f25a16688 100644 --- a/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/switch-with-fall-through-cases/0-opt.wgsl.expected.msl @@ -21,7 +21,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { while (true) { int const x_31 = x_31_phi; float const x_37 = x_6.injectionSwitch.x; - if ((x_31 < (2 + int(x_37)))) { + if ((x_31 < as_type((as_type(2) + as_type(int(x_37)))))) { } else { break; } @@ -51,14 +51,14 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_4) { case 2: { float const x_46 = x_46_phi; if ((x_46 == 1.0f)) { - *(tint_symbol_4) = float4(float((x_31 + 1)), 0.0f, 0.0f, 1.0f); + *(tint_symbol_4) = float4(float(as_type((as_type(x_31) + as_type(1)))), 0.0f, 0.0f, 1.0f); return; } break; } } { - int const x_32 = (x_31 + 1); + int const x_32 = as_type((as_type(x_31) + as_type(1))); i = x_32; x_31_phi = x_32; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl index 67500c562d..a21c19e77b 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.spvasm.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_70 = (*(tint_symbol_5)).x; (*(tint_symbol_5)).x = (x_70 + 0.25f); int const x_12 = odd_index; - odd_index = (x_12 + 1); + odd_index = as_type((as_type(x_12) + as_type(1))); } even_index = 1; while (true) { @@ -72,12 +72,12 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } int const x_17 = ll; - ll = (x_17 + 1); + ll = as_type((as_type(x_17) + as_type(1))); int const x_19 = j; if ((as_type(x_19) < 1u)) { { int const x_20 = j; - j = (x_20 + 1); + j = as_type((as_type(x_20) + as_type(1))); } continue; } @@ -88,7 +88,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } { int const x_20 = j; - j = (x_20 + 1); + j = as_type((as_type(x_20) + as_type(1))); } } float const x_113 = x_8.injectionSwitch.x; @@ -97,7 +97,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); } int const x_22 = even_index; - even_index = (x_22 - 1); + even_index = as_type((as_type(x_22) - as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl index 67500c562d..a21c19e77b 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-2-iteration-loops/0-opt.wgsl.expected.msl @@ -41,7 +41,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float float const x_70 = (*(tint_symbol_5)).x; (*(tint_symbol_5)).x = (x_70 + 0.25f); int const x_12 = odd_index; - odd_index = (x_12 + 1); + odd_index = as_type((as_type(x_12) + as_type(1))); } even_index = 1; while (true) { @@ -72,12 +72,12 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float break; } int const x_17 = ll; - ll = (x_17 + 1); + ll = as_type((as_type(x_17) + as_type(1))); int const x_19 = j; if ((as_type(x_19) < 1u)) { { int const x_20 = j; - j = (x_20 + 1); + j = as_type((as_type(x_20) + as_type(1))); } continue; } @@ -88,7 +88,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float } { int const x_20 = j; - j = (x_20 + 1); + j = as_type((as_type(x_20) + as_type(1))); } } float const x_113 = x_8.injectionSwitch.x; @@ -97,7 +97,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_5, thread float *(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f); } int const x_22 = even_index; - even_index = (x_22 - 1); + even_index = as_type((as_type(x_22) - as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl index e1b045ea40..469427d8d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.spvasm.expected.msl @@ -39,14 +39,14 @@ void main_1(constant buf0& x_9, device doesNotMatter& x_12, thread float4* const } { int const x_76 = j; - j = (x_76 + 1); + j = as_type((as_type(x_76) + as_type(1))); } } break; } { int const x_78 = i; - i = (x_78 + 1); + i = as_type((as_type(x_78) + as_type(1))); } } float const x_81 = x_9.injectionSwitch.x; @@ -75,7 +75,7 @@ void main_1(constant buf0& x_9, device doesNotMatter& x_12, thread float4* const threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_101 = GLF_dead3k; - GLF_dead3k = (x_101 + 1); + GLF_dead3k = as_type((as_type(x_101) + as_type(1))); } } x_12.x_compute_data[0] = 42u; diff --git a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl index e1b045ea40..469427d8d0 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-for-loops-with-barrier-function/0-opt.wgsl.expected.msl @@ -39,14 +39,14 @@ void main_1(constant buf0& x_9, device doesNotMatter& x_12, thread float4* const } { int const x_76 = j; - j = (x_76 + 1); + j = as_type((as_type(x_76) + as_type(1))); } } break; } { int const x_78 = i; - i = (x_78 + 1); + i = as_type((as_type(x_78) + as_type(1))); } } float const x_81 = x_9.injectionSwitch.x; @@ -75,7 +75,7 @@ void main_1(constant buf0& x_9, device doesNotMatter& x_12, thread float4* const threadgroup_barrier(mem_flags::mem_threadgroup); { int const x_101 = GLF_dead3k; - GLF_dead3k = (x_101 + 1); + GLF_dead3k = as_type((as_type(x_101) + as_type(1))); } } x_12.x_compute_data[0] = 42u; diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl index 3b8cbfcc54..4958a8e4f5 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.spvasm.expected.msl @@ -28,7 +28,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { matrix_u[x_11] = 1.0f; { int const x_12 = x; - x = (x_12 - 1); + x = as_type((as_type(x_12) - as_type(1))); } } b = 4; @@ -52,7 +52,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { matrix_b[x_14] = x_67; { int const x_16 = b; - b = (x_16 - 1); + b = as_type((as_type(x_16) - as_type(1))); } } *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl index 3b8cbfcc54..4958a8e4f5 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-matrix/0.wgsl.expected.msl @@ -28,7 +28,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { matrix_u[x_11] = 1.0f; { int const x_12 = x; - x = (x_12 - 1); + x = as_type((as_type(x_12) - as_type(1))); } } b = 4; @@ -52,7 +52,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) { matrix_b[x_14] = x_67; { int const x_16 = b; - b = (x_16 - 1); + b = as_type((as_type(x_16) - as_type(1))); } } *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl index 51c44be9d5..80928888ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.spvasm.expected.msl @@ -40,7 +40,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { { x_34 = x_33; x_34.col = float3(1.0f, 0.0f, 0.0f); - x_7 = (x_9 + 1); + x_7 = as_type((as_type(x_9) + as_type(1))); x_33_phi = x_34; x_9_phi = x_7; } @@ -59,7 +59,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { { x_43 = x_42; x_43.col = float3(1.0f, 0.0f, 0.0f); - x_8 = (x_10 + 1); + x_8 = as_type((as_type(x_10) + as_type(1))); x_42_phi = x_43; x_10_phi = x_8; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl index 51c44be9d5..80928888ad 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-set-struct/0.wgsl.expected.msl @@ -40,7 +40,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { { x_34 = x_33; x_34.col = float3(1.0f, 0.0f, 0.0f); - x_7 = (x_9 + 1); + x_7 = as_type((as_type(x_9) + as_type(1))); x_33_phi = x_34; x_9_phi = x_7; } @@ -59,7 +59,7 @@ void main_1(constant buf0& x_5, thread float4* const tint_symbol_5) { { x_43 = x_42; x_43.col = float3(1.0f, 0.0f, 0.0f); - x_8 = (x_10 + 1); + x_8 = as_type((as_type(x_10) + as_type(1))); x_42_phi = x_43; x_10_phi = x_8; } diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl index afbd08f972..0cb64a4728 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.spvasm.expected.msl @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_11 = GLF_live15i; - GLF_live15i = (x_11 + 1); + GLF_live15i = as_type((as_type(x_11) + as_type(1))); } } GLF_live15d = float4(0.0f, 0.0f, 0.0f, 0.0f); @@ -54,7 +54,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_16 = GLF_live15i_1; - GLF_live15i_1 = (x_16 + 1); + GLF_live15i_1 = as_type((as_type(x_16) + as_type(1))); } } *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl index afbd08f972..0cb64a4728 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-loops-with-break/0-opt.wgsl.expected.msl @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_11 = GLF_live15i; - GLF_live15i = (x_11 + 1); + GLF_live15i = as_type((as_type(x_11) + as_type(1))); } } GLF_live15d = float4(0.0f, 0.0f, 0.0f, 0.0f); @@ -54,7 +54,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_16 = GLF_live15i_1; - GLF_live15i_1 = (x_16 + 1); + GLF_live15i_1 = as_type((as_type(x_16) + as_type(1))); } } *(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f); diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl index 4489a5b990..d76e41a348 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.spvasm.expected.msl @@ -48,19 +48,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } { int const x_70 = i_2; - i_2 = (x_70 + 1); + i_2 = as_type((as_type(x_70) + as_type(1))); } } { int const x_72 = i_1; - i_1 = (x_72 + 1); + i_1 = as_type((as_type(x_72) + as_type(1))); } continue; } return; { int const x_72 = i_1; - i_1 = (x_72 + 1); + i_1 = as_type((as_type(x_72) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl index 4489a5b990..d76e41a348 100644 --- a/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/two-nested-do-whiles/0-opt.wgsl.expected.msl @@ -48,19 +48,19 @@ void main_1(constant buf0& x_7, thread float4* const tint_symbol_5, thread float } { int const x_70 = i_2; - i_2 = (x_70 + 1); + i_2 = as_type((as_type(x_70) + as_type(1))); } } { int const x_72 = i_1; - i_1 = (x_72 + 1); + i_1 = as_type((as_type(x_72) + as_type(1))); } continue; } return; { int const x_72 = i_1; - i_1 = (x_72 + 1); + i_1 = as_type((as_type(x_72) + as_type(1))); } } { diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl index a4f03c0ae4..7138b3ef71 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.spvasm.expected.msl @@ -37,7 +37,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } { int const x_73 = i; - i = (x_73 + 1); + i = as_type((as_type(x_73) + as_type(1))); } } while (true) { @@ -65,12 +65,12 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } { int const x_106 = l; - l = (x_106 + 1); + l = as_type((as_type(x_106) + as_type(1))); } } { int const x_108 = m; - m = (x_108 + 1); + m = as_type((as_type(x_108) + as_type(1))); } } n = 0; @@ -87,7 +87,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } { int const x_124 = n; - n = (x_124 + 1); + n = as_type((as_type(x_124) + as_type(1))); } } } else { diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl index a4f03c0ae4..7138b3ef71 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-barrier-in-loops/0-opt.wgsl.expected.msl @@ -37,7 +37,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } { int const x_73 = i; - i = (x_73 + 1); + i = as_type((as_type(x_73) + as_type(1))); } } while (true) { @@ -65,12 +65,12 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } { int const x_106 = l; - l = (x_106 + 1); + l = as_type((as_type(x_106) + as_type(1))); } } { int const x_108 = m; - m = (x_108 + 1); + m = as_type((as_type(x_108) + as_type(1))); } } n = 0; @@ -87,7 +87,7 @@ void main_1(constant buf1& x_10, constant buf2& x_13, device doesNotMatter& x_15 } { int const x_124 = n; - n = (x_124 + 1); + n = as_type((as_type(x_124) + as_type(1))); } } } else { diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl index 73ff170d47..e65fcde9fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.spvasm.expected.msl @@ -47,7 +47,7 @@ void main_1(thread float4* const tint_symbol_4) { { float3 const x_38 = mand_(); int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl index 73ff170d47..e65fcde9fd 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-discard-statement/0.wgsl.expected.msl @@ -47,7 +47,7 @@ void main_1(thread float4* const tint_symbol_4) { { float3 const x_38 = mand_(); int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl index cc9b3ff154..58160d1e63 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.spvasm.expected.msl @@ -54,7 +54,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl index cc9b3ff154..58160d1e63 100644 --- a/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/unreachable-loops-in-switch/0.wgsl.expected.msl @@ -54,7 +54,7 @@ void main_1(thread float4* const tint_symbol_4) { } { int const x_9 = i; - i = (x_9 + 1); + i = as_type((as_type(x_9) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl index 04778b97f8..7da427321c 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.spvasm.expected.msl @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_4) { return; { int const x_7 = i; - i = (x_7 + 1); + i = as_type((as_type(x_7) + as_type(1))); x_37_phi = false; x_9_phi = 0; } diff --git a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl index 04778b97f8..7da427321c 100644 --- a/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/uv-value-comparison-as-boolean/0.wgsl.expected.msl @@ -32,7 +32,7 @@ void main_1(thread float4* const tint_symbol_4) { return; { int const x_7 = i; - i = (x_7 + 1); + i = as_type((as_type(x_7) + as_type(1))); x_37_phi = false; x_9_phi = 0; } diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl index 282221c8e2..58c2140023 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.spvasm.expected.msl @@ -42,7 +42,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { while (true) { int const x_102 = i; float const x_104 = x_10.injectionSwitch.y; - if ((x_102 < (int(x_104) + 1))) { + if ((x_102 < as_type((as_type(int(x_104)) + as_type(1))))) { } else { break; } @@ -50,7 +50,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { value.x = float(x_109); { int const x_112 = i; - i = (x_112 + 1); + i = as_type((as_type(x_112) + as_type(1))); } } float const x_115 = value.x; @@ -78,16 +78,16 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa while (true) { int const x_51 = i_1; float const x_53 = x_10.injectionSwitch.y; - if ((x_51 < (int(x_53) + 1))) { + if ((x_51 < as_type((as_type(int(x_53)) + as_type(1))))) { } else { break; } float const x_58 = func_(x_10, tint_symbol_6); int const x_60 = count; - count = (x_60 + int(x_58)); + count = as_type((as_type(x_60) + as_type(int(x_58)))); { int const x_62 = i_1; - i_1 = (x_62 + 1); + i_1 = as_type((as_type(x_62) + as_type(1))); } } int const x_64 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl index 282221c8e2..58c2140023 100644 --- a/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/vector-values-multiplied-by-fragcoord/0-opt.wgsl.expected.msl @@ -42,7 +42,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { while (true) { int const x_102 = i; float const x_104 = x_10.injectionSwitch.y; - if ((x_102 < (int(x_104) + 1))) { + if ((x_102 < as_type((as_type(int(x_104)) + as_type(1))))) { } else { break; } @@ -50,7 +50,7 @@ float func_(constant buf0& x_10, thread float4* const tint_symbol_5) { value.x = float(x_109); { int const x_112 = i; - i = (x_112 + 1); + i = as_type((as_type(x_112) + as_type(1))); } } float const x_115 = value.x; @@ -78,16 +78,16 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_6, thread floa while (true) { int const x_51 = i_1; float const x_53 = x_10.injectionSwitch.y; - if ((x_51 < (int(x_53) + 1))) { + if ((x_51 < as_type((as_type(int(x_53)) + as_type(1))))) { } else { break; } float const x_58 = func_(x_10, tint_symbol_6); int const x_60 = count; - count = (x_60 + int(x_58)); + count = as_type((as_type(x_60) + as_type(int(x_58)))); { int const x_62 = i_1; - i_1 = (x_62 + 1); + i_1 = as_type((as_type(x_62) + as_type(1))); } } int const x_64 = count; diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl index 0536ebcaf5..1c6f19b6ab 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl @@ -39,7 +39,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { break; } int const x_20 = ll_1; - ll_1 = (x_20 + 1); + ll_1 = as_type((as_type(x_20) + as_type(1))); int const x_22 = x_9.injected; z = x_22; ll_2 = 0; @@ -56,7 +56,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { break; } int const x_26 = ll_2; - ll_2 = (x_26 + 1); + ll_2 = as_type((as_type(x_26) + as_type(1))); float4x3 const x_98 = m43; tempm43 = x_98; ll_3 = 0; @@ -77,7 +77,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { tempm43[select(0, x_31, ((x_29 >= 0) & (x_30 < 4)))][select(0, x_34, ((x_32 >= 0) & (x_33 < 3)))] = 1.0f; { int const x_35 = c; - c = (x_35 + 1); + c = as_type((as_type(x_35) + as_type(1))); } } int const x_37 = idx; @@ -90,11 +90,11 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { GLF_live6sums.arr[x_117] = (x_121 + x_119); { int const x_41 = ctr; - ctr = (x_41 + 1); + ctr = as_type((as_type(x_41) + as_type(1))); } } int const x_43 = idx; - idx = (x_43 + 1); + idx = as_type((as_type(x_43) + as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl index aa5c43e802..cbdb09fa3b 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.wgsl.expected.msl @@ -39,7 +39,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { break; } int const x_20 = ll_1; - ll_1 = (x_20 + 1); + ll_1 = as_type((as_type(x_20) + as_type(1))); int const x_22 = x_9.injected; z = x_22; ll_2 = 0; @@ -56,7 +56,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { break; } int const x_26 = ll_2; - ll_2 = (x_26 + 1); + ll_2 = as_type((as_type(x_26) + as_type(1))); float4x3 const x_98 = m43; tempm43 = x_98; ll_3 = 0; @@ -77,7 +77,7 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { tempm43[select(0, x_31, ((x_29 >= 0) && (x_30 < 4)))][select(0, x_34, ((x_32 >= 0) && (x_33 < 3)))] = 1.0f; { int const x_35 = c; - c = (x_35 + 1); + c = as_type((as_type(x_35) + as_type(1))); } } int const x_37 = idx; @@ -90,11 +90,11 @@ void main_1(constant buf0& x_9, thread float4* const tint_symbol_4) { GLF_live6sums.arr[x_117] = (x_121 + x_119); { int const x_41 = ctr; - ctr = (x_41 + 1); + ctr = as_type((as_type(x_41) + as_type(1))); } } int const x_43 = idx; - idx = (x_43 + 1); + idx = as_type((as_type(x_43) + as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl index ff8271add4..6ef3d6fedf 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl @@ -244,13 +244,13 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ BST const x_239 = param_8; (*(tint_symbol_9)).arr[0] = x_239; int const x_113 = treeIndex_1; - treeIndex_1 = (x_113 + 1); + treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 5; insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_9); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); GLF_live1_looplimiter2 = 0; GLF_live1i = 0; while (true) { @@ -263,10 +263,10 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ break; } int const x_119 = GLF_live1_looplimiter2; - GLF_live1_looplimiter2 = (x_119 + 1); + GLF_live1_looplimiter2 = as_type((as_type(x_119) + as_type(1))); { int const x_121 = GLF_live1i; - GLF_live1i = (x_121 + 1); + GLF_live1i = as_type((as_type(x_121) + as_type(1))); } } int const x_123 = treeIndex_1; @@ -274,37 +274,37 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ param_13 = 12; insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_9); int const x_124 = treeIndex_1; - treeIndex_1 = (x_124 + 1); + treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_14 = x_126; param_15 = 15; insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_9); int const x_127 = treeIndex_1; - treeIndex_1 = (x_127 + 1); + treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_16 = x_129; param_17 = 7; insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_9); int const x_130 = treeIndex_1; - treeIndex_1 = (x_130 + 1); + treeIndex_1 = as_type((as_type(x_130) + as_type(1))); int const x_132 = treeIndex_1; param_18 = x_132; param_19 = 8; insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_9); int const x_133 = treeIndex_1; - treeIndex_1 = (x_133 + 1); + treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 2; insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_9); int const x_136 = treeIndex_1; - treeIndex_1 = (x_136 + 1); + treeIndex_1 = as_type((as_type(x_136) + as_type(1))); int const x_138 = treeIndex_1; param_22 = x_138; param_23 = 6; insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_9); int const x_139 = treeIndex_1; - treeIndex_1 = (x_139 + 1); + treeIndex_1 = as_type((as_type(x_139) + as_type(1))); GLF_live4_looplimiter3 = 0; GLF_live4i = 0; while (true) { @@ -317,7 +317,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ break; } int const x_142 = GLF_live4_looplimiter3; - GLF_live4_looplimiter3 = (x_142 + 1); + GLF_live4_looplimiter3 = as_type((as_type(x_142) + as_type(1))); GLF_live4index = 1; int const x_144 = GLF_live4index; int const x_145 = GLF_live4index; @@ -330,7 +330,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ GLF_live4obj.even_numbers.arr[select(0, x_149, ((x_147 >= 0) & (x_148 < 10)))] = 1.0f; { int const x_150 = GLF_live4i; - GLF_live4i = (x_150 + 1); + GLF_live4i = as_type((as_type(x_150) + as_type(1))); } } int const x_152 = treeIndex_1; @@ -343,7 +343,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ return; } int const x_153 = treeIndex_1; - treeIndex_1 = (x_153 + 1); + treeIndex_1 = as_type((as_type(x_153) + as_type(1))); int const x_155 = treeIndex_1; param_26 = x_155; param_27 = 13; @@ -381,7 +381,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } case -1: { int const x_161 = sum; - sum = (x_161 + 1); + sum = as_type((as_type(x_161) + as_type(1))); break; } default: { @@ -391,7 +391,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } { int const x_163 = target_1; - target_1 = (x_163 + 1); + target_1 = as_type((as_type(x_163) + as_type(1))); } } float const x_307 = x_1; diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl index 10ddae2a75..fae9d9d465 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.wgsl.expected.msl @@ -244,13 +244,13 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ BST const x_239 = param_8; (*(tint_symbol_9)).arr[0] = x_239; int const x_113 = treeIndex_1; - treeIndex_1 = (x_113 + 1); + treeIndex_1 = as_type((as_type(x_113) + as_type(1))); int const x_115 = treeIndex_1; param_10 = x_115; param_11 = 5; insert_i1_i1_(x_27, &(param_10), &(param_11), tint_symbol_9); int const x_116 = treeIndex_1; - treeIndex_1 = (x_116 + 1); + treeIndex_1 = as_type((as_type(x_116) + as_type(1))); GLF_live1_looplimiter2 = 0; GLF_live1i = 0; while (true) { @@ -263,10 +263,10 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ break; } int const x_119 = GLF_live1_looplimiter2; - GLF_live1_looplimiter2 = (x_119 + 1); + GLF_live1_looplimiter2 = as_type((as_type(x_119) + as_type(1))); { int const x_121 = GLF_live1i; - GLF_live1i = (x_121 + 1); + GLF_live1i = as_type((as_type(x_121) + as_type(1))); } } int const x_123 = treeIndex_1; @@ -274,37 +274,37 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ param_13 = 12; insert_i1_i1_(x_27, &(param_12), &(param_13), tint_symbol_9); int const x_124 = treeIndex_1; - treeIndex_1 = (x_124 + 1); + treeIndex_1 = as_type((as_type(x_124) + as_type(1))); int const x_126 = treeIndex_1; param_14 = x_126; param_15 = 15; insert_i1_i1_(x_27, &(param_14), &(param_15), tint_symbol_9); int const x_127 = treeIndex_1; - treeIndex_1 = (x_127 + 1); + treeIndex_1 = as_type((as_type(x_127) + as_type(1))); int const x_129 = treeIndex_1; param_16 = x_129; param_17 = 7; insert_i1_i1_(x_27, &(param_16), &(param_17), tint_symbol_9); int const x_130 = treeIndex_1; - treeIndex_1 = (x_130 + 1); + treeIndex_1 = as_type((as_type(x_130) + as_type(1))); int const x_132 = treeIndex_1; param_18 = x_132; param_19 = 8; insert_i1_i1_(x_27, &(param_18), &(param_19), tint_symbol_9); int const x_133 = treeIndex_1; - treeIndex_1 = (x_133 + 1); + treeIndex_1 = as_type((as_type(x_133) + as_type(1))); int const x_135 = treeIndex_1; param_20 = x_135; param_21 = 2; insert_i1_i1_(x_27, &(param_20), &(param_21), tint_symbol_9); int const x_136 = treeIndex_1; - treeIndex_1 = (x_136 + 1); + treeIndex_1 = as_type((as_type(x_136) + as_type(1))); int const x_138 = treeIndex_1; param_22 = x_138; param_23 = 6; insert_i1_i1_(x_27, &(param_22), &(param_23), tint_symbol_9); int const x_139 = treeIndex_1; - treeIndex_1 = (x_139 + 1); + treeIndex_1 = as_type((as_type(x_139) + as_type(1))); GLF_live4_looplimiter3 = 0; GLF_live4i = 0; while (true) { @@ -317,7 +317,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ break; } int const x_142 = GLF_live4_looplimiter3; - GLF_live4_looplimiter3 = (x_142 + 1); + GLF_live4_looplimiter3 = as_type((as_type(x_142) + as_type(1))); GLF_live4index = 1; int const x_144 = GLF_live4index; int const x_145 = GLF_live4index; @@ -330,7 +330,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ GLF_live4obj.even_numbers.arr[select(0, x_149, ((x_147 >= 0) && (x_148 < 10)))] = 1.0f; { int const x_150 = GLF_live4i; - GLF_live4i = (x_150 + 1); + GLF_live4i = as_type((as_type(x_150) + as_type(1))); } } int const x_152 = treeIndex_1; @@ -343,7 +343,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ return; } int const x_153 = treeIndex_1; - treeIndex_1 = (x_153 + 1); + treeIndex_1 = as_type((as_type(x_153) + as_type(1))); int const x_155 = treeIndex_1; param_26 = x_155; param_27 = 13; @@ -381,7 +381,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } case -1: { int const x_161 = sum; - sum = (x_161 + 1); + sum = as_type((as_type(x_161) + as_type(1))); break; } default: { @@ -391,7 +391,7 @@ void main_1(constant buf0& x_27, thread tint_array_wrapper_1* const tint_symbol_ } { int const x_163 = target_1; - target_1 = (x_163 + 1); + target_1 = as_type((as_type(x_163) + as_type(1))); } } float const x_307 = x_1; diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl index 534ff4cba0..970164540b 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl @@ -38,7 +38,7 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_17 = ll1; - ll1 = (x_17 + 1); + ll1 = as_type((as_type(x_17) + as_type(1))); ll4 = 10; ll2 = 0; c = 0; @@ -53,7 +53,7 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_21 = ll2; - ll2 = (x_21 + 1); + ll2 = as_type((as_type(x_21) + as_type(1))); float4x3 const x_92 = m43; tempm43 = x_92; ll3 = 0; @@ -73,7 +73,7 @@ void main_1(thread float4* const tint_symbol_4) { tempm43[select(0, x_26, ((x_24 >= 0) & (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) & (x_28 < 3)))] = 1.0f; { int const x_30 = d; - d = (x_30 + 1); + d = as_type((as_type(x_30) + as_type(1))); } } int const x_32 = idx; @@ -86,11 +86,11 @@ void main_1(thread float4* const tint_symbol_4) { sums.arr[x_111] = (x_115 + x_113); { int const x_36 = c; - c = (x_36 + 1); + c = as_type((as_type(x_36) + as_type(1))); } } int const x_38 = idx; - idx = (x_38 + 1); + idx = as_type((as_type(x_38) + as_type(1))); } return; } diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl index 2070937b5d..4900c8c983 100644 --- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.wgsl.expected.msl @@ -38,7 +38,7 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_17 = ll1; - ll1 = (x_17 + 1); + ll1 = as_type((as_type(x_17) + as_type(1))); ll4 = 10; ll2 = 0; c = 0; @@ -53,7 +53,7 @@ void main_1(thread float4* const tint_symbol_4) { break; } int const x_21 = ll2; - ll2 = (x_21 + 1); + ll2 = as_type((as_type(x_21) + as_type(1))); float4x3 const x_92 = m43; tempm43 = x_92; ll3 = 0; @@ -73,7 +73,7 @@ void main_1(thread float4* const tint_symbol_4) { tempm43[select(0, x_26, ((x_24 >= 0) && (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) && (x_28 < 3)))] = 1.0f; { int const x_30 = d; - d = (x_30 + 1); + d = as_type((as_type(x_30) + as_type(1))); } } int const x_32 = idx; @@ -86,11 +86,11 @@ void main_1(thread float4* const tint_symbol_4) { sums.arr[x_111] = (x_115 + x_113); { int const x_36 = c; - c = (x_36 + 1); + c = as_type((as_type(x_36) + as_type(1))); } } int const x_38 = idx; - idx = (x_38 + 1); + idx = as_type((as_type(x_38) + as_type(1))); } return; } diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl index be9d4565d7..d0db5166f2 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.spvasm.expected.msl @@ -60,9 +60,9 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c int const x_86 = x_17.data_in1.arr[(x_81 + as_type(x_82))]; x_15.data_out0.arr[(x_77 + as_type(x_78))] = x_86; int const x_88 = index_out0; - index_out0 = (x_88 - 1); + index_out0 = as_type((as_type(x_88) - as_type(1))); int const x_90 = index_in1; - index_in1 = (x_90 - 1); + index_in1 = as_type((as_type(x_90) - as_type(1))); } else { uint const x_92 = base_index_out; int const x_93 = index_out1; @@ -71,14 +71,14 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c int const x_101 = x_19.data_in0.arr[(x_96 + as_type(x_97))]; x_15.data_out0.arr[(x_92 + as_type(x_93))] = x_101; int const x_103 = index_out1; - index_out1 = (x_103 - 1); + index_out1 = as_type((as_type(x_103) - as_type(1))); int const x_105 = index_in1; - index_in1 = (x_105 - 1); + index_in1 = as_type((as_type(x_105) - as_type(1))); } int const x_107 = condition_index; - int const x_110 = x_13.data_in2.arr[(x_107 + 1)]; + int const x_110 = x_13.data_in2.arr[as_type((as_type(x_107) + as_type(1)))]; int const x_111 = condition_index; - condition_index = (x_111 + x_110); + condition_index = as_type((as_type(x_111) + as_type(x_110))); int const x_113 = index_in0; temp0 = x_113; int const x_114 = index_in1; @@ -93,7 +93,7 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c index_out1 = x_118; { int const x_119 = i; - i = (x_119 + 1); + i = as_type((as_type(x_119) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl index be9d4565d7..d0db5166f2 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_overflow/0-opt.wgsl.expected.msl @@ -60,9 +60,9 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c int const x_86 = x_17.data_in1.arr[(x_81 + as_type(x_82))]; x_15.data_out0.arr[(x_77 + as_type(x_78))] = x_86; int const x_88 = index_out0; - index_out0 = (x_88 - 1); + index_out0 = as_type((as_type(x_88) - as_type(1))); int const x_90 = index_in1; - index_in1 = (x_90 - 1); + index_in1 = as_type((as_type(x_90) - as_type(1))); } else { uint const x_92 = base_index_out; int const x_93 = index_out1; @@ -71,14 +71,14 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c int const x_101 = x_19.data_in0.arr[(x_96 + as_type(x_97))]; x_15.data_out0.arr[(x_92 + as_type(x_93))] = x_101; int const x_103 = index_out1; - index_out1 = (x_103 - 1); + index_out1 = as_type((as_type(x_103) - as_type(1))); int const x_105 = index_in1; - index_in1 = (x_105 - 1); + index_in1 = as_type((as_type(x_105) - as_type(1))); } int const x_107 = condition_index; - int const x_110 = x_13.data_in2.arr[(x_107 + 1)]; + int const x_110 = x_13.data_in2.arr[as_type((as_type(x_107) + as_type(1)))]; int const x_111 = condition_index; - condition_index = (x_111 + x_110); + condition_index = as_type((as_type(x_111) + as_type(x_110))); int const x_113 = index_in0; temp0 = x_113; int const x_114 = index_in1; @@ -93,7 +93,7 @@ void main_1(const device In2& x_13, const device In1& x_17, device Out0& x_15, c index_out1 = x_118; { int const x_119 = i; - i = (x_119 + 1); + i = as_type((as_type(x_119) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl index 734a346dfa..5063da4c8b 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.spvasm.expected.msl @@ -60,9 +60,9 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c int const x_84 = x_17.data_in0.arr[(x_79 + as_type(x_80))]; x_15.data_out0.arr[(x_75 + as_type(x_76))] = x_84; int const x_86 = index_out0; - index_out0 = (x_86 + 1); + index_out0 = as_type((as_type(x_86) + as_type(1))); int const x_88 = index_in1; - index_in1 = (x_88 + 1); + index_in1 = as_type((as_type(x_88) + as_type(1))); } else { uint const x_90 = base_index_out; int const x_91 = index_out1; @@ -71,14 +71,14 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c int const x_99 = x_19.data_in1.arr[(x_94 + as_type(x_95))]; x_15.data_out0.arr[(x_90 + as_type(x_91))] = x_99; int const x_101 = index_out1; - index_out1 = (x_101 + 1); + index_out1 = as_type((as_type(x_101) + as_type(1))); int const x_103 = index_in1; - index_in1 = (x_103 + 1); + index_in1 = as_type((as_type(x_103) + as_type(1))); } int const x_105 = condition_index; - int const x_108 = x_13.data_in2.arr[(x_105 + 1)]; + int const x_108 = x_13.data_in2.arr[as_type((as_type(x_105) + as_type(1)))]; int const x_109 = condition_index; - condition_index = (x_109 + x_108); + condition_index = as_type((as_type(x_109) + as_type(x_108))); int const x_111 = index_in0; temp0 = x_111; int const x_112 = index_in1; @@ -93,7 +93,7 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c index_out1 = x_116; { int const x_117 = i; - i = (x_117 + 1); + i = as_type((as_type(x_117) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl index 734a346dfa..5063da4c8b 100644 --- a/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/non_robust_buffer_access/unexecuted_oob_underflow/0-opt.wgsl.expected.msl @@ -60,9 +60,9 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c int const x_84 = x_17.data_in0.arr[(x_79 + as_type(x_80))]; x_15.data_out0.arr[(x_75 + as_type(x_76))] = x_84; int const x_86 = index_out0; - index_out0 = (x_86 + 1); + index_out0 = as_type((as_type(x_86) + as_type(1))); int const x_88 = index_in1; - index_in1 = (x_88 + 1); + index_in1 = as_type((as_type(x_88) + as_type(1))); } else { uint const x_90 = base_index_out; int const x_91 = index_out1; @@ -71,14 +71,14 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c int const x_99 = x_19.data_in1.arr[(x_94 + as_type(x_95))]; x_15.data_out0.arr[(x_90 + as_type(x_91))] = x_99; int const x_101 = index_out1; - index_out1 = (x_101 + 1); + index_out1 = as_type((as_type(x_101) + as_type(1))); int const x_103 = index_in1; - index_in1 = (x_103 + 1); + index_in1 = as_type((as_type(x_103) + as_type(1))); } int const x_105 = condition_index; - int const x_108 = x_13.data_in2.arr[(x_105 + 1)]; + int const x_108 = x_13.data_in2.arr[as_type((as_type(x_105) + as_type(1)))]; int const x_109 = condition_index; - condition_index = (x_109 + x_108); + condition_index = as_type((as_type(x_109) + as_type(x_108))); int const x_111 = index_in0; temp0 = x_111; int const x_112 = index_in1; @@ -93,7 +93,7 @@ void main_1(const device In2& x_13, const device In0& x_17, device Out0& x_15, c index_out1 = x_116; { int const x_117 = i; - i = (x_117 + 1); + i = as_type((as_type(x_117) + as_type(1))); } } return; diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl index d7828a3b2b..d0c4825f35 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.spvasm.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct S { /* 0x0000 */ uint field0[1]; }; @@ -8,7 +13,7 @@ struct S { void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_2) { uint const x_20 = (*(tint_symbol_2)).x; uint const x_22 = x_5.field0[x_20]; - x_6.field0[x_20] = as_type(-(as_type(x_22))); + x_6.field0[x_20] = as_type(tint_unary_minus(as_type(x_22))); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl index d7828a3b2b..d0c4825f35 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/compute/signed_op/uint_snegate/0-opt.wgsl.expected.msl @@ -1,6 +1,11 @@ #include using namespace metal; + +int tint_unary_minus(const int v) { + return select(-v, v, v == -2147483648); +} + struct S { /* 0x0000 */ uint field0[1]; }; @@ -8,7 +13,7 @@ struct S { void main_1(device S& x_5, device S& x_6, thread uint3* const tint_symbol_2) { uint const x_20 = (*(tint_symbol_2)).x; uint const x_22 = x_5.field0[x_20]; - x_6.field0[x_20] = as_type(-(as_type(x_22))); + x_6.field0[x_20] = as_type(tint_unary_minus(as_type(x_22))); return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl index 88c8f1c3cd..7f6fbb6f6e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.spvasm.expected.msl @@ -17,7 +17,7 @@ void main_1(thread int* const tint_symbol_6, thread float4* const tint_symbol_7, int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); int const x_33 = *(tint_symbol_8); - if (((((x_27 & 1) + (x_28 & 1)) + x_33) == int(x_23.z))) { + if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } tint_symbol_9.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28))); return; diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl index 88c8f1c3cd..7f6fbb6f6e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_image_store/1.wgsl.expected.msl @@ -17,7 +17,7 @@ void main_1(thread int* const tint_symbol_6, thread float4* const tint_symbol_7, int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); int const x_33 = *(tint_symbol_8); - if (((((x_27 & 1) + (x_28 & 1)) + x_33) == int(x_23.z))) { + if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } tint_symbol_9.write(int4(x_27, 0, 0, 0), uint2(int2(x_27, x_28))); return; diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl index a72a5095c5..a50bd6e24f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.spvasm.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_3 { void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { float4 const x_16 = *(tint_symbol_6); int const x_26 = *(tint_symbol_7); - if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_26) == int(x_16.z))) { + if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } *(tint_symbol_8) = 1; return; diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl index a72a5095c5..a50bd6e24f 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/1.wgsl.expected.msl @@ -14,7 +14,7 @@ struct tint_symbol_3 { void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, thread int* const tint_symbol_8) { float4 const x_16 = *(tint_symbol_6); int const x_26 = *(tint_symbol_7); - if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_26) == int(x_16.z))) { + if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } *(tint_symbol_8) = 1; return; diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl index 06facd98fc..5a727de487 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.spvasm.expected.msl @@ -15,7 +15,7 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, float4 const x_16 = *(tint_symbol_6); int const x_26 = *(tint_symbol_7); *(tint_symbol_8) = 1; - if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_26) == int(x_16.z))) { + if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl index 06facd98fc..5a727de487 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write_before_terminate/1.wgsl.expected.msl @@ -15,7 +15,7 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, float4 const x_16 = *(tint_symbol_6); int const x_26 = *(tint_symbol_7); *(tint_symbol_8) = 1; - if (((((int(x_16.x) & 1) + (int(x_16.y) & 1)) + x_26) == int(x_16.z))) { + if ((as_type((as_type(as_type((as_type((int(x_16.x) & 1)) + as_type((int(x_16.y) & 1))))) + as_type(x_26))) == int(x_16.z))) { } return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl index bf23c884e6..b8e78d874e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.spvasm.expected.msl @@ -20,9 +20,9 @@ void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); int const x_33 = *(tint_symbol_8); - if (((((x_27 & 1) + (x_28 & 1)) + x_33) == int(x_23.z))) { + if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } - x_5.field0[(x_27 + (x_28 * 8))] = x_27; + x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl index bf23c884e6..b8e78d874e 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_ssbo_store/1.wgsl.expected.msl @@ -20,9 +20,9 @@ void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); int const x_33 = *(tint_symbol_8); - if (((((x_27 & 1) + (x_28 & 1)) + x_33) == int(x_23.z))) { + if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } - x_5.field0[(x_27 + (x_28 * 8))] = x_27; + x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl index 893315ff6d..59d9bdb993 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.spvasm.expected.msl @@ -20,8 +20,8 @@ void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); int const x_33 = *(tint_symbol_8); - x_5.field0[(x_27 + (x_28 * 8))] = x_27; - if (((((x_27 & 1) + (x_28 & 1)) + x_33) == int(x_23.z))) { + x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; + if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl index 893315ff6d..59d9bdb993 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/ssbo_store_before_terminate/1.wgsl.expected.msl @@ -20,8 +20,8 @@ void main_1(device S& x_5, thread int* const tint_symbol_6, thread float4* const int const x_27 = int(x_23.x); int const x_28 = int(x_23.y); int const x_33 = *(tint_symbol_8); - x_5.field0[(x_27 + (x_28 * 8))] = x_27; - if (((((x_27 & 1) + (x_28 & 1)) + x_33) == int(x_23.z))) { + x_5.field0[as_type((as_type(x_27) + as_type(as_type((as_type(x_28) * as_type(8))))))] = x_27; + if ((as_type((as_type(as_type((as_type((x_27 & 1)) + as_type((x_28 & 1))))) + as_type(x_33))) == int(x_23.z))) { } return; } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl index 27b481f4a2..2715be4c3d 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.spvasm.expected.msl @@ -16,7 +16,7 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, float4 const x_18 = *(tint_symbol_6); int const x_28 = *(tint_symbol_7); x_33_phi = 0; - if (((((int(x_18.x) & 1) + (int(x_18.y) & 1)) + x_28) == int(x_18.z))) { + if ((as_type((as_type(as_type((as_type((int(x_18.x) & 1)) + as_type((int(x_18.y) & 1))))) + as_type(x_28))) == int(x_18.z))) { while (true) { int x_34 = 0; int const x_33 = x_33_phi; @@ -25,7 +25,7 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, break; } { - x_34 = (x_33 + 1); + x_34 = as_type((as_type(x_33) + as_type(1))); x_33_phi = x_34; } } diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl index 27b481f4a2..2715be4c3d 100644 --- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl +++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/terminate_loop/1.wgsl.expected.msl @@ -16,7 +16,7 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, float4 const x_18 = *(tint_symbol_6); int const x_28 = *(tint_symbol_7); x_33_phi = 0; - if (((((int(x_18.x) & 1) + (int(x_18.y) & 1)) + x_28) == int(x_18.z))) { + if ((as_type((as_type(as_type((as_type((int(x_18.x) & 1)) + as_type((int(x_18.y) & 1))))) + as_type(x_28))) == int(x_18.z))) { while (true) { int x_34 = 0; int const x_33 = x_33_phi; @@ -25,7 +25,7 @@ void main_1(thread float4* const tint_symbol_6, thread int* const tint_symbol_7, break; } { - x_34 = (x_33 + 1); + x_34 = as_type((as_type(x_33) + as_type(1))); x_33_phi = x_34; } }