MSL writer: make signed int overflow defined behaviour
Bug: tint:124
Change-Id: Icf545b633d6390ceb7f639e80111390005e311a1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60100
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: David Neto <dneto@google.com>
diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc
index c5220a0..3508276 100644
--- a/src/writer/msl/generator_impl.cc
+++ b/src/writer/msl/generator_impl.cc
@@ -17,6 +17,7 @@
#include <algorithm>
#include <cmath>
#include <iomanip>
+#include <limits>
#include <utility>
#include <vector>
@@ -74,6 +75,32 @@
stmts->last()->Is<ast::FallthroughStatement>();
}
+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<sem::Vector>();
+
+ // 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) {}
@@ -226,8 +253,104 @@
}
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<sem::I32>();
+ } else if (auto* v = ty->As<sem::Vector>()) {
+ return builder_.create<sem::Vector>(builder_.create<sem::I32>(),
+ v->Width());
+ }
+ return {};
+ };
+
+ auto unsigned_type_of = [&](const sem::Type* ty) -> const sem::Type* {
+ if (ty->is_integer_scalar()) {
+ return builder_.create<sem::U32>();
+ } else if (auto* v = ty->As<sem::Vector>()) {
+ return builder_.create<sem::Vector>(builder_.create<sem::U32>(),
+ 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())) {
@@ -240,80 +363,75 @@
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<sem::Vector>()
+ ? lhs_type
+ : (rhs_type->Is<sem::Vector>() ? 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;
}
@@ -2327,6 +2445,53 @@
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<int32_t>::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 899025b..6a4efb7 100644
--- a/src/writer/msl/generator_impl.h
+++ b/src/writer/msl/generator_impl.h
@@ -356,6 +356,7 @@
bool has_invariant_ = false;
std::unordered_map<const sem::Intrinsic*, std::string> intrinsics_;
+ std::unordered_map<const sem::Type*, std::string> 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 e228516..4b460dc 100644
--- a/src/writer/msl/generator_impl_binary_test.cc
+++ b/src/writer/msl/generator_impl_binary_test.cc
@@ -74,6 +74,85 @@
BinaryData{"(left / right)", ast::BinaryOp::kDivide},
BinaryData{"(left % right)", ast::BinaryOp::kModulo}));
+using MslBinaryTest_SignedOverflowDefinedBehaviour =
+ TestParamHelper<BinaryData>;
+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<ast::Type*>(ty.u32())
+ : ty.i32();
+
+ auto* a = Var("a", a_type);
+ auto* b = Var("b", b_type);
+
+ auto* expr = create<ast::BinaryExpression>(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<int>((as_type<uint>(a) << b))", Op::kShiftLeft},
+ {"(a >> b)", Op::kShiftRight},
+ {"as_type<int>((as_type<uint>(a) + as_type<uint>(b)))", Op::kAdd},
+ {"as_type<int>((as_type<uint>(a) - as_type<uint>(b)))", Op::kSubtract},
+ {"as_type<int>((as_type<uint>(a) * as_type<uint>(b)))", Op::kMultiply}};
+INSTANTIATE_TEST_SUITE_P(
+ MslGeneratorImplTest,
+ MslBinaryTest_SignedOverflowDefinedBehaviour,
+ testing::ValuesIn(signed_overflow_defined_behaviour_cases));
+
+using MslBinaryTest_SignedOverflowDefinedBehaviour_Chained =
+ TestParamHelper<BinaryData>;
+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<ast::Type*>(ty.u32())
+ : ty.i32();
+
+ auto* a = Var("a", a_type);
+ auto* b = Var("b", b_type);
+
+ auto* expr1 = create<ast::BinaryExpression>(params.op, Expr(a), Expr(b));
+ auto* expr2 = create<ast::BinaryExpression>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(a) << b))) << "
+ "b))",
+ Op::kShiftLeft},
+ {"((a >> b) >> b)", Op::kShiftRight},
+ {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) + "
+ "as_type<uint>(b)))) + as_type<uint>(b)))",
+ Op::kAdd},
+ {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) - "
+ "as_type<uint>(b)))) - as_type<uint>(b)))",
+ Op::kSubtract},
+ {"as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) * "
+ "as_type<uint>(b)))) * as_type<uint>(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 80c07f2..b2b718b 100644
--- a/src/writer/msl/generator_impl_intrinsic_test.cc
+++ b/src/writer/msl/generator_impl_intrinsic_test.cc
@@ -360,7 +360,7 @@
using namespace metal;
int f(int a, int b, int c) {
- return ((a + b) * c);
+ return as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(a) + as_type<uint>(b)))) * as_type<uint>(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 178df07..4c6bcf7 100644
--- a/src/writer/msl/generator_impl_loop_test.cc
+++ b/src/writer/msl/generator_impl_loop_test.cc
@@ -259,7 +259,7 @@
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<int>((as_type<uint>(i) + as_type<uint>(1)))) {
a_statement();
}
)");
@@ -310,7 +310,7 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 9254494..3374e3e 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 @@
std::stringstream out;
ASSERT_TRUE(gen.EmitExpression(out, op)) << gen.error();
- EXPECT_EQ(out.str(), "-(expr)");
+ EXPECT_EQ(out.str(), "tint_unary_minus(expr)");
}
} // namespace
diff --git a/test/array/type_constructor.wgsl.expected.msl b/test/array/type_constructor.wgsl.expected.msl
index 8de420b..c7c48ac 100644
--- a/test/array/type_constructor.wgsl.expected.msl
+++ b/test/array/type_constructor.wgsl.expected.msl
@@ -18,7 +18,7 @@
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<int>((as_type<uint>(x) + as_type<uint>(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 @@
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<int>((as_type<uint>(x) + as_type<uint>(1)))}};
+ tint_array_wrapper const tint_symbol_10 = {.arr={5, 6, nonempty.arr[2], as_type<int>((as_type<uint>(nonempty.arr[3]) + as_type<uint>(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<int>((as_type<uint>(x) + as_type<uint>(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 @@
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<int>((as_type<uint>(x) + as_type<uint>(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 2ab266f..1e1cbee 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<int>((as_type<uint>(i) + as_type<uint>(1)))) {
(*(tint_symbol_1))[i] = 1.0f;
(*(tint_symbol_2))[i] = 1;
(*(tint_symbol_3))[i] = 1u;
@@ -15,7 +15,7 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 44a4fa0..ec498ee 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 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 b622316..eb3e7d2 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 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 4c124ca..9b58f40 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 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 2113ef6..fa9d188 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 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 356f44d..c363fc7 100644
--- a/test/bug/tint/534.wgsl.expected.msl
+++ b/test/bug/tint/534.wgsl.expected.msl
@@ -20,7 +20,7 @@
int2 dstTexCoord = int2(GlobalInvocationID.xy);
int2 srcTexCoord = dstTexCoord;
if ((uniforms.dstTextureFlipY == 1u)) {
- srcTexCoord.y = ((size.y - dstTexCoord.y) - 1);
+ srcTexCoord.y = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(size.y) - as_type<uint>(dstTexCoord.y)))) - as_type<uint>(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 b11eedc..51883a6 100644
--- a/test/bug/tint/749.spvasm.expected.msl
+++ b/test/bug/tint/749.spvasm.expected.msl
@@ -152,7 +152,7 @@
int const x_959 = *(l);
*(l) = 0;
*(l) = x_959;
- i_1 = (x_45 - as_type<int>(1u));
+ i_1 = as_type<int>((as_type<uint>(x_45) - as_type<uint>(as_type<int>(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 const x_968 = param;
param = 0;
param = x_968;
- if ((x_55 <= (x_56 - as_type<int>(1u)))) {
+ if ((x_55 <= as_type<int>((as_type<uint>(x_56) - as_type<uint>(as_type<int>(1u)))))) {
} else {
break;
}
@@ -242,7 +242,7 @@
int const x_979 = param;
param = 0;
param = x_979;
- i_1 = (x_67 + as_type<int>(1u));
+ i_1 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(as_type<int>(1u))));
int const x_980 = *(l);
*(l) = 0;
*(l) = x_980;
@@ -290,7 +290,7 @@
int const x_990 = param;
param = 0;
param = x_990;
- j_1 = (1 + x_74);
+ j_1 = as_type<int>((as_type<uint>(1) + as_type<uint>(x_74)));
int const x_991 = param_1;
param_1 = 0;
param_1 = x_991;
@@ -313,7 +313,7 @@
int const x_995 = *(h);
*(h) = 0;
*(h) = x_995;
- i_1 = (1 + x_76);
+ i_1 = as_type<int>((as_type<uint>(1) + as_type<uint>(x_76)));
int const x_996 = param_1;
param_1 = 0;
param_1 = x_996;
@@ -392,7 +392,7 @@
int const x_1011 = p;
p = 0;
p = x_1011;
- int const x_94 = (x_93 + as_type<int>(1u));
+ int const x_94 = as_type<int>((as_type<uint>(x_93) + as_type<uint>(as_type<int>(1u))));
int const x_1012 = top;
top = 0;
top = x_1012;
@@ -436,7 +436,7 @@
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<int>((as_type<uint>(x_97) + as_type<uint>(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 @@
int const x_1035 = p;
p = 0;
p = x_1035;
- top = (x_108 - as_type<int>(1u));
+ top = as_type<int>((as_type<uint>(x_108) - as_type<uint>(as_type<int>(1u))));
int const x_1036 = p;
p = 0;
p = x_1036;
@@ -536,7 +536,7 @@
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<int>((as_type<uint>(x_112) - as_type<uint>(1)));
int const x_1044 = param_5;
param_5 = 0;
param_5 = x_1044;
@@ -604,7 +604,7 @@
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<int>(1u)) > x_124)) {
+ if ((as_type<int>((as_type<uint>(x_122) - as_type<uint>(as_type<int>(1u)))) > x_124)) {
int const x_1060 = param_4;
param_4 = 0;
param_4 = x_1060;
@@ -627,7 +627,7 @@
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<int>((as_type<uint>(1) + as_type<uint>(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 @@
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<int>(1u));
+ stack.arr[x_136_save] = as_type<int>((as_type<uint>(x_134) - as_type<uint>(as_type<int>(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 @@
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<int>((as_type<uint>(x_143) + as_type<uint>(1)));
int const x_1087 = param_5;
param_5 = 0;
param_5 = x_1087;
@@ -759,7 +759,7 @@
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<int>(1u));
+ int const x_149 = as_type<int>((as_type<uint>(x_148) + as_type<uint>(as_type<int>(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 cecfa13..70c5faff 100644
--- a/test/bug/tint/942.wgsl.expected.msl
+++ b/test/bug/tint/942.wgsl.expected.msl
@@ -24,10 +24,10 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
uint const filterOffset = ((params.filterDim - 1u) / 2u);
int2 const dims = int2(tint_symbol_4.get_width(0), tint_symbol_4.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<int2>((as_type<uint2>(int2(((WorkGroupID.xy * uint2(params.blockDim, 4u)) + (LocalInvocationID.xy * uint2(4u, 1u))))) - as_type<uint2>(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<int2>((as_type<uint2>(baseIndex) + as_type<uint2>(int2(int(c), int(r)))));
if ((flip.value != 0u)) {
loadIndex = loadIndex.yx;
}
@@ -37,7 +37,7 @@
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<int2>((as_type<uint2>(baseIndex) + as_type<uint2>(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 31a04fe..3433643 100644
--- a/test/bug/tint/943.spvasm.expected.msl
+++ b/test/bug/tint/943.spvasm.expected.msl
@@ -60,7 +60,7 @@
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<int>((as_type<uint>(x_417) * as_type<uint>(x_419)));
int const x_421 = *(row);
int const x_422 = *(col);
int const x_424 = *(tint_symbol_5);
@@ -74,7 +74,7 @@
int const x_441 = *(row);
int const x_442 = *(tint_symbol_6);
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_438) * as_type<uint>(x_439)))) + as_type<uint>(as_type<int>((as_type<uint>(x_441) * as_type<uint>(x_442))))))) + as_type<uint>(x_445)))];
x_430 = x_448;
} else {
x_430 = 0.0f;
@@ -90,7 +90,7 @@
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<int>((as_type<uint>(x_455) * as_type<uint>(x_457)));
int const x_459 = *(row_1);
int const x_460 = *(col_1);
int const x_462 = *(tint_symbol_8);
@@ -104,7 +104,7 @@
int const x_478 = *(row_1);
int const x_479 = *(tint_symbol_9);
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_475) * as_type<uint>(x_476)))) + as_type<uint>(as_type<int>((as_type<uint>(x_478) * as_type<uint>(x_479))))))) + as_type<uint>(x_482)))];
x_468 = x_485;
} else {
x_468 = 0.0f;
@@ -204,15 +204,15 @@
int param_8 = 0;
float param_9 = 0.0f;
uint const x_132 = (*(tint_symbol_12)).y;
- tileRow = (as_type<int>(x_132) * 1);
+ tileRow = as_type<int>((as_type<uint>(as_type<int>(x_132)) * as_type<uint>(1)));
uint const x_137 = (*(tint_symbol_12)).x;
- tileCol = (as_type<int>(x_137) * 1);
+ tileCol = as_type<int>((as_type<uint>(as_type<int>(x_137)) * as_type<uint>(1)));
uint const x_143 = (*(tint_symbol_13)).y;
- globalRow = (as_type<int>(x_143) * 1);
+ globalRow = as_type<int>((as_type<uint>(as_type<int>(x_143)) * as_type<uint>(1)));
uint const x_148 = (*(tint_symbol_13)).x;
- globalCol = (as_type<int>(x_148) * 1);
+ globalCol = as_type<int>((as_type<uint>(as_type<int>(x_148)) * as_type<uint>(1)));
int const x_152 = *(dimInner);
- numTiles = (((x_152 - 1) / 64) + 1);
+ numTiles = as_type<int>((as_type<uint>((as_type<int>((as_type<uint>(x_152) - as_type<uint>(1))) / 64)) + as_type<uint>(1)));
innerRow = 0;
while (true) {
int const x_163 = innerRow;
@@ -232,18 +232,18 @@
acc.arr[x_177].arr[x_178] = 0.0f;
{
int const x_181 = innerCol;
- innerCol = (x_181 + 1);
+ innerCol = as_type<int>((as_type<uint>(x_181) + as_type<uint>(1)));
}
}
{
int const x_183 = innerRow;
- innerRow = (x_183 + 1);
+ innerRow = as_type<int>((as_type<uint>(x_183) + as_type<uint>(1)));
}
}
uint const x_187 = (*(tint_symbol_12)).x;
- tileColA = (as_type<int>(x_187) * 64);
+ tileColA = as_type<int>((as_type<uint>(as_type<int>(x_187)) * as_type<uint>(64)));
uint const x_192 = (*(tint_symbol_12)).y;
- tileRowB = (as_type<int>(x_192) * 1);
+ tileRowB = as_type<int>((as_type<uint>(as_type<int>(x_192)) * as_type<uint>(1)));
t = 0;
while (true) {
int const x_201 = t;
@@ -268,28 +268,28 @@
}
int const x_221 = tileRow;
int const x_222 = innerRow_1;
- inputRow = (x_221 + x_222);
+ inputRow = as_type<int>((as_type<uint>(x_221) + as_type<uint>(x_222)));
int const x_225 = tileColA;
int const x_226 = innerCol_1;
- inputCol = (x_225 + x_226);
+ inputCol = as_type<int>((as_type<uint>(x_225) + as_type<uint>(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<int>((as_type<uint>(x_235) + as_type<uint>(x_236)));
+ param_4 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_238) * as_type<uint>(64)))) + as_type<uint>(x_240)));
float const x_244 = mm_readA_i1_i1_(x_48, x_165, &(param_3), &(param_4), tint_symbol_14, tint_symbol_15, tint_symbol_16);
(*(tint_symbol_17)).arr[x_233].arr[x_234] = x_244;
{
int const x_247 = innerCol_1;
- innerCol_1 = (x_247 + 1);
+ innerCol_1 = as_type<int>((as_type<uint>(x_247) + as_type<uint>(1)));
}
}
{
int const x_249 = innerRow_1;
- innerRow_1 = (x_249 + 1);
+ innerRow_1 = as_type<int>((as_type<uint>(x_249) + as_type<uint>(1)));
}
}
innerRow_2 = 0;
@@ -308,28 +308,28 @@
}
int const x_268 = tileRowB;
int const x_269 = innerRow_2;
- inputRow_1 = (x_268 + x_269);
+ inputRow_1 = as_type<int>((as_type<uint>(x_268) + as_type<uint>(x_269)));
int const x_272 = tileCol;
int const x_273 = innerCol_2;
- inputCol_1 = (x_272 + x_273);
+ inputCol_1 = as_type<int>((as_type<uint>(x_272) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_280) * as_type<uint>(64)))) + as_type<uint>(x_282)));
+ param_6 = as_type<int>((as_type<uint>(x_284) + as_type<uint>(x_285)));
float const x_289 = mm_readB_i1_i1_(x_48, x_185, &(param_5), &(param_6), tint_symbol_15, tint_symbol_18, tint_symbol_16);
(*(tint_symbol_19)).arr[x_278].arr[x_279] = x_289;
{
int const x_291 = innerCol_2;
- innerCol_2 = (x_291 + 1);
+ innerCol_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
}
}
{
int const x_293 = innerRow_2;
- innerRow_2 = (x_293 + 1);
+ innerRow_2 = as_type<int>((as_type<uint>(x_293) + as_type<uint>(1)));
}
}
threadgroup_barrier(mem_flags::mem_threadgroup);
@@ -351,11 +351,11 @@
int const x_315 = k;
int const x_316 = tileCol;
int const x_317 = inner;
- float const x_320 = (*(tint_symbol_19)).arr[x_315].arr[(x_316 + x_317)];
+ float const x_320 = (*(tint_symbol_19)).arr[x_315].arr[as_type<int>((as_type<uint>(x_316) + as_type<uint>(x_317)))];
BCached.arr[x_314] = x_320;
{
int const x_322 = inner;
- inner = (x_322 + 1);
+ inner = as_type<int>((as_type<uint>(x_322) + as_type<uint>(1)));
}
}
innerRow_3 = 0;
@@ -368,7 +368,7 @@
int const x_333 = tileRow;
int const x_334 = innerRow_3;
int const x_336 = k;
- float const x_338 = (*(tint_symbol_17)).arr[(x_333 + x_334)].arr[x_336];
+ float const x_338 = (*(tint_symbol_17)).arr[as_type<int>((as_type<uint>(x_333) + as_type<uint>(x_334)))].arr[x_336];
ACached = x_338;
innerCol_3 = 0;
while (true) {
@@ -386,23 +386,23 @@
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<int>((as_type<uint>(x_358) + as_type<uint>(1)));
}
}
{
int const x_360 = innerRow_3;
- innerRow_3 = (x_360 + 1);
+ innerRow_3 = as_type<int>((as_type<uint>(x_360) + as_type<uint>(1)));
}
}
{
int const x_362 = k;
- k = (x_362 + 1);
+ k = as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)));
}
}
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_364 = t;
- t = (x_364 + 1);
+ t = as_type<int>((as_type<uint>(x_364) + as_type<uint>(1)));
}
}
innerRow_4 = 0;
@@ -424,13 +424,13 @@
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<int>((as_type<uint>(x_382) + as_type<uint>(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<int>((as_type<uint>(x_389) + as_type<uint>(x_390))) < x_392);
x_394_phi = x_393;
}
bool const x_394 = x_394_phi;
@@ -441,20 +441,20 @@
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<int>((as_type<uint>(x_397) + as_type<uint>(x_398)));
+ param_8 = as_type<int>((as_type<uint>(x_400) + as_type<uint>(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_16);
}
{
int const x_411 = innerCol_4;
- innerCol_4 = (x_411 + 1);
+ innerCol_4 = as_type<int>((as_type<uint>(x_411) + as_type<uint>(1)));
}
}
{
int const x_413 = innerRow_4;
- innerRow_4 = (x_413 + 1);
+ innerRow_4 = as_type<int>((as_type<uint>(x_413) + as_type<uint>(1)));
}
}
return;
diff --git a/test/bug/tint/948.wgsl.expected.msl b/test/bug/tint/948.wgsl.expected.msl
index e7d07da..86ebd22 100644
--- a/test/bug/tint/948.wgsl.expected.msl
+++ b/test/bug/tint/948.wgsl.expected.msl
@@ -180,7 +180,7 @@
}
{
int const x_304 = i;
- i = (x_304 + 1);
+ i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(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 75eef87..3d195ff 100644
--- a/test/bug/tint/949.wgsl.expected.msl
+++ b/test/bug/tint/949.wgsl.expected.msl
@@ -339,7 +339,7 @@
}
{
int const x_441 = i;
- i = (x_441 + 1);
+ i = as_type<int>((as_type<uint>(x_441) + as_type<uint>(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 062cf47..e77d38f 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 @@
kernel void f() {
int const a = 1;
int const b = 2;
- int const r = (a + b);
+ int const r = as_type<int>((as_type<uint>(a) + as_type<uint>(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 f46975e..46f1909 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 @@
kernel void f() {
int const a = 4;
int3 const b = int3(1, 2, 3);
- int3 const r = (a + b);
+ int3 const r = as_type<int3>((as_type<uint>(a) + as_type<uint3>(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 ba1fdc5..89306cc 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 @@
kernel void f() {
int3 const a = int3(1, 2, 3);
int const b = 4;
- int3 const r = (a + b);
+ int3 const r = as_type<int3>((as_type<uint3>(a) + as_type<uint>(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 2f4fbae..54d88c7 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 @@
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<int3>((as_type<uint3>(a) + as_type<uint3>(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 0000000..641f5bf
--- /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 0000000..9b54fe4
--- /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 0000000..3c5ec17
--- /dev/null
+++ b/test/expressions/binary/left-shift/scalar-scalar/i32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+using namespace metal;
+kernel void f() {
+ int const a = 1;
+ uint const b = 2u;
+ int const r = as_type<int>((as_type<uint>(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 0000000..d623dc4
--- /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 0000000..df07fda
--- /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 0000000..a1a39b6
--- /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 0000000..3195ab7
--- /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 0000000..90ec5fb
--- /dev/null
+++ b/test/expressions/binary/left-shift/scalar-scalar/u32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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 0000000..17c61e3
--- /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 0000000..1aee254
--- /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 0000000..78156b2
--- /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<i32>(1, 2, 3);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<i32> = 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 0000000..d43dfb6
--- /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 0000000..f97db25
--- /dev/null
+++ b/test/expressions/binary/left-shift/vector-vector/i32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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<int3>((as_type<uint3>(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 0000000..42f104e
--- /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 0000000..3a752fa
--- /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<i32>(1, 2, 3);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<i32> = (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 0000000..c85d91e
--- /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<u32>(1u, 2u, 3u);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<u32> = 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 0000000..2de16f0
--- /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 0000000..c80e57e
--- /dev/null
+++ b/test/expressions/binary/left-shift/vector-vector/u32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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 0000000..27379ec
--- /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 0000000..987e680
--- /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<u32>(1u, 2u, 3u);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<u32> = (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 1bd365e..7a20eac 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 @@
kernel void f() {
int const a = 1;
int const b = 2;
- int const r = (a * b);
+ int const r = as_type<int>((as_type<uint>(a) * as_type<uint>(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 733799e..216de39 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 @@
kernel void f() {
int const a = 4;
int3 const b = int3(1, 2, 3);
- int3 const r = (a * b);
+ int3 const r = as_type<int3>((as_type<uint>(a) * as_type<uint3>(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 afabaf3..f320bd7 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 @@
kernel void f() {
int3 const a = int3(1, 2, 3);
int const b = 4;
- int3 const r = (a * b);
+ int3 const r = as_type<int3>((as_type<uint3>(a) * as_type<uint>(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 91d1b9f..f4511b2 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 @@
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<int3>((as_type<uint3>(a) * as_type<uint3>(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 0000000..ef2e9f9
--- /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 0000000..861995c
--- /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 0000000..9d9f749
--- /dev/null
+++ b/test/expressions/binary/right-shift/scalar-scalar/i32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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 0000000..10b58f2
--- /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 0000000..9953bcc
--- /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 0000000..ecfbc1b
--- /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 0000000..4e90e73
--- /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 0000000..68036b5
--- /dev/null
+++ b/test/expressions/binary/right-shift/scalar-scalar/u32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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 0000000..04adcf8
--- /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 0000000..3757438
--- /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 0000000..ffae0c1
--- /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<i32>(1, 2, 3);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<i32> = 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 0000000..2520c5e
--- /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 0000000..5c3fd63
--- /dev/null
+++ b/test/expressions/binary/right-shift/vector-vector/i32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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 0000000..227bd02
--- /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 0000000..765b4b1
--- /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<i32>(1, 2, 3);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<i32> = (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 0000000..35da873
--- /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<u32>(1u, 2u, 3u);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<u32> = 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 0000000..1c57ee7
--- /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 0000000..b5aa9e9
--- /dev/null
+++ b/test/expressions/binary/right-shift/vector-vector/u32.wgsl.expected.msl
@@ -0,0 +1,10 @@
+#include <metal_stdlib>
+
+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 0000000..17932f2
--- /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 0000000..7368058
--- /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<u32>(1u, 2u, 3u);
+ let b = vec3<u32>(4u, 5u, 6u);
+ let r : vec3<u32> = (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 7a7adf0..4c25a09 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 @@
kernel void f() {
int const a = 1;
int const b = 2;
- int const r = (a - b);
+ int const r = as_type<int>((as_type<uint>(a) - as_type<uint>(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 c6791796..8837be0 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 @@
kernel void f() {
int const a = 4;
int3 const b = int3(1, 2, 3);
- int3 const r = (a - b);
+ int3 const r = as_type<int3>((as_type<uint>(a) - as_type<uint3>(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 9fc724f..6149a0c 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 @@
kernel void f() {
int3 const a = int3(1, 2, 3);
int const b = 4;
- int3 const r = (a - b);
+ int3 const r = as_type<int3>((as_type<uint3>(a) - as_type<uint>(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 f611cb2..142bb72 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 @@
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<int3>((as_type<uint3>(a) - as_type<uint3>(b)));
return;
}
diff --git a/test/expressions/splat/expression/i32.wgsl.expected.msl b/test/expressions/splat/expression/i32.wgsl.expected.msl
index ad7738c..afbc9b2 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<int>((as_type<uint>(1) + as_type<uint>(2))));
+ int3 v3 = int3(as_type<int>((as_type<uint>(1) + as_type<uint>(2))));
+ int4 v4 = int4(as_type<int>((as_type<uint>(1) + as_type<uint>(2))));
}
diff --git a/test/expressions/splat/var/i32.wgsl.expected.msl b/test/expressions/splat/var/i32.wgsl.expected.msl
index 30ae6c0..7e62e14 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<int>((as_type<uint>(1) + as_type<uint>(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 0000000..d54631f
--- /dev/null
+++ b/test/expressions/unary/negate/negate.wgsl
@@ -0,0 +1,7 @@
+fn i(x : i32) -> i32 {
+ return -x;
+}
+
+fn vi(x : vec4<i32>) -> vec4<i32> {
+ 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 0000000..a19621e
--- /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 0000000..7c4e322
--- /dev/null
+++ b/test/expressions/unary/negate/negate.wgsl.expected.msl
@@ -0,0 +1,20 @@
+#include <metal_stdlib>
+
+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 0000000..8378e84
--- /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 0000000..5bcf144
--- /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<i32>) -> vec4<i32> {
+ return -(x);
+}
diff --git a/test/intrinsics/ignore.wgsl.expected.msl b/test/intrinsics/ignore.wgsl.expected.msl
index 1dc15cf..c2406f8 100644
--- a/test/intrinsics/ignore.wgsl.expected.msl
+++ b/test/intrinsics/ignore.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<int>((as_type<uint>(as_type<int>((as_type<uint>(a) * as_type<uint>(b)))) + as_type<uint>(c)));
}
kernel void tint_symbol() {
diff --git a/test/loops/loop.wgsl.expected.msl b/test/loops/loop.wgsl.expected.msl
index 9772ce4..59523f0 100644
--- a/test/loops/loop.wgsl.expected.msl
+++ b/test/loops/loop.wgsl.expected.msl
@@ -4,7 +4,7 @@
int f() {
int i = 0;
while (true) {
- i = (i + 1);
+ i = as_type<int>((as_type<uint>(i) + as_type<uint>(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 fc31429..c99f6f8 100644
--- a/test/loops/loop_with_continuing.wgsl.expected.msl
+++ b/test/loops/loop_with_continuing.wgsl.expected.msl
@@ -8,7 +8,7 @@
return i;
}
{
- i = (i + 1);
+ i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
}
}
return 0;
diff --git a/test/loops/nested_loops.wgsl.expected.msl b/test/loops/nested_loops.wgsl.expected.msl
index e813828..580263c 100644
--- a/test/loops/nested_loops.wgsl.expected.msl
+++ b/test/loops/nested_loops.wgsl.expected.msl
@@ -5,12 +5,12 @@
int i = 0;
int j = 0;
while (true) {
- i = (i + 1);
+ i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)));
if ((i > 4)) {
return 1;
}
while (true) {
- j = (j + 1);
+ j = as_type<int>((as_type<uint>(j) + as_type<uint>(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 8c9f8fd..24fa85d 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 @@
return 2;
}
{
- j = (j + 1);
+ j = as_type<int>((as_type<uint>(j) + as_type<uint>(1)));
}
}
{
- i = (i + 1);
+ i = as_type<int>((as_type<uint>(i) + as_type<uint>(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 58c70f5..178b0a5 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<int>((as_type<uint>(x_9) + as_type<uint>(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 d7d3c63..a041b63 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 @@
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<int>((as_type<uint>(i) + as_type<uint>(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 bfbd8e5..5e52f4a 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 @@
int i = 0;
i = 123;
int const x_10 = i;
- int const x_12 = (x_10 + 1);
+ int const x_12 = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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 e7b87bb..57e23d3 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<int>((as_type<uint>(i) + as_type<uint>(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 e7b87bb..57e23d3 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<int>((as_type<uint>(i) + as_type<uint>(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 5ceee0a..bbb957e 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<int>((as_type<uint>(tint_symbol_1) + as_type<uint>(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 c00663c..2426a3d 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 @@
};
kernel void tint_symbol(device S& v [[buffer(0)]]) {
- int const use = (v.a + 1);
+ int const use = as_type<int>((as_type<uint>(v.a) + as_type<uint>(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 5aeb081..9c4e4e4 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 @@
};
kernel void tint_symbol(constant S& v [[buffer(0)]]) {
- int const use = (v.a + 1);
+ int const use = as_type<int>((as_type<uint>(v.a) + as_type<uint>(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 f8f9031..925031d 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 @@
}
threadgroup_barrier(mem_flags::mem_threadgroup);
tint_symbol_2 = 123;
- int const use = (tint_symbol_2 + 1);
+ int const use = as_type<int>((as_type<uint>(tint_symbol_2) + as_type<uint>(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 9c1e7cb..712ca5e 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<int>((as_type<uint>(value) + as_type<uint>(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 a215474..613530d 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<int>((as_type<uint>(value) + as_type<uint>(*(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 6451fe4..c27b618 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<int>((as_type<uint>(as_type<int>((as_type<uint>(100) + as_type<uint>(20)))) + as_type<uint>(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 7eaf2d6..f68ac56 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(100) + as_type<uint>(20)))) + as_type<uint>(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 dd05e5c..1e56158 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 @@
int i = 0;
i = 123;
i = 123;
- i = ((100 + 20) + 3);
+ i = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(100) + as_type<uint>(20)))) + as_type<uint>(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 bde2867..fc37fba 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 @@
kernel void tint_symbol() {
int i = 123;
i = 123;
- i = ((100 + 20) + 3);
+ i = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(100) + as_type<uint>(20)))) + as_type<uint>(3)));
return;
}
diff --git a/test/samples/compute_boids.wgsl.expected.msl b/test/samples/compute_boids.wgsl.expected.msl
index cc9a856..980c237 100644
--- a/test/samples/compute_boids.wgsl.expected.msl
+++ b/test/samples/compute_boids.wgsl.expected.msl
@@ -69,14 +69,14 @@
vel = particlesA.particles.arr[i].vel.xy;
if ((distance(pos, vPos) < params.rule1Distance)) {
cMass = (cMass + pos);
- cMassCount = (cMassCount + 1);
+ cMassCount = as_type<int>((as_type<uint>(cMassCount) + as_type<uint>(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<int>((as_type<uint>(cVelCount) + as_type<uint>(1)));
}
}
if ((cMassCount > 0)) {
diff --git a/test/statements/for/basic.wgsl.expected.msl b/test/statements/for/basic.wgsl.expected.msl
index e36af9f..20c444b 100644
--- a/test/statements/for/basic.wgsl.expected.msl
+++ b/test/statements/for/basic.wgsl.expected.msl
@@ -5,7 +5,7 @@
}
void f() {
- for(int i = 0; (i < 5); i = (i + 1)) {
+ for(int i = 0; (i < 5); i = as_type<int>((as_type<uint>(i) + as_type<uint>(1)))) {
some_loop_body();
}
}
diff --git a/test/statements/for/complex.wgsl.expected.msl b/test/statements/for/complex.wgsl.expected.msl
index 9ed6331..534cd3a 100644
--- a/test/statements/for/complex.wgsl.expected.msl
+++ b/test/statements/for/complex.wgsl.expected.msl
@@ -6,9 +6,9 @@
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<int>((as_type<uint>(i) + as_type<uint>(1)))) {
some_loop_body();
- j = (i * 30);
+ j = as_type<int>((as_type<uint>(i) * as_type<uint>(30)));
}
}
diff --git a/test/statements/for/continuing.wgsl.expected.msl b/test/statements/for/continuing.wgsl.expected.msl
index a288b5d..6426654 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<int>((as_type<uint>(i) + as_type<uint>(1)))) {
}
}
diff --git a/test/struct/type_constructor.wgsl.expected.msl b/test/struct/type_constructor.wgsl.expected.msl
index 36ef72f..69583e6 100644
--- a/test/struct/type_constructor.wgsl.expected.msl
+++ b/test/struct/type_constructor.wgsl.expected.msl
@@ -30,27 +30,27 @@
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<int>((as_type<uint>(x) + as_type<uint>(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<int>((as_type<uint>(x) + as_type<uint>(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<int>((as_type<uint>(x) + as_type<uint>(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<int>((as_type<uint>(x) + as_type<uint>(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 @@
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<int>((as_type<uint>(aosoa_nonempty.arr[0].a.arr[0]) + as_type<uint>(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/var/uses/private.wgsl.expected.msl b/test/var/uses/private.wgsl.expected.msl
index ed8cfa6..d5f572f 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<int>((as_type<uint>(*(tint_symbol)) + as_type<uint>(1)));
}
void uses_b(thread int* const tint_symbol_1) {
- *(tint_symbol_1) = (*(tint_symbol_1) * 2);
+ *(tint_symbol_1) = as_type<int>((as_type<uint>(*(tint_symbol_1)) * as_type<uint>(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 2105f71..1cb6c8b 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<int>((as_type<uint>(*(tint_symbol_3)) + as_type<uint>(1)));
}
void uses_b(threadgroup int* const tint_symbol_4) {
- *(tint_symbol_4) = (*(tint_symbol_4) * 2);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(*(tint_symbol_4)) * as_type<uint>(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 5262879..0de2d02 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 @@
} else {
break;
}
- int const x_22 = (x_21 - 1);
+ int const x_22 = as_type<int>((as_type<uint>(x_21) - as_type<uint>(1)));
x_19 = x_22;
int const x_23 = x_24.arr[x_22];
if ((x_23 == 1)) {
@@ -139,7 +139,7 @@
} else {
break;
}
- int const x_13 = (x_15 - 1);
+ int const x_13 = as_type<int>((as_type<uint>(x_15) - as_type<uint>(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 5262879..0de2d02 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 @@
} else {
break;
}
- int const x_22 = (x_21 - 1);
+ int const x_22 = as_type<int>((as_type<uint>(x_21) - as_type<uint>(1)));
x_19 = x_22;
int const x_23 = x_24.arr[x_22];
if ((x_23 == 1)) {
@@ -139,7 +139,7 @@
} else {
break;
}
- int const x_13 = (x_15 - 1);
+ int const x_13 = as_type<int>((as_type<uint>(x_15) - as_type<uint>(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 3bf51a5..33c3ed3 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 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<int>((as_type<uint>(x_107) - as_type<uint>(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<int>((as_type<uint>(x_115) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_126) + as_type<uint>(1)));
int const x_128 = i_1;
param = x_128;
int const x_129 = j_1;
@@ -68,16 +68,16 @@
}
{
int const x_131 = j_1;
- j_1 = (x_131 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_131) + as_type<uint>(1)));
}
}
int const x_133 = i_1;
- param_2 = (x_133 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(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<int>((as_type<uint>(x_137) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_6) {
@@ -92,12 +92,12 @@
h_1 = 9;
top = -1;
int const x_140 = top;
- int const x_141 = (x_140 + 1);
+ int const x_141 = as_type<int>((as_type<uint>(x_140) + as_type<uint>(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<int>((as_type<uint>(x_144) + as_type<uint>(1)));
top = x_145;
int const x_146 = h_1;
stack.arr[x_145] = x_146;
@@ -108,11 +108,11 @@
break;
}
int const x_155 = top;
- top = (x_155 - 1);
+ top = as_type<int>((as_type<uint>(x_155) - as_type<uint>(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<int>((as_type<uint>(x_159) - as_type<uint>(1)));
int const x_162 = stack.arr[x_159];
l_1 = x_162;
int const x_163 = l_1;
@@ -123,28 +123,28 @@
p = x_165;
int const x_166 = p;
int const x_168 = l_1;
- if (((x_166 - 1) > x_168)) {
+ if ((as_type<int>((as_type<uint>(x_166) - as_type<uint>(1))) > x_168)) {
int const x_172 = top;
- int const x_173 = (x_172 + 1);
+ int const x_173 = as_type<int>((as_type<uint>(x_172) + as_type<uint>(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<int>((as_type<uint>(x_176) + as_type<uint>(1)));
top = x_177;
int const x_178 = p;
- stack.arr[x_177] = (x_178 - 1);
+ stack.arr[x_177] = as_type<int>((as_type<uint>(x_178) - as_type<uint>(1)));
}
int const x_181 = p;
int const x_183 = h_1;
- if (((x_181 + 1) < x_183)) {
+ if ((as_type<int>((as_type<uint>(x_181) + as_type<uint>(1))) < x_183)) {
int const x_187 = top;
- int const x_188 = (x_187 + 1);
+ int const x_188 = as_type<int>((as_type<uint>(x_187) + as_type<uint>(1)));
top = x_188;
int const x_189 = p;
- stack.arr[x_188] = (x_189 + 1);
+ stack.arr[x_188] = as_type<int>((as_type<uint>(x_189) + as_type<uint>(1)));
int const x_192 = top;
- int const x_193 = (x_192 + 1);
+ int const x_193 = as_type<int>((as_type<uint>(x_192) + as_type<uint>(1)));
top = x_193;
int const x_194 = h_1;
stack.arr[x_193] = x_194;
@@ -164,16 +164,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_74) * as_type<uint>(x_77)));
{
int const x_80 = i_2;
- i_2 = (x_80 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_80) + as_type<uint>(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 3bf51a5..33c3ed3 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 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<int>((as_type<uint>(x_107) - as_type<uint>(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<int>((as_type<uint>(x_115) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_126) + as_type<uint>(1)));
int const x_128 = i_1;
param = x_128;
int const x_129 = j_1;
@@ -68,16 +68,16 @@
}
{
int const x_131 = j_1;
- j_1 = (x_131 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_131) + as_type<uint>(1)));
}
}
int const x_133 = i_1;
- param_2 = (x_133 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_133) + as_type<uint>(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<int>((as_type<uint>(x_137) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_6) {
@@ -92,12 +92,12 @@
h_1 = 9;
top = -1;
int const x_140 = top;
- int const x_141 = (x_140 + 1);
+ int const x_141 = as_type<int>((as_type<uint>(x_140) + as_type<uint>(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<int>((as_type<uint>(x_144) + as_type<uint>(1)));
top = x_145;
int const x_146 = h_1;
stack.arr[x_145] = x_146;
@@ -108,11 +108,11 @@
break;
}
int const x_155 = top;
- top = (x_155 - 1);
+ top = as_type<int>((as_type<uint>(x_155) - as_type<uint>(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<int>((as_type<uint>(x_159) - as_type<uint>(1)));
int const x_162 = stack.arr[x_159];
l_1 = x_162;
int const x_163 = l_1;
@@ -123,28 +123,28 @@
p = x_165;
int const x_166 = p;
int const x_168 = l_1;
- if (((x_166 - 1) > x_168)) {
+ if ((as_type<int>((as_type<uint>(x_166) - as_type<uint>(1))) > x_168)) {
int const x_172 = top;
- int const x_173 = (x_172 + 1);
+ int const x_173 = as_type<int>((as_type<uint>(x_172) + as_type<uint>(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<int>((as_type<uint>(x_176) + as_type<uint>(1)));
top = x_177;
int const x_178 = p;
- stack.arr[x_177] = (x_178 - 1);
+ stack.arr[x_177] = as_type<int>((as_type<uint>(x_178) - as_type<uint>(1)));
}
int const x_181 = p;
int const x_183 = h_1;
- if (((x_181 + 1) < x_183)) {
+ if ((as_type<int>((as_type<uint>(x_181) + as_type<uint>(1))) < x_183)) {
int const x_187 = top;
- int const x_188 = (x_187 + 1);
+ int const x_188 = as_type<int>((as_type<uint>(x_187) + as_type<uint>(1)));
top = x_188;
int const x_189 = p;
- stack.arr[x_188] = (x_189 + 1);
+ stack.arr[x_188] = as_type<int>((as_type<uint>(x_189) + as_type<uint>(1)));
int const x_192 = top;
- int const x_193 = (x_192 + 1);
+ int const x_193 = as_type<int>((as_type<uint>(x_192) + as_type<uint>(1)));
top = x_193;
int const x_194 = h_1;
stack.arr[x_193] = x_194;
@@ -164,16 +164,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_74) * as_type<uint>(x_77)));
{
int const x_80 = i_2;
- i_2 = (x_80 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_80) + as_type<uint>(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 4eedfbc..34a6d51 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 @@
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<int>((as_type<uint>(x_118) + as_type<uint>(as_type<int>((as_type<uint>(int(clamp(x_114, 0.0f, 1.0f))) * as_type<uint>(3))))));
int const x_120 = x;
return (5.0f + float(x_120));
}
@@ -42,7 +42,7 @@
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<int>((as_type<uint>(4) + as_type<uint>(int(x_50)))))) {
} else {
break;
}
@@ -60,7 +60,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_67)))) + as_type<uint>(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 @@
}
{
int const x_93 = j;
- j = (x_93 + 1);
+ j = as_type<int>((as_type<uint>(x_93) + as_type<uint>(1)));
}
}
}
{
int const x_95 = i;
- i = (x_95 + 1);
+ i = as_type<int>((as_type<uint>(x_95) + as_type<uint>(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 4eedfbc..34a6d51 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 @@
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<int>((as_type<uint>(x_118) + as_type<uint>(as_type<int>((as_type<uint>(int(clamp(x_114, 0.0f, 1.0f))) * as_type<uint>(3))))));
int const x_120 = x;
return (5.0f + float(x_120));
}
@@ -42,7 +42,7 @@
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<int>((as_type<uint>(4) + as_type<uint>(int(x_50)))))) {
} else {
break;
}
@@ -60,7 +60,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_67)))) + as_type<uint>(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 @@
}
{
int const x_93 = j;
- j = (x_93 + 1);
+ j = as_type<int>((as_type<uint>(x_93) + as_type<uint>(1)));
}
}
}
{
int const x_95 = i;
- i = (x_95 + 1);
+ i = as_type<int>((as_type<uint>(x_95) + as_type<uint>(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 106d158..9f12b7c 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 @@
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<int>((as_type<uint>(x_92) + as_type<uint>(2)));
}
}
}
@@ -54,10 +54,10 @@
}
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<int>((as_type<uint>(x_103) + as_type<uint>(1)));
{
int const x_106 = i;
- i = (x_106 + 1);
+ i = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
int const x_109 = (*(tint_symbol_7)).arr[0];
@@ -101,7 +101,7 @@
}
{
int const x_62 = i_1;
- i_1 = (x_62 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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 106d158..9f12b7c 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 @@
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<int>((as_type<uint>(x_92) + as_type<uint>(2)));
}
}
}
@@ -54,10 +54,10 @@
}
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<int>((as_type<uint>(x_103) + as_type<uint>(1)));
{
int const x_106 = i;
- i = (x_106 + 1);
+ i = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
int const x_109 = (*(tint_symbol_7)).arr[0];
@@ -101,7 +101,7 @@
}
{
int const x_62 = i_1;
- i_1 = (x_62 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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 8260441..4063dcb 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 @@
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<int>((as_type<uint>(x_71) + as_type<uint>(1)));
}
}
i = 0;
@@ -50,10 +50,10 @@
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<int>((as_type<uint>(x_82) + as_type<uint>(x_83)));
{
int const x_86 = i;
- i = (x_86 + 1);
+ i = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
}
}
int const x_89 = data.arr[0];
@@ -88,7 +88,7 @@
func_i1_(&(param), tint_symbol_5);
{
int const x_48 = i_1;
- i_1 = (x_48 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 8260441..4063dcb 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 @@
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<int>((as_type<uint>(x_71) + as_type<uint>(1)));
}
}
i = 0;
@@ -50,10 +50,10 @@
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<int>((as_type<uint>(x_82) + as_type<uint>(x_83)));
{
int const x_86 = i;
- i = (x_86 + 1);
+ i = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
}
}
int const x_89 = data.arr[0];
@@ -88,7 +88,7 @@
func_i1_(&(param), tint_symbol_5);
{
int const x_48 = i_1;
- i_1 = (x_48 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 99eb99a..9d6a2d8 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 @@
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<int>((as_type<uint>(x_55) - as_type<uint>(1)))];
int const x_59 = val;
- val = (x_59 + x_58);
+ val = as_type<int>((as_type<uint>(x_59) + as_type<uint>(x_58)));
float const x_62 = x_10.injectionSwitch.x;
if ((x_62 > 100.0f)) {
break;
@@ -38,7 +38,7 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_66 = i;
- i = (x_66 + 1);
+ i = as_type<int>((as_type<uint>(x_66) + as_type<uint>(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 99eb99a..9d6a2d8 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 @@
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<int>((as_type<uint>(x_55) - as_type<uint>(1)))];
int const x_59 = val;
- val = (x_59 + x_58);
+ val = as_type<int>((as_type<uint>(x_59) + as_type<uint>(x_58)));
float const x_62 = x_10.injectionSwitch.x;
if ((x_62 > 100.0f)) {
break;
@@ -38,7 +38,7 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_66 = i;
- i = (x_66 + 1);
+ i = as_type<int>((as_type<uint>(x_66) + as_type<uint>(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 1063af2..b53ef96 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 @@
break;
}
int x_54_phi = 0;
- int const x_8 = (x_11 + 1);
+ int const x_8 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
float const x_47 = x_6.injectionSwitch.x;
x_54_phi = x_40;
switch(int(x_47)) {
@@ -43,7 +43,7 @@
/* fallthrough */
}
case 19: {
- x_54_phi = as_type<int>((x_40 + as_type<int>(1)));
+ x_54_phi = as_type<int>(as_type<int>((as_type<uint>(x_40) + as_type<uint>(as_type<int>(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 1063af2..b53ef96 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 @@
break;
}
int x_54_phi = 0;
- int const x_8 = (x_11 + 1);
+ int const x_8 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
float const x_47 = x_6.injectionSwitch.x;
x_54_phi = x_40;
switch(int(x_47)) {
@@ -43,7 +43,7 @@
/* fallthrough */
}
case 19: {
- x_54_phi = as_type<int>((x_40 + as_type<int>(1)));
+ x_54_phi = as_type<int>(as_type<int>((as_type<uint>(x_40) + as_type<uint>(as_type<int>(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 734666e..85a576d 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 @@
{
*(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<int>((as_type<uint>(x_45.f0) + as_type<uint>(1)));
+ x_9 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
x_45_phi = x_46;
x_11_phi = x_9;
}
@@ -57,7 +57,7 @@
}
{
*(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
- x_6 = (x_12 + 1);
+ x_6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(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 734666e..85a576d 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 @@
{
*(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<int>((as_type<uint>(x_45.f0) + as_type<uint>(1)));
+ x_9 = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
x_45_phi = x_46;
x_11_phi = x_9;
}
@@ -57,7 +57,7 @@
}
{
*(tint_symbol_7) = float4(1.0f, 0.0f, 0.0f, 1.0f);
- x_6 = (x_12 + 1);
+ x_6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(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 cb848ea..7fd5883 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 @@
break;
}
int const x_41 = GLF_live4_looplimiter5;
- GLF_live4_looplimiter5 = (x_41 + 1);
+ GLF_live4_looplimiter5 = as_type<int>((as_type<uint>(x_41) + as_type<uint>(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 @@
break;
}
int const x_45 = GLF_live7_looplimiter3;
- GLF_live7_looplimiter3 = (x_45 + 1);
+ GLF_live7_looplimiter3 = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
GLF_live7rows = 2;
while (true) {
int const x_47 = GLF_live7rows;
@@ -111,7 +111,7 @@
break;
}
int const x_49 = GLF_live7_looplimiter2;
- GLF_live7_looplimiter2 = (x_49 + 1);
+ GLF_live7_looplimiter2 = as_type<int>((as_type<uint>(x_49) + as_type<uint>(1)));
GLF_live7_looplimiter1 = 0;
GLF_live7c = 0;
while (true) {
@@ -125,7 +125,7 @@
break;
}
int const x_53 = GLF_live7_looplimiter1;
- GLF_live7_looplimiter1 = (x_53 + 1);
+ GLF_live7_looplimiter1 = as_type<int>((as_type<uint>(x_53) + as_type<uint>(1)));
GLF_live7r = 0;
while (true) {
int const x_55 = GLF_live7r;
@@ -138,7 +138,7 @@
break;
}
int const x_57 = GLF_live7_looplimiter0;
- GLF_live7_looplimiter0 = (x_57 + 1);
+ GLF_live7_looplimiter0 = as_type<int>((as_type<uint>(x_57) + as_type<uint>(1)));
int const x_59 = GLF_live7c;
int const x_60 = GLF_live7c;
int const x_61 = GLF_live7c;
@@ -159,22 +159,22 @@
}
{
int const x_71 = GLF_live7r;
- GLF_live7r = (x_71 + 1);
+ GLF_live7r = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
}
}
{
int const x_73 = GLF_live7c;
- GLF_live7c = (x_73 + 1);
+ GLF_live7c = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
}
}
{
int const x_75 = GLF_live7rows;
- GLF_live7rows = (x_75 + 1);
+ GLF_live7rows = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
{
int const x_77 = GLF_live7cols;
- GLF_live7cols = (x_77 + 1);
+ GLF_live7cols = as_type<int>((as_type<uint>(x_77) + as_type<uint>(1)));
}
}
GLF_live7sum_index = 0;
@@ -191,7 +191,7 @@
break;
}
int const x_81 = GLF_live7_looplimiter7;
- GLF_live7_looplimiter7 = (x_81 + 1);
+ GLF_live7_looplimiter7 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(1)));
GLF_live7rows_1 = 2;
int const x_83 = GLF_live7sum_index;
int const x_84 = GLF_live7sum_index;
@@ -241,24 +241,24 @@
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<int>((as_type<uint>(x_98) + as_type<uint>(1)));
}
}
{
int const x_100 = GLF_live7c_1;
- GLF_live7c_1 = (x_100 + 1);
+ GLF_live7c_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
}
}
int const x_102 = GLF_live7sum_index;
- GLF_live7sum_index = (x_102 + 1);
+ GLF_live7sum_index = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1)));
{
int const x_104 = GLF_live7cols_1;
- GLF_live7cols_1 = (x_104 + 1);
+ GLF_live7cols_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
}
}
{
int const x_106 = GLF_live4i;
- GLF_live4i = (x_106 + 1);
+ GLF_live4i = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
return float3(1.0f, 1.0f, 1.0f);
@@ -292,7 +292,7 @@
float3 const x_178 = drawShape_vf2_(x_25, &(param_2));
{
int const x_109 = i;
- i = (x_109 - 1);
+ i = as_type<int>((as_type<uint>(x_109) - as_type<uint>(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 9f3a7ed..5842374 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 @@
break;
}
int const x_41 = GLF_live4_looplimiter5;
- GLF_live4_looplimiter5 = (x_41 + 1);
+ GLF_live4_looplimiter5 = as_type<int>((as_type<uint>(x_41) + as_type<uint>(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 @@
break;
}
int const x_45 = GLF_live7_looplimiter3;
- GLF_live7_looplimiter3 = (x_45 + 1);
+ GLF_live7_looplimiter3 = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
GLF_live7rows = 2;
while (true) {
int const x_47 = GLF_live7rows;
@@ -111,7 +111,7 @@
break;
}
int const x_49 = GLF_live7_looplimiter2;
- GLF_live7_looplimiter2 = (x_49 + 1);
+ GLF_live7_looplimiter2 = as_type<int>((as_type<uint>(x_49) + as_type<uint>(1)));
GLF_live7_looplimiter1 = 0;
GLF_live7c = 0;
while (true) {
@@ -125,7 +125,7 @@
break;
}
int const x_53 = GLF_live7_looplimiter1;
- GLF_live7_looplimiter1 = (x_53 + 1);
+ GLF_live7_looplimiter1 = as_type<int>((as_type<uint>(x_53) + as_type<uint>(1)));
GLF_live7r = 0;
while (true) {
int const x_55 = GLF_live7r;
@@ -138,7 +138,7 @@
break;
}
int const x_57 = GLF_live7_looplimiter0;
- GLF_live7_looplimiter0 = (x_57 + 1);
+ GLF_live7_looplimiter0 = as_type<int>((as_type<uint>(x_57) + as_type<uint>(1)));
int const x_59 = GLF_live7c;
int const x_60 = GLF_live7c;
int const x_61 = GLF_live7c;
@@ -159,22 +159,22 @@
}
{
int const x_71 = GLF_live7r;
- GLF_live7r = (x_71 + 1);
+ GLF_live7r = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
}
}
{
int const x_73 = GLF_live7c;
- GLF_live7c = (x_73 + 1);
+ GLF_live7c = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
}
}
{
int const x_75 = GLF_live7rows;
- GLF_live7rows = (x_75 + 1);
+ GLF_live7rows = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
{
int const x_77 = GLF_live7cols;
- GLF_live7cols = (x_77 + 1);
+ GLF_live7cols = as_type<int>((as_type<uint>(x_77) + as_type<uint>(1)));
}
}
GLF_live7sum_index = 0;
@@ -191,7 +191,7 @@
break;
}
int const x_81 = GLF_live7_looplimiter7;
- GLF_live7_looplimiter7 = (x_81 + 1);
+ GLF_live7_looplimiter7 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(1)));
GLF_live7rows_1 = 2;
int const x_83 = GLF_live7sum_index;
int const x_84 = GLF_live7sum_index;
@@ -241,24 +241,24 @@
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<int>((as_type<uint>(x_98) + as_type<uint>(1)));
}
}
{
int const x_100 = GLF_live7c_1;
- GLF_live7c_1 = (x_100 + 1);
+ GLF_live7c_1 = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
}
}
int const x_102 = GLF_live7sum_index;
- GLF_live7sum_index = (x_102 + 1);
+ GLF_live7sum_index = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1)));
{
int const x_104 = GLF_live7cols_1;
- GLF_live7cols_1 = (x_104 + 1);
+ GLF_live7cols_1 = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
}
}
{
int const x_106 = GLF_live4i;
- GLF_live4i = (x_106 + 1);
+ GLF_live4i = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
return float3(1.0f, 1.0f, 1.0f);
@@ -292,7 +292,7 @@
float3 const x_178 = drawShape_vf2_(x_25, &(param_2));
{
int const x_109 = i;
- i = (x_109 - 1);
+ i = as_type<int>((as_type<uint>(x_109) - as_type<uint>(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 d5ad884..c65a101 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 @@
}
{
int const x_121 = i;
- i = (x_121 + 1);
+ i = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
}
}
}
{
int const x_123 = ndx;
- ndx = (x_123 + 1);
+ ndx = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
}
}
int const x_125 = *(b);
@@ -80,17 +80,17 @@
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<int>((as_type<uint>(int(x_76)) + as_type<uint>(1))))) {
} else {
break;
}
int const x_81 = x_1;
- param_1 = (x_81 + 10);
+ param_1 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(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<int>((as_type<uint>(x_84) + as_type<uint>(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 d5ad884..c65a101 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 @@
}
{
int const x_121 = i;
- i = (x_121 + 1);
+ i = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
}
}
}
{
int const x_123 = ndx;
- ndx = (x_123 + 1);
+ ndx = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
}
}
int const x_125 = *(b);
@@ -80,17 +80,17 @@
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<int>((as_type<uint>(int(x_76)) + as_type<uint>(1))))) {
} else {
break;
}
int const x_81 = x_1;
- param_1 = (x_81 + 10);
+ param_1 = as_type<int>((as_type<uint>(x_81) + as_type<uint>(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<int>((as_type<uint>(x_84) + as_type<uint>(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 9140262..007dbce 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 @@
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<int>((as_type<uint>(x_49) + as_type<uint>(1))))) {
} else {
break;
}
@@ -39,12 +39,12 @@
}
{
int const x_67 = j;
- j = (x_67 + 1);
+ j = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
{
int const x_69 = i;
- i = (x_69 + 1);
+ i = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 9140262..007dbce 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 @@
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<int>((as_type<uint>(x_49) + as_type<uint>(1))))) {
} else {
break;
}
@@ -39,12 +39,12 @@
}
{
int const x_67 = j;
- j = (x_67 + 1);
+ j = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
{
int const x_69 = i;
- i = (x_69 + 1);
+ i = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 4c716f0..6c4b3c8 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 @@
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<int>((as_type<uint>(x_65) - as_type<uint>(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 4c716f0..6c4b3c8 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 @@
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<int>((as_type<uint>(x_65) - as_type<uint>(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 941cf28..7e3095b 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 @@
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<int>((as_type<uint>(x_11) + as_type<uint>(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 6033ad9..05942bc 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 @@
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<int>((as_type<uint>(x_11) + as_type<uint>(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 5daa237..1b780b8 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 @@
}
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 5daa237..1b780b8 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 @@
}
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 76666da..24f173c 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 @@
int const x_49 = arr.arr[x_47];
a = x_49;
int const x_50 = a;
- b = (x_50 - 1);
+ b = as_type<int>((as_type<uint>(x_50) - as_type<uint>(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<int>((as_type<uint>(x_59) + as_type<uint>(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 76666da..24f173c 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 @@
int const x_49 = arr.arr[x_47];
a = x_49;
int const x_50 = a;
- b = (x_50 - 1);
+ b = as_type<int>((as_type<uint>(x_50) - as_type<uint>(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<int>((as_type<uint>(x_59) + as_type<uint>(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 417083d..60b542a 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 @@
break;
}
int const x_122 = limiter0;
- limiter0 = (x_122 + 1);
+ limiter0 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(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 @@
break;
}
int const x_143 = limiter1;
- limiter1 = (x_143 + 1);
+ limiter1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(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<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
}
@@ -117,7 +117,7 @@
break;
}
int const x_159 = limiter2;
- limiter2 = (x_159 + 1);
+ limiter2 = as_type<int>((as_type<uint>(x_159) + as_type<uint>(1)));
int const x_162 = arr1.arr[1];
arr0.arr[1] = x_162;
}
@@ -135,14 +135,14 @@
break;
}
int const x_179 = limiter3;
- limiter3 = (x_179 + 1);
+ limiter3 = as_type<int>((as_type<uint>(x_179) + as_type<uint>(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<int>((as_type<uint>(x_186) + as_type<uint>(1)));
}
}
{
@@ -156,7 +156,7 @@
}
{
int const x_193 = a;
- a = (x_193 + 1);
+ a = as_type<int>((as_type<uint>(x_193) + as_type<uint>(1)));
}
}
int const x_196 = x_6.x_GLF_uniform_int_values.arr[11].el;
@@ -221,7 +221,7 @@
}
{
int const x_285 = i;
- i = (x_285 + 1);
+ i = as_type<int>((as_type<uint>(x_285) + as_type<uint>(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 417083d..60b542a 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 @@
break;
}
int const x_122 = limiter0;
- limiter0 = (x_122 + 1);
+ limiter0 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(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 @@
break;
}
int const x_143 = limiter1;
- limiter1 = (x_143 + 1);
+ limiter1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(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<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
}
@@ -117,7 +117,7 @@
break;
}
int const x_159 = limiter2;
- limiter2 = (x_159 + 1);
+ limiter2 = as_type<int>((as_type<uint>(x_159) + as_type<uint>(1)));
int const x_162 = arr1.arr[1];
arr0.arr[1] = x_162;
}
@@ -135,14 +135,14 @@
break;
}
int const x_179 = limiter3;
- limiter3 = (x_179 + 1);
+ limiter3 = as_type<int>((as_type<uint>(x_179) + as_type<uint>(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<int>((as_type<uint>(x_186) + as_type<uint>(1)));
}
}
{
@@ -156,7 +156,7 @@
}
{
int const x_193 = a;
- a = (x_193 + 1);
+ a = as_type<int>((as_type<uint>(x_193) + as_type<uint>(1)));
}
}
int const x_196 = x_6.x_GLF_uniform_int_values.arr[11].el;
@@ -221,7 +221,7 @@
}
{
int const x_285 = i;
- i = (x_285 + 1);
+ i = as_type<int>((as_type<uint>(x_285) + as_type<uint>(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 66a656e..89cd260 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 @@
param = x_35;
x_37 = func_i1_(&(param));
a = x_37;
- int const x_36 = (x_35 + 1);
+ int const x_36 = as_type<int>((as_type<uint>(x_35) + as_type<uint>(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 66a656e..89cd260 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 @@
param = x_35;
x_37 = func_i1_(&(param));
a = x_37;
- int const x_36 = (x_35 + 1);
+ int const x_36 = as_type<int>((as_type<uint>(x_35) + as_type<uint>(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 cbab4db..1cfbbb0 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 @@
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<int>((as_type<uint>(x_71) + as_type<uint>(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 cbab4db..1cfbbb0 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 @@
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<int>((as_type<uint>(x_71) + as_type<uint>(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 971d8fe..be7c5a2 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 @@
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<int>((as_type<uint>(x_24) - as_type<uint>(1))))) {
} else {
break;
}
- x_29 = as_type<int>((x_28 + as_type<int>(x_31)));
+ x_29 = as_type<int>(as_type<int>((as_type<uint>(x_28) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_31) + as_type<uint>(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 971d8fe..be7c5a2 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 @@
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<int>((as_type<uint>(x_24) - as_type<uint>(1))))) {
} else {
break;
}
- x_29 = as_type<int>((x_28 + as_type<int>(x_31)));
+ x_29 = as_type<int>(as_type<int>((as_type<uint>(x_28) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_31) + as_type<uint>(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 5e6ba53..b50ffb6 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 @@
break;
}
int const x_104 = a;
- a = (x_104 + 1);
+ a = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
{
int const x_106 = i8_1;
- i8_1 = (x_106 + 1);
+ i8_1 = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
{
int const x_108 = i7;
- i7 = (x_108 + 1);
+ i7 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
}
{
int const x_110 = i6;
- i6 = (x_110 + 1);
+ i6 = as_type<int>((as_type<uint>(x_110) + as_type<uint>(1)));
}
}
{
int const x_112 = i5;
- i5 = (x_112 + 1);
+ i5 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
}
}
{
int const x_114 = i4;
- i4 = (x_114 + 1);
+ i4 = as_type<int>((as_type<uint>(x_114) + as_type<uint>(1)));
}
}
{
int const x_116 = i3;
- i3 = (x_116 + 1);
+ i3 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
}
}
{
int const x_118 = i2;
- i2 = (x_118 + 1);
+ i2 = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
}
}
{
int const x_120 = i1;
- i1 = (x_120 + 1);
+ i1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(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 5e6ba53..b50ffb6 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 @@
break;
}
int const x_104 = a;
- a = (x_104 + 1);
+ a = as_type<int>((as_type<uint>(x_104) + as_type<uint>(1)));
{
int const x_106 = i8_1;
- i8_1 = (x_106 + 1);
+ i8_1 = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
{
int const x_108 = i7;
- i7 = (x_108 + 1);
+ i7 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
}
{
int const x_110 = i6;
- i6 = (x_110 + 1);
+ i6 = as_type<int>((as_type<uint>(x_110) + as_type<uint>(1)));
}
}
{
int const x_112 = i5;
- i5 = (x_112 + 1);
+ i5 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
}
}
{
int const x_114 = i4;
- i4 = (x_114 + 1);
+ i4 = as_type<int>((as_type<uint>(x_114) + as_type<uint>(1)));
}
}
{
int const x_116 = i3;
- i3 = (x_116 + 1);
+ i3 = as_type<int>((as_type<uint>(x_116) + as_type<uint>(1)));
}
}
{
int const x_118 = i2;
- i2 = (x_118 + 1);
+ i2 = as_type<int>((as_type<uint>(x_118) + as_type<uint>(1)));
}
}
{
int const x_120 = i1;
- i1 = (x_120 + 1);
+ i1 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(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 ed07fe7..0972c1e 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 @@
sums.arr[x_35] = (x_142 + x_140);
{
int const x_39 = d;
- d = (x_39 + 1);
+ d = as_type<int>((as_type<uint>(x_39) + as_type<uint>(1)));
}
}
{
int const x_41 = c;
- c = (x_41 + 1);
+ c = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
}
}
{
int const x_43 = b;
- b = (x_43 + 1);
+ b = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
}
{
int const x_45 = a;
- a = (x_45 + 1);
+ a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 ed07fe7..0972c1e 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 @@
sums.arr[x_35] = (x_142 + x_140);
{
int const x_39 = d;
- d = (x_39 + 1);
+ d = as_type<int>((as_type<uint>(x_39) + as_type<uint>(1)));
}
}
{
int const x_41 = c;
- c = (x_41 + 1);
+ c = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
}
}
{
int const x_43 = b;
- b = (x_43 + 1);
+ b = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
}
{
int const x_45 = a;
- a = (x_45 + 1);
+ a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 d993da9..2fbf155 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 @@
sums.arr[x_59] = (x_71 + x_69);
{
int const x_74 = i;
- i = (x_74 + 1);
+ i = as_type<int>((as_type<uint>(x_74) + as_type<uint>(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 d993da9..2fbf155 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 @@
sums.arr[x_59] = (x_71 + x_69);
{
int const x_74 = i;
- i = (x_74 + 1);
+ i = as_type<int>((as_type<uint>(x_74) + as_type<uint>(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 3c693a4..95cd418 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 @@
}
{
int const x_109 = i;
- i = (x_109 + 1);
+ i = as_type<int>((as_type<uint>(x_109) + as_type<uint>(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 3c693a4..95cd418 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 @@
}
{
int const x_109 = i;
- i = (x_109 + 1);
+ i = as_type<int>((as_type<uint>(x_109) + as_type<uint>(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 1cbfbfa..335c044 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 @@
}
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<int>((as_type<uint>(x_92) + as_type<uint>(x_91)));
{
int const x_94 = j;
- j = (x_94 + 1);
+ j = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
}
}
{
int const x_96 = i;
- i = (x_96 + 1);
+ i = as_type<int>((as_type<uint>(x_96) + as_type<uint>(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 1cbfbfa..335c044 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 @@
}
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<int>((as_type<uint>(x_92) + as_type<uint>(x_91)));
{
int const x_94 = j;
- j = (x_94 + 1);
+ j = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
}
}
{
int const x_96 = i;
- i = (x_96 + 1);
+ i = as_type<int>((as_type<uint>(x_96) + as_type<uint>(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 374c16d..94b9529 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 @@
int const x_38 = i;
if ((~(x_38) != 0)) {
int const x_43 = a;
- a = (x_43 + 1);
+ a = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
{
int const x_45 = i;
- i = (x_45 + 1);
+ i = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 374c16d..94b9529 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 @@
int const x_38 = i;
if ((~(x_38) != 0)) {
int const x_43 = a;
- a = (x_43 + 1);
+ a = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
{
int const x_45 = i;
- i = (x_45 + 1);
+ i = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 51c4567..80079dc 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 @@
break;
}
int const x_61 = a;
- a = (x_61 + 1);
+ a = as_type<int>((as_type<uint>(x_61) + as_type<uint>(1)));
if ((x_61 > 3)) {
break;
}
@@ -61,7 +61,7 @@
}
{
int const x_73 = i;
- i = (x_73 + 1);
+ i = as_type<int>((as_type<uint>(x_73) + as_type<uint>(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 51c4567..80079dc 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 @@
break;
}
int const x_61 = a;
- a = (x_61 + 1);
+ a = as_type<int>((as_type<uint>(x_61) + as_type<uint>(1)));
if ((x_61 > 3)) {
break;
}
@@ -61,7 +61,7 @@
}
{
int const x_73 = i;
- i = (x_73 + 1);
+ i = as_type<int>((as_type<uint>(x_73) + as_type<uint>(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 6c19a66..57e7f66 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 @@
break;
}
int const x_33 = i;
- i = (x_33 + 1);
+ i = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
int const x_35 = j;
- j = (x_35 + 1);
+ j = as_type<int>((as_type<uint>(x_35) + as_type<uint>(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 35f0b9c..d1907be 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 @@
break;
}
int const x_33 = i;
- i = (x_33 + 1);
+ i = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
int const x_35 = j;
- j = (x_35 + 1);
+ j = as_type<int>((as_type<uint>(x_35) + as_type<uint>(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 b29ecd0..e4553afc 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 @@
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<int>((as_type<uint>(min(10, x_43)) + as_type<uint>(x_46))))) {
} else {
break;
}
@@ -37,7 +37,7 @@
data.arr[x_50] = 5;
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 b29ecd0..e4553afc 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 @@
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<int>((as_type<uint>(min(10, x_43)) + as_type<uint>(x_46))))) {
} else {
break;
}
@@ -37,7 +37,7 @@
data.arr[x_50] = 5;
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 b0caa47..5954cdd 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 @@
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<int>((as_type<uint>(x_37) + as_type<uint>(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 b0caa47..5954cdd 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 @@
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<int>((as_type<uint>(x_37) + as_type<uint>(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 3a57b28..51d38f6 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 @@
{
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<int>((as_type<uint>(x_5) + as_type<uint>(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 3a57b28..51d38f6 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 @@
{
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<int>((as_type<uint>(x_5) + as_type<uint>(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 e105e07..4219d43 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_80)) - as_type<uint>((x_83 / 2))))) + as_type<uint>(x_86)));
int const x_88 = b;
- b = (x_88 + 1);
+ b = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
{
int const x_90 = i;
- i = (x_90 + 1);
+ i = as_type<int>((as_type<uint>(x_90) + as_type<uint>(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 e105e07..4219d43 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_80)) - as_type<uint>((x_83 / 2))))) + as_type<uint>(x_86)));
int const x_88 = b;
- b = (x_88 + 1);
+ b = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
{
int const x_90 = i;
- i = (x_90 + 1);
+ i = as_type<int>((as_type<uint>(x_90) + as_type<uint>(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 604ed91..439f521 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 @@
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<int>((as_type<uint>(x_60) + as_type<uint>(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 @@
}
{
int const x_75 = i;
- i = (x_75 + 1);
+ i = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
int const x_78 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -84,10 +84,10 @@
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<int>((as_type<uint>(x_96) + as_type<uint>(x_95)));
{
int const x_98 = i_2;
- i_2 = (x_98 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 604ed91..439f521 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 @@
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<int>((as_type<uint>(x_60) + as_type<uint>(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 @@
}
{
int const x_75 = i;
- i = (x_75 + 1);
+ i = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
int const x_78 = x_6.x_GLF_uniform_int_values.arr[2].el;
@@ -84,10 +84,10 @@
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<int>((as_type<uint>(x_96) + as_type<uint>(x_95)));
{
int const x_98 = i_2;
- i_2 = (x_98 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 030119e..9a7b4b8 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 @@
int const x_41 = i;
if ((x_41 > 1)) {
int const x_45 = a;
- a = (x_45 + 1);
+ a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
if (false) {
i_1 = 0;
while (true) {
@@ -46,7 +46,7 @@
}
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(1)));
}
}
i_2 = 0;
@@ -61,10 +61,10 @@
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<int>((as_type<uint>(x_68) + as_type<uint>(x_67)));
{
int const x_70 = i_2;
- i_2 = (x_70 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_70) + as_type<uint>(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 030119e..9a7b4b8 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 @@
int const x_41 = i;
if ((x_41 > 1)) {
int const x_45 = a;
- a = (x_45 + 1);
+ a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
if (false) {
i_1 = 0;
while (true) {
@@ -46,7 +46,7 @@
}
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(1)));
}
}
i_2 = 0;
@@ -61,10 +61,10 @@
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<int>((as_type<uint>(x_68) + as_type<uint>(x_67)));
{
int const x_70 = i_2;
- i_2 = (x_70 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_70) + as_type<uint>(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 3d744a3..64ce0dd 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 @@
v[uint3(0u, 1u, 2u)[x_50]] = float(x_51);
{
int const x_55 = i;
- i = (x_55 + 1);
+ i = as_type<int>((as_type<uint>(x_55) + as_type<uint>(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 3d744a3..64ce0dd 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 @@
v[uint3(0u, 1u, 2u)[x_50]] = float(x_51);
{
int const x_55 = i;
- i = (x_55 + 1);
+ i = as_type<int>((as_type<uint>(x_55) + as_type<uint>(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 f8f6e26..2ce6493 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(x_35) + as_type<uint>(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 @@
break;
}
int const x_42 = a;
- a = (x_42 + 1);
+ a = as_type<int>((as_type<uint>(x_42) + as_type<uint>(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 f8f6e26..2ce6493 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(x_35) + as_type<uint>(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 @@
break;
}
int const x_42 = a;
- a = (x_42 + 1);
+ a = as_type<int>((as_type<uint>(x_42) + as_type<uint>(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 673c478..56fe5a1 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 @@
}
int const x_46 = x_10.minusEight;
int const x_48 = a;
- a = (x_48 + (x_46 / -4));
+ a = as_type<int>((as_type<uint>(x_48) + as_type<uint>((x_46 / -4))));
int const x_50 = b;
- b = (x_50 + 1);
+ b = as_type<int>((as_type<uint>(x_50) + as_type<uint>(1)));
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 673c478..56fe5a1 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 @@
}
int const x_46 = x_10.minusEight;
int const x_48 = a;
- a = (x_48 + (x_46 / -4));
+ a = as_type<int>((as_type<uint>(x_48) + as_type<uint>((x_46 / -4))));
int const x_50 = b;
- b = (x_50 + 1);
+ b = as_type<int>((as_type<uint>(x_50) + as_type<uint>(1)));
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 bab3597..5eb30b6 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 @@
v[x_50] = (x_51 + float(x_52));
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(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 bab3597..5eb30b6 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 @@
v[x_50] = (x_51 + float(x_52));
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(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 f9b0707..031cc10 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 @@
(*(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<int>((as_type<uint>(int(x_65)) + as_type<uint>(x_18)))) {
case 51: {
while (true) {
if (true) {
@@ -62,7 +62,7 @@
}
{
int const x_22 = c;
- c = (x_22 + 1);
+ c = as_type<int>((as_type<uint>(x_22) + as_type<uint>(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 f9b0707..031cc10 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 @@
(*(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<int>((as_type<uint>(int(x_65)) + as_type<uint>(x_18)))) {
case 51: {
while (true) {
if (true) {
@@ -62,7 +62,7 @@
}
{
int const x_22 = c;
- c = (x_22 + 1);
+ c = as_type<int>((as_type<uint>(x_22) + as_type<uint>(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 8361b24..ae1ce51 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 @@
break;
}
int const x_54 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_54 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_54) + as_type<uint>(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<int>((as_type<uint>(x_62) + as_type<uint>(1)));
}
}
while (true) {
@@ -63,7 +63,7 @@
break;
}
int const x_71 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_71 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_71) + as_type<uint>(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 8361b24..ae1ce51 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 @@
break;
}
int const x_54 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_54 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_54) + as_type<uint>(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<int>((as_type<uint>(x_62) + as_type<uint>(1)));
}
}
while (true) {
@@ -63,7 +63,7 @@
break;
}
int const x_71 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_71 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_71) + as_type<uint>(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 c3d3e97..4fb97f0 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 @@
f = fmin(fmax(x_53, 0.0f), 0.0f);
{
int const x_56 = i;
- i = (x_56 - 1);
+ i = as_type<int>((as_type<uint>(x_56) - as_type<uint>(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 c3d3e97..4fb97f0 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 @@
f = fmin(fmax(x_53, 0.0f), 0.0f);
{
int const x_56 = i;
- i = (x_56 - 1);
+ i = as_type<int>((as_type<uint>(x_56) - as_type<uint>(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 2f4c481..a0efc1e 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 @@
i = x_53;
while (true) {
int const x_58 = i;
- i = (x_58 + 1);
+ i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(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 2f4c481..a0efc1e 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 @@
i = x_53;
while (true) {
int const x_58 = i;
- i = (x_58 + 1);
+ i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(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 821d826..a2e952d 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 @@
}
{
int const x_59 = i;
- i = (x_59 + 1);
+ i = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
int const x_61 = a;
- a = (x_61 + 1);
+ a = as_type<int>((as_type<uint>(x_61) + as_type<uint>(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 821d826..a2e952d 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 @@
}
{
int const x_59 = i;
- i = (x_59 + 1);
+ i = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
int const x_61 = a;
- a = (x_61 + 1);
+ a = as_type<int>((as_type<uint>(x_61) + as_type<uint>(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 f57fd22..7bb1268 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 @@
break;
}
int const x_44 = ret;
- ret = (x_44 + 1);
+ ret = as_type<int>((as_type<uint>(x_44) + as_type<uint>(1)));
{
int const x_47 = x_8.one;
int const x_48 = i;
- i = (x_48 - x_47);
+ i = as_type<int>((as_type<uint>(x_48) - as_type<uint>(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 f57fd22..7bb1268 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 @@
break;
}
int const x_44 = ret;
- ret = (x_44 + 1);
+ ret = as_type<int>((as_type<uint>(x_44) + as_type<uint>(1)));
{
int const x_47 = x_8.one;
int const x_48 = i;
- i = (x_48 - x_47);
+ i = as_type<int>((as_type<uint>(x_48) - as_type<uint>(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 fdfaeeb..9a920a0 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 @@
i = 2;
while (true) {
int const x_6 = i;
- i = (x_6 + 1);
+ i = as_type<int>((as_type<uint>(x_6) + as_type<uint>(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 a3fb456..587b3e2 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 @@
i = 2;
while (true) {
int const x_6 = i;
- i = (x_6 + 1);
+ i = as_type<int>((as_type<uint>(x_6) + as_type<uint>(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 bc8e92f..a4b35aa 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 <metal_stdlib>
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 @@
int negMinValue = 0;
minValue = -2147483648;
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<int>((as_type<uint>(x_28) * as_type<uint>(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 bc8e92f..a4b35aa 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 <metal_stdlib>
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 @@
int negMinValue = 0;
minValue = -2147483648;
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<int>((as_type<uint>(x_28) * as_type<uint>(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 b73cd87..45dc7c5 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 @@
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<int>((as_type<uint>(1) + as_type<uint>(as_type<int>((as_type<uint>(3) - as_type<uint>(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 b73cd87..45dc7c5 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 @@
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<int>((as_type<uint>(1) + as_type<uint>(as_type<int>((as_type<uint>(3) - as_type<uint>(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 921f5ea..ade8de6 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 @@
break;
}
int const x_6 = i;
- i = (x_6 - 3);
+ i = as_type<int>((as_type<uint>(x_6) - as_type<uint>(3)));
int const x_8 = i;
- i = (x_8 + 1);
+ i = as_type<int>((as_type<uint>(x_8) + as_type<uint>(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 921f5ea..ade8de6 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 @@
break;
}
int const x_6 = i;
- i = (x_6 - 3);
+ i = as_type<int>((as_type<uint>(x_6) - as_type<uint>(3)));
int const x_8 = i;
- i = (x_8 + 1);
+ i = as_type<int>((as_type<uint>(x_8) + as_type<uint>(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 1392c3b..971bd11 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 @@
}
{
int const x_9 = i;
- i = (x_9 - 1);
+ i = as_type<int>((as_type<uint>(x_9) - as_type<uint>(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 1392c3b..971bd11 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 @@
}
{
int const x_9 = i;
- i = (x_9 - 1);
+ i = as_type<int>((as_type<uint>(x_9) - as_type<uint>(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 c2559b6..c195bec 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 @@
}
{
int const x_9 = i;
- i = (x_9 - 1);
+ i = as_type<int>((as_type<uint>(x_9) - as_type<uint>(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 c2559b6..c195bec 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 @@
}
{
int const x_9 = i;
- i = (x_9 - 1);
+ i = as_type<int>((as_type<uint>(x_9) - as_type<uint>(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 9138eca..e516896 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 @@
break;
}
int const x_34 = i;
- i = (x_34 - 1);
+ i = as_type<int>((as_type<uint>(x_34) - as_type<uint>(1)));
int const x_36 = i;
- i = (x_36 - 1);
+ i = as_type<int>((as_type<uint>(x_36) - as_type<uint>(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 9138eca..e516896 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 @@
break;
}
int const x_34 = i;
- i = (x_34 - 1);
+ i = as_type<int>((as_type<uint>(x_34) - as_type<uint>(1)));
int const x_36 = i;
- i = (x_36 - 1);
+ i = as_type<int>((as_type<uint>(x_36) - as_type<uint>(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 342ee1d..5d3b770 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 <metal_stdlib>
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 @@
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 342ee1d..5d3b770 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 <metal_stdlib>
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 @@
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 ba94661..d7a23cd 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(5) - as_type<uint>(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 ba94661..d7a23cd 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(5) - as_type<uint>(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 e614cff..917b1d9 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 @@
a = tint_symbol_3;
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 e614cff..917b1d9 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 @@
a = tint_symbol_3;
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 cd5d0e3..122ec2d 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 @@
arr.arr[x_53] = (x_57 + x_55);
{
int const x_60 = i;
- i = (x_60 + 1);
+ i = as_type<int>((as_type<uint>(x_60) + as_type<uint>(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 cd5d0e3..122ec2d 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 @@
arr.arr[x_53] = (x_57 + x_55);
{
int const x_60 = i;
- i = (x_60 + 1);
+ i = as_type<int>((as_type<uint>(x_60) + as_type<uint>(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 cb70f17..d08d1ee 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 @@
}
{
int const x_43 = i;
- i = (x_43 + 1);
+ i = as_type<int>((as_type<uint>(x_43) + as_type<uint>(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 cb70f17..d08d1ee 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 @@
}
{
int const x_43 = i;
- i = (x_43 + 1);
+ i = as_type<int>((as_type<uint>(x_43) + as_type<uint>(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 18db7a4..ac797e7 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 @@
break;
}
int const x_86 = b;
- b = (x_86 + 1);
+ b = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
{
int const x_88 = i;
- i = (x_88 + 1);
+ i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(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 18db7a4..ac797e7 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 @@
break;
}
int const x_86 = b;
- b = (x_86 + 1);
+ b = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
{
int const x_88 = i;
- i = (x_88 + 1);
+ i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(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 c57161c..a4060c7 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 @@
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<int>((as_type<uint>(x_69) * as_type<uint>(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 c57161c..a4060c7 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 @@
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<int>((as_type<uint>(x_69) * as_type<uint>(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 80f3c6a..e0f4d2a 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 @@
break;
}
int const x_45 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_45 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 @@
break;
}
int const x_66 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_66 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_66) + as_type<uint>(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 80f3c6a..e0f4d2a 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 @@
break;
}
int const x_45 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_45 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 @@
break;
}
int const x_66 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_66 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_66) + as_type<uint>(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 68f7998..5c952b7 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 @@
break;
}
int const x_118 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_118 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(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 @@
break;
}
int const x_137 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_137 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(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 @@
f = (x_149 + (x_142 * x_147));
{
int const x_151 = b;
- b = (x_151 - 1);
+ b = as_type<int>((as_type<uint>(x_151) - as_type<uint>(1)));
}
}
int const x_153 = a;
@@ -115,7 +115,7 @@
}
{
int const x_172 = a;
- a = (x_172 + 1);
+ a = as_type<int>((as_type<uint>(x_172) + as_type<uint>(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 68f7998..5c952b7 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 @@
break;
}
int const x_118 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_118 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_118) + as_type<uint>(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 @@
break;
}
int const x_137 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_137 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_137) + as_type<uint>(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 @@
f = (x_149 + (x_142 * x_147));
{
int const x_151 = b;
- b = (x_151 - 1);
+ b = as_type<int>((as_type<uint>(x_151) - as_type<uint>(1)));
}
}
int const x_153 = a;
@@ -115,7 +115,7 @@
}
{
int const x_172 = a;
- a = (x_172 + 1);
+ a = as_type<int>((as_type<uint>(x_172) + as_type<uint>(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 6527266..3a59796 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 @@
break;
}
int const x_75 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_75 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el;
return x_78;
}
@@ -39,7 +39,7 @@
*(tint_symbol_5) = 0;
while (true) {
int const x_35 = *(tint_symbol_5);
- *(tint_symbol_5) = (x_35 + 1);
+ *(tint_symbol_5) = as_type<int>((as_type<uint>(x_35) + as_type<uint>(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 e3bf7ba..7db4d7c 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 @@
break;
}
int const x_75 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_75 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
int const x_78 = x_7.x_GLF_uniform_int_values.arr[0].el;
return x_78;
}
@@ -39,7 +39,7 @@
*(tint_symbol_5) = 0;
while (true) {
int const x_35 = *(tint_symbol_5);
- *(tint_symbol_5) = (x_35 + 1);
+ *(tint_symbol_5) = as_type<int>((as_type<uint>(x_35) + as_type<uint>(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 de0a7fc..56d2e87 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 @@
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<int>(x_27)))) {
+ if ((x_23 < as_type<int>((as_type<uint>(100) - as_type<uint>(as_type<int>(x_27)))))) {
} else {
break;
}
{
- x_24 = as_type<int>((x_23 + as_type<int>(1)));
+ x_24 = as_type<int>(as_type<int>((as_type<uint>(x_23) + as_type<uint>(as_type<int>(1)))));
x_23_phi = x_24;
}
}
@@ -55,8 +55,8 @@
break;
}
{
- x_41 = (x_40 + 1);
- x_38 = as_type<int>((x_37 * as_type<int>((1 - as_type<int>(x_37)))));
+ x_41 = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
+ x_38 = as_type<int>(as_type<int>((as_type<uint>(x_37) * as_type<uint>(as_type<int>(as_type<int>((as_type<uint>(1) - as_type<uint>(as_type<int>(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 de0a7fc..56d2e87 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 @@
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<int>(x_27)))) {
+ if ((x_23 < as_type<int>((as_type<uint>(100) - as_type<uint>(as_type<int>(x_27)))))) {
} else {
break;
}
{
- x_24 = as_type<int>((x_23 + as_type<int>(1)));
+ x_24 = as_type<int>(as_type<int>((as_type<uint>(x_23) + as_type<uint>(as_type<int>(1)))));
x_23_phi = x_24;
}
}
@@ -55,8 +55,8 @@
break;
}
{
- x_41 = (x_40 + 1);
- x_38 = as_type<int>((x_37 * as_type<int>((1 - as_type<int>(x_37)))));
+ x_41 = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
+ x_38 = as_type<int>(as_type<int>((as_type<uint>(x_37) * as_type<uint>(as_type<int>(as_type<int>((as_type<uint>(1) - as_type<uint>(as_type<int>(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 a7c34d0..ef3b65b 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 @@
break;
}
int const x_33 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_33 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
int const x_35 = *(tint_symbol_4);
int const x_36 = *(tint_symbol_4);
- if (((x_35 * x_36) > 10)) {
+ if ((as_type<int>((as_type<uint>(x_35) * as_type<uint>(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 a7c34d0..ef3b65b 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 @@
break;
}
int const x_33 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_33 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
int const x_35 = *(tint_symbol_4);
int const x_36 = *(tint_symbol_4);
- if (((x_35 * x_36) > 10)) {
+ if ((as_type<int>((as_type<uint>(x_35) * as_type<uint>(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 63f4fcd..5db673b 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 @@
int const x_26 = a;
if ((x_26 == 0)) {
int const x_31 = a;
- a = (x_31 + 1);
+ a = as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)));
} else {
int const x_33 = a;
- a = (x_33 + 1);
+ a = as_type<int>((as_type<uint>(x_33) + as_type<uint>(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 63f4fcd..5db673b 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 @@
int const x_26 = a;
if ((x_26 == 0)) {
int const x_31 = a;
- a = (x_31 + 1);
+ a = as_type<int>((as_type<uint>(x_31) + as_type<uint>(1)));
} else {
int const x_33 = a;
- a = (x_33 + 1);
+ a = as_type<int>((as_type<uint>(x_33) + as_type<uint>(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 b18bbf7..20c03a2 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 @@
break;
}
int const x_42 = a;
- a = (x_42 + 1);
+ a = as_type<int>((as_type<uint>(x_42) + as_type<uint>(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<int>((as_type<uint>(x_53) * as_type<uint>(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 b18bbf7..20c03a2 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 @@
break;
}
int const x_42 = a;
- a = (x_42 + 1);
+ a = as_type<int>((as_type<uint>(x_42) + as_type<uint>(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<int>((as_type<uint>(x_53) * as_type<uint>(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 6aa0157..5989dc4 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 @@
discard_fragment();
}
int const x_37 = a;
- a = (x_37 + 1);
+ a = as_type<int>((as_type<uint>(x_37) + as_type<uint>(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 6aa0157..5989dc4 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 @@
discard_fragment();
}
int const x_37 = a;
- a = (x_37 + 1);
+ a = as_type<int>((as_type<uint>(x_37) + as_type<uint>(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 b25d714..82604e9 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 @@
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<int>((as_type<uint>(7) + as_type<uint>(x_33))))) {
} else {
break;
}
@@ -28,7 +28,7 @@
case 7:
case 8: {
int const x_40 = a;
- a = (x_40 + 1);
+ a = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
break;
}
default: {
@@ -37,7 +37,7 @@
}
{
int const x_42 = i;
- i = (x_42 + 1);
+ i = as_type<int>((as_type<uint>(x_42) + as_type<uint>(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 b25d714..82604e9 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 @@
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<int>((as_type<uint>(7) + as_type<uint>(x_33))))) {
} else {
break;
}
@@ -28,7 +28,7 @@
case 7:
case 8: {
int const x_40 = a;
- a = (x_40 + 1);
+ a = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
break;
}
default: {
@@ -37,7 +37,7 @@
}
{
int const x_42 = i;
- i = (x_42 + 1);
+ i = as_type<int>((as_type<uint>(x_42) + as_type<uint>(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 28fc564..7f0eda5 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 @@
break;
}
int const x_49 = a;
- a = (x_49 + 1);
+ a = as_type<int>((as_type<uint>(x_49) + as_type<uint>(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 28fc564..7f0eda5 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 @@
break;
}
int const x_49 = a;
- a = (x_49 + 1);
+ a = as_type<int>((as_type<uint>(x_49) + as_type<uint>(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 fa49516..9c31fce 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 @@
f1 = x_51;
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 fa49516..9c31fce 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 @@
f1 = x_51;
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 9a18e81..6c3580d 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 @@
}
{
int const x_73 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_73 + 1);
- x_67 = (x_66 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
+ x_67 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
x_66_phi = x_67;
}
}
@@ -54,7 +54,7 @@
}
{
int const x_32 = *(tint_symbol_5);
- *(tint_symbol_5) = (x_32 + 1);
+ *(tint_symbol_5) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
func_(x_7, tint_symbol_5);
}
}
@@ -66,7 +66,7 @@
}
{
int const x_40 = *(tint_symbol_5);
- *(tint_symbol_5) = (x_40 + 1);
+ *(tint_symbol_5) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(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 9a18e81..6c3580d 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 @@
}
{
int const x_73 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_73 + 1);
- x_67 = (x_66 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
+ x_67 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
x_66_phi = x_67;
}
}
@@ -54,7 +54,7 @@
}
{
int const x_32 = *(tint_symbol_5);
- *(tint_symbol_5) = (x_32 + 1);
+ *(tint_symbol_5) = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
func_(x_7, tint_symbol_5);
}
}
@@ -66,7 +66,7 @@
}
{
int const x_40 = *(tint_symbol_5);
- *(tint_symbol_5) = (x_40 + 1);
+ *(tint_symbol_5) = as_type<int>((as_type<uint>(x_40) + as_type<uint>(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 231e58a..141d1a7 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 @@
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<int>((as_type<uint>(x_45) + as_type<uint>(1)));
}
int const x_47 = b;
- int const x_48 = (x_47 + 1);
+ int const x_48 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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<int>((as_type<uint>(x_51) + as_type<uint>(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 231e58a..141d1a7 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 @@
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<int>((as_type<uint>(x_45) + as_type<uint>(1)));
}
int const x_47 = b;
- int const x_48 = (x_47 + 1);
+ int const x_48 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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<int>((as_type<uint>(x_51) + as_type<uint>(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 8671edc..3f78d7f 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 @@
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<int>((as_type<uint>(x_56) + as_type<uint>(x_55)));
{
int const x_58 = i;
- i = (x_58 + 1);
+ i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(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 8671edc..3f78d7f 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 @@
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<int>((as_type<uint>(x_56) + as_type<uint>(x_55)));
{
int const x_58 = i;
- i = (x_58 + 1);
+ i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(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 45a90bc..083b8d5 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 @@
break;
}
int const x_50 = a;
- a = (x_50 + 1);
+ a = as_type<int>((as_type<uint>(x_50) + as_type<uint>(1)));
int const x_52 = c;
- c = (x_52 + 1);
+ c = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
int const x_54 = b;
- b = (x_54 + 1);
+ b = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
}
while (true) {
int const x_60 = a;
@@ -59,7 +59,7 @@
}
{
int const x_65 = a;
- a = (x_65 + 1);
+ a = as_type<int>((as_type<uint>(x_65) + as_type<uint>(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 2c946fe..e80a8e0 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 @@
break;
}
int const x_50 = a;
- a = (x_50 + 1);
+ a = as_type<int>((as_type<uint>(x_50) + as_type<uint>(1)));
int const x_52 = c;
- c = (x_52 + 1);
+ c = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
int const x_54 = b;
- b = (x_54 + 1);
+ b = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
}
while (true) {
int const x_60 = a;
@@ -59,7 +59,7 @@
}
{
int const x_65 = a;
- a = (x_65 + 1);
+ a = as_type<int>((as_type<uint>(x_65) + as_type<uint>(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 5b389f3..5db1f98 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 @@
int const x_38 = i;
if ((x_38 > 5)) {
int const x_42 = i;
- i = (x_42 + 1);
+ i = as_type<int>((as_type<uint>(x_42) + as_type<uint>(1)));
}
int const x_44 = i;
if ((x_44 > 8)) {
@@ -28,7 +28,7 @@
}
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 5b389f3..5db1f98 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 @@
int const x_38 = i;
if ((x_38 > 5)) {
int const x_42 = i;
- i = (x_42 + 1);
+ i = as_type<int>((as_type<uint>(x_42) + as_type<uint>(1)));
}
int const x_44 = i;
if ((x_44 > 8)) {
@@ -28,7 +28,7 @@
}
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 26ba969..c8fdc80 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 @@
arr.arr[x_50] = x_52;
{
int const x_54 = i;
- i = (x_54 + 1);
+ i = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
}
}
a = -1;
@@ -57,13 +57,13 @@
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<int>((as_type<uint>(x_64) + as_type<uint>(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<int>((as_type<uint>(x_69) + as_type<uint>(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 26ba969..c8fdc80 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 @@
arr.arr[x_50] = x_52;
{
int const x_54 = i;
- i = (x_54 + 1);
+ i = as_type<int>((as_type<uint>(x_54) + as_type<uint>(1)));
}
}
a = -1;
@@ -57,13 +57,13 @@
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<int>((as_type<uint>(x_64) + as_type<uint>(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<int>((as_type<uint>(x_69) + as_type<uint>(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 bcdae40..4d2e299 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(x_35) + as_type<uint>(1)));
int const x_38 = x_6.x_GLF_uniform_int_values.arr[1].el;
i = x_38;
while (true) {
@@ -47,10 +52,10 @@
}
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<int>((as_type<uint>(x_53) + as_type<uint>(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 bcdae40..4d2e299 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(x_35) + as_type<uint>(1)));
int const x_38 = x_6.x_GLF_uniform_int_values.arr[1].el;
i = x_38;
while (true) {
@@ -47,10 +52,10 @@
}
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<int>((as_type<uint>(x_53) + as_type<uint>(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 e2416d2..6c318fa 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_80)) - as_type<uint>(1)))) - as_type<uint>(x_84)))) + as_type<uint>(x_86)));
int const x_88 = b;
- b = (x_88 + 1);
+ b = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
{
int const x_90 = i;
- i = (x_90 + 1);
+ i = as_type<int>((as_type<uint>(x_90) + as_type<uint>(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 e2416d2..6c318fa 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_80)) - as_type<uint>(1)))) - as_type<uint>(x_84)))) + as_type<uint>(x_86)));
int const x_88 = b;
- b = (x_88 + 1);
+ b = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
{
int const x_90 = i;
- i = (x_90 + 1);
+ i = as_type<int>((as_type<uint>(x_90) + as_type<uint>(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 d0afc76..523aec7 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 @@
A.arr[x_66] = x_68;
{
int const x_70 = i;
- i = (x_70 + 1);
+ i = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
a = -1;
@@ -57,7 +57,7 @@
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<int>((as_type<uint>(x_79) + as_type<uint>(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 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<int>((as_type<uint>(x_94) + as_type<uint>(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 d0afc76..523aec7 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 @@
A.arr[x_66] = x_68;
{
int const x_70 = i;
- i = (x_70 + 1);
+ i = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
a = -1;
@@ -57,7 +57,7 @@
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<int>((as_type<uint>(x_79) + as_type<uint>(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 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<int>((as_type<uint>(x_94) + as_type<uint>(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 4f33cd7..3db287a5 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 @@
case 0:
case 1: {
int const x_47 = count0;
- count0 = (x_47 + 1);
+ count0 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(1)));
/* fallthrough */
}
case 2:
case 3: {
int const x_49 = count1;
- count1 = (x_49 + 1);
+ count1 = as_type<int>((as_type<uint>(x_49) + as_type<uint>(1)));
break;
}
default: {
@@ -55,7 +55,7 @@
}
{
int const x_51 = i;
- i = (x_51 + 1);
+ i = as_type<int>((as_type<uint>(x_51) + as_type<uint>(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 4f33cd7..3db287a5 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 @@
case 0:
case 1: {
int const x_47 = count0;
- count0 = (x_47 + 1);
+ count0 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(1)));
/* fallthrough */
}
case 2:
case 3: {
int const x_49 = count1;
- count1 = (x_49 + 1);
+ count1 = as_type<int>((as_type<uint>(x_49) + as_type<uint>(1)));
break;
}
default: {
@@ -55,7 +55,7 @@
}
{
int const x_51 = i;
- i = (x_51 + 1);
+ i = as_type<int>((as_type<uint>(x_51) + as_type<uint>(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 b727426..25b2762 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 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<int>((as_type<uint>(x_77) + as_type<uint>(1)));
int const x_79 = b;
- b = (x_79 + 1);
+ b = as_type<int>((as_type<uint>(x_79) + as_type<uint>(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 b727426..25b2762 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 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<int>((as_type<uint>(x_77) + as_type<uint>(1)));
int const x_79 = b;
- b = (x_79 + 1);
+ b = as_type<int>((as_type<uint>(x_79) + as_type<uint>(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 111c664..fe0cdc7 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 @@
*(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
}
int const x_59 = i;
- i = (x_59 - 1);
+ i = as_type<int>((as_type<uint>(x_59) - as_type<uint>(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 111c664..fe0cdc7 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 @@
*(tint_symbol_4) = float4(x_57, x_57, x_57, x_57);
}
int const x_59 = i;
- i = (x_59 - 1);
+ i = as_type<int>((as_type<uint>(x_59) - as_type<uint>(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 752c12b..2bc64d6 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 @@
*(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<uint>(select(1, 2, (x_38 >= x_40))));
+ i = as_type<int>((as_type<uint>(1) << as_type<uint>(select(1, 2, (x_38 >= x_40)))));
while (true) {
bool x_57 = false;
bool x_58_phi = false;
@@ -61,7 +61,7 @@
*(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<int>((as_type<uint>(x_73) + as_type<uint>(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 752c12b..2bc64d6 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 @@
*(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<uint>(select(1, 2, (x_38 >= x_40))));
+ i = as_type<int>((as_type<uint>(1) << as_type<uint>(select(1, 2, (x_38 >= x_40)))));
while (true) {
bool x_57 = false;
bool x_58_phi = false;
@@ -61,7 +61,7 @@
*(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<int>((as_type<uint>(x_73) + as_type<uint>(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 57d1bba..166f249 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 @@
break;
}
int const x_66 = i;
- i = (x_66 - 1);
+ i = as_type<int>((as_type<uint>(x_66) - as_type<uint>(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 57d1bba..166f249 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 @@
break;
}
int const x_66 = i;
- i = (x_66 - 1);
+ i = as_type<int>((as_type<uint>(x_66) - as_type<uint>(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 ed3ad85..63a0e83 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 @@
a = x_55;
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(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 ed3ad85..63a0e83 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 @@
a = x_55;
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(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 0e0fb17..1219c9f 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 @@
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<uint>((x_25 << as_type<uint>(5)))) >> as_type<uint>(x_29));
+ a = ((1 >> as_type<uint>(as_type<int>((as_type<uint>(x_25) << as_type<uint>(5))))) >> as_type<uint>(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 0e0fb17..1219c9f 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 @@
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<uint>((x_25 << as_type<uint>(5)))) >> as_type<uint>(x_29));
+ a = ((1 >> as_type<uint>(as_type<int>((as_type<uint>(x_25) << as_type<uint>(5))))) >> as_type<uint>(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 6399b00..5aae4c1 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 const x_22 = i;
- i = (x_22 + 1);
+ i = as_type<int>((as_type<uint>(x_22) + as_type<uint>(1)));
}
}
int const x_24 = x_8.x_GLF_uniform_int_values.arr[0].el;
@@ -103,20 +103,20 @@
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<int>((as_type<uint>(x_55) + as_type<uint>(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<int>((as_type<uint>(x_79) + as_type<uint>(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<int>((as_type<uint>(x_61) + as_type<uint>(x_62)));
int const x_64 = i_1;
int const x_65 = a_1.arr[x_64];
param = x_65;
@@ -126,7 +126,7 @@
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<int>((as_type<uint>(x_69) - as_type<uint>(1)));
}
} else {
int const x_71 = i_1;
@@ -138,12 +138,12 @@
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<int>((as_type<uint>(x_77) + as_type<uint>(x_76)));
}
}
{
int const x_79 = i_1;
- i_1 = (x_79 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
}
}
int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el;
@@ -167,7 +167,7 @@
}
{
int const x_89 = i_2;
- i_2 = (x_89 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_89) + as_type<uint>(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 6399b00..5aae4c1 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 const x_22 = i;
- i = (x_22 + 1);
+ i = as_type<int>((as_type<uint>(x_22) + as_type<uint>(1)));
}
}
int const x_24 = x_8.x_GLF_uniform_int_values.arr[0].el;
@@ -103,20 +103,20 @@
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<int>((as_type<uint>(x_55) + as_type<uint>(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<int>((as_type<uint>(x_79) + as_type<uint>(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<int>((as_type<uint>(x_61) + as_type<uint>(x_62)));
int const x_64 = i_1;
int const x_65 = a_1.arr[x_64];
param = x_65;
@@ -126,7 +126,7 @@
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<int>((as_type<uint>(x_69) - as_type<uint>(1)));
}
} else {
int const x_71 = i_1;
@@ -138,12 +138,12 @@
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<int>((as_type<uint>(x_77) + as_type<uint>(x_76)));
}
}
{
int const x_79 = i_1;
- i_1 = (x_79 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
}
}
int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el;
@@ -167,7 +167,7 @@
}
{
int const x_89 = i_2;
- i_2 = (x_89 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_89) + as_type<uint>(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 df420d2..0314455 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 @@
arr.arr[x_56].data = x_57;
{
int const x_59 = i;
- i = (x_59 + 1);
+ i = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el;
@@ -107,13 +107,13 @@
}
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
}
}
{
int const x_115 = i_1;
- i_1 = (x_115 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(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 df420d2..0314455 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 @@
arr.arr[x_56].data = x_57;
{
int const x_59 = i;
- i = (x_59 + 1);
+ i = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el;
@@ -107,13 +107,13 @@
}
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
}
}
{
int const x_115 = i_1;
- i_1 = (x_115 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(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 f3e2dd6..e93e2b5 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 @@
}
{
int const x_62 = i;
- i = (x_62 + 1);
+ i = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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 f3e2dd6..e93e2b5 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 @@
}
{
int const x_62 = i;
- i = (x_62 + 1);
+ i = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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 4b31f2b..0ecda7c 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 @@
a = (x_45 / 2);
{
int const x_47 = i;
- i = (x_47 + 1);
+ i = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 4b31f2b..0ecda7c 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 @@
a = (x_45 / 2);
{
int const x_47 = i;
- i = (x_47 + 1);
+ i = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 3ebe7f7..573e4e9 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 @@
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<int>((as_type<uint>(x_46) + as_type<uint>(1)));
}
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 3ebe7f7..573e4e9 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 @@
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<int>((as_type<uint>(x_46) + as_type<uint>(1)));
}
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 06c1659..4c40186 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 @@
}
v.y = 1.0f;
int const x_100 = i;
- i = (x_100 + 1);
+ i = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
{
int const x_102 = k;
- k = (x_102 + 1);
+ k = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1)));
}
}
int const x_104 = i;
@@ -63,7 +63,7 @@
data.arr[x_52] = x_53;
{
int const x_55 = j;
- j = (x_55 + 1);
+ j = as_type<int>((as_type<uint>(x_55) + as_type<uint>(1)));
}
}
j_1 = 0;
@@ -75,10 +75,10 @@
}
int const x_64 = j_1;
float3 const x_67 = func_();
- data.arr[((4 * x_64) + 1)] = x_67;
+ data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_64)))) + as_type<uint>(1)))] = x_67;
{
int const x_69 = j_1;
- j_1 = (x_69 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 06c1659..4c40186 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 @@
}
v.y = 1.0f;
int const x_100 = i;
- i = (x_100 + 1);
+ i = as_type<int>((as_type<uint>(x_100) + as_type<uint>(1)));
{
int const x_102 = k;
- k = (x_102 + 1);
+ k = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1)));
}
}
int const x_104 = i;
@@ -63,7 +63,7 @@
data.arr[x_52] = x_53;
{
int const x_55 = j;
- j = (x_55 + 1);
+ j = as_type<int>((as_type<uint>(x_55) + as_type<uint>(1)));
}
}
j_1 = 0;
@@ -75,10 +75,10 @@
}
int const x_64 = j_1;
float3 const x_67 = func_();
- data.arr[((4 * x_64) + 1)] = x_67;
+ data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_64)))) + as_type<uint>(1)))] = x_67;
{
int const x_69 = j_1;
- j_1 = (x_69 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 2ff0873..380f548 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 @@
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<uint>(x_27));
+ idx = as_type<int>((as_type<uint>(1) << as_type<uint>(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 2ff0873..380f548 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 @@
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<uint>(x_27));
+ idx = as_type<int>((as_type<uint>(1) << as_type<uint>(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 6500f1c..ae80624 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 @@
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<uint>(x_28)) >> as_type<uint>(1));
+ int const x_30 = (as_type<int>((as_type<uint>(x_28) << as_type<uint>(x_28))) >> as_type<uint>(1));
x_32_phi = x_24;
while (true) {
int const x_32 = x_32_phi;
@@ -33,7 +33,7 @@
break;
}
int x_33 = 0;
- x_33 = (x_32 + 1);
+ x_33 = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el;
if ((x_33 == as_type<int>(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 6500f1c..ae80624 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 @@
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<uint>(x_28)) >> as_type<uint>(1));
+ int const x_30 = (as_type<int>((as_type<uint>(x_28) << as_type<uint>(x_28))) >> as_type<uint>(1));
x_32_phi = x_24;
while (true) {
int const x_32 = x_32_phi;
@@ -33,7 +33,7 @@
break;
}
int x_33 = 0;
- x_33 = (x_32 + 1);
+ x_33 = as_type<int>((as_type<uint>(x_32) + as_type<uint>(1)));
int const x_39 = x_5.x_GLF_uniform_int_values.arr[2].el;
if ((x_33 == as_type<int>(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 0932150..ddde176 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 @@
}
v.y = 1.0f;
int const x_89 = i;
- i = (x_89 + 1);
+ i = as_type<int>((as_type<uint>(x_89) + as_type<uint>(1)));
{
int const x_91 = k;
- k = (x_91 + 1);
+ k = as_type<int>((as_type<uint>(x_91) + as_type<uint>(1)));
}
}
int const x_93 = i;
@@ -61,7 +61,7 @@
data.arr[x_49] = x_50;
{
int const x_52 = j;
- j = (x_52 + 1);
+ j = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
}
}
j_1 = 0;
@@ -73,10 +73,10 @@
}
int const x_61 = j_1;
float3 const x_64 = func_();
- data.arr[((4 * x_61) + 1)] = x_64;
+ data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_61)))) + as_type<uint>(1)))] = x_64;
{
int const x_66 = j_1;
- j_1 = (x_66 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(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 0932150..ddde176 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 @@
}
v.y = 1.0f;
int const x_89 = i;
- i = (x_89 + 1);
+ i = as_type<int>((as_type<uint>(x_89) + as_type<uint>(1)));
{
int const x_91 = k;
- k = (x_91 + 1);
+ k = as_type<int>((as_type<uint>(x_91) + as_type<uint>(1)));
}
}
int const x_93 = i;
@@ -61,7 +61,7 @@
data.arr[x_49] = x_50;
{
int const x_52 = j;
- j = (x_52 + 1);
+ j = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
}
}
j_1 = 0;
@@ -73,10 +73,10 @@
}
int const x_61 = j_1;
float3 const x_64 = func_();
- data.arr[((4 * x_61) + 1)] = x_64;
+ data.arr[as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(x_61)))) + as_type<uint>(1)))] = x_64;
{
int const x_66 = j_1;
- j_1 = (x_66 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_66) + as_type<uint>(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 d81e3ea..ab1a1a4 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 @@
f = (fabs((-(x_47) * x_49)) + x_53);
{
int const x_55 = i;
- i = (x_55 + 1);
+ i = as_type<int>((as_type<uint>(x_55) + as_type<uint>(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 d81e3ea..ab1a1a4 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 @@
f = (fabs((-(x_47) * x_49)) + x_53);
{
int const x_55 = i;
- i = (x_55 + 1);
+ i = as_type<int>((as_type<uint>(x_55) + as_type<uint>(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 a1922a9..4836c63 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 @@
}
}
int const x_45 = a;
- a = (x_45 + 1);
+ a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
{
int const x_47 = i;
- i = (x_47 + 1);
+ i = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 a1922a9..4836c63 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 @@
}
}
int const x_45 = a;
- a = (x_45 + 1);
+ a = as_type<int>((as_type<uint>(x_45) + as_type<uint>(1)));
{
int const x_47 = i;
- i = (x_47 + 1);
+ i = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 df997cd..e902978 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 @@
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<int>((as_type<uint>(x_62) + as_type<uint>(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 df997cd..e902978 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 @@
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<int>((as_type<uint>(x_62) + as_type<uint>(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 49fff4f..03f75a7 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 @@
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<int>((as_type<uint>(x_57) + as_type<uint>(1)));
int const x_59 = index;
- index = (x_59 + 1);
+ index = as_type<int>((as_type<uint>(x_59) + as_type<uint>(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 028ec7e..f10a979 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 @@
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<int>((as_type<uint>(x_57) + as_type<uint>(1)));
int const x_59 = index;
- index = (x_59 + 1);
+ index = as_type<int>((as_type<uint>(x_59) + as_type<uint>(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 70485b3..10f8c70 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 @@
a = (x_64 / x_65);
{
int const x_67 = i;
- i = (x_67 + 1);
+ i = as_type<int>((as_type<uint>(x_67) + as_type<uint>(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 70485b3..10f8c70 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 @@
a = (x_64 / x_65);
{
int const x_67 = i;
- i = (x_67 + 1);
+ i = as_type<int>((as_type<uint>(x_67) + as_type<uint>(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 5bef25a..1c8b0d4 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 @@
}
{
int const x_85 = i;
- i = (x_85 + 1);
+ i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(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 6b34014..a488355 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 @@
}
{
int const x_85 = i;
- i = (x_85 + 1);
+ i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(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 20ea637..df16623 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 @@
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<int>((as_type<uint>(x_42) + as_type<uint>(1)));
} else {
int const x_44 = a;
int const x_45 = i;
@@ -42,7 +42,7 @@
}
{
int const x_47 = i;
- i = (x_47 + 1);
+ i = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 20ea637..df16623 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 @@
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<int>((as_type<uint>(x_42) + as_type<uint>(1)));
} else {
int const x_44 = a;
int const x_45 = i;
@@ -42,7 +42,7 @@
}
{
int const x_47 = i;
- i = (x_47 + 1);
+ i = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 1332988..78ca106 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 <metal_stdlib>
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 @@
break;
}
int const x_33 = a;
- a = ((x_33 / 2) - 1);
+ a = as_type<int>((as_type<uint>((x_33 / 2)) - as_type<uint>(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 1332988..78ca106 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 <metal_stdlib>
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 @@
break;
}
int const x_33 = a;
- a = ((x_33 / 2) - 1);
+ a = as_type<int>((as_type<uint>((x_33 / 2)) - as_type<uint>(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 886f813..87ab4e7 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 @@
*(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<int>((as_type<uint>(x_62) + as_type<uint>(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 886f813..87ab4e7 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 @@
*(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<int>((as_type<uint>(x_62) + as_type<uint>(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 ec7cae1..a8ea0d5 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 @@
arr.arr[x_63] = (x_65 + 1.0f);
{
int const x_68 = i;
- i = (x_68 + 1);
+ i = as_type<int>((as_type<uint>(x_68) + as_type<uint>(1)));
int const x_70 = j;
- j = (x_70 + 1);
+ j = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
float const x_73 = x_6.x_GLF_uniform_float_values.arr[0].el;
@@ -88,7 +88,7 @@
}
{
int const x_101 = i;
- i = (x_101 + 1);
+ i = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 ec7cae1..a8ea0d5 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 @@
arr.arr[x_63] = (x_65 + 1.0f);
{
int const x_68 = i;
- i = (x_68 + 1);
+ i = as_type<int>((as_type<uint>(x_68) + as_type<uint>(1)));
int const x_70 = j;
- j = (x_70 + 1);
+ j = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
float const x_73 = x_6.x_GLF_uniform_float_values.arr[0].el;
@@ -88,7 +88,7 @@
}
{
int const x_101 = i;
- i = (x_101 + 1);
+ i = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 e35af4f..cd059fc 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 @@
}
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
}
{
int const x_115 = i;
- i = (x_115 + 1);
+ i = as_type<int>((as_type<uint>(x_115) + as_type<uint>(1)));
}
}
{
int const x_117 = a;
- a = (x_117 + 1);
+ a = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
}
}
while (true) {
@@ -121,7 +121,7 @@
*(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<int>((as_type<uint>(x_144) + as_type<uint>(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 e35af4f..cd059fc 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 @@
}
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
}
{
int const x_115 = i;
- i = (x_115 + 1);
+ i = as_type<int>((as_type<uint>(x_115) + as_type<uint>(1)));
}
}
{
int const x_117 = a;
- a = (x_117 + 1);
+ a = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
}
}
while (true) {
@@ -121,7 +121,7 @@
*(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<int>((as_type<uint>(x_144) + as_type<uint>(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 efced0c..9ddedab 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 @@
a = pow((((x_91 + x_93) + x_96) + x_99), x_102);
{
int const x_18 = i;
- i = (x_18 + 1);
+ i = as_type<int>((as_type<uint>(x_18) + as_type<uint>(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 efced0c..9ddedab 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 @@
a = pow((((x_91 + x_93) + x_96) + x_99), x_102);
{
int const x_18 = i;
- i = (x_18 + 1);
+ i = as_type<int>((as_type<uint>(x_18) + as_type<uint>(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 813f700..3afddf2 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 @@
break;
}
float const x_44 = x_7.injectionSwitch.y;
- a = ((int(x_44) * 2) / 2);
+ a = (as_type<int>((as_type<uint>(int(x_44)) * as_type<uint>(2))) / 2);
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 813f700..3afddf2 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 @@
break;
}
float const x_44 = x_7.injectionSwitch.y;
- a = ((int(x_44) * 2) / 2);
+ a = (as_type<int>((as_type<uint>(int(x_44)) * as_type<uint>(2))) / 2);
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 5d2d058..6c07995 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 @@
}
{
int const x_91 = i;
- i = (x_91 + 1);
+ i = as_type<int>((as_type<uint>(x_91) + as_type<uint>(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 5d2d058..6c07995 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 @@
}
{
int const x_91 = i;
- i = (x_91 + 1);
+ i = as_type<int>((as_type<uint>(x_91) + as_type<uint>(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 f72fd0a..19ebc96 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 const x_112 = i;
- i = (x_112 + 1);
+ i = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
}
}
int const x_115 = x_8.x_GLF_uniform_int_values.arr[0].el;
@@ -80,7 +80,7 @@
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<int>((as_type<uint>(x_44) + as_type<uint>(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 f72fd0a..19ebc96 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 const x_112 = i;
- i = (x_112 + 1);
+ i = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
}
}
int const x_115 = x_8.x_GLF_uniform_int_values.arr[0].el;
@@ -80,7 +80,7 @@
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<int>((as_type<uint>(x_44) + as_type<uint>(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 91c59ac..b986b1e 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 @@
} else {
S const x_60 = arr.arr[1];
param = x_60;
- param_1 = (2 + as_type<int>(x_50));
+ param_1 = as_type<int>((as_type<uint>(2) + as_type<uint>(as_type<int>(x_50))));
int const x_61 = param_1;
S const x_63 = param;
S x_64_1 = x_63;
@@ -55,13 +55,13 @@
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<int>((as_type<uint>(x_72) + as_type<uint>(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<int>((as_type<uint>(x_77) + as_type<uint>(2)));
S const x_81 = x_81_1;
param = x_81;
S const x_82 = param;
@@ -75,7 +75,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_89.a) + as_type<uint>(x_91.b)))) + as_type<uint>(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 @@
(*(s)).a = 9;
}
int const x_109 = *(x);
- (*(s)).b = (x_109 + 1);
+ (*(s)).b = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
int const x_112 = *(x);
- (*(s)).c = (x_112 + 2);
+ (*(s)).c = as_type<int>((as_type<uint>(x_112) + as_type<uint>(2)));
int const x_115 = (*(s)).b;
if ((x_115 == 2)) {
(*(s)).b = 7;
@@ -115,6 +115,6 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_119) + as_type<uint>(x_120)))) + as_type<uint>(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 91c59ac..b986b1e 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 @@
} else {
S const x_60 = arr.arr[1];
param = x_60;
- param_1 = (2 + as_type<int>(x_50));
+ param_1 = as_type<int>((as_type<uint>(2) + as_type<uint>(as_type<int>(x_50))));
int const x_61 = param_1;
S const x_63 = param;
S x_64_1 = x_63;
@@ -55,13 +55,13 @@
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<int>((as_type<uint>(x_72) + as_type<uint>(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<int>((as_type<uint>(x_77) + as_type<uint>(2)));
S const x_81 = x_81_1;
param = x_81;
S const x_82 = param;
@@ -75,7 +75,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_89.a) + as_type<uint>(x_91.b)))) + as_type<uint>(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 @@
(*(s)).a = 9;
}
int const x_109 = *(x);
- (*(s)).b = (x_109 + 1);
+ (*(s)).b = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
int const x_112 = *(x);
- (*(s)).c = (x_112 + 2);
+ (*(s)).c = as_type<int>((as_type<uint>(x_112) + as_type<uint>(2)));
int const x_115 = (*(s)).b;
if ((x_115 == 2)) {
(*(s)).b = 7;
@@ -115,6 +115,6 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_119) + as_type<uint>(x_120)))) + as_type<uint>(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 0ab9beb..0b412c2 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 @@
}
while (true) {
int const x_371 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_371 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_371) + as_type<uint>(1)));
{
int const x_373 = *(tint_symbol_4);
if ((x_373 < 98)) {
@@ -369,192 +369,192 @@
m44[x_396][x_397] = 1.0f;
{
int const x_399 = i_37;
- i_37 = (x_399 + 1);
+ i_37 = as_type<int>((as_type<uint>(x_399) + as_type<uint>(1)));
}
}
{
int const x_401 = i_36;
- i_36 = (x_401 + 1);
+ i_36 = as_type<int>((as_type<uint>(x_401) + as_type<uint>(1)));
}
}
{
int const x_403 = i_35;
- i_35 = (x_403 + 1);
+ i_35 = as_type<int>((as_type<uint>(x_403) + as_type<uint>(1)));
}
}
{
int const x_405 = i_34;
- i_34 = (x_405 + 1);
+ i_34 = as_type<int>((as_type<uint>(x_405) + as_type<uint>(1)));
}
}
{
int const x_407 = i_33;
- i_33 = (x_407 + 1);
+ i_33 = as_type<int>((as_type<uint>(x_407) + as_type<uint>(1)));
}
}
{
int const x_409 = i_32;
- i_32 = (x_409 + 1);
+ i_32 = as_type<int>((as_type<uint>(x_409) + as_type<uint>(1)));
}
}
{
int const x_411 = i_31;
- i_31 = (x_411 + 1);
+ i_31 = as_type<int>((as_type<uint>(x_411) + as_type<uint>(1)));
}
}
{
int const x_413 = i_30;
- i_30 = (x_413 + 1);
+ i_30 = as_type<int>((as_type<uint>(x_413) + as_type<uint>(1)));
}
}
{
int const x_415 = i_29;
- i_29 = (x_415 + 1);
+ i_29 = as_type<int>((as_type<uint>(x_415) + as_type<uint>(1)));
}
}
{
int const x_417 = i_28;
- i_28 = (x_417 + 1);
+ i_28 = as_type<int>((as_type<uint>(x_417) + as_type<uint>(1)));
}
}
{
int const x_419 = i_27;
- i_27 = (x_419 + 1);
+ i_27 = as_type<int>((as_type<uint>(x_419) + as_type<uint>(1)));
}
}
{
int const x_421 = i_26;
- i_26 = (x_421 + 1);
+ i_26 = as_type<int>((as_type<uint>(x_421) + as_type<uint>(1)));
}
}
{
int const x_423 = i_25;
- i_25 = (x_423 + 1);
+ i_25 = as_type<int>((as_type<uint>(x_423) + as_type<uint>(1)));
}
}
{
int const x_425 = i_24;
- i_24 = (x_425 + 1);
+ i_24 = as_type<int>((as_type<uint>(x_425) + as_type<uint>(1)));
}
}
{
int const x_427 = i_23;
- i_23 = (x_427 + 1);
+ i_23 = as_type<int>((as_type<uint>(x_427) + as_type<uint>(1)));
}
}
{
int const x_429 = i_22;
- i_22 = (x_429 + 1);
+ i_22 = as_type<int>((as_type<uint>(x_429) + as_type<uint>(1)));
}
}
{
int const x_431 = i_21;
- i_21 = (x_431 + 1);
+ i_21 = as_type<int>((as_type<uint>(x_431) + as_type<uint>(1)));
}
}
{
int const x_433 = i_20;
- i_20 = (x_433 + 1);
+ i_20 = as_type<int>((as_type<uint>(x_433) + as_type<uint>(1)));
}
}
{
int const x_435 = i_19;
- i_19 = (x_435 + 1);
+ i_19 = as_type<int>((as_type<uint>(x_435) + as_type<uint>(1)));
}
}
{
int const x_437 = i_18;
- i_18 = (x_437 + 1);
+ i_18 = as_type<int>((as_type<uint>(x_437) + as_type<uint>(1)));
}
}
{
int const x_439 = i_17;
- i_17 = (x_439 + 1);
+ i_17 = as_type<int>((as_type<uint>(x_439) + as_type<uint>(1)));
}
}
{
int const x_441 = i_16;
- i_16 = (x_441 + 1);
+ i_16 = as_type<int>((as_type<uint>(x_441) + as_type<uint>(1)));
}
}
{
int const x_443 = i_15;
- i_15 = (x_443 + 1);
+ i_15 = as_type<int>((as_type<uint>(x_443) + as_type<uint>(1)));
}
}
{
int const x_445 = i_14;
- i_14 = (x_445 + 1);
+ i_14 = as_type<int>((as_type<uint>(x_445) + as_type<uint>(1)));
}
}
{
int const x_447 = i_13;
- i_13 = (x_447 + 1);
+ i_13 = as_type<int>((as_type<uint>(x_447) + as_type<uint>(1)));
}
}
{
int const x_449 = i_12;
- i_12 = (x_449 + 1);
+ i_12 = as_type<int>((as_type<uint>(x_449) + as_type<uint>(1)));
}
}
{
int const x_451 = i_11;
- i_11 = (x_451 + 1);
+ i_11 = as_type<int>((as_type<uint>(x_451) + as_type<uint>(1)));
}
}
{
int const x_453 = i_10;
- i_10 = (x_453 + 1);
+ i_10 = as_type<int>((as_type<uint>(x_453) + as_type<uint>(1)));
}
}
{
int const x_455 = i_9;
- i_9 = (x_455 + 1);
+ i_9 = as_type<int>((as_type<uint>(x_455) + as_type<uint>(1)));
}
}
{
int const x_457 = i_8;
- i_8 = (x_457 + 1);
+ i_8 = as_type<int>((as_type<uint>(x_457) + as_type<uint>(1)));
}
}
{
int const x_459 = i_7;
- i_7 = (x_459 + 1);
+ i_7 = as_type<int>((as_type<uint>(x_459) + as_type<uint>(1)));
}
}
{
int const x_461 = i_6;
- i_6 = (x_461 + 1);
+ i_6 = as_type<int>((as_type<uint>(x_461) + as_type<uint>(1)));
}
}
{
int const x_463 = i_5;
- i_5 = (x_463 + 1);
+ i_5 = as_type<int>((as_type<uint>(x_463) + as_type<uint>(1)));
}
}
{
int const x_465 = i_4;
- i_4 = (x_465 + 1);
+ i_4 = as_type<int>((as_type<uint>(x_465) + as_type<uint>(1)));
}
}
{
int const x_467 = i_3;
- i_3 = (x_467 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_467) + as_type<uint>(1)));
}
}
{
int const x_469 = i_2;
- i_2 = (x_469 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_469) + as_type<uint>(1)));
}
}
{
int const x_471 = i_1;
- i_1 = (x_471 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_471) + as_type<uint>(1)));
}
}
{
int const x_473 = i;
- i = (x_473 + 1);
+ i = as_type<int>((as_type<uint>(x_473) + as_type<uint>(1)));
}
}
sum = 0.0f;
@@ -566,7 +566,7 @@
break;
}
int const x_482 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_482 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_482) + as_type<uint>(1)));
int const x_484 = r;
float const x_486 = m23[0][x_484];
float const x_487 = sum;
@@ -601,7 +601,7 @@
sum = (x_522 + x_521);
{
int const x_524 = r;
- r = (x_524 + 1);
+ r = as_type<int>((as_type<uint>(x_524) + as_type<uint>(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 0ab9beb..0b412c2 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 @@
}
while (true) {
int const x_371 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_371 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_371) + as_type<uint>(1)));
{
int const x_373 = *(tint_symbol_4);
if ((x_373 < 98)) {
@@ -369,192 +369,192 @@
m44[x_396][x_397] = 1.0f;
{
int const x_399 = i_37;
- i_37 = (x_399 + 1);
+ i_37 = as_type<int>((as_type<uint>(x_399) + as_type<uint>(1)));
}
}
{
int const x_401 = i_36;
- i_36 = (x_401 + 1);
+ i_36 = as_type<int>((as_type<uint>(x_401) + as_type<uint>(1)));
}
}
{
int const x_403 = i_35;
- i_35 = (x_403 + 1);
+ i_35 = as_type<int>((as_type<uint>(x_403) + as_type<uint>(1)));
}
}
{
int const x_405 = i_34;
- i_34 = (x_405 + 1);
+ i_34 = as_type<int>((as_type<uint>(x_405) + as_type<uint>(1)));
}
}
{
int const x_407 = i_33;
- i_33 = (x_407 + 1);
+ i_33 = as_type<int>((as_type<uint>(x_407) + as_type<uint>(1)));
}
}
{
int const x_409 = i_32;
- i_32 = (x_409 + 1);
+ i_32 = as_type<int>((as_type<uint>(x_409) + as_type<uint>(1)));
}
}
{
int const x_411 = i_31;
- i_31 = (x_411 + 1);
+ i_31 = as_type<int>((as_type<uint>(x_411) + as_type<uint>(1)));
}
}
{
int const x_413 = i_30;
- i_30 = (x_413 + 1);
+ i_30 = as_type<int>((as_type<uint>(x_413) + as_type<uint>(1)));
}
}
{
int const x_415 = i_29;
- i_29 = (x_415 + 1);
+ i_29 = as_type<int>((as_type<uint>(x_415) + as_type<uint>(1)));
}
}
{
int const x_417 = i_28;
- i_28 = (x_417 + 1);
+ i_28 = as_type<int>((as_type<uint>(x_417) + as_type<uint>(1)));
}
}
{
int const x_419 = i_27;
- i_27 = (x_419 + 1);
+ i_27 = as_type<int>((as_type<uint>(x_419) + as_type<uint>(1)));
}
}
{
int const x_421 = i_26;
- i_26 = (x_421 + 1);
+ i_26 = as_type<int>((as_type<uint>(x_421) + as_type<uint>(1)));
}
}
{
int const x_423 = i_25;
- i_25 = (x_423 + 1);
+ i_25 = as_type<int>((as_type<uint>(x_423) + as_type<uint>(1)));
}
}
{
int const x_425 = i_24;
- i_24 = (x_425 + 1);
+ i_24 = as_type<int>((as_type<uint>(x_425) + as_type<uint>(1)));
}
}
{
int const x_427 = i_23;
- i_23 = (x_427 + 1);
+ i_23 = as_type<int>((as_type<uint>(x_427) + as_type<uint>(1)));
}
}
{
int const x_429 = i_22;
- i_22 = (x_429 + 1);
+ i_22 = as_type<int>((as_type<uint>(x_429) + as_type<uint>(1)));
}
}
{
int const x_431 = i_21;
- i_21 = (x_431 + 1);
+ i_21 = as_type<int>((as_type<uint>(x_431) + as_type<uint>(1)));
}
}
{
int const x_433 = i_20;
- i_20 = (x_433 + 1);
+ i_20 = as_type<int>((as_type<uint>(x_433) + as_type<uint>(1)));
}
}
{
int const x_435 = i_19;
- i_19 = (x_435 + 1);
+ i_19 = as_type<int>((as_type<uint>(x_435) + as_type<uint>(1)));
}
}
{
int const x_437 = i_18;
- i_18 = (x_437 + 1);
+ i_18 = as_type<int>((as_type<uint>(x_437) + as_type<uint>(1)));
}
}
{
int const x_439 = i_17;
- i_17 = (x_439 + 1);
+ i_17 = as_type<int>((as_type<uint>(x_439) + as_type<uint>(1)));
}
}
{
int const x_441 = i_16;
- i_16 = (x_441 + 1);
+ i_16 = as_type<int>((as_type<uint>(x_441) + as_type<uint>(1)));
}
}
{
int const x_443 = i_15;
- i_15 = (x_443 + 1);
+ i_15 = as_type<int>((as_type<uint>(x_443) + as_type<uint>(1)));
}
}
{
int const x_445 = i_14;
- i_14 = (x_445 + 1);
+ i_14 = as_type<int>((as_type<uint>(x_445) + as_type<uint>(1)));
}
}
{
int const x_447 = i_13;
- i_13 = (x_447 + 1);
+ i_13 = as_type<int>((as_type<uint>(x_447) + as_type<uint>(1)));
}
}
{
int const x_449 = i_12;
- i_12 = (x_449 + 1);
+ i_12 = as_type<int>((as_type<uint>(x_449) + as_type<uint>(1)));
}
}
{
int const x_451 = i_11;
- i_11 = (x_451 + 1);
+ i_11 = as_type<int>((as_type<uint>(x_451) + as_type<uint>(1)));
}
}
{
int const x_453 = i_10;
- i_10 = (x_453 + 1);
+ i_10 = as_type<int>((as_type<uint>(x_453) + as_type<uint>(1)));
}
}
{
int const x_455 = i_9;
- i_9 = (x_455 + 1);
+ i_9 = as_type<int>((as_type<uint>(x_455) + as_type<uint>(1)));
}
}
{
int const x_457 = i_8;
- i_8 = (x_457 + 1);
+ i_8 = as_type<int>((as_type<uint>(x_457) + as_type<uint>(1)));
}
}
{
int const x_459 = i_7;
- i_7 = (x_459 + 1);
+ i_7 = as_type<int>((as_type<uint>(x_459) + as_type<uint>(1)));
}
}
{
int const x_461 = i_6;
- i_6 = (x_461 + 1);
+ i_6 = as_type<int>((as_type<uint>(x_461) + as_type<uint>(1)));
}
}
{
int const x_463 = i_5;
- i_5 = (x_463 + 1);
+ i_5 = as_type<int>((as_type<uint>(x_463) + as_type<uint>(1)));
}
}
{
int const x_465 = i_4;
- i_4 = (x_465 + 1);
+ i_4 = as_type<int>((as_type<uint>(x_465) + as_type<uint>(1)));
}
}
{
int const x_467 = i_3;
- i_3 = (x_467 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_467) + as_type<uint>(1)));
}
}
{
int const x_469 = i_2;
- i_2 = (x_469 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_469) + as_type<uint>(1)));
}
}
{
int const x_471 = i_1;
- i_1 = (x_471 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_471) + as_type<uint>(1)));
}
}
{
int const x_473 = i;
- i = (x_473 + 1);
+ i = as_type<int>((as_type<uint>(x_473) + as_type<uint>(1)));
}
}
sum = 0.0f;
@@ -566,7 +566,7 @@
break;
}
int const x_482 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_482 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_482) + as_type<uint>(1)));
int const x_484 = r;
float const x_486 = m23[0][x_484];
float const x_487 = sum;
@@ -601,7 +601,7 @@
sum = (x_522 + x_521);
{
int const x_524 = r;
- r = (x_524 + 1);
+ r = as_type<int>((as_type<uint>(x_524) + as_type<uint>(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 1a1463b..86c77f2 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 @@
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<int>((as_type<uint>(x_163) + as_type<uint>(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 5cd7a35..cc84cc2 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 @@
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<int>((as_type<uint>(x_163) + as_type<uint>(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 ecc0d68..70bd67b 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 @@
}
{
int const x_96 = c;
- c = (x_96 + 1);
+ c = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
}
}
{
int const x_98 = a;
- a = (x_98 + 1);
+ a = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 ecc0d68..70bd67b 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 @@
}
{
int const x_96 = c;
- c = (x_96 + 1);
+ c = as_type<int>((as_type<uint>(x_96) + as_type<uint>(1)));
}
}
{
int const x_98 = a;
- a = (x_98 + 1);
+ a = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 a589c96..a1f4edb 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 @@
}
while (true) {
int const x_223 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_223 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(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<int>((as_type<uint>(100) - as_type<uint>(x_227))))) {
} else {
break;
}
@@ -202,77 +202,77 @@
f = (x_232 + x_231);
{
int const x_234 = i_14;
- i_14 = (x_234 + 1);
+ i_14 = as_type<int>((as_type<uint>(x_234) + as_type<uint>(1)));
}
}
{
int const x_236 = i_13;
- i_13 = (x_236 + 1);
+ i_13 = as_type<int>((as_type<uint>(x_236) + as_type<uint>(1)));
}
}
{
int const x_238 = i_12;
- i_12 = (x_238 + 1);
+ i_12 = as_type<int>((as_type<uint>(x_238) + as_type<uint>(1)));
}
}
{
int const x_240 = i_11;
- i_11 = (x_240 + 1);
+ i_11 = as_type<int>((as_type<uint>(x_240) + as_type<uint>(1)));
}
}
{
int const x_242 = i_10;
- i_10 = (x_242 + 1);
+ i_10 = as_type<int>((as_type<uint>(x_242) + as_type<uint>(1)));
}
}
{
int const x_244 = i_9;
- i_9 = (x_244 + 1);
+ i_9 = as_type<int>((as_type<uint>(x_244) + as_type<uint>(1)));
}
}
{
int const x_246 = i_8;
- i_8 = (x_246 + 1);
+ i_8 = as_type<int>((as_type<uint>(x_246) + as_type<uint>(1)));
}
}
{
int const x_248 = i_7;
- i_7 = (x_248 + 1);
+ i_7 = as_type<int>((as_type<uint>(x_248) + as_type<uint>(1)));
}
}
{
int const x_250 = i_6;
- i_6 = (x_250 + 1);
+ i_6 = as_type<int>((as_type<uint>(x_250) + as_type<uint>(1)));
}
}
{
int const x_252 = i_5;
- i_5 = (x_252 + 1);
+ i_5 = as_type<int>((as_type<uint>(x_252) + as_type<uint>(1)));
}
}
{
int const x_254 = i_4;
- i_4 = (x_254 + 1);
+ i_4 = as_type<int>((as_type<uint>(x_254) + as_type<uint>(1)));
}
}
{
int const x_256 = i_3;
- i_3 = (x_256 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_256) + as_type<uint>(1)));
}
}
{
int const x_258 = i_2;
- i_2 = (x_258 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_258) + as_type<uint>(1)));
}
}
{
int const x_260 = i_1;
- i_1 = (x_260 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_260) + as_type<uint>(1)));
}
}
{
int const x_262 = i;
- i = (x_262 + 1);
+ i = as_type<int>((as_type<uint>(x_262) + as_type<uint>(1)));
}
}
float const x_265 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -286,13 +286,13 @@
break;
}
int const x_275 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_275 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(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<int>((as_type<uint>(x_280) + as_type<uint>(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 a589c96..a1f4edb 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 @@
}
while (true) {
int const x_223 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_223 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_223) + as_type<uint>(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<int>((as_type<uint>(100) - as_type<uint>(x_227))))) {
} else {
break;
}
@@ -202,77 +202,77 @@
f = (x_232 + x_231);
{
int const x_234 = i_14;
- i_14 = (x_234 + 1);
+ i_14 = as_type<int>((as_type<uint>(x_234) + as_type<uint>(1)));
}
}
{
int const x_236 = i_13;
- i_13 = (x_236 + 1);
+ i_13 = as_type<int>((as_type<uint>(x_236) + as_type<uint>(1)));
}
}
{
int const x_238 = i_12;
- i_12 = (x_238 + 1);
+ i_12 = as_type<int>((as_type<uint>(x_238) + as_type<uint>(1)));
}
}
{
int const x_240 = i_11;
- i_11 = (x_240 + 1);
+ i_11 = as_type<int>((as_type<uint>(x_240) + as_type<uint>(1)));
}
}
{
int const x_242 = i_10;
- i_10 = (x_242 + 1);
+ i_10 = as_type<int>((as_type<uint>(x_242) + as_type<uint>(1)));
}
}
{
int const x_244 = i_9;
- i_9 = (x_244 + 1);
+ i_9 = as_type<int>((as_type<uint>(x_244) + as_type<uint>(1)));
}
}
{
int const x_246 = i_8;
- i_8 = (x_246 + 1);
+ i_8 = as_type<int>((as_type<uint>(x_246) + as_type<uint>(1)));
}
}
{
int const x_248 = i_7;
- i_7 = (x_248 + 1);
+ i_7 = as_type<int>((as_type<uint>(x_248) + as_type<uint>(1)));
}
}
{
int const x_250 = i_6;
- i_6 = (x_250 + 1);
+ i_6 = as_type<int>((as_type<uint>(x_250) + as_type<uint>(1)));
}
}
{
int const x_252 = i_5;
- i_5 = (x_252 + 1);
+ i_5 = as_type<int>((as_type<uint>(x_252) + as_type<uint>(1)));
}
}
{
int const x_254 = i_4;
- i_4 = (x_254 + 1);
+ i_4 = as_type<int>((as_type<uint>(x_254) + as_type<uint>(1)));
}
}
{
int const x_256 = i_3;
- i_3 = (x_256 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_256) + as_type<uint>(1)));
}
}
{
int const x_258 = i_2;
- i_2 = (x_258 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_258) + as_type<uint>(1)));
}
}
{
int const x_260 = i_1;
- i_1 = (x_260 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_260) + as_type<uint>(1)));
}
}
{
int const x_262 = i;
- i = (x_262 + 1);
+ i = as_type<int>((as_type<uint>(x_262) + as_type<uint>(1)));
}
}
float const x_265 = x_7.x_GLF_uniform_float_values.arr[1].el;
@@ -286,13 +286,13 @@
break;
}
int const x_275 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_275 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_275) + as_type<uint>(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<int>((as_type<uint>(x_280) + as_type<uint>(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 5993503..f1c678f 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 @@
}
int const x_134 = i;
int const x_135 = a;
- a = (x_135 - 1);
+ a = as_type<int>((as_type<uint>(x_135) - as_type<uint>(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<int>((as_type<uint>(x_144) + as_type<uint>(x_146)));
{
int const x_149 = i;
- i = (x_149 + 1);
+ i = as_type<int>((as_type<uint>(x_149) + as_type<uint>(1)));
}
}
ok = true;
@@ -111,7 +111,7 @@
}
{
int const x_171 = i_1;
- i_1 = (x_171 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_171) + as_type<uint>(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 5993503..f1c678f 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 @@
}
int const x_134 = i;
int const x_135 = a;
- a = (x_135 - 1);
+ a = as_type<int>((as_type<uint>(x_135) - as_type<uint>(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<int>((as_type<uint>(x_144) + as_type<uint>(x_146)));
{
int const x_149 = i;
- i = (x_149 + 1);
+ i = as_type<int>((as_type<uint>(x_149) + as_type<uint>(1)));
}
}
ok = true;
@@ -111,7 +111,7 @@
}
{
int const x_171 = i_1;
- i_1 = (x_171 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_171) + as_type<uint>(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 f8f8420..7cdef23 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 @@
v1 = x_88;
{
int const x_89 = i;
- i = (x_89 + 1);
+ i = as_type<int>((as_type<uint>(x_89) + as_type<uint>(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 f8f8420..7cdef23 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 @@
v1 = x_88;
{
int const x_89 = i;
- i = (x_89 + 1);
+ i = as_type<int>((as_type<uint>(x_89) + as_type<uint>(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 b6ec84f..856f1d9 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 @@
a = (x_71 + x_70);
{
int const x_73 = c;
- c = (x_73 + 1);
+ c = as_type<int>((as_type<uint>(x_73) + as_type<uint>(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 b6ec84f..856f1d9 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 @@
a = (x_71 + x_70);
{
int const x_73 = c;
- c = (x_73 + 1);
+ c = as_type<int>((as_type<uint>(x_73) + as_type<uint>(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 e1218a1..589b4c6 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 @@
}
{
int const x_83 = j;
- j = (x_83 + 1);
+ j = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
}
}
{
int const x_85 = i;
- i = (x_85 + 1);
+ i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(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 e1218a1..589b4c6 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 @@
}
{
int const x_83 = j;
- j = (x_83 + 1);
+ j = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
}
}
{
int const x_85 = i;
- i = (x_85 + 1);
+ i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(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 8d410b0..15bee7e 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 @@
}
{
int const x_57 = i_10;
- i_10 = (x_57 + 1);
+ i_10 = as_type<int>((as_type<uint>(x_57) + as_type<uint>(1)));
}
}
{
int const x_59 = i_9;
- i_9 = (x_59 + 1);
+ i_9 = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
{
int const x_61 = i_8;
- i_8 = (x_61 + 1);
+ i_8 = as_type<int>((as_type<uint>(x_61) + as_type<uint>(1)));
}
}
{
int const x_63 = i_7;
- i_7 = (x_63 + 1);
+ i_7 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
}
}
{
int const x_65 = i_6;
- i_6 = (x_65 + 1);
+ i_6 = as_type<int>((as_type<uint>(x_65) + as_type<uint>(1)));
}
}
{
int const x_67 = i_5;
- i_5 = (x_67 + 1);
+ i_5 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
{
int const x_69 = i_4;
- i_4 = (x_69 + 1);
+ i_4 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(1)));
}
}
{
int const x_71 = i_3;
- i_3 = (x_71 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
}
}
{
int const x_73 = i_2;
- i_2 = (x_73 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
}
}
{
int const x_75 = i_1;
- i_1 = (x_75 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
float const x_204 = b;
b = (x_204 + 1.0f);
{
int const x_77 = i;
- i = (x_77 + 1);
+ i = as_type<int>((as_type<uint>(x_77) + as_type<uint>(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 8d410b0..15bee7e 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 @@
}
{
int const x_57 = i_10;
- i_10 = (x_57 + 1);
+ i_10 = as_type<int>((as_type<uint>(x_57) + as_type<uint>(1)));
}
}
{
int const x_59 = i_9;
- i_9 = (x_59 + 1);
+ i_9 = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
{
int const x_61 = i_8;
- i_8 = (x_61 + 1);
+ i_8 = as_type<int>((as_type<uint>(x_61) + as_type<uint>(1)));
}
}
{
int const x_63 = i_7;
- i_7 = (x_63 + 1);
+ i_7 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
}
}
{
int const x_65 = i_6;
- i_6 = (x_65 + 1);
+ i_6 = as_type<int>((as_type<uint>(x_65) + as_type<uint>(1)));
}
}
{
int const x_67 = i_5;
- i_5 = (x_67 + 1);
+ i_5 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
{
int const x_69 = i_4;
- i_4 = (x_69 + 1);
+ i_4 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(1)));
}
}
{
int const x_71 = i_3;
- i_3 = (x_71 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_71) + as_type<uint>(1)));
}
}
{
int const x_73 = i_2;
- i_2 = (x_73 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
}
}
{
int const x_75 = i_1;
- i_1 = (x_75 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
float const x_204 = b;
b = (x_204 + 1.0f);
{
int const x_77 = i;
- i = (x_77 + 1);
+ i = as_type<int>((as_type<uint>(x_77) + as_type<uint>(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 301e8f0..abd41b5 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 @@
}
{
int const x_97 = i;
- i = (x_97 + 1);
+ i = as_type<int>((as_type<uint>(x_97) + as_type<uint>(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 301e8f0..abd41b5 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 @@
}
{
int const x_97 = i;
- i = (x_97 + 1);
+ i = as_type<int>((as_type<uint>(x_97) + as_type<uint>(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 a59c60d..f75a911 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 @@
*(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<int>((as_type<uint>(x_84) + as_type<uint>(1)));
}
}
{
int const x_86 = i;
- i = (x_86 + 1);
+ i = as_type<int>((as_type<uint>(x_86) + as_type<uint>(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 a59c60d..f75a911 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 @@
*(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<int>((as_type<uint>(x_84) + as_type<uint>(1)));
}
}
{
int const x_86 = i;
- i = (x_86 + 1);
+ i = as_type<int>((as_type<uint>(x_86) + as_type<uint>(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 d580cda..e9afb93 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_68) * as_type<uint>(x_70)))) + as_type<uint>(x_72))));
{
int const x_76 = j;
- j = (x_76 + 1);
+ j = as_type<int>((as_type<uint>(x_76) + as_type<uint>(1)));
}
}
{
int const x_78 = i;
- i = (x_78 + 1);
+ i = as_type<int>((as_type<uint>(x_78) + as_type<uint>(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 d6a3fcf..c00aec3 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_68) * as_type<uint>(x_70)))) + as_type<uint>(x_72))));
{
int const x_76 = j;
- j = (x_76 + 1);
+ j = as_type<int>((as_type<uint>(x_76) + as_type<uint>(1)));
}
}
{
int const x_78 = i;
- i = (x_78 + 1);
+ i = as_type<int>((as_type<uint>(x_78) + as_type<uint>(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 fc21427..b86c0c8 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 @@
if ((x_17 == 1)) {
int const x_18 = *(x);
int const x_19 = (*(s)).data;
- return (x_18 + x_19);
+ return as_type<int>((as_type<uint>(x_18) + as_type<uint>(x_19)));
} else {
int const x_21 = *(x);
return x_21;
@@ -45,7 +45,7 @@
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<int>((as_type<uint>(5) + as_type<uint>(x_24))))) {
} else {
break;
}
@@ -70,7 +70,7 @@
}
{
int const x_31 = i;
- i = (x_31 + 1);
+ i = as_type<int>((as_type<uint>(x_31) + as_type<uint>(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 fc21427..b86c0c8 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 @@
if ((x_17 == 1)) {
int const x_18 = *(x);
int const x_19 = (*(s)).data;
- return (x_18 + x_19);
+ return as_type<int>((as_type<uint>(x_18) + as_type<uint>(x_19)));
} else {
int const x_21 = *(x);
return x_21;
@@ -45,7 +45,7 @@
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<int>((as_type<uint>(5) + as_type<uint>(x_24))))) {
} else {
break;
}
@@ -70,7 +70,7 @@
}
{
int const x_31 = i;
- i = (x_31 + 1);
+ i = as_type<int>((as_type<uint>(x_31) + as_type<uint>(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 4e920ba..ab191bd 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 @@
}
{
int const x_58 = i;
- i = (x_58 + 1);
+ i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(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 4e920ba..ab191bd 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 @@
}
{
int const x_58 = i;
- i = (x_58 + 1);
+ i = as_type<int>((as_type<uint>(x_58) + as_type<uint>(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 14a2550..c3f9b00 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 @@
sums.arr[x_53] = (x_199 + x_197);
{
int const x_54 = j;
- j = (x_54 - 1);
+ j = as_type<int>((as_type<uint>(x_54) - as_type<uint>(1)));
}
}
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(1)));
}
}
{
int const x_58 = h;
- h = (x_58 + 1);
+ h = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
}
}
{
int const x_60 = g;
- g = (x_60 + 1);
+ g = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
}
}
{
int const x_62 = f;
- f = (x_62 + 1);
+ f = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
}
}
{
int const x_64 = e;
- e = (x_64 + 1);
+ e = as_type<int>((as_type<uint>(x_64) + as_type<uint>(1)));
}
}
{
int const x_66 = d;
- d = (x_66 + 1);
+ d = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
}
}
{
int const x_68 = c;
- c = (x_68 + 1);
+ c = as_type<int>((as_type<uint>(x_68) + as_type<uint>(1)));
}
}
{
int const x_70 = b;
- b = (x_70 + 1);
+ b = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
{
int const x_72 = a;
- a = (x_72 + 1);
+ a = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 14a2550..c3f9b00 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 @@
sums.arr[x_53] = (x_199 + x_197);
{
int const x_54 = j;
- j = (x_54 - 1);
+ j = as_type<int>((as_type<uint>(x_54) - as_type<uint>(1)));
}
}
{
int const x_56 = i;
- i = (x_56 + 1);
+ i = as_type<int>((as_type<uint>(x_56) + as_type<uint>(1)));
}
}
{
int const x_58 = h;
- h = (x_58 + 1);
+ h = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
}
}
{
int const x_60 = g;
- g = (x_60 + 1);
+ g = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
}
}
{
int const x_62 = f;
- f = (x_62 + 1);
+ f = as_type<int>((as_type<uint>(x_62) + as_type<uint>(1)));
}
}
{
int const x_64 = e;
- e = (x_64 + 1);
+ e = as_type<int>((as_type<uint>(x_64) + as_type<uint>(1)));
}
}
{
int const x_66 = d;
- d = (x_66 + 1);
+ d = as_type<int>((as_type<uint>(x_66) + as_type<uint>(1)));
}
}
{
int const x_68 = c;
- c = (x_68 + 1);
+ c = as_type<int>((as_type<uint>(x_68) + as_type<uint>(1)));
}
}
{
int const x_70 = b;
- b = (x_70 + 1);
+ b = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
{
int const x_72 = a;
- a = (x_72 + 1);
+ a = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 77cd3d1..1ef23cb 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 @@
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<int>((as_type<uint>(x_69) + as_type<uint>(2))))) {
} else {
break;
}
@@ -111,57 +111,57 @@
break;
}
int const x_135 = a;
- a = (x_135 + 1);
+ a = as_type<int>((as_type<uint>(x_135) + as_type<uint>(1)));
{
int const x_137 = i9;
- i9 = (x_137 + 1);
+ i9 = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
}
}
{
int const x_139 = i8_1;
- i8_1 = (x_139 + 1);
+ i8_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
}
}
{
int const x_141 = i7;
- i7 = (x_141 + 1);
+ i7 = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
}
}
{
int const x_143 = i6;
- i6 = (x_143 + 1);
+ i6 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
}
}
break;
}
{
int const x_145 = i5;
- i5 = (x_145 + 1);
+ i5 = as_type<int>((as_type<uint>(x_145) + as_type<uint>(1)));
}
}
{
int const x_147 = i4;
- i4 = (x_147 + 1);
+ i4 = as_type<int>((as_type<uint>(x_147) + as_type<uint>(1)));
}
}
{
int const x_149 = i3;
- i3 = (x_149 + 1);
+ i3 = as_type<int>((as_type<uint>(x_149) + as_type<uint>(1)));
}
}
{
int const x_151 = i2;
- i2 = (x_151 + 1);
+ i2 = as_type<int>((as_type<uint>(x_151) + as_type<uint>(1)));
}
}
{
int const x_153 = i1;
- i1 = (x_153 + 1);
+ i1 = as_type<int>((as_type<uint>(x_153) + as_type<uint>(1)));
}
}
{
int const x_155 = i0;
- i0 = (x_155 + 1);
+ i0 = as_type<int>((as_type<uint>(x_155) + as_type<uint>(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 77cd3d1..1ef23cb 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 @@
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<int>((as_type<uint>(x_69) + as_type<uint>(2))))) {
} else {
break;
}
@@ -111,57 +111,57 @@
break;
}
int const x_135 = a;
- a = (x_135 + 1);
+ a = as_type<int>((as_type<uint>(x_135) + as_type<uint>(1)));
{
int const x_137 = i9;
- i9 = (x_137 + 1);
+ i9 = as_type<int>((as_type<uint>(x_137) + as_type<uint>(1)));
}
}
{
int const x_139 = i8_1;
- i8_1 = (x_139 + 1);
+ i8_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
}
}
{
int const x_141 = i7;
- i7 = (x_141 + 1);
+ i7 = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
}
}
{
int const x_143 = i6;
- i6 = (x_143 + 1);
+ i6 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
}
}
break;
}
{
int const x_145 = i5;
- i5 = (x_145 + 1);
+ i5 = as_type<int>((as_type<uint>(x_145) + as_type<uint>(1)));
}
}
{
int const x_147 = i4;
- i4 = (x_147 + 1);
+ i4 = as_type<int>((as_type<uint>(x_147) + as_type<uint>(1)));
}
}
{
int const x_149 = i3;
- i3 = (x_149 + 1);
+ i3 = as_type<int>((as_type<uint>(x_149) + as_type<uint>(1)));
}
}
{
int const x_151 = i2;
- i2 = (x_151 + 1);
+ i2 = as_type<int>((as_type<uint>(x_151) + as_type<uint>(1)));
}
}
{
int const x_153 = i1;
- i1 = (x_153 + 1);
+ i1 = as_type<int>((as_type<uint>(x_153) + as_type<uint>(1)));
}
}
{
int const x_155 = i0;
- i0 = (x_155 + 1);
+ i0 = as_type<int>((as_type<uint>(x_155) + as_type<uint>(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 99d436c..f3cbdcf 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 @@
c = clamp(x_41, 0, 3);
{
int const x_43 = i;
- i = (x_43 + 1);
+ i = as_type<int>((as_type<uint>(x_43) + as_type<uint>(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 99d436c..f3cbdcf 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 @@
c = clamp(x_41, 0, 3);
{
int const x_43 = i;
- i = (x_43 + 1);
+ i = as_type<int>((as_type<uint>(x_43) + as_type<uint>(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 c5bf9c8..a1a1c5a 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 @@
break;
}
{
- float const x_61 = float((x_38 + x_56));
+ float const x_61 = float(as_type<int>((as_type<uint>(x_38) + as_type<uint>(x_56))));
x_54 = float4(x_61, x_61, x_61, x_61);
- x_57 = (x_56 + 1);
+ x_57 = as_type<int>((as_type<uint>(x_56) + as_type<uint>(1)));
x_53_phi = x_54;
x_56_phi = x_57;
}
@@ -81,9 +81,9 @@
float4 const x_34 = x_34_phi;
int const x_62 = x_62_phi;
{
- x_39 = (x_38 + 1);
+ x_39 = as_type<int>((as_type<uint>(x_38) + as_type<uint>(1)));
x_33_phi = x_34;
- x_36_phi = as_type<int>((x_36 + as_type<int>(x_62)));
+ x_36_phi = as_type<int>(as_type<int>((as_type<uint>(x_36) + as_type<uint>(as_type<int>(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 c5bf9c8..a1a1c5a 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 @@
break;
}
{
- float const x_61 = float((x_38 + x_56));
+ float const x_61 = float(as_type<int>((as_type<uint>(x_38) + as_type<uint>(x_56))));
x_54 = float4(x_61, x_61, x_61, x_61);
- x_57 = (x_56 + 1);
+ x_57 = as_type<int>((as_type<uint>(x_56) + as_type<uint>(1)));
x_53_phi = x_54;
x_56_phi = x_57;
}
@@ -81,9 +81,9 @@
float4 const x_34 = x_34_phi;
int const x_62 = x_62_phi;
{
- x_39 = (x_38 + 1);
+ x_39 = as_type<int>((as_type<uint>(x_38) + as_type<uint>(1)));
x_33_phi = x_34;
- x_36_phi = as_type<int>((x_36 + as_type<int>(x_62)));
+ x_36_phi = as_type<int>(as_type<int>((as_type<uint>(x_36) + as_type<uint>(as_type<int>(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 5852dfa..0163d7c 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 @@
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<int>((as_type<uint>(x_16) + as_type<uint>(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 @@
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<int>((as_type<uint>(2) + as_type<uint>(x_23))))) {
} else {
break;
}
@@ -50,7 +50,7 @@
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<int>((as_type<uint>(3) + as_type<uint>(x_26))))) {
} else {
break;
}
@@ -58,18 +58,18 @@
int const x_29 = j;
S const x_79 = s_1;
param = x_79;
- param_1 = (x_28 + x_29);
+ param_1 = as_type<int>((as_type<uint>(x_28) + as_type<uint>(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<int>((as_type<uint>(x_32) + as_type<uint>(x_31)));
{
int const x_34 = j;
- j = (x_34 + 1);
+ j = as_type<int>((as_type<uint>(x_34) + as_type<uint>(1)));
}
}
{
int const x_36 = i;
- i = (x_36 + 1);
+ i = as_type<int>((as_type<uint>(x_36) + as_type<uint>(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 5852dfa..0163d7c 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 @@
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<int>((as_type<uint>(x_16) + as_type<uint>(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 @@
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<int>((as_type<uint>(2) + as_type<uint>(x_23))))) {
} else {
break;
}
@@ -50,7 +50,7 @@
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<int>((as_type<uint>(3) + as_type<uint>(x_26))))) {
} else {
break;
}
@@ -58,18 +58,18 @@
int const x_29 = j;
S const x_79 = s_1;
param = x_79;
- param_1 = (x_28 + x_29);
+ param_1 = as_type<int>((as_type<uint>(x_28) + as_type<uint>(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<int>((as_type<uint>(x_32) + as_type<uint>(x_31)));
{
int const x_34 = j;
- j = (x_34 + 1);
+ j = as_type<int>((as_type<uint>(x_34) + as_type<uint>(1)));
}
}
{
int const x_36 = i;
- i = (x_36 + 1);
+ i = as_type<int>((as_type<uint>(x_36) + as_type<uint>(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 5e8b3f9..abf71b6 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 @@
}
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 5e8b3f9..abf71b6 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 @@
}
{
int const x_52 = i;
- i = (x_52 + 1);
+ i = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 beae1dd..6e6d198 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 @@
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<int>((as_type<uint>(x_42) + as_type<uint>(1))))) {
} else {
break;
}
@@ -38,14 +38,14 @@
}
{
int const x_62 = i;
- i = (x_62 + 1);
+ i = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(x_67)))) + as_type<uint>(x_70)))) + as_type<uint>(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 beae1dd..6e6d198 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 @@
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<int>((as_type<uint>(x_42) + as_type<uint>(1))))) {
} else {
break;
}
@@ -38,14 +38,14 @@
}
{
int const x_62 = i;
- i = (x_62 + 1);
+ i = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(x_67)))) + as_type<uint>(x_70)))) + as_type<uint>(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 b2f057c..79dbc24 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 @@
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<int>((as_type<uint>(x_37) * as_type<uint>(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<int>((as_type<uint>(x_46) + as_type<uint>(int4(1, 2, 3, 4)[(x_41 / x_43)])));
{
int const x_48 = r;
- r = (x_48 + 2);
+ r = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 b2f057c..79dbc24 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 @@
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<int>((as_type<uint>(x_37) * as_type<uint>(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<int>((as_type<uint>(x_46) + as_type<uint>(int4(1, 2, 3, 4)[(x_41 / x_43)])));
{
int const x_48 = r;
- r = (x_48 + 2);
+ r = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 1ec287c..fdecb23 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 <metal_stdlib>
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 @@
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 @@
}
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<int>((as_type<uint>(x_41) * as_type<uint>(x_43)));
{
int const x_45 = i;
- i = (x_45 + 1);
+ i = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 1ec287c..fdecb23 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 <metal_stdlib>
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 @@
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 @@
}
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<int>((as_type<uint>(x_41) * as_type<uint>(x_43)));
{
int const x_45 = i;
- i = (x_45 + 1);
+ i = as_type<int>((as_type<uint>(x_45) + as_type<uint>(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 a850e67..fa512e1 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 @@
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<int>((as_type<uint>(2) * as_type<uint>(x_47))), as_type<int>((as_type<uint>(2) * as_type<uint>(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<int>((as_type<uint>(x_60) + as_type<uint>(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 a850e67..fa512e1 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 @@
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<int>((as_type<uint>(2) * as_type<uint>(x_47))), as_type<int>((as_type<uint>(2) * as_type<uint>(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<int>((as_type<uint>(x_60) + as_type<uint>(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 0bb4833..d1fa98f 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 @@
break;
}
int const x_9 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_9 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
}
int const x_11 = *(tint_symbol_4);
a = x_11;
@@ -34,7 +34,7 @@
break;
}
int const x_13 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_13 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_13) + as_type<uint>(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 0bb4833..d1fa98f 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 @@
break;
}
int const x_9 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_9 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
}
int const x_11 = *(tint_symbol_4);
a = x_11;
@@ -34,7 +34,7 @@
break;
}
int const x_13 = *(tint_symbol_4);
- *(tint_symbol_4) = (x_13 + 1);
+ *(tint_symbol_4) = as_type<int>((as_type<uint>(x_13) + as_type<uint>(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 6614fe8..a9726f7 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 @@
}
{
int const x_44 = i;
- i = (x_44 + 1);
+ i = as_type<int>((as_type<uint>(x_44) + as_type<uint>(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 6614fe8..a9726f7 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 @@
}
{
int const x_44 = i;
- i = (x_44 + 1);
+ i = as_type<int>((as_type<uint>(x_44) + as_type<uint>(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 82cc6ae..5d1a17b 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 @@
color[x_71] = x_73;
{
int const x_75 = k;
- k = (x_75 + 1);
+ k = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
{
int const x_77 = j;
- j = (x_77 + 1);
+ j = as_type<int>((as_type<uint>(x_77) + as_type<uint>(1)));
}
}
int const x_79 = i;
@@ -94,7 +94,7 @@
}
{
int const x_87 = i;
- i = (x_87 + 1);
+ i = as_type<int>((as_type<uint>(x_87) + as_type<uint>(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 82cc6ae..5d1a17b 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 @@
color[x_71] = x_73;
{
int const x_75 = k;
- k = (x_75 + 1);
+ k = as_type<int>((as_type<uint>(x_75) + as_type<uint>(1)));
}
}
{
int const x_77 = j;
- j = (x_77 + 1);
+ j = as_type<int>((as_type<uint>(x_77) + as_type<uint>(1)));
}
}
int const x_79 = i;
@@ -94,7 +94,7 @@
}
{
int const x_87 = i;
- i = (x_87 + 1);
+ i = as_type<int>((as_type<uint>(x_87) + as_type<uint>(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 126ce92..3f6b2dc 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 @@
*(tint_symbol_4) = float4(x_73, x_75, x_77, x_79);
{
int const x_16 = i;
- i = (x_16 + 1);
+ i = as_type<int>((as_type<uint>(x_16) + as_type<uint>(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 126ce92..3f6b2dc 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 @@
*(tint_symbol_4) = float4(x_73, x_75, x_77, x_79);
{
int const x_16 = i;
- i = (x_16 + 1);
+ i = as_type<int>((as_type<uint>(x_16) + as_type<uint>(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 e3b232e..a342ca8 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 @@
arr.arr[x_56].data = x_57;
{
int const x_59 = i;
- i = (x_59 + 1);
+ i = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el;
@@ -113,13 +113,13 @@
}
{
int const x_117 = j;
- j = (x_117 + 1);
+ j = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
}
}
}
{
int const x_119 = i_1;
- i_1 = (x_119 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(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 e3b232e..a342ca8 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 @@
arr.arr[x_56].data = x_57;
{
int const x_59 = i;
- i = (x_59 + 1);
+ i = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
}
}
int const x_62 = x_10.x_GLF_uniform_int_values.arr[2].el;
@@ -113,13 +113,13 @@
}
{
int const x_117 = j;
- j = (x_117 + 1);
+ j = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
}
}
}
{
int const x_119 = i_1;
- i_1 = (x_119 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(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 34d029d..9415629 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 @@
arr.arr[x_46].data = 0;
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 34d029d..9415629 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 @@
arr.arr[x_46].data = 0;
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 3fc4376..0aa7f65 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 @@
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<int>((as_type<uint>(x_67) + as_type<uint>(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 3fc4376..0aa7f65 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 @@
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<int>((as_type<uint>(x_67) + as_type<uint>(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 5b0e89e..d35b7e2 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 @@
m0[(x_68 % x_70)][x_73] = x_75;
{
int const x_77 = c;
- c = (x_77 + 1);
+ c = as_type<int>((as_type<uint>(x_77) + as_type<uint>(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 2e9eaea..690351b 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 @@
m0[(x_68 % x_70)][x_73] = x_75;
{
int const x_77 = c;
- c = (x_77 + 1);
+ c = as_type<int>((as_type<uint>(x_77) + as_type<uint>(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 4aaf44e..f471e20 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 <metal_stdlib>
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 @@
A.arr[x_40] = x_41;
{
int const x_43 = i;
- i = (x_43 + 1);
+ i = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
}
int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -52,7 +57,7 @@
*(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 4aaf44e..f471e20 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 <metal_stdlib>
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 @@
A.arr[x_40] = x_41;
{
int const x_43 = i;
- i = (x_43 + 1);
+ i = as_type<int>((as_type<uint>(x_43) + as_type<uint>(1)));
}
}
int const x_46 = x_6.x_GLF_uniform_int_values.arr[1].el;
@@ -52,7 +57,7 @@
*(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 bd9b04a..7d21ec9 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 @@
if (((1 % x_39) == x_42)) {
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
}
continue;
}
int const x_46 = a;
- a = (x_46 + 1);
+ a = as_type<int>((as_type<uint>(x_46) + as_type<uint>(1)));
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 bd9b04a..7d21ec9 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 @@
if (((1 % x_39) == x_42)) {
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(1)));
}
continue;
}
int const x_46 = a;
- a = (x_46 + 1);
+ a = as_type<int>((as_type<uint>(x_46) + as_type<uint>(1)));
{
int const x_48 = i;
- i = (x_48 + 1);
+ i = as_type<int>((as_type<uint>(x_48) + as_type<uint>(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 f06e3b0..b6bcce5 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 @@
break;
}
int const x_33 = i;
- a = ((x_33 | -2) - 1);
+ a = as_type<int>((as_type<uint>((x_33 | -2)) - as_type<uint>(1)));
{
int const x_36 = i;
- i = (x_36 + 1);
+ i = as_type<int>((as_type<uint>(x_36) + as_type<uint>(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 f06e3b0..b6bcce5 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 @@
break;
}
int const x_33 = i;
- a = ((x_33 | -2) - 1);
+ a = as_type<int>((as_type<uint>((x_33 | -2)) - as_type<uint>(1)));
{
int const x_36 = i;
- i = (x_36 + 1);
+ i = as_type<int>((as_type<uint>(x_36) + as_type<uint>(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 aca4892..449f564 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 @@
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<int>((as_type<uint>(x_35) - as_type<uint>(1)));
}
i = 0;
while (true) {
@@ -40,11 +40,11 @@
}
int const x_45 = i;
int const x_46 = sum;
- sum = (x_46 + x_45);
+ sum = as_type<int>((as_type<uint>(x_46) + as_type<uint>(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<int>((as_type<uint>(x_50) + as_type<uint>(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 aca4892..449f564 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 @@
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<int>((as_type<uint>(x_35) - as_type<uint>(1)));
}
i = 0;
while (true) {
@@ -40,11 +40,11 @@
}
int const x_45 = i;
int const x_46 = sum;
- sum = (x_46 + x_45);
+ sum = as_type<int>((as_type<uint>(x_46) + as_type<uint>(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<int>((as_type<uint>(x_50) + as_type<uint>(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 cceaae5..0846e48 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 <metal_stdlib>
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 @@
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 @@
data.arr[x_139] = ~(clamp(~(x_140), ~(x_142), x_145));
{
int const x_149 = i;
- i = (x_149 + 1);
+ i = as_type<int>((as_type<uint>(x_149) + as_type<uint>(1)));
}
}
int const x_152 = x_6.x_GLF_uniform_int_values.arr[5].el;
@@ -105,7 +110,7 @@
data.arr[x_162] = ~(clamp(~(x_163), 0, 1));
{
int const x_168 = i_1;
- i_1 = (x_168 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_168) + as_type<uint>(1)));
}
}
int const x_171 = x_6.x_GLF_uniform_int_values.arr[6].el;
@@ -122,7 +127,7 @@
data.arr[x_181] = ~(clamp(x_182, 0, 1));
{
int const x_186 = i_2;
- i_2 = (x_186 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_186) + as_type<uint>(1)));
}
}
int const x_189 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -146,7 +151,7 @@
}
{
int const x_212 = i_3;
- i_3 = (x_212 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_212) + as_type<uint>(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 cceaae5..0846e48 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 <metal_stdlib>
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 @@
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 @@
data.arr[x_139] = ~(clamp(~(x_140), ~(x_142), x_145));
{
int const x_149 = i;
- i = (x_149 + 1);
+ i = as_type<int>((as_type<uint>(x_149) + as_type<uint>(1)));
}
}
int const x_152 = x_6.x_GLF_uniform_int_values.arr[5].el;
@@ -105,7 +110,7 @@
data.arr[x_162] = ~(clamp(~(x_163), 0, 1));
{
int const x_168 = i_1;
- i_1 = (x_168 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_168) + as_type<uint>(1)));
}
}
int const x_171 = x_6.x_GLF_uniform_int_values.arr[6].el;
@@ -122,7 +127,7 @@
data.arr[x_181] = ~(clamp(x_182, 0, 1));
{
int const x_186 = i_2;
- i_2 = (x_186 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_186) + as_type<uint>(1)));
}
}
int const x_189 = x_6.x_GLF_uniform_int_values.arr[0].el;
@@ -146,7 +151,7 @@
}
{
int const x_212 = i_3;
- i_3 = (x_212 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_212) + as_type<uint>(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 2843739..6605a4f 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 @@
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<int>((as_type<uint>(10) + as_type<uint>(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<int>((as_type<uint>(x_31) + as_type<uint>(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 2843739..6605a4f 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 @@
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<int>((as_type<uint>(10) + as_type<uint>(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<int>((as_type<uint>(x_31) + as_type<uint>(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 df17a9a..15e5fa3 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 @@
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<int>((as_type<uint>(x_48) + as_type<uint>(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 df17a9a..15e5fa3 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 @@
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<int>((as_type<uint>(x_48) + as_type<uint>(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 852c328..844f4c9 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 @@
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<int>((as_type<uint>(x_52) + as_type<uint>(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 852c328..844f4c9 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 @@
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<int>((as_type<uint>(x_52) + as_type<uint>(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 a7a8dbb..8df39ed 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 @@
if ((-2147483648 < x_70)) {
{
int const x_82 = j;
- j = (x_82 + 1);
+ j = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
continue;
}
@@ -87,12 +87,12 @@
}
{
int const x_82 = j;
- j = (x_82 + 1);
+ j = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
{
int const x_84 = i;
- i = (x_84 + 1);
+ i = as_type<int>((as_type<uint>(x_84) + as_type<uint>(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 a7a8dbb..8df39ed 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 @@
if ((-2147483648 < x_70)) {
{
int const x_82 = j;
- j = (x_82 + 1);
+ j = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
continue;
}
@@ -87,12 +87,12 @@
}
{
int const x_82 = j;
- j = (x_82 + 1);
+ j = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
{
int const x_84 = i;
- i = (x_84 + 1);
+ i = as_type<int>((as_type<uint>(x_84) + as_type<uint>(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 bea4a4b..348e88d 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 @@
}
{
int const x_85 = i;
- i = (x_85 + 1);
+ i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(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 bea4a4b..348e88d 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 @@
}
{
int const x_85 = i;
- i = (x_85 + 1);
+ i = as_type<int>((as_type<uint>(x_85) + as_type<uint>(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 3fa3858..8e396a6 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 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_60 = i;
- i = (x_60 - 1);
+ i = as_type<int>((as_type<uint>(x_60) - as_type<uint>(1)));
}
}
GLF_live3s = 0.0f;
@@ -68,7 +68,7 @@
GLF_live3s = (x_95 + 1.0f);
{
int const x_97 = z;
- z = (x_97 - 1);
+ z = as_type<int>((as_type<uint>(x_97) - as_type<uint>(1)));
}
}
int const x_99 = i_1;
@@ -80,7 +80,7 @@
}
{
int const x_108 = i_1;
- i_1 = (x_108 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(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 3fa3858..8e396a6 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 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_60 = i;
- i = (x_60 - 1);
+ i = as_type<int>((as_type<uint>(x_60) - as_type<uint>(1)));
}
}
GLF_live3s = 0.0f;
@@ -68,7 +68,7 @@
GLF_live3s = (x_95 + 1.0f);
{
int const x_97 = z;
- z = (x_97 - 1);
+ z = as_type<int>((as_type<uint>(x_97) - as_type<uint>(1)));
}
}
int const x_99 = i_1;
@@ -80,7 +80,7 @@
}
{
int const x_108 = i_1;
- i_1 = (x_108 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_108) + as_type<uint>(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 08b8b28..7450656 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 @@
data.arr[0] = x_55;
{
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(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 08b8b28..7450656 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 @@
data.arr[0] = x_55;
{
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(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 9e3108a..a792451 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 @@
break;
} else {
{
- x_31 = (x_30 + 1);
+ x_31 = as_type<int>((as_type<uint>(x_30) + as_type<uint>(1)));
x_30_phi = x_31;
}
continue;
}
{
- x_31 = (x_30 + 1);
+ x_31 = as_type<int>((as_type<uint>(x_30) + as_type<uint>(1)));
x_30_phi = x_31;
}
continue;
@@ -48,7 +48,7 @@
x_48_phi = true;
break;
{
- x_31 = (x_30 + 1);
+ x_31 = as_type<int>((as_type<uint>(x_30) + as_type<uint>(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 9e3108a..a792451 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 @@
break;
} else {
{
- x_31 = (x_30 + 1);
+ x_31 = as_type<int>((as_type<uint>(x_30) + as_type<uint>(1)));
x_30_phi = x_31;
}
continue;
}
{
- x_31 = (x_30 + 1);
+ x_31 = as_type<int>((as_type<uint>(x_30) + as_type<uint>(1)));
x_30_phi = x_31;
}
continue;
@@ -48,7 +48,7 @@
x_48_phi = true;
break;
{
- x_31 = (x_30 + 1);
+ x_31 = as_type<int>((as_type<uint>(x_30) + as_type<uint>(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 f11683a..badaebb 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 @@
}
{
int const x_7 = ll;
- ll = (x_7 + 1);
+ ll = as_type<int>((as_type<uint>(x_7) + as_type<uint>(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 f11683a..badaebb 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 @@
}
{
int const x_7 = ll;
- ll = (x_7 + 1);
+ ll = as_type<int>((as_type<uint>(x_7) + as_type<uint>(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 428b891..a6d951d 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 @@
break;
}
int const x_8 = iteration;
- iteration = (x_8 + 1);
+ iteration = as_type<int>((as_type<uint>(x_8) + as_type<uint>(1)));
{
int const x_10 = k;
- k = (x_10 + 1);
+ k = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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<int>((as_type<uint>(x_13) - as_type<uint>(1)))), float(as_type<int>((as_type<uint>(x_15) - as_type<uint>(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 428b891..a6d951d 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 @@
break;
}
int const x_8 = iteration;
- iteration = (x_8 + 1);
+ iteration = as_type<int>((as_type<uint>(x_8) + as_type<uint>(1)));
{
int const x_10 = k;
- k = (x_10 + 1);
+ k = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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<int>((as_type<uint>(x_13) - as_type<uint>(1)))), float(as_type<int>((as_type<uint>(x_15) - as_type<uint>(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 a19b54d..f983be3 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 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<int>((as_type<uint>(x_38) + as_type<uint>(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<int>((as_type<uint>(x_45) + as_type<uint>(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 a19b54d..f983be3 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 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<int>((as_type<uint>(x_38) + as_type<uint>(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<int>((as_type<uint>(x_45) + as_type<uint>(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 d4c94f7..049c25a 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 @@
break;
}
{
- x_33 = (x_32 - 1);
+ x_33 = as_type<int>((as_type<uint>(x_32) - as_type<uint>(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 d4c94f7..049c25a 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 @@
break;
}
{
- x_33 = (x_32 - 1);
+ x_33 = as_type<int>((as_type<uint>(x_32) - as_type<uint>(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 763a5d8..ce03716 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 @@
}
{
int const x_67 = loop_count;
- loop_count = (x_67 + 1);
+ loop_count = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
}
{
int const x_69 = loop_count;
- loop_count = (x_69 + 1);
+ loop_count = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 763a5d8..ce03716 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 @@
}
{
int const x_67 = loop_count;
- loop_count = (x_67 + 1);
+ loop_count = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
}
{
int const x_69 = loop_count;
- loop_count = (x_69 + 1);
+ loop_count = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 d32227c..7ba8d10 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 @@
}
{
int const x_7 = i;
- i = (x_7 + 1);
+ i = as_type<int>((as_type<uint>(x_7) + as_type<uint>(1)));
}
continue;
}
return;
{
int const x_7 = i;
- i = (x_7 + 1);
+ i = as_type<int>((as_type<uint>(x_7) + as_type<uint>(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 d32227c..7ba8d10 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 @@
}
{
int const x_7 = i;
- i = (x_7 + 1);
+ i = as_type<int>((as_type<uint>(x_7) + as_type<uint>(1)));
}
continue;
}
return;
{
int const x_7 = i;
- i = (x_7 + 1);
+ i = as_type<int>((as_type<uint>(x_7) + as_type<uint>(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 7d54d73..87ba14b 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 @@
globalNumbers.arr[x_102_save] = 1;
}
{
- int const x_19 = (x_25 + 1);
+ int const x_19 = as_type<int>((as_type<uint>(x_25) + as_type<uint>(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<int>((x_24 + as_type<int>(x_14)));
+ int const x_14 = globalNumbers.arr[as_type<int>((as_type<uint>(int(x_107)) - as_type<uint>(1)))];
+ int const x_15 = as_type<int>(as_type<int>((as_type<uint>(x_24) + as_type<uint>(as_type<int>(x_14)))));
acc = x_15;
{
- int const x_16 = (x_23 + 1);
+ int const x_16 = as_type<int>((as_type<uint>(x_23) + as_type<uint>(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 7d54d73..87ba14b 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 @@
globalNumbers.arr[x_102_save] = 1;
}
{
- int const x_19 = (x_25 + 1);
+ int const x_19 = as_type<int>((as_type<uint>(x_25) + as_type<uint>(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<int>((x_24 + as_type<int>(x_14)));
+ int const x_14 = globalNumbers.arr[as_type<int>((as_type<uint>(int(x_107)) - as_type<uint>(1)))];
+ int const x_15 = as_type<int>(as_type<int>((as_type<uint>(x_24) + as_type<uint>(as_type<int>(x_14)))));
acc = x_15;
{
- int const x_16 = (x_23 + 1);
+ int const x_16 = as_type<int>((as_type<uint>(x_23) + as_type<uint>(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 f21f0fa..0ab13c5 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 @@
}
if (x_78) {
{
- x_87 = (x_86 + 1);
+ x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
continue;
@@ -110,7 +110,7 @@
break;
}
{
- x_87 = (x_86 + 1);
+ x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
}
@@ -125,7 +125,7 @@
break;
}
x_66 = x_66_phi;
- x_63 = as_type<int>((x_62 + x_66));
+ x_63 = as_type<int>(as_type<int>((as_type<uint>(x_62) + as_type<uint>(x_66))));
if (x_41) {
while (true) {
if (x_41) {
@@ -143,7 +143,7 @@
break;
}
{
- x_68 = (x_67 + 1);
+ x_68 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
@@ -163,7 +163,7 @@
break;
}
{
- x_53 = (x_52 + 1);
+ x_53 = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
@@ -215,7 +215,7 @@
}
if (x_135) {
{
- x_144 = (x_143 + 1);
+ x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
continue;
@@ -226,7 +226,7 @@
break;
}
{
- x_144 = (x_143 + 1);
+ x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
}
@@ -242,13 +242,13 @@
}
int x_119 = 0;
x_119 = x_119_phi;
- x_116 = as_type<int>((x_115 + x_119));
+ x_116 = as_type<int>(as_type<int>((as_type<uint>(x_115) + as_type<uint>(x_119))));
if (select(x_41, false, !(x_41))) {
x_161_phi = x_116;
break;
}
{
- x_121 = (x_120 + 1);
+ x_121 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(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 f21f0fa..0ab13c5 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 @@
}
if (x_78) {
{
- x_87 = (x_86 + 1);
+ x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
continue;
@@ -110,7 +110,7 @@
break;
}
{
- x_87 = (x_86 + 1);
+ x_87 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
x_86_phi = x_87;
}
}
@@ -125,7 +125,7 @@
break;
}
x_66 = x_66_phi;
- x_63 = as_type<int>((x_62 + x_66));
+ x_63 = as_type<int>(as_type<int>((as_type<uint>(x_62) + as_type<uint>(x_66))));
if (x_41) {
while (true) {
if (x_41) {
@@ -143,7 +143,7 @@
break;
}
{
- x_68 = (x_67 + 1);
+ x_68 = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
x_62_phi = x_63;
x_65_phi = x_66;
x_67_phi = x_68;
@@ -163,7 +163,7 @@
break;
}
{
- x_53 = (x_52 + 1);
+ x_53 = as_type<int>((as_type<uint>(x_52) + as_type<uint>(1)));
x_45_phi = x_46;
x_48_phi = x_49;
x_50_phi = x_51;
@@ -215,7 +215,7 @@
}
if (x_135) {
{
- x_144 = (x_143 + 1);
+ x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
continue;
@@ -226,7 +226,7 @@
break;
}
{
- x_144 = (x_143 + 1);
+ x_144 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
x_143_phi = x_144;
}
}
@@ -242,13 +242,13 @@
}
int x_119 = 0;
x_119 = x_119_phi;
- x_116 = as_type<int>((x_115 + x_119));
+ x_116 = as_type<int>(as_type<int>((as_type<uint>(x_115) + as_type<uint>(x_119))));
if (select(x_41, false, !(x_41))) {
x_161_phi = x_116;
break;
}
{
- x_121 = (x_120 + 1);
+ x_121 = as_type<int>((as_type<uint>(x_120) + as_type<uint>(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 c1f7672..af005b6 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 @@
break;
}
{
- x_7 = as_type<int>((x_9 + as_type<int>(1)));
+ x_7 = as_type<int>(as_type<int>((as_type<uint>(x_9) + as_type<uint>(as_type<int>(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 c1f7672..af005b6 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 @@
break;
}
{
- x_7 = as_type<int>((x_9 + as_type<int>(1)));
+ x_7 = as_type<int>(as_type<int>((as_type<uint>(x_9) + as_type<uint>(as_type<int>(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 d05608a..8aad500 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 @@
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<int>((as_type<uint>(x_16) + as_type<uint>(1)));
donor_replacementGLF_dead0top = x_17;
x_54 = x_17;
} else {
@@ -66,12 +66,12 @@
matrix_b[x_20] = (x_87 - 1.0f);
{
int const x_22 = b;
- b = (x_22 - 1);
+ b = as_type<int>((as_type<uint>(x_22) - as_type<uint>(1)));
}
}
{
int const x_24 = k;
- k = (x_24 + 1);
+ k = as_type<int>((as_type<uint>(x_24) + as_type<uint>(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 837b916..a41081a 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 @@
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<int>((as_type<uint>(x_16) + as_type<uint>(1)));
donor_replacementGLF_dead0top = x_17;
x_54 = x_17;
} else {
@@ -66,12 +66,12 @@
matrix_b[x_20] = (x_87 - 1.0f);
{
int const x_22 = b;
- b = (x_22 - 1);
+ b = as_type<int>((as_type<uint>(x_22) - as_type<uint>(1)));
}
}
{
int const x_24 = k;
- k = (x_24 + 1);
+ k = as_type<int>((as_type<uint>(x_24) + as_type<uint>(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 447bbeb..b378883 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 @@
}
{
int const x_11 = j;
- j = (x_11 + 1);
+ j = as_type<int>((as_type<uint>(x_11) + as_type<uint>(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 447bbeb..b378883 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 @@
}
{
int const x_11 = j;
- j = (x_11 + 1);
+ j = as_type<int>((as_type<uint>(x_11) + as_type<uint>(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 dee463b..86dc885 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 @@
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<int>((as_type<uint>(x_18) - as_type<uint>(int(x_67)))) == 4)) {
int const x_21 = i;
obj_1.prime_numbers.arr[x_21] = 11;
} else {
@@ -62,7 +62,7 @@
}
{
int const x_24 = i;
- i = (x_24 + 1);
+ i = as_type<int>((as_type<uint>(x_24) + as_type<uint>(1)));
}
continue;
}
@@ -78,7 +78,7 @@
}
{
int const x_24 = i;
- i = (x_24 + 1);
+ i = as_type<int>((as_type<uint>(x_24) + as_type<uint>(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 dee463b..86dc885 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 @@
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<int>((as_type<uint>(x_18) - as_type<uint>(int(x_67)))) == 4)) {
int const x_21 = i;
obj_1.prime_numbers.arr[x_21] = 11;
} else {
@@ -62,7 +62,7 @@
}
{
int const x_24 = i;
- i = (x_24 + 1);
+ i = as_type<int>((as_type<uint>(x_24) + as_type<uint>(1)));
}
continue;
}
@@ -78,7 +78,7 @@
}
{
int const x_24 = i;
- i = (x_24 + 1);
+ i = as_type<int>((as_type<uint>(x_24) + as_type<uint>(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 998e2de..394db17 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 @@
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<int>((as_type<uint>(x_11) + as_type<uint>(1)));
x_11_phi = x_8;
}
}
{
- x_9 = (x_10 + 1);
+ x_9 = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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 998e2de..394db17 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 @@
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<int>((as_type<uint>(x_11) + as_type<uint>(1)));
x_11_phi = x_8;
}
}
{
- x_9 = (x_10 + 1);
+ x_9 = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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 54dd6b3..68b02b1 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 @@
}
{
int const x_8 = i;
- i = (x_8 + 1);
+ i = as_type<int>((as_type<uint>(x_8) + as_type<uint>(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 54dd6b3..68b02b1 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 @@
}
{
int const x_8 = i;
- i = (x_8 + 1);
+ i = as_type<int>((as_type<uint>(x_8) + as_type<uint>(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 5965457..c22cdd3 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 @@
}
{
int const x_101 = GLF_dead5r;
- GLF_dead5r = (x_101 + 1);
+ GLF_dead5r = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
}
}
{
int const x_103 = GLF_dead5c;
- GLF_dead5c = (x_103 + 1);
+ GLF_dead5c = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
}
}
int const x_105 = msb10;
- msb10 = (x_105 + 1);
+ msb10 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
{
int const x_107 = GLF_dead5rows;
- GLF_dead5rows = (x_107 + 1);
+ GLF_dead5rows = as_type<int>((as_type<uint>(x_107) + as_type<uint>(1)));
}
}
{
int const x_109 = GLF_dead5cols;
- GLF_dead5cols = (x_109 + 1);
+ GLF_dead5cols = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
}
}
}
int const x_111 = i;
- i = (x_111 + 1);
+ i = as_type<int>((as_type<uint>(x_111) + as_type<uint>(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 d1d24c8..0a2d6a4 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 @@
}
{
int const x_101 = GLF_dead5r;
- GLF_dead5r = (x_101 + 1);
+ GLF_dead5r = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
}
}
{
int const x_103 = GLF_dead5c;
- GLF_dead5c = (x_103 + 1);
+ GLF_dead5c = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
}
}
int const x_105 = msb10;
- msb10 = (x_105 + 1);
+ msb10 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
{
int const x_107 = GLF_dead5rows;
- GLF_dead5rows = (x_107 + 1);
+ GLF_dead5rows = as_type<int>((as_type<uint>(x_107) + as_type<uint>(1)));
}
}
{
int const x_109 = GLF_dead5cols;
- GLF_dead5cols = (x_109 + 1);
+ GLF_dead5cols = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
}
}
}
int const x_111 = i;
- i = (x_111 + 1);
+ i = as_type<int>((as_type<uint>(x_111) + as_type<uint>(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 110e1af..15cae52 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 @@
} else {
{
int const x_10 = i;
- i = (x_10 + 1);
+ i = as_type<int>((as_type<uint>(x_10) + as_type<uint>(1)));
}
continue;
}
{
int const x_10 = i;
- i = (x_10 + 1);
+ i = as_type<int>((as_type<uint>(x_10) + as_type<uint>(1)));
}
}
return 1.0f;
@@ -50,7 +50,7 @@
float const x_39 = f_();
c.x = x_39;
int const x_13 = i_1;
- i_1 = (x_13 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_13) + as_type<uint>(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 110e1af..15cae52 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 @@
} else {
{
int const x_10 = i;
- i = (x_10 + 1);
+ i = as_type<int>((as_type<uint>(x_10) + as_type<uint>(1)));
}
continue;
}
{
int const x_10 = i;
- i = (x_10 + 1);
+ i = as_type<int>((as_type<uint>(x_10) + as_type<uint>(1)));
}
}
return 1.0f;
@@ -50,7 +50,7 @@
float const x_39 = f_();
c.x = x_39;
int const x_13 = i_1;
- i_1 = (x_13 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_13) + as_type<uint>(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 9694480..1288d26 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 @@
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<int>((as_type<uint>(x_34) + as_type<uint>(int(x_50)))))) {
} else {
break;
}
@@ -54,7 +54,7 @@
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<int>((as_type<uint>(x_34) + as_type<uint>(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 @@
x_45 = x_45_phi;
}
{
- x_48 = (x_47 + 1);
+ x_48 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 9694480..1288d26 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 @@
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<int>((as_type<uint>(x_34) + as_type<uint>(int(x_50)))))) {
} else {
break;
}
@@ -54,7 +54,7 @@
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<int>((as_type<uint>(x_34) + as_type<uint>(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 @@
x_45 = x_45_phi;
}
{
- x_48 = (x_47 + 1);
+ x_48 = as_type<int>((as_type<uint>(x_47) + as_type<uint>(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 3bfd32e..985ef75 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 @@
break;
}
int const x_12 = GLF_live5_looplimiter6;
- GLF_live5_looplimiter6 = (x_12 + 1);
+ GLF_live5_looplimiter6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(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 3bfd32e..985ef75 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 @@
break;
}
int const x_12 = GLF_live5_looplimiter6;
- GLF_live5_looplimiter6 = (x_12 + 1);
+ GLF_live5_looplimiter6 = as_type<int>((as_type<uint>(x_12) + as_type<uint>(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 e1df0f2..0bff464 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 @@
(*(tint_symbol_6)).arr[x_78] = 0;
{
int const x_80 = i;
- i = (x_80 + 1);
+ i = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -57,7 +57,7 @@
bool x_143_phi = false;
bool x_163_phi = false;
int const x_86 = v;
- v = (x_86 + 1);
+ v = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
directions = 0;
int const x_89 = p.x;
bool const x_90 = (x_89 > 0);
@@ -65,14 +65,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_94) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_97) * as_type<uint>(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<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
int const x_109 = p.y;
bool const x_110 = (x_109 > 0);
@@ -80,14 +80,14 @@
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<int>((as_type<uint>(x_114) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_126) + as_type<uint>(1)));
}
int const x_129 = p.x;
bool const x_130 = (x_129 < 14);
@@ -95,14 +95,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_134) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_137) * as_type<uint>(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<int>((as_type<uint>(x_146) + as_type<uint>(1)));
}
int const x_149 = p.y;
bool const x_150 = (x_149 < 14);
@@ -110,14 +110,14 @@
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<int>((as_type<uint>(x_154) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_156) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_166) + as_type<uint>(1)));
}
bool x_227 = false;
bool x_240 = false;
@@ -154,34 +154,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_187) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_194 == 0)) {
int const x_198 = j;
- p.x = (x_198 * 2);
+ p.x = as_type<int>((as_type<uint>(x_198) * as_type<uint>(2)));
int const x_201 = i;
- p.y = (x_201 * 2);
+ p.y = as_type<int>((as_type<uint>(x_201) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_204 = j;
- j = (x_204 + 1);
+ j = as_type<int>((as_type<uint>(x_204) + as_type<uint>(1)));
}
}
{
int const x_206 = i;
- i = (x_206 + 1);
+ i = as_type<int>((as_type<uint>(x_206) + as_type<uint>(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<int>((as_type<uint>(x_209) + as_type<uint>(as_type<int>((as_type<uint>(x_211) * as_type<uint>(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<int>((as_type<uint>(x_219) + as_type<uint>(x_218)));
int const x_221 = d;
bool const x_222 = (x_221 >= 0);
x_228_phi = x_222;
@@ -195,25 +195,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_232) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_235) * as_type<uint>(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<int>((as_type<uint>(x_244) - as_type<uint>(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<int>((as_type<uint>(x_247) + as_type<uint>(as_type<int>((as_type<uint>(x_249) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_257) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_262) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_265) * as_type<uint>(16))))))] = 1;
int const x_270 = p.x;
- p.x = (x_270 - 2);
+ p.x = as_type<int>((as_type<uint>(x_270) - as_type<uint>(2)));
}
int const x_273 = d;
bool const x_274 = (x_273 >= 0);
@@ -228,25 +228,25 @@
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<int>((as_type<uint>(x_284) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_286) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_296) - as_type<uint>(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<int>((as_type<uint>(x_299) + as_type<uint>(as_type<int>((as_type<uint>(x_301) * as_type<uint>(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<int>((as_type<uint>(x_306) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_308) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_314) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_316) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_322 = p.y;
- p.y = (x_322 - 2);
+ p.y = as_type<int>((as_type<uint>(x_322) - as_type<uint>(2)));
}
int const x_325 = d;
bool const x_326 = (x_325 >= 0);
@@ -261,25 +261,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_336) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_339) * as_type<uint>(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<int>((as_type<uint>(x_348) - as_type<uint>(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<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(x_353) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_358) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_361) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_366) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_369) * as_type<uint>(16))))))] = 1;
int const x_374 = p.x;
- p.x = (x_374 + 2);
+ p.x = as_type<int>((as_type<uint>(x_374) + as_type<uint>(2)));
}
int const x_377 = d;
bool const x_378 = (x_377 >= 0);
@@ -294,30 +294,30 @@
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<int>((as_type<uint>(x_388) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_390) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_400) - as_type<uint>(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<int>((as_type<uint>(x_403) + as_type<uint>(as_type<int>((as_type<uint>(x_405) * as_type<uint>(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<int>((as_type<uint>(x_410) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_412) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_418) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_420) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_426 = p.y;
- p.y = (x_426 + 2);
+ p.y = as_type<int>((as_type<uint>(x_426) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) * as_type<uint>(16)))) + as_type<uint>(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 e1df0f2..0bff464 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 @@
(*(tint_symbol_6)).arr[x_78] = 0;
{
int const x_80 = i;
- i = (x_80 + 1);
+ i = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -57,7 +57,7 @@
bool x_143_phi = false;
bool x_163_phi = false;
int const x_86 = v;
- v = (x_86 + 1);
+ v = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
directions = 0;
int const x_89 = p.x;
bool const x_90 = (x_89 > 0);
@@ -65,14 +65,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_94) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_97) * as_type<uint>(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<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
int const x_109 = p.y;
bool const x_110 = (x_109 > 0);
@@ -80,14 +80,14 @@
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<int>((as_type<uint>(x_114) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_126) + as_type<uint>(1)));
}
int const x_129 = p.x;
bool const x_130 = (x_129 < 14);
@@ -95,14 +95,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_134) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_137) * as_type<uint>(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<int>((as_type<uint>(x_146) + as_type<uint>(1)));
}
int const x_149 = p.y;
bool const x_150 = (x_149 < 14);
@@ -110,14 +110,14 @@
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<int>((as_type<uint>(x_154) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_156) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_166) + as_type<uint>(1)));
}
bool x_227 = false;
bool x_240 = false;
@@ -154,34 +154,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_187) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_194 == 0)) {
int const x_198 = j;
- p.x = (x_198 * 2);
+ p.x = as_type<int>((as_type<uint>(x_198) * as_type<uint>(2)));
int const x_201 = i;
- p.y = (x_201 * 2);
+ p.y = as_type<int>((as_type<uint>(x_201) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_204 = j;
- j = (x_204 + 1);
+ j = as_type<int>((as_type<uint>(x_204) + as_type<uint>(1)));
}
}
{
int const x_206 = i;
- i = (x_206 + 1);
+ i = as_type<int>((as_type<uint>(x_206) + as_type<uint>(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<int>((as_type<uint>(x_209) + as_type<uint>(as_type<int>((as_type<uint>(x_211) * as_type<uint>(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<int>((as_type<uint>(x_219) + as_type<uint>(x_218)));
int const x_221 = d;
bool const x_222 = (x_221 >= 0);
x_228_phi = x_222;
@@ -195,25 +195,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_232) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_235) * as_type<uint>(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<int>((as_type<uint>(x_244) - as_type<uint>(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<int>((as_type<uint>(x_247) + as_type<uint>(as_type<int>((as_type<uint>(x_249) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_254) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_257) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_262) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_265) * as_type<uint>(16))))))] = 1;
int const x_270 = p.x;
- p.x = (x_270 - 2);
+ p.x = as_type<int>((as_type<uint>(x_270) - as_type<uint>(2)));
}
int const x_273 = d;
bool const x_274 = (x_273 >= 0);
@@ -228,25 +228,25 @@
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<int>((as_type<uint>(x_284) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_286) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_296) - as_type<uint>(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<int>((as_type<uint>(x_299) + as_type<uint>(as_type<int>((as_type<uint>(x_301) * as_type<uint>(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<int>((as_type<uint>(x_306) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_308) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_314) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_316) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_322 = p.y;
- p.y = (x_322 - 2);
+ p.y = as_type<int>((as_type<uint>(x_322) - as_type<uint>(2)));
}
int const x_325 = d;
bool const x_326 = (x_325 >= 0);
@@ -261,25 +261,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_336) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_339) * as_type<uint>(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<int>((as_type<uint>(x_348) - as_type<uint>(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<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(x_353) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_358) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_361) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_366) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_369) * as_type<uint>(16))))))] = 1;
int const x_374 = p.x;
- p.x = (x_374 + 2);
+ p.x = as_type<int>((as_type<uint>(x_374) + as_type<uint>(2)));
}
int const x_377 = d;
bool const x_378 = (x_377 >= 0);
@@ -294,30 +294,30 @@
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<int>((as_type<uint>(x_388) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_390) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_400) - as_type<uint>(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<int>((as_type<uint>(x_403) + as_type<uint>(as_type<int>((as_type<uint>(x_405) * as_type<uint>(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<int>((as_type<uint>(x_410) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_412) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_418) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_420) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_426 = p.y;
- p.y = (x_426 + 2);
+ p.y = as_type<int>((as_type<uint>(x_426) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) * as_type<uint>(16)))) + as_type<uint>(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 ad27d07..50fbd98 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 @@
break;
}
{
- x_59 = (x_58 + 1);
+ x_59 = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
x_55_phi = x_56;
x_58_phi = x_59;
}
@@ -139,7 +139,7 @@
break;
}
{
- x_96 = (x_95 + 1);
+ x_96 = as_type<int>((as_type<uint>(x_95) + as_type<uint>(1)));
x_92_phi = x_93;
x_95_phi = x_96;
}
@@ -176,7 +176,7 @@
c[x_135_save] = (x_140 * x_141);
}
{
- x_130 = (x_129 + 1);
+ x_130 = as_type<int>((as_type<uint>(x_129) + as_type<uint>(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 ccd7c33..e525067 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 @@
break;
}
{
- x_59 = (x_58 + 1);
+ x_59 = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
x_55_phi = x_56;
x_58_phi = x_59;
}
@@ -139,7 +139,7 @@
break;
}
{
- x_96 = (x_95 + 1);
+ x_96 = as_type<int>((as_type<uint>(x_95) + as_type<uint>(1)));
x_92_phi = x_93;
x_95_phi = x_96;
}
@@ -176,7 +176,7 @@
c[x_135_save] = (x_140 * x_141);
}
{
- x_130 = (x_129 + 1);
+ x_130 = as_type<int>((as_type<uint>(x_129) + as_type<uint>(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 3a92f08..b21c6f8 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 @@
break;
}
{
- x_61 = (x_60 + 1);
+ x_61 = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
x_57_phi = x_58;
x_60_phi = x_61;
}
@@ -144,7 +144,7 @@
break;
}
{
- x_102 = (x_101 + 1);
+ x_102 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
x_98_phi = x_99;
x_101_phi = x_102;
}
@@ -181,7 +181,7 @@
c[x_141_save] = (x_146 * x_147);
}
{
- x_136 = (x_135 + 1);
+ x_136 = as_type<int>((as_type<uint>(x_135) + as_type<uint>(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 05e2aaa..2aea05b 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 @@
break;
}
{
- x_61 = (x_60 + 1);
+ x_61 = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
x_57_phi = x_58;
x_60_phi = x_61;
}
@@ -144,7 +144,7 @@
break;
}
{
- x_102 = (x_101 + 1);
+ x_102 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
x_98_phi = x_99;
x_101_phi = x_102;
}
@@ -181,7 +181,7 @@
c[x_141_save] = (x_146 * x_147);
}
{
- x_136 = (x_135 + 1);
+ x_136 = as_type<int>((as_type<uint>(x_135) + as_type<uint>(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 f5bbeb8..bc1b29b 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 @@
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<int>((as_type<uint>(int((x_56.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_56.y * 10.0f))) * as_type<uint>(10))))));
x_66_phi = 100;
x_69_phi = 0;
while (true) {
@@ -35,8 +35,8 @@
break;
}
{
- x_67 = (((4 * as_type<int>(x_66)) * (1000 - as_type<int>(x_66))) / 1000);
- x_70 = (x_69 + 1);
+ x_67 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_66))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_66))))))) / 1000);
+ x_70 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 f5bbeb8..bc1b29b 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 @@
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<int>((as_type<uint>(int((x_56.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_56.y * 10.0f))) * as_type<uint>(10))))));
x_66_phi = 100;
x_69_phi = 0;
while (true) {
@@ -35,8 +35,8 @@
break;
}
{
- x_67 = (((4 * as_type<int>(x_66)) * (1000 - as_type<int>(x_66))) / 1000);
- x_70 = (x_69 + 1);
+ x_67 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_66))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_66))))))) / 1000);
+ x_70 = as_type<int>((as_type<uint>(x_69) + as_type<uint>(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 7c00279..0aeb0f5 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 @@
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<int>((as_type<uint>(int((x_59.x * float4(float4(0.0f, x_55, 0.5f).w, 10.0f, float2(0.0f, 0.0f)).y))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
x_72_phi = 100;
x_75_phi = 0;
while (true) {
@@ -36,8 +36,8 @@
break;
}
{
- x_73 = (((4 * as_type<int>(x_72)) * (1000 - as_type<int>(x_72))) / 1000);
- x_76 = (x_75 + 1);
+ x_73 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_72))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_72))))))) / 1000);
+ x_76 = as_type<int>((as_type<uint>(x_75) + as_type<uint>(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 7c00279..0aeb0f5 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 @@
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<int>((as_type<uint>(int((x_59.x * float4(float4(0.0f, x_55, 0.5f).w, 10.0f, float2(0.0f, 0.0f)).y))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
x_72_phi = 100;
x_75_phi = 0;
while (true) {
@@ -36,8 +36,8 @@
break;
}
{
- x_73 = (((4 * as_type<int>(x_72)) * (1000 - as_type<int>(x_72))) / 1000);
- x_76 = (x_75 + 1);
+ x_73 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_72))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_72))))))) / 1000);
+ x_76 = as_type<int>((as_type<uint>(x_75) + as_type<uint>(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 4c8e613..f406708 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 @@
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<int>((as_type<uint>(x_222) + as_type<uint>(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<int>((as_type<uint>(x_228) - as_type<uint>(15))));
x_231_phi = x_230;
}
bool const x_231 = x_231_phi;
@@ -61,14 +61,14 @@
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<int>((as_type<uint>(x_220) - as_type<uint>(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<int>((as_type<uint>(x_216) + as_type<uint>(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 4c8e613..f406708 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 @@
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<int>((as_type<uint>(x_222) + as_type<uint>(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<int>((as_type<uint>(x_228) - as_type<uint>(15))));
x_231_phi = x_230;
}
bool const x_231 = x_231_phi;
@@ -61,14 +61,14 @@
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<int>((as_type<uint>(x_220) - as_type<uint>(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<int>((as_type<uint>(x_216) + as_type<uint>(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 805d16d..6c9b126 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(120) - as_type<uint>(0)));
x_214 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f)));
switch(0u) {
default: {
@@ -51,13 +56,13 @@
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<int>((as_type<uint>(x_227) + as_type<uint>(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<int>((as_type<uint>(x_233) - as_type<uint>(15))));
x_236_phi = x_235;
}
bool const x_236 = x_236_phi;
@@ -65,16 +70,16 @@
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<int>((as_type<uint>(91) + as_type<uint>(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<int>((as_type<uint>(x_225) - as_type<uint>(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<int>((as_type<uint>(x_221) + as_type<uint>(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 805d16d..6c9b126 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(120) - as_type<uint>(0)));
x_214 = int2(int((x_202.x * 256.0f)), int((x_202.y * 256.0f)));
switch(0u) {
default: {
@@ -51,13 +56,13 @@
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<int>((as_type<uint>(x_227) + as_type<uint>(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<int>((as_type<uint>(x_233) - as_type<uint>(15))));
x_236_phi = x_235;
}
bool const x_236 = x_236_phi;
@@ -65,16 +70,16 @@
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<int>((as_type<uint>(91) + as_type<uint>(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<int>((as_type<uint>(x_225) - as_type<uint>(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<int>((as_type<uint>(x_221) + as_type<uint>(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 192b6aa..147da65 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(256) - as_type<uint>(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 @@
(*(tint_symbol_6)).arr[x_86] = 0;
{
int const x_88 = i;
- i = (x_88 + 1);
+ i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -58,7 +63,7 @@
bool x_151_phi = false;
bool x_172_phi = false;
int const x_94 = v;
- v = (x_94 + 1);
+ v = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
directions = 0;
int const x_97 = p.x;
bool const x_98 = (x_97 > 0);
@@ -66,14 +71,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_102) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_105) * as_type<uint>(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<int>((as_type<uint>(x_114) + as_type<uint>(1)));
}
int const x_117 = p.y;
bool const x_118 = (x_117 > 0);
@@ -81,14 +86,14 @@
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<int>((as_type<uint>(x_122) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_124) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_134) + as_type<uint>(1)));
}
int const x_137 = p.x;
bool const x_138 = (x_137 < 14);
@@ -96,30 +101,30 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_142) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_145) * as_type<uint>(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<int>((as_type<uint>(x_154) + as_type<uint>(1)));
}
- int const x_156 = (256 - x_68);
+ int const x_156 = as_type<int>((as_type<uint>(256) - as_type<uint>(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<int>((as_type<uint>(x_163) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_165) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_175) + as_type<uint>(1)));
}
bool x_237 = false;
bool x_250 = false;
@@ -148,12 +153,12 @@
break;
}
j = 0;
- int const x_189 = (x_156 - x_186);
+ int const x_189 = as_type<int>((as_type<uint>(x_156) - as_type<uint>(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<int>((as_type<uint>(x_216) + as_type<uint>(1)));
}
continue;
}
@@ -165,34 +170,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_197) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_199) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_204 == 0)) {
int const x_208 = j;
- p.x = (x_208 * 2);
+ p.x = as_type<int>((as_type<uint>(x_208) * as_type<uint>(2)));
int const x_211 = i;
- p.y = (x_211 * 2);
+ p.y = as_type<int>((as_type<uint>(x_211) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_214 = j;
- j = (x_214 + 1);
+ j = as_type<int>((as_type<uint>(x_214) + as_type<uint>(1)));
}
}
{
int const x_216 = i;
- i = (x_216 + 1);
+ i = as_type<int>((as_type<uint>(x_216) + as_type<uint>(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<int>((as_type<uint>(x_219) + as_type<uint>(as_type<int>((as_type<uint>(x_221) * as_type<uint>(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<int>((as_type<uint>(x_229) + as_type<uint>(x_228)));
int const x_231 = d;
bool const x_232 = (x_231 >= 0);
x_238_phi = x_232;
@@ -206,25 +211,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_242) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_245) * as_type<uint>(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<int>((as_type<uint>(x_254) - as_type<uint>(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<int>((as_type<uint>(x_257) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_275) * as_type<uint>(16))))))] = 1;
int const x_280 = p.x;
- p.x = (x_280 - 2);
+ p.x = as_type<int>((as_type<uint>(x_280) - as_type<uint>(2)));
}
int const x_283 = d;
bool const x_284 = (x_283 >= 0);
@@ -239,25 +244,25 @@
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<int>((as_type<uint>(x_294) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_296) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_306) - as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(x_311) * as_type<uint>(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<int>((as_type<uint>(x_316) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_318) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_324) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_332 = p.y;
- p.y = (x_332 - 2);
+ p.y = as_type<int>((as_type<uint>(x_332) - as_type<uint>(2)));
}
int const x_335 = d;
bool const x_336 = (x_335 >= 0);
@@ -272,25 +277,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_346) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_349) * as_type<uint>(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<int>((as_type<uint>(x_358) - as_type<uint>(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<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(x_363) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_368) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_371) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_376) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_379) * as_type<uint>(16))))))] = 1;
int const x_384 = p.x;
- p.x = (x_384 + 2);
+ p.x = as_type<int>((as_type<uint>(x_384) + as_type<uint>(2)));
}
int const x_387 = d;
bool const x_388 = (x_387 >= 0);
@@ -305,30 +310,30 @@
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<int>((as_type<uint>(x_398) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_410) - as_type<uint>(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<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(x_415) * as_type<uint>(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<int>((as_type<uint>(x_420) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_422) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_428) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_436 = p.y;
- p.y = (x_436 + 2);
+ p.y = as_type<int>((as_type<uint>(x_436) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) * as_type<uint>(16)))) + as_type<uint>(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 192b6aa..147da65 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(256) - as_type<uint>(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 @@
(*(tint_symbol_6)).arr[x_86] = 0;
{
int const x_88 = i;
- i = (x_88 + 1);
+ i = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -58,7 +63,7 @@
bool x_151_phi = false;
bool x_172_phi = false;
int const x_94 = v;
- v = (x_94 + 1);
+ v = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
directions = 0;
int const x_97 = p.x;
bool const x_98 = (x_97 > 0);
@@ -66,14 +71,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_102) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_105) * as_type<uint>(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<int>((as_type<uint>(x_114) + as_type<uint>(1)));
}
int const x_117 = p.y;
bool const x_118 = (x_117 > 0);
@@ -81,14 +86,14 @@
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<int>((as_type<uint>(x_122) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_124) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_134) + as_type<uint>(1)));
}
int const x_137 = p.x;
bool const x_138 = (x_137 < 14);
@@ -96,30 +101,30 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_142) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_145) * as_type<uint>(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<int>((as_type<uint>(x_154) + as_type<uint>(1)));
}
- int const x_156 = (256 - x_68);
+ int const x_156 = as_type<int>((as_type<uint>(256) - as_type<uint>(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<int>((as_type<uint>(x_163) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_165) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_175) + as_type<uint>(1)));
}
bool x_237 = false;
bool x_250 = false;
@@ -148,12 +153,12 @@
break;
}
j = 0;
- int const x_189 = (x_156 - x_186);
+ int const x_189 = as_type<int>((as_type<uint>(x_156) - as_type<uint>(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<int>((as_type<uint>(x_216) + as_type<uint>(1)));
}
continue;
}
@@ -165,34 +170,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_197) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_199) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_204 == 0)) {
int const x_208 = j;
- p.x = (x_208 * 2);
+ p.x = as_type<int>((as_type<uint>(x_208) * as_type<uint>(2)));
int const x_211 = i;
- p.y = (x_211 * 2);
+ p.y = as_type<int>((as_type<uint>(x_211) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_214 = j;
- j = (x_214 + 1);
+ j = as_type<int>((as_type<uint>(x_214) + as_type<uint>(1)));
}
}
{
int const x_216 = i;
- i = (x_216 + 1);
+ i = as_type<int>((as_type<uint>(x_216) + as_type<uint>(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<int>((as_type<uint>(x_219) + as_type<uint>(as_type<int>((as_type<uint>(x_221) * as_type<uint>(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<int>((as_type<uint>(x_229) + as_type<uint>(x_228)));
int const x_231 = d;
bool const x_232 = (x_231 >= 0);
x_238_phi = x_232;
@@ -206,25 +211,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_242) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_245) * as_type<uint>(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<int>((as_type<uint>(x_254) - as_type<uint>(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<int>((as_type<uint>(x_257) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_275) * as_type<uint>(16))))))] = 1;
int const x_280 = p.x;
- p.x = (x_280 - 2);
+ p.x = as_type<int>((as_type<uint>(x_280) - as_type<uint>(2)));
}
int const x_283 = d;
bool const x_284 = (x_283 >= 0);
@@ -239,25 +244,25 @@
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<int>((as_type<uint>(x_294) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_296) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_306) - as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(x_311) * as_type<uint>(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<int>((as_type<uint>(x_316) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_318) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_324) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_332 = p.y;
- p.y = (x_332 - 2);
+ p.y = as_type<int>((as_type<uint>(x_332) - as_type<uint>(2)));
}
int const x_335 = d;
bool const x_336 = (x_335 >= 0);
@@ -272,25 +277,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_346) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_349) * as_type<uint>(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<int>((as_type<uint>(x_358) - as_type<uint>(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<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(x_363) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_368) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_371) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_376) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_379) * as_type<uint>(16))))))] = 1;
int const x_384 = p.x;
- p.x = (x_384 + 2);
+ p.x = as_type<int>((as_type<uint>(x_384) + as_type<uint>(2)));
}
int const x_387 = d;
bool const x_388 = (x_387 >= 0);
@@ -305,30 +310,30 @@
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<int>((as_type<uint>(x_398) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_410) - as_type<uint>(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<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(x_415) * as_type<uint>(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<int>((as_type<uint>(x_420) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_422) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_428) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_430) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_436 = p.y;
- p.y = (x_436 + 2);
+ p.y = as_type<int>((as_type<uint>(x_436) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) * as_type<uint>(16)))) + as_type<uint>(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 8780c86..d072491 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_164)) * as_type<uint>(int(x_168))))) + as_type<uint>(as_type<int>((as_type<uint>(x_171) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
res = x_177;
}
{
int const x_178 = i;
- i = (x_178 + 1);
+ i = as_type<int>((as_type<uint>(x_178) + as_type<uint>(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 8780c86..d072491 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_164)) * as_type<uint>(int(x_168))))) + as_type<uint>(as_type<int>((as_type<uint>(x_171) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
res = x_177;
}
{
int const x_178 = i;
- i = (x_178 + 1);
+ i = as_type<int>((as_type<uint>(x_178) + as_type<uint>(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 5b43db6..d8c43f8 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_168)) * as_type<uint>(int(x_172))))) + as_type<uint>(as_type<int>((as_type<uint>(x_175) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
res = x_181;
}
{
int const x_182 = i;
- i = (x_182 + 1);
+ i = as_type<int>((as_type<uint>(x_182) + as_type<uint>(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 5b43db6..d8c43f8 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_168)) * as_type<uint>(int(x_172))))) + as_type<uint>(as_type<int>((as_type<uint>(x_175) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
res = x_181;
}
{
int const x_182 = i;
- i = (x_182 + 1);
+ i = as_type<int>((as_type<uint>(x_182) + as_type<uint>(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 5c560fc..40421fe 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 @@
int const x_255 = *(from);
i = x_255;
int const x_256 = *(mid);
- j = (x_256 + 1);
+ j = as_type<int>((as_type<uint>(x_256) + as_type<uint>(1)));
while (true) {
int const x_262 = i;
int const x_263 = *(mid);
@@ -43,16 +43,16 @@
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<int>((as_type<uint>(x_280) + as_type<uint>(1)));
int const x_282 = i;
- i = (x_282 + 1);
+ i = as_type<int>((as_type<uint>(x_282) + as_type<uint>(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<int>((as_type<uint>(x_287) + as_type<uint>(1)));
int const x_289 = j;
- j = (x_289 + 1);
+ j = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
int const x_292 = (*(tint_symbol_5)).arr[x_289];
(*(tint_symbol_6)).arr[x_287] = x_292;
}
@@ -66,9 +66,9 @@
break;
}
int const x_305 = k;
- k = (x_305 + 1);
+ k = as_type<int>((as_type<uint>(x_305) + as_type<uint>(1)));
int const x_307 = i;
- i = (x_307 + 1);
+ i = as_type<int>((as_type<uint>(x_307) + as_type<uint>(1)));
int const x_310 = (*(tint_symbol_5)).arr[x_307];
(*(tint_symbol_6)).arr[x_305] = x_310;
}
@@ -87,7 +87,7 @@
(*(tint_symbol_5)).arr[x_321] = x_324;
{
int const x_326 = i_1;
- i_1 = (x_326 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_326) + as_type<uint>(1)));
}
}
return;
@@ -127,11 +127,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_347) + as_type<uint>(x_348)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_352))))))) - as_type<uint>(1))), x_356);
int const x_358 = from_1;
param = x_358;
int const x_359 = mid_1;
@@ -142,12 +142,12 @@
{
int const x_362 = m;
int const x_364 = i_2;
- i_2 = (x_364 + (2 * x_362));
+ i_2 = as_type<int>((as_type<uint>(x_364) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_362))))));
}
}
{
int const x_366 = m;
- m = (2 * x_366);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_366)));
}
}
return;
@@ -217,7 +217,7 @@
}
}
int const x_125 = i_3;
- i_3 = (x_125 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_125) + as_type<uint>(1)));
{
int const x_127 = i_3;
if ((x_127 < 10)) {
@@ -239,7 +239,7 @@
(*(tint_symbol_10)).arr[x_136] = x_139;
{
int const x_141 = j_1;
- j_1 = (x_141 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_141) + as_type<uint>(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 6e7adb4..aff7c99 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 @@
int const x_255 = *(from);
i = x_255;
int const x_256 = *(mid);
- j = (x_256 + 1);
+ j = as_type<int>((as_type<uint>(x_256) + as_type<uint>(1)));
while (true) {
int const x_262 = i;
int const x_263 = *(mid);
@@ -43,16 +43,16 @@
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<int>((as_type<uint>(x_280) + as_type<uint>(1)));
int const x_282 = i;
- i = (x_282 + 1);
+ i = as_type<int>((as_type<uint>(x_282) + as_type<uint>(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<int>((as_type<uint>(x_287) + as_type<uint>(1)));
int const x_289 = j;
- j = (x_289 + 1);
+ j = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
int const x_292 = (*(tint_symbol_5)).arr[x_289];
(*(tint_symbol_6)).arr[x_287] = x_292;
}
@@ -66,9 +66,9 @@
break;
}
int const x_305 = k;
- k = (x_305 + 1);
+ k = as_type<int>((as_type<uint>(x_305) + as_type<uint>(1)));
int const x_307 = i;
- i = (x_307 + 1);
+ i = as_type<int>((as_type<uint>(x_307) + as_type<uint>(1)));
int const x_310 = (*(tint_symbol_5)).arr[x_307];
(*(tint_symbol_6)).arr[x_305] = x_310;
}
@@ -87,7 +87,7 @@
(*(tint_symbol_5)).arr[x_321] = x_324;
{
int const x_326 = i_1;
- i_1 = (x_326 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_326) + as_type<uint>(1)));
}
}
return;
@@ -127,11 +127,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_347) + as_type<uint>(x_348)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_351) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_352))))))) - as_type<uint>(1))), x_356);
int const x_358 = from_1;
param = x_358;
int const x_359 = mid_1;
@@ -142,12 +142,12 @@
{
int const x_362 = m;
int const x_364 = i_2;
- i_2 = (x_364 + (2 * x_362));
+ i_2 = as_type<int>((as_type<uint>(x_364) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_362))))));
}
}
{
int const x_366 = m;
- m = (2 * x_366);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_366)));
}
}
return;
@@ -217,7 +217,7 @@
}
}
int const x_125 = i_3;
- i_3 = (x_125 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_125) + as_type<uint>(1)));
{
int const x_127 = i_3;
if ((x_127 < 10)) {
@@ -239,7 +239,7 @@
(*(tint_symbol_10)).arr[x_136] = x_139;
{
int const x_141 = j_1;
- j_1 = (x_141 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_141) + as_type<uint>(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 5676576..39c99c4 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 @@
int const x_256 = *(from);
i = x_256;
int const x_257 = *(mid);
- j = (x_257 + 1);
+ j = as_type<int>((as_type<uint>(x_257) + as_type<uint>(1)));
while (true) {
int const x_263 = i;
int const x_264 = *(mid);
@@ -43,16 +43,16 @@
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<int>((as_type<uint>(x_281) + as_type<uint>(1)));
int const x_283 = i;
- i = (x_283 + 1);
+ i = as_type<int>((as_type<uint>(x_283) + as_type<uint>(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<int>((as_type<uint>(x_288) + as_type<uint>(1)));
int const x_290 = j;
- j = (x_290 + 1);
+ j = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
int const x_293 = (*(tint_symbol_5)).arr[x_290];
(*(tint_symbol_6)).arr[x_288] = x_293;
}
@@ -66,9 +66,9 @@
break;
}
int const x_306 = k;
- k = (x_306 + 1);
+ k = as_type<int>((as_type<uint>(x_306) + as_type<uint>(1)));
int const x_308 = i;
- i = (x_308 + 1);
+ i = as_type<int>((as_type<uint>(x_308) + as_type<uint>(1)));
int const x_311 = (*(tint_symbol_5)).arr[x_308];
(*(tint_symbol_6)).arr[x_306] = x_311;
}
@@ -87,7 +87,7 @@
(*(tint_symbol_5)).arr[x_322] = x_325;
{
int const x_327 = i_1;
- i_1 = (x_327 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_327) + as_type<uint>(1)));
}
}
return;
@@ -127,11 +127,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_348) + as_type<uint>(x_349)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_352) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_353))))))) - as_type<uint>(1))), x_357);
int const x_359 = from_1;
param = x_359;
int const x_360 = mid_1;
@@ -142,12 +142,12 @@
{
int const x_363 = m;
int const x_365 = i_2;
- i_2 = (x_365 + (2 * x_363));
+ i_2 = as_type<int>((as_type<uint>(x_365) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_363))))));
}
}
{
int const x_367 = m;
- m = (2 * x_367);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_367)));
}
}
return;
@@ -228,7 +228,7 @@
}
}
int const x_126 = i_3;
- i_3 = (x_126 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_126) + as_type<uint>(1)));
{
int const x_128 = i_3;
if ((x_128 < 10)) {
@@ -250,7 +250,7 @@
(*(tint_symbol_10)).arr[x_137] = x_140;
{
int const x_142 = j_1;
- j_1 = (x_142 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(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 983295b..d17e466 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 @@
int const x_256 = *(from);
i = x_256;
int const x_257 = *(mid);
- j = (x_257 + 1);
+ j = as_type<int>((as_type<uint>(x_257) + as_type<uint>(1)));
while (true) {
int const x_263 = i;
int const x_264 = *(mid);
@@ -43,16 +43,16 @@
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<int>((as_type<uint>(x_281) + as_type<uint>(1)));
int const x_283 = i;
- i = (x_283 + 1);
+ i = as_type<int>((as_type<uint>(x_283) + as_type<uint>(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<int>((as_type<uint>(x_288) + as_type<uint>(1)));
int const x_290 = j;
- j = (x_290 + 1);
+ j = as_type<int>((as_type<uint>(x_290) + as_type<uint>(1)));
int const x_293 = (*(tint_symbol_5)).arr[x_290];
(*(tint_symbol_6)).arr[x_288] = x_293;
}
@@ -66,9 +66,9 @@
break;
}
int const x_306 = k;
- k = (x_306 + 1);
+ k = as_type<int>((as_type<uint>(x_306) + as_type<uint>(1)));
int const x_308 = i;
- i = (x_308 + 1);
+ i = as_type<int>((as_type<uint>(x_308) + as_type<uint>(1)));
int const x_311 = (*(tint_symbol_5)).arr[x_308];
(*(tint_symbol_6)).arr[x_306] = x_311;
}
@@ -87,7 +87,7 @@
(*(tint_symbol_5)).arr[x_322] = x_325;
{
int const x_327 = i_1;
- i_1 = (x_327 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_327) + as_type<uint>(1)));
}
}
return;
@@ -127,11 +127,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_348) + as_type<uint>(x_349)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_352) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_353))))))) - as_type<uint>(1))), x_357);
int const x_359 = from_1;
param = x_359;
int const x_360 = mid_1;
@@ -142,12 +142,12 @@
{
int const x_363 = m;
int const x_365 = i_2;
- i_2 = (x_365 + (2 * x_363));
+ i_2 = as_type<int>((as_type<uint>(x_365) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_363))))));
}
}
{
int const x_367 = m;
- m = (2 * x_367);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_367)));
}
}
return;
@@ -228,7 +228,7 @@
}
}
int const x_126 = i_3;
- i_3 = (x_126 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_126) + as_type<uint>(1)));
{
int const x_128 = i_3;
if ((x_128 < 10)) {
@@ -250,7 +250,7 @@
(*(tint_symbol_10)).arr[x_137] = x_140;
{
int const x_142 = j_1;
- j_1 = (x_142 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(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 45769f1..e54d779 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 @@
}
{
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<int>((as_type<uint>(10) - as_type<uint>(x_40)))) * x_48);
+ x_41 = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
x_40_phi = x_41;
}
}
@@ -56,9 +56,9 @@
} else {
break;
}
- if ((x_59 < (x_52 + 1))) {
+ if ((x_59 < as_type<int>((as_type<uint>(x_52) + as_type<uint>(1))))) {
{
- x_60 = (x_59 + 1);
+ x_60 = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
x_59_phi = x_60;
}
continue;
@@ -84,12 +84,12 @@
data.arr[x_71_save] = x_87;
}
{
- x_60 = (x_59 + 1);
+ x_60 = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
x_59_phi = x_60;
}
}
{
- x_53 = (x_52 + 1);
+ x_53 = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 45769f1..e54d779 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 @@
}
{
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<int>((as_type<uint>(10) - as_type<uint>(x_40)))) * x_48);
+ x_41 = as_type<int>((as_type<uint>(x_40) + as_type<uint>(1)));
x_40_phi = x_41;
}
}
@@ -56,9 +56,9 @@
} else {
break;
}
- if ((x_59 < (x_52 + 1))) {
+ if ((x_59 < as_type<int>((as_type<uint>(x_52) + as_type<uint>(1))))) {
{
- x_60 = (x_59 + 1);
+ x_60 = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
x_59_phi = x_60;
}
continue;
@@ -84,12 +84,12 @@
data.arr[x_71_save] = x_87;
}
{
- x_60 = (x_59 + 1);
+ x_60 = as_type<int>((as_type<uint>(x_59) + as_type<uint>(1)));
x_59_phi = x_60;
}
}
{
- x_53 = (x_52 + 1);
+ x_53 = as_type<int>((as_type<uint>(x_52) + as_type<uint>(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 0bcea9e..4539194 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 @@
}
{
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<int>((as_type<uint>(10) - as_type<uint>(x_41)))) * x_49);
+ x_42 = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
x_41_phi = x_42;
}
}
@@ -56,9 +56,9 @@
} else {
break;
}
- if ((x_60 < (x_53 + 1))) {
+ if ((x_60 < as_type<int>((as_type<uint>(x_53) + as_type<uint>(1))))) {
{
- x_61 = (x_60 + 1);
+ x_61 = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
x_60_phi = x_61;
}
continue;
@@ -84,12 +84,12 @@
data.arr[x_72_save] = x_88;
}
{
- x_61 = (x_60 + 1);
+ x_61 = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
x_60_phi = x_61;
}
}
{
- x_54 = (x_53 + 1);
+ x_54 = as_type<int>((as_type<uint>(x_53) + as_type<uint>(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 0bcea9e..4539194 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 @@
}
{
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<int>((as_type<uint>(10) - as_type<uint>(x_41)))) * x_49);
+ x_42 = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
x_41_phi = x_42;
}
}
@@ -56,9 +56,9 @@
} else {
break;
}
- if ((x_60 < (x_53 + 1))) {
+ if ((x_60 < as_type<int>((as_type<uint>(x_53) + as_type<uint>(1))))) {
{
- x_61 = (x_60 + 1);
+ x_61 = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
x_60_phi = x_61;
}
continue;
@@ -84,12 +84,12 @@
data.arr[x_72_save] = x_88;
}
{
- x_61 = (x_60 + 1);
+ x_61 = as_type<int>((as_type<uint>(x_60) + as_type<uint>(1)));
x_60_phi = x_61;
}
}
{
- x_54 = (x_53 + 1);
+ x_54 = as_type<int>((as_type<uint>(x_53) + as_type<uint>(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 4bc9816..eefc297 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 @@
int const x_257 = *(from);
i = x_257;
int const x_258 = *(mid);
- j = (x_258 + 1);
+ j = as_type<int>((as_type<uint>(x_258) + as_type<uint>(1)));
while (true) {
int const x_264 = i;
int const x_265 = *(mid);
@@ -43,16 +43,16 @@
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<int>((as_type<uint>(x_282) + as_type<uint>(1)));
int const x_284 = i;
- i = (x_284 + 1);
+ i = as_type<int>((as_type<uint>(x_284) + as_type<uint>(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<int>((as_type<uint>(x_289) + as_type<uint>(1)));
int const x_291 = j;
- j = (x_291 + 1);
+ j = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
int const x_294 = (*(tint_symbol_5)).arr[x_291];
(*(tint_symbol_6)).arr[x_289] = x_294;
}
@@ -70,9 +70,9 @@
break;
}
int const x_309 = k;
- k = (x_309 + 1);
+ k = as_type<int>((as_type<uint>(x_309) + as_type<uint>(1)));
int const x_311 = i;
- i = (x_311 + 1);
+ i = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
int const x_314 = (*(tint_symbol_5)).arr[x_311];
(*(tint_symbol_6)).arr[x_309] = x_314;
}
@@ -91,7 +91,7 @@
(*(tint_symbol_5)).arr[x_325] = x_328;
{
int const x_330 = i_1;
- i_1 = (x_330 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
}
}
return;
@@ -131,11 +131,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_351) + as_type<uint>(x_352)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_356))))))) - as_type<uint>(1))), x_360);
int const x_362 = from_1;
param = x_362;
int const x_363 = mid_1;
@@ -146,12 +146,12 @@
{
int const x_366 = m;
int const x_368 = i_2;
- i_2 = (x_368 + (2 * x_366));
+ i_2 = as_type<int>((as_type<uint>(x_368) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_366))))));
}
}
{
int const x_370 = m;
- m = (2 * x_370);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_370)));
}
}
return;
@@ -221,7 +221,7 @@
}
}
int const x_127 = i_3;
- i_3 = (x_127 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
{
int const x_129 = i_3;
if ((x_129 < 10)) {
@@ -243,7 +243,7 @@
(*(tint_symbol_10)).arr[x_138] = x_141;
{
int const x_143 = j_1;
- j_1 = (x_143 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(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 e2f2448..7455bc8 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 @@
int const x_257 = *(from);
i = x_257;
int const x_258 = *(mid);
- j = (x_258 + 1);
+ j = as_type<int>((as_type<uint>(x_258) + as_type<uint>(1)));
while (true) {
int const x_264 = i;
int const x_265 = *(mid);
@@ -43,16 +43,16 @@
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<int>((as_type<uint>(x_282) + as_type<uint>(1)));
int const x_284 = i;
- i = (x_284 + 1);
+ i = as_type<int>((as_type<uint>(x_284) + as_type<uint>(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<int>((as_type<uint>(x_289) + as_type<uint>(1)));
int const x_291 = j;
- j = (x_291 + 1);
+ j = as_type<int>((as_type<uint>(x_291) + as_type<uint>(1)));
int const x_294 = (*(tint_symbol_5)).arr[x_291];
(*(tint_symbol_6)).arr[x_289] = x_294;
}
@@ -70,9 +70,9 @@
break;
}
int const x_309 = k;
- k = (x_309 + 1);
+ k = as_type<int>((as_type<uint>(x_309) + as_type<uint>(1)));
int const x_311 = i;
- i = (x_311 + 1);
+ i = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
int const x_314 = (*(tint_symbol_5)).arr[x_311];
(*(tint_symbol_6)).arr[x_309] = x_314;
}
@@ -91,7 +91,7 @@
(*(tint_symbol_5)).arr[x_325] = x_328;
{
int const x_330 = i_1;
- i_1 = (x_330 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
}
}
return;
@@ -131,11 +131,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_351) + as_type<uint>(x_352)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_356))))))) - as_type<uint>(1))), x_360);
int const x_362 = from_1;
param = x_362;
int const x_363 = mid_1;
@@ -146,12 +146,12 @@
{
int const x_366 = m;
int const x_368 = i_2;
- i_2 = (x_368 + (2 * x_366));
+ i_2 = as_type<int>((as_type<uint>(x_368) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_366))))));
}
}
{
int const x_370 = m;
- m = (2 * x_370);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_370)));
}
}
return;
@@ -221,7 +221,7 @@
}
}
int const x_127 = i_3;
- i_3 = (x_127 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
{
int const x_129 = i_3;
if ((x_129 < 10)) {
@@ -243,7 +243,7 @@
(*(tint_symbol_10)).arr[x_138] = x_141;
{
int const x_143 = j_1;
- j_1 = (x_143 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(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 94bc881..320cbdb 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 @@
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<int>((as_type<uint>(6) - as_type<uint>(15)));
if ((x_362 < 20)) {
} else {
break;
@@ -720,7 +720,7 @@
case 17: {
x_402_phi = x_360;
if ((x_358 == as_type<int>(x_362))) {
- x_401 = as_type<int>((x_360 + as_type<int>(1)));
+ x_401 = as_type<int>(as_type<int>((as_type<uint>(x_360) + as_type<uint>(as_type<int>(1)))));
x_402_phi = x_401;
}
x_402 = x_402_phi;
@@ -730,7 +730,7 @@
default: {
x_407_phi = x_360;
if ((x_358 == as_type<int>(-1))) {
- x_406 = as_type<int>((x_360 + as_type<int>(1)));
+ x_406 = as_type<int>(as_type<int>((as_type<uint>(x_360) + as_type<uint>(as_type<int>(1)))));
x_407_phi = x_406;
}
x_407 = x_407_phi;
@@ -740,7 +740,7 @@
}
int const x_361 = x_361_phi;
{
- x_363 = (x_362 + 1);
+ x_363 = as_type<int>((as_type<uint>(x_362) + as_type<uint>(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 94bc881..320cbdb 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 @@
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<int>((as_type<uint>(6) - as_type<uint>(15)));
if ((x_362 < 20)) {
} else {
break;
@@ -720,7 +720,7 @@
case 17: {
x_402_phi = x_360;
if ((x_358 == as_type<int>(x_362))) {
- x_401 = as_type<int>((x_360 + as_type<int>(1)));
+ x_401 = as_type<int>(as_type<int>((as_type<uint>(x_360) + as_type<uint>(as_type<int>(1)))));
x_402_phi = x_401;
}
x_402 = x_402_phi;
@@ -730,7 +730,7 @@
default: {
x_407_phi = x_360;
if ((x_358 == as_type<int>(-1))) {
- x_406 = as_type<int>((x_360 + as_type<int>(1)));
+ x_406 = as_type<int>(as_type<int>((as_type<uint>(x_360) + as_type<uint>(as_type<int>(1)))));
x_407_phi = x_406;
}
x_407 = x_407_phi;
@@ -740,7 +740,7 @@
}
int const x_361 = x_361_phi;
{
- x_363 = (x_362 + 1);
+ x_363 = as_type<int>((as_type<uint>(x_362) + as_type<uint>(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 ecbf92f..2d12628 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_125)) * as_type<uint>(int(x_128))))) + as_type<uint>(as_type<int>((as_type<uint>(x_92) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
x_90_phi = x_136;
}
float4 const x_90 = x_90_phi;
{
- x_93 = (x_92 + 1);
+ x_93 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(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 ecbf92f..2d12628 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_125)) * as_type<uint>(int(x_128))))) + as_type<uint>(as_type<int>((as_type<uint>(x_92) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
x_90_phi = x_136;
}
float4 const x_90 = x_90_phi;
{
- x_93 = (x_92 + 1);
+ x_93 = as_type<int>((as_type<uint>(x_92) + as_type<uint>(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 d75eca0..5761e9d 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 @@
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<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
x_69_phi = 100;
x_72_phi = 0;
while (true) {
@@ -35,8 +35,8 @@
break;
}
{
- x_70 = (((4 * as_type<int>(x_69)) * (1000 - as_type<int>(x_69))) / 1000);
- x_73 = (x_72 + 1);
+ x_70 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_69))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_69))))))) / 1000);
+ x_73 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 d75eca0..5761e9d 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 @@
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<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
x_69_phi = 100;
x_72_phi = 0;
while (true) {
@@ -35,8 +35,8 @@
break;
}
{
- x_70 = (((4 * as_type<int>(x_69)) * (1000 - as_type<int>(x_69))) / 1000);
- x_73 = (x_72 + 1);
+ x_70 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_69))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_69))))))) / 1000);
+ x_73 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 f126328..1a7dc71 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 @@
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<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
x_69_phi = 100;
x_72_phi = 0;
while (true) {
@@ -35,8 +35,8 @@
break;
}
{
- x_70 = (((4 * as_type<int>(x_69)) * (1000 - as_type<int>(x_69))) / 1000);
- x_73 = (x_72 + 1);
+ x_70 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_69))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_69))))))) / 1000);
+ x_73 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 f126328..1a7dc71 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 @@
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<int>((as_type<uint>(int((x_59.x * 10.0f))) + as_type<uint>(as_type<int>((as_type<uint>(int((x_59.y * 10.0f))) * as_type<uint>(10))))));
x_69_phi = 100;
x_72_phi = 0;
while (true) {
@@ -35,8 +35,8 @@
break;
}
{
- x_70 = (((4 * as_type<int>(x_69)) * (1000 - as_type<int>(x_69))) / 1000);
- x_73 = (x_72 + 1);
+ x_70 = (as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(4) * as_type<uint>(as_type<int>(x_69))))) * as_type<uint>(as_type<int>((as_type<uint>(1000) - as_type<uint>(as_type<int>(x_69))))))) / 1000);
+ x_73 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 08dcf56..c8ec7ec 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 @@
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<int>((as_type<uint>(10) - as_type<uint>(x_60)))) * x_64);
{
int const x_67 = i;
- i = (x_67 + 1);
+ i = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
i_1 = 0;
@@ -75,10 +75,10 @@
}
int const x_83 = j;
int const x_84 = i_1;
- if ((x_83 < (x_84 + 1))) {
+ if ((x_83 < as_type<int>((as_type<uint>(x_84) + as_type<uint>(1))))) {
{
int const x_110 = j;
- j = (x_110 + 1);
+ j = as_type<int>((as_type<uint>(x_110) + as_type<uint>(1)));
}
continue;
}
@@ -105,12 +105,12 @@
}
{
int const x_110 = j;
- j = (x_110 + 1);
+ j = as_type<int>((as_type<uint>(x_110) + as_type<uint>(1)));
}
}
{
int const x_112 = i_1;
- i_1 = (x_112 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(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 08dcf56..c8ec7ec 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 @@
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<int>((as_type<uint>(10) - as_type<uint>(x_60)))) * x_64);
{
int const x_67 = i;
- i = (x_67 + 1);
+ i = as_type<int>((as_type<uint>(x_67) + as_type<uint>(1)));
}
}
i_1 = 0;
@@ -75,10 +75,10 @@
}
int const x_83 = j;
int const x_84 = i_1;
- if ((x_83 < (x_84 + 1))) {
+ if ((x_83 < as_type<int>((as_type<uint>(x_84) + as_type<uint>(1))))) {
{
int const x_110 = j;
- j = (x_110 + 1);
+ j = as_type<int>((as_type<uint>(x_110) + as_type<uint>(1)));
}
continue;
}
@@ -105,12 +105,12 @@
}
{
int const x_110 = j;
- j = (x_110 + 1);
+ j = as_type<int>((as_type<uint>(x_110) + as_type<uint>(1)));
}
}
{
int const x_112 = i_1;
- i_1 = (x_112 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_112) + as_type<uint>(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 3475e45..9d94669 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 @@
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<int>((as_type<uint>(10) - as_type<uint>(x_63)))) * x_67);
{
int const x_70 = i;
- i = (x_70 + 1);
+ i = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
i_1 = 0;
@@ -132,10 +132,10 @@
}
int const x_86 = j;
int const x_87 = i_1;
- if ((x_86 < (x_87 + 1))) {
+ if ((x_86 < as_type<int>((as_type<uint>(x_87) + as_type<uint>(1))))) {
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
continue;
}
@@ -162,12 +162,12 @@
}
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
}
{
int const x_115 = i_1;
- i_1 = (x_115 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(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 3475e45..9d94669 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 @@
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<int>((as_type<uint>(10) - as_type<uint>(x_63)))) * x_67);
{
int const x_70 = i;
- i = (x_70 + 1);
+ i = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
i_1 = 0;
@@ -132,10 +132,10 @@
}
int const x_86 = j;
int const x_87 = i_1;
- if ((x_86 < (x_87 + 1))) {
+ if ((x_86 < as_type<int>((as_type<uint>(x_87) + as_type<uint>(1))))) {
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
continue;
}
@@ -162,12 +162,12 @@
}
{
int const x_113 = j;
- j = (x_113 + 1);
+ j = as_type<int>((as_type<uint>(x_113) + as_type<uint>(1)));
}
}
{
int const x_115 = i_1;
- i_1 = (x_115 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_115) + as_type<uint>(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 c9c314f..561b2f2 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_57.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_57.y))));
x_65_phi = 0;
x_68_phi = x_63;
while (true) {
@@ -36,7 +36,7 @@
break;
}
if (((x_68 & 1) == 1)) {
- x_79 = ((3 * x_68) + 1);
+ x_79 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_68)))) + as_type<uint>(1)));
x_69_phi = x_79;
} else {
x_80 = (x_68 / 2);
@@ -44,7 +44,7 @@
}
int const x_69 = x_69_phi;
{
- x_65_phi = as_type<int>((x_65 + as_type<int>(1)));
+ x_65_phi = as_type<int>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(as_type<int>(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 c9c314f..561b2f2 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_57.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_57.y))));
x_65_phi = 0;
x_68_phi = x_63;
while (true) {
@@ -36,7 +36,7 @@
break;
}
if (((x_68 & 1) == 1)) {
- x_79 = ((3 * x_68) + 1);
+ x_79 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_68)))) + as_type<uint>(1)));
x_69_phi = x_79;
} else {
x_80 = (x_68 / 2);
@@ -44,7 +44,7 @@
}
int const x_69 = x_69_phi;
{
- x_65_phi = as_type<int>((x_65 + as_type<int>(1)));
+ x_65_phi = as_type<int>(as_type<int>((as_type<uint>(x_65) + as_type<uint>(as_type<int>(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 b1f84a6..9a040b1 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_62.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_62.y))));
x_71_phi = 0;
x_74_phi = x_69;
while (true) {
@@ -38,7 +38,7 @@
break;
}
if (((x_74 & 1) == 1)) {
- x_85 = ((3 * x_74) + 1);
+ x_85 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_74)))) + as_type<uint>(1)));
x_75_phi = x_85;
} else {
x_86 = (x_74 / 2);
@@ -46,7 +46,7 @@
}
int const x_75 = x_75_phi;
{
- x_71_phi = as_type<int>((x_71 + as_type<int>(1)));
+ x_71_phi = as_type<int>(as_type<int>((as_type<uint>(x_71) + as_type<uint>(as_type<int>(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 b1f84a6..9a040b1 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_62.x)) * as_type<uint>(8)))) + as_type<uint>(int(x_62.y))));
x_71_phi = 0;
x_74_phi = x_69;
while (true) {
@@ -38,7 +38,7 @@
break;
}
if (((x_74 & 1) == 1)) {
- x_85 = ((3 * x_74) + 1);
+ x_85 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_74)))) + as_type<uint>(1)));
x_75_phi = x_85;
} else {
x_86 = (x_74 / 2);
@@ -46,7 +46,7 @@
}
int const x_75 = x_75_phi;
{
- x_71_phi = as_type<int>((x_71 + as_type<int>(1)));
+ x_71_phi = as_type<int>(as_type<int>((as_type<uint>(x_71) + as_type<uint>(as_type<int>(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 6bbc2e7..3576345 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 @@
break;
}
{
- x_59 = (x_58 + 1);
+ x_59 = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
x_55_phi = x_56;
x_58_phi = x_59;
}
@@ -139,7 +139,7 @@
break;
}
{
- x_96 = (x_95 + 1);
+ x_96 = as_type<int>((as_type<uint>(x_95) + as_type<uint>(1)));
x_92_phi = x_93;
x_95_phi = x_96;
}
@@ -176,7 +176,7 @@
c[x_135_save] = (x_140 * x_141);
}
{
- x_130 = (x_129 + 1);
+ x_130 = as_type<int>((as_type<uint>(x_129) + as_type<uint>(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 7df5ad7..e986722 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 @@
break;
}
{
- x_59 = (x_58 + 1);
+ x_59 = as_type<int>((as_type<uint>(x_58) + as_type<uint>(1)));
x_55_phi = x_56;
x_58_phi = x_59;
}
@@ -139,7 +139,7 @@
break;
}
{
- x_96 = (x_95 + 1);
+ x_96 = as_type<int>((as_type<uint>(x_95) + as_type<uint>(1)));
x_92_phi = x_93;
x_95_phi = x_96;
}
@@ -176,7 +176,7 @@
c[x_135_save] = (x_140 * x_141);
}
{
- x_130 = (x_129 + 1);
+ x_130 = as_type<int>((as_type<uint>(x_129) + as_type<uint>(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 794863a..51be36d 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 @@
(*(tint_symbol_9)).arr[x_80] = 0;
{
int const x_82 = i;
- i = (x_82 + 1);
+ i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -57,7 +57,7 @@
bool x_145_phi = false;
bool x_165_phi = false;
int const x_88 = v;
- v = (x_88 + 1);
+ v = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
directions = 0;
int const x_91 = p.x;
bool const x_92 = (x_91 > 0);
@@ -65,14 +65,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
int const x_111 = p.y;
bool const x_112 = (x_111 > 0);
@@ -80,14 +80,14 @@
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<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_128) + as_type<uint>(1)));
}
int const x_131 = p.x;
bool const x_132 = (x_131 < 14);
@@ -95,14 +95,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(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<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
int const x_151 = p.y;
bool const x_152 = (x_151 < 14);
@@ -110,14 +110,14 @@
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<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_168) + as_type<uint>(1)));
}
bool x_229 = false;
bool x_242 = false;
@@ -164,34 +164,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_196 == 0)) {
int const x_200 = j;
- p.x = (x_200 * 2);
+ p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
int const x_203 = i;
- p.y = (x_203 * 2);
+ p.y = as_type<int>((as_type<uint>(x_203) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_206 = j;
- j = (x_206 + 1);
+ j = as_type<int>((as_type<uint>(x_206) + as_type<uint>(1)));
}
}
{
int const x_208 = i;
- i = (x_208 + 1);
+ i = as_type<int>((as_type<uint>(x_208) + as_type<uint>(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<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(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<int>((as_type<uint>(x_221) + as_type<uint>(x_220)));
int const x_223 = d;
bool const x_224 = (x_223 >= 0);
x_230_phi = x_224;
@@ -205,25 +205,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(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<int>((as_type<uint>(x_246) - as_type<uint>(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<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
int const x_272 = p.x;
- p.x = (x_272 - 2);
+ p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
}
int const x_275 = d;
bool const x_276 = (x_275 >= 0);
@@ -250,7 +250,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_297) - as_type<uint>(2)))) * as_type<uint>(16)));
if (x_282) {
x_303 = *(tint_symbol_9);
x_305_phi = x_303;
@@ -268,7 +268,7 @@
*(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<int>((as_type<uint>(x_290) + as_type<uint>(x_299)))];
x_317_phi = x_315;
} else {
x_316 = 0;
@@ -278,22 +278,22 @@
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<int>((as_type<uint>(x_323) - as_type<uint>(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<int>((as_type<uint>(x_326) + as_type<uint>(as_type<int>((as_type<uint>(x_328) * as_type<uint>(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<int>((as_type<uint>(x_333) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_335) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_341) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_343) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_350 = p.y;
- p.y = (x_350 - 2);
+ p.y = as_type<int>((as_type<uint>(x_350) - as_type<uint>(2)));
}
int const x_353 = d;
bool const x_354 = (x_353 >= 0);
@@ -308,25 +308,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_364) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_367) * as_type<uint>(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<int>((as_type<uint>(x_376) - as_type<uint>(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<int>((as_type<uint>(x_379) + as_type<uint>(as_type<int>((as_type<uint>(x_381) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_386) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_389) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_397) * as_type<uint>(16))))))] = 1;
int const x_402 = p.x;
- p.x = (x_402 + 2);
+ p.x = as_type<int>((as_type<uint>(x_402) + as_type<uint>(2)));
}
int const x_405 = d;
bool const x_406 = (x_405 >= 0);
@@ -341,30 +341,30 @@
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<int>((as_type<uint>(x_416) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_418) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_428) - as_type<uint>(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<int>((as_type<uint>(x_431) + as_type<uint>(as_type<int>((as_type<uint>(x_433) * as_type<uint>(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<int>((as_type<uint>(x_438) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_446) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_448) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_454 = p.y;
- p.y = (x_454 + 2);
+ p.y = as_type<int>((as_type<uint>(x_454) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_458) * as_type<uint>(16)))) + as_type<uint>(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 794863a..51be36d 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 @@
(*(tint_symbol_9)).arr[x_80] = 0;
{
int const x_82 = i;
- i = (x_82 + 1);
+ i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -57,7 +57,7 @@
bool x_145_phi = false;
bool x_165_phi = false;
int const x_88 = v;
- v = (x_88 + 1);
+ v = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
directions = 0;
int const x_91 = p.x;
bool const x_92 = (x_91 > 0);
@@ -65,14 +65,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
int const x_111 = p.y;
bool const x_112 = (x_111 > 0);
@@ -80,14 +80,14 @@
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<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_128) + as_type<uint>(1)));
}
int const x_131 = p.x;
bool const x_132 = (x_131 < 14);
@@ -95,14 +95,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(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<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
int const x_151 = p.y;
bool const x_152 = (x_151 < 14);
@@ -110,14 +110,14 @@
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<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_168) + as_type<uint>(1)));
}
bool x_229 = false;
bool x_242 = false;
@@ -164,34 +164,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_196 == 0)) {
int const x_200 = j;
- p.x = (x_200 * 2);
+ p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
int const x_203 = i;
- p.y = (x_203 * 2);
+ p.y = as_type<int>((as_type<uint>(x_203) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_206 = j;
- j = (x_206 + 1);
+ j = as_type<int>((as_type<uint>(x_206) + as_type<uint>(1)));
}
}
{
int const x_208 = i;
- i = (x_208 + 1);
+ i = as_type<int>((as_type<uint>(x_208) + as_type<uint>(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<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(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<int>((as_type<uint>(x_221) + as_type<uint>(x_220)));
int const x_223 = d;
bool const x_224 = (x_223 >= 0);
x_230_phi = x_224;
@@ -205,25 +205,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(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<int>((as_type<uint>(x_246) - as_type<uint>(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<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
int const x_272 = p.x;
- p.x = (x_272 - 2);
+ p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
}
int const x_275 = d;
bool const x_276 = (x_275 >= 0);
@@ -250,7 +250,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_297) - as_type<uint>(2)))) * as_type<uint>(16)));
if (x_282) {
x_303 = *(tint_symbol_9);
x_305_phi = x_303;
@@ -268,7 +268,7 @@
*(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<int>((as_type<uint>(x_290) + as_type<uint>(x_299)))];
x_317_phi = x_315;
} else {
x_316 = 0;
@@ -278,22 +278,22 @@
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<int>((as_type<uint>(x_323) - as_type<uint>(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<int>((as_type<uint>(x_326) + as_type<uint>(as_type<int>((as_type<uint>(x_328) * as_type<uint>(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<int>((as_type<uint>(x_333) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_335) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_341) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_343) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_350 = p.y;
- p.y = (x_350 - 2);
+ p.y = as_type<int>((as_type<uint>(x_350) - as_type<uint>(2)));
}
int const x_353 = d;
bool const x_354 = (x_353 >= 0);
@@ -308,25 +308,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_364) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_367) * as_type<uint>(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<int>((as_type<uint>(x_376) - as_type<uint>(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<int>((as_type<uint>(x_379) + as_type<uint>(as_type<int>((as_type<uint>(x_381) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_386) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_389) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_397) * as_type<uint>(16))))))] = 1;
int const x_402 = p.x;
- p.x = (x_402 + 2);
+ p.x = as_type<int>((as_type<uint>(x_402) + as_type<uint>(2)));
}
int const x_405 = d;
bool const x_406 = (x_405 >= 0);
@@ -341,30 +341,30 @@
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<int>((as_type<uint>(x_416) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_418) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_428) - as_type<uint>(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<int>((as_type<uint>(x_431) + as_type<uint>(as_type<int>((as_type<uint>(x_433) * as_type<uint>(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<int>((as_type<uint>(x_438) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_440) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_446) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_448) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_454 = p.y;
- p.y = (x_454 + 2);
+ p.y = as_type<int>((as_type<uint>(x_454) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_458) * as_type<uint>(16)))) + as_type<uint>(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 b60fe95..22486d2 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 @@
(*(tint_symbol_8)).arr[x_80] = 0;
{
int const x_82 = i;
- i = (x_82 + 1);
+ i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -57,7 +57,7 @@
bool x_145_phi = false;
bool x_165_phi = false;
int const x_88 = v;
- v = (x_88 + 1);
+ v = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
directions = 0;
int const x_91 = p.x;
bool const x_92 = (x_91 > 0);
@@ -65,14 +65,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
int const x_111 = p.y;
bool const x_112 = (x_111 > 0);
@@ -80,14 +80,14 @@
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<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_128) + as_type<uint>(1)));
}
int const x_131 = p.x;
bool const x_132 = (x_131 < 14);
@@ -95,14 +95,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(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<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
int const x_151 = p.y;
bool const x_152 = (x_151 < 14);
@@ -110,14 +110,14 @@
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<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_168) + as_type<uint>(1)));
}
bool x_229 = false;
bool x_242 = false;
@@ -154,34 +154,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_196 == 0)) {
int const x_200 = j;
- p.x = (x_200 * 2);
+ p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
int const x_203 = i;
- p.y = (x_203 * 2);
+ p.y = as_type<int>((as_type<uint>(x_203) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_206 = j;
- j = (x_206 + 1);
+ j = as_type<int>((as_type<uint>(x_206) + as_type<uint>(1)));
}
}
{
int const x_208 = i;
- i = (x_208 + 1);
+ i = as_type<int>((as_type<uint>(x_208) + as_type<uint>(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<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(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<int>((as_type<uint>(x_221) + as_type<uint>(x_220)));
int const x_223 = d;
bool const x_224 = (x_223 >= 0);
x_230_phi = x_224;
@@ -195,25 +195,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(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<int>((as_type<uint>(x_246) - as_type<uint>(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<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
int const x_272 = p.x;
- p.x = (x_272 - 2);
+ p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
}
int const x_275 = d;
bool const x_276 = (x_275 >= 0);
@@ -232,29 +232,29 @@
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<int>((as_type<uint>(x_286) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_288) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_299) - as_type<uint>(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<int>((as_type<uint>(x_302) + as_type<uint>(as_type<int>((as_type<uint>(x_304) * as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_317) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_319) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_326 = p.y;
- p.y = (x_326 - 2);
+ p.y = as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)));
}
int const x_329 = d;
bool const x_330 = (x_329 >= 0);
@@ -269,25 +269,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_340) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_343) * as_type<uint>(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<int>((as_type<uint>(x_352) - as_type<uint>(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<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(x_357) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_365) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_370) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_373) * as_type<uint>(16))))))] = 1;
int const x_378 = p.x;
- p.x = (x_378 + 2);
+ p.x = as_type<int>((as_type<uint>(x_378) + as_type<uint>(2)));
}
int const x_381 = d;
bool const x_382 = (x_381 >= 0);
@@ -302,30 +302,30 @@
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<int>((as_type<uint>(x_392) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_404) - as_type<uint>(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<int>((as_type<uint>(x_407) + as_type<uint>(as_type<int>((as_type<uint>(x_409) * as_type<uint>(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<int>((as_type<uint>(x_414) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_416) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_422) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_424) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_430 = p.y;
- p.y = (x_430 + 2);
+ p.y = as_type<int>((as_type<uint>(x_430) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_434) * as_type<uint>(16)))) + as_type<uint>(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 b60fe95..22486d2 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 @@
(*(tint_symbol_8)).arr[x_80] = 0;
{
int const x_82 = i;
- i = (x_82 + 1);
+ i = as_type<int>((as_type<uint>(x_82) + as_type<uint>(1)));
}
}
p = int2(0, 0);
@@ -57,7 +57,7 @@
bool x_145_phi = false;
bool x_165_phi = false;
int const x_88 = v;
- v = (x_88 + 1);
+ v = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
directions = 0;
int const x_91 = p.x;
bool const x_92 = (x_91 > 0);
@@ -65,14 +65,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_96) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_99) * as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
int const x_111 = p.y;
bool const x_112 = (x_111 > 0);
@@ -80,14 +80,14 @@
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<int>((as_type<uint>(x_116) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_118) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_128) + as_type<uint>(1)));
}
int const x_131 = p.x;
bool const x_132 = (x_131 < 14);
@@ -95,14 +95,14 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_139) * as_type<uint>(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<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
int const x_151 = p.y;
bool const x_152 = (x_151 < 14);
@@ -110,14 +110,14 @@
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<int>((as_type<uint>(x_156) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_158) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_168) + as_type<uint>(1)));
}
bool x_229 = false;
bool x_242 = false;
@@ -154,34 +154,34 @@
}
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_189) * as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_191) * as_type<uint>(2)))) * as_type<uint>(16))))))];
if ((x_196 == 0)) {
int const x_200 = j;
- p.x = (x_200 * 2);
+ p.x = as_type<int>((as_type<uint>(x_200) * as_type<uint>(2)));
int const x_203 = i;
- p.y = (x_203 * 2);
+ p.y = as_type<int>((as_type<uint>(x_203) * as_type<uint>(2)));
canwalk = true;
}
{
int const x_206 = j;
- j = (x_206 + 1);
+ j = as_type<int>((as_type<uint>(x_206) + as_type<uint>(1)));
}
}
{
int const x_208 = i;
- i = (x_208 + 1);
+ i = as_type<int>((as_type<uint>(x_208) + as_type<uint>(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<int>((as_type<uint>(x_211) + as_type<uint>(as_type<int>((as_type<uint>(x_213) * as_type<uint>(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<int>((as_type<uint>(x_221) + as_type<uint>(x_220)));
int const x_223 = d;
bool const x_224 = (x_223 >= 0);
x_230_phi = x_224;
@@ -195,25 +195,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_234) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_237) * as_type<uint>(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<int>((as_type<uint>(x_246) - as_type<uint>(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<int>((as_type<uint>(x_249) + as_type<uint>(as_type<int>((as_type<uint>(x_251) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_256) - as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_259) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_264) - as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_267) * as_type<uint>(16))))))] = 1;
int const x_272 = p.x;
- p.x = (x_272 - 2);
+ p.x = as_type<int>((as_type<uint>(x_272) - as_type<uint>(2)));
}
int const x_275 = d;
bool const x_276 = (x_275 >= 0);
@@ -232,29 +232,29 @@
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<int>((as_type<uint>(x_286) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_288) - as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_299) - as_type<uint>(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<int>((as_type<uint>(x_302) + as_type<uint>(as_type<int>((as_type<uint>(x_304) * as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_317) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_319) - as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_326 = p.y;
- p.y = (x_326 - 2);
+ p.y = as_type<int>((as_type<uint>(x_326) - as_type<uint>(2)));
}
int const x_329 = d;
bool const x_330 = (x_329 >= 0);
@@ -269,25 +269,25 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_340) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_343) * as_type<uint>(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<int>((as_type<uint>(x_352) - as_type<uint>(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<int>((as_type<uint>(x_355) + as_type<uint>(as_type<int>((as_type<uint>(x_357) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_362) + as_type<uint>(1)))) + as_type<uint>(as_type<int>((as_type<uint>(x_365) * as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_370) + as_type<uint>(2)))) + as_type<uint>(as_type<int>((as_type<uint>(x_373) * as_type<uint>(16))))))] = 1;
int const x_378 = p.x;
- p.x = (x_378 + 2);
+ p.x = as_type<int>((as_type<uint>(x_378) + as_type<uint>(2)));
}
int const x_381 = d;
bool const x_382 = (x_381 >= 0);
@@ -302,30 +302,30 @@
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<int>((as_type<uint>(x_392) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_394) + as_type<uint>(2)))) * as_type<uint>(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<int>((as_type<uint>(x_404) - as_type<uint>(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<int>((as_type<uint>(x_407) + as_type<uint>(as_type<int>((as_type<uint>(x_409) * as_type<uint>(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<int>((as_type<uint>(x_414) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_416) + as_type<uint>(1)))) * as_type<uint>(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<int>((as_type<uint>(x_422) + as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_424) + as_type<uint>(2)))) * as_type<uint>(16))))))] = 1;
int const x_430 = p.y;
- p.y = (x_430 + 2);
+ p.y = as_type<int>((as_type<uint>(x_430) + as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_434) * as_type<uint>(16)))) + as_type<uint>(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 27feeef..13fa0cf 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 @@
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<int>((as_type<uint>(x_63) + as_type<uint>(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<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_100;
break;
}
case 8: {
data.arr[x_63] = -4;
- x_98 = (x_63 + 1);
+ x_98 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_98;
break;
}
case 7: {
data.arr[x_63] = -3;
- x_96 = (x_63 + 1);
+ x_96 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_96;
break;
}
case 6: {
data.arr[x_63] = -2;
- x_94 = (x_63 + 1);
+ x_94 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_94;
break;
}
case 5: {
data.arr[x_63] = -1;
- x_92 = (x_63 + 1);
+ x_92 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_92;
break;
}
case 4: {
data.arr[x_63] = 0;
- x_90 = (x_63 + 1);
+ x_90 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_90;
break;
}
case 3: {
data.arr[x_63] = 1;
- x_88 = (x_63 + 1);
+ x_88 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_88;
break;
}
case 2: {
data.arr[x_63] = 2;
- x_86 = (x_63 + 1);
+ x_86 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_86;
break;
}
case 1: {
data.arr[x_63] = 3;
- x_84 = (x_63 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_84;
break;
}
case 0: {
data.arr[x_63] = 4;
- x_82 = (x_63 + 1);
+ x_82 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_82;
break;
}
@@ -130,7 +130,7 @@
{
int const x_109 = data.arr[x_103];
temp.arr[x_103] = x_109;
- x_104 = (x_103 + 1);
+ x_104 = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
x_103_phi = x_104;
}
}
@@ -158,10 +158,10 @@
} 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<int>((as_type<uint>(x_119) + as_type<uint>(x_112)));
+ int const x_126 = as_type<int>((as_type<uint>(x_125) - as_type<uint>(1)));
+ int const x_120 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_112))))));
+ int const x_129 = min(as_type<int>((as_type<uint>(x_120) - as_type<uint>(1))), 9);
x_131_phi = x_119;
x_134_phi = x_125;
x_136_phi = x_119;
@@ -181,15 +181,15 @@
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<int>((x_131 + as_type<int>(1)));
+ int const x_132 = as_type<int>(as_type<int>((as_type<uint>(x_131) + as_type<uint>(as_type<int>(1)))));
if ((x_144 < x_146)) {
- x_151 = as_type<int>((x_136 + as_type<int>(1)));
+ x_151 = as_type<int>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_134) + as_type<uint>(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 @@
break;
}
{
- x_159 = (x_158 + 1);
- x_162 = (x_161 + 1);
+ x_159 = as_type<int>((as_type<uint>(x_158) + as_type<uint>(1)));
+ x_162 = as_type<int>((as_type<uint>(x_161) + as_type<uint>(1)));
int const x_168 = data.arr[x_161];
temp.arr[x_158] = x_168;
x_158_phi = x_159;
@@ -234,7 +234,7 @@
{
int const x_177 = temp.arr[x_171];
data.arr[x_171] = x_177;
- x_172 = (x_171 + 1);
+ x_172 = as_type<int>((as_type<uint>(x_171) + as_type<uint>(1)));
x_171_phi = x_172;
}
}
@@ -243,7 +243,7 @@
}
}
{
- x_113 = (2 * x_112);
+ x_113 = as_type<int>((as_type<uint>(2) * as_type<uint>(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 e8a7ca8..261784f 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 @@
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<int>((as_type<uint>(x_63) + as_type<uint>(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<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_100;
break;
}
case 8: {
data.arr[x_63] = -4;
- x_98 = (x_63 + 1);
+ x_98 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_98;
break;
}
case 7: {
data.arr[x_63] = -3;
- x_96 = (x_63 + 1);
+ x_96 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_96;
break;
}
case 6: {
data.arr[x_63] = -2;
- x_94 = (x_63 + 1);
+ x_94 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_94;
break;
}
case 5: {
data.arr[x_63] = -1;
- x_92 = (x_63 + 1);
+ x_92 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_92;
break;
}
case 4: {
data.arr[x_63] = 0;
- x_90 = (x_63 + 1);
+ x_90 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_90;
break;
}
case 3: {
data.arr[x_63] = 1;
- x_88 = (x_63 + 1);
+ x_88 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_88;
break;
}
case 2: {
data.arr[x_63] = 2;
- x_86 = (x_63 + 1);
+ x_86 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_86;
break;
}
case 1: {
data.arr[x_63] = 3;
- x_84 = (x_63 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_84;
break;
}
case 0: {
data.arr[x_63] = 4;
- x_82 = (x_63 + 1);
+ x_82 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_82;
break;
}
@@ -130,7 +130,7 @@
{
int const x_109 = data.arr[x_103];
temp.arr[x_103] = x_109;
- x_104 = (x_103 + 1);
+ x_104 = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
x_103_phi = x_104;
}
}
@@ -158,10 +158,10 @@
} 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<int>((as_type<uint>(x_119) + as_type<uint>(x_112)));
+ int const x_126 = as_type<int>((as_type<uint>(x_125) - as_type<uint>(1)));
+ int const x_120 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_112))))));
+ int const x_129 = min(as_type<int>((as_type<uint>(x_120) - as_type<uint>(1))), 9);
x_131_phi = x_119;
x_134_phi = x_125;
x_136_phi = x_119;
@@ -181,15 +181,15 @@
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<int>((x_131 + as_type<int>(1)));
+ int const x_132 = as_type<int>(as_type<int>((as_type<uint>(x_131) + as_type<uint>(as_type<int>(1)))));
if ((x_144 < x_146)) {
- x_151 = as_type<int>((x_136 + as_type<int>(1)));
+ x_151 = as_type<int>(as_type<int>((as_type<uint>(x_136) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_134) + as_type<uint>(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 @@
break;
}
{
- x_159 = (x_158 + 1);
- x_162 = (x_161 + 1);
+ x_159 = as_type<int>((as_type<uint>(x_158) + as_type<uint>(1)));
+ x_162 = as_type<int>((as_type<uint>(x_161) + as_type<uint>(1)));
int const x_168 = data.arr[x_161];
temp.arr[x_158] = x_168;
x_158_phi = x_159;
@@ -234,7 +234,7 @@
{
int const x_177 = temp.arr[x_171];
data.arr[x_171] = x_177;
- x_172 = (x_171 + 1);
+ x_172 = as_type<int>((as_type<uint>(x_171) + as_type<uint>(1)));
x_171_phi = x_172;
}
}
@@ -243,7 +243,7 @@
}
}
{
- x_113 = (2 * x_112);
+ x_113 = as_type<int>((as_type<uint>(2) * as_type<uint>(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 14e0ab3..3feada0 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 @@
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<int>((as_type<uint>(x_63) + as_type<uint>(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<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_99;
break;
}
case 8: {
data.arr[x_63] = -4;
- x_97 = (x_63 + 1);
+ x_97 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_97;
break;
}
case 7: {
data.arr[x_63] = -3;
- x_95 = (x_63 + 1);
+ x_95 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_95;
break;
}
case 6: {
data.arr[x_63] = -2;
- x_93 = (x_63 + 1);
+ x_93 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_93;
break;
}
case 5: {
data.arr[x_63] = -1;
- x_91 = (x_63 + 1);
+ x_91 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_91;
break;
}
case 4: {
data.arr[x_63] = 0;
- x_89 = (x_63 + 1);
+ x_89 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_89;
break;
}
case 3: {
data.arr[x_63] = 1;
- x_87 = (x_63 + 1);
+ x_87 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_87;
break;
}
case 2: {
data.arr[x_63] = 2;
- x_85 = (x_63 + 1);
+ x_85 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_85;
break;
}
case 1: {
data.arr[x_63] = 3;
- x_83 = (x_63 + 1);
+ x_83 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_83;
break;
}
case 0: {
data.arr[x_63] = 4;
- x_81 = (x_63 + 1);
+ x_81 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_81;
break;
}
@@ -126,7 +126,7 @@
{
int const x_108 = data.arr[x_102];
temp.arr[x_102] = x_108;
- x_103 = (x_102 + 1);
+ x_103 = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1)));
x_102_phi = x_103;
}
}
@@ -154,10 +154,10 @@
} 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<int>((as_type<uint>(x_118) + as_type<uint>(x_111)));
+ int const x_125 = as_type<int>((as_type<uint>(x_124) - as_type<uint>(1)));
+ int const x_119 = as_type<int>((as_type<uint>(x_118) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_111))))));
+ int const x_128 = min(as_type<int>((as_type<uint>(x_119) - as_type<uint>(1))), 9);
x_130_phi = x_118;
x_133_phi = x_124;
x_135_phi = x_118;
@@ -177,15 +177,15 @@
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<int>((x_130 + as_type<int>(1)));
+ int const x_131 = as_type<int>(as_type<int>((as_type<uint>(x_130) + as_type<uint>(as_type<int>(1)))));
if ((x_143 < x_145)) {
- x_150 = as_type<int>((x_135 + as_type<int>(1)));
+ x_150 = as_type<int>(as_type<int>((as_type<uint>(x_135) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_133) + as_type<uint>(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 @@
break;
}
{
- x_158 = (x_157 + 1);
- x_161 = (x_160 + 1);
+ x_158 = as_type<int>((as_type<uint>(x_157) + as_type<uint>(1)));
+ x_161 = as_type<int>((as_type<uint>(x_160) + as_type<uint>(1)));
int const x_167 = data.arr[x_160];
temp.arr[x_157] = x_167;
x_157_phi = x_158;
@@ -230,7 +230,7 @@
{
int const x_176 = temp.arr[x_170];
data.arr[x_170] = x_176;
- x_171 = (x_170 + 1);
+ x_171 = as_type<int>((as_type<uint>(x_170) + as_type<uint>(1)));
x_170_phi = x_171;
}
}
@@ -239,7 +239,7 @@
}
}
{
- x_112 = (2 * x_111);
+ x_112 = as_type<int>((as_type<uint>(2) * as_type<uint>(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 64e598b..13ce0fd 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 @@
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<int>((as_type<uint>(x_63) + as_type<uint>(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<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_99;
break;
}
case 8: {
data.arr[x_63] = -4;
- x_97 = (x_63 + 1);
+ x_97 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_97;
break;
}
case 7: {
data.arr[x_63] = -3;
- x_95 = (x_63 + 1);
+ x_95 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_95;
break;
}
case 6: {
data.arr[x_63] = -2;
- x_93 = (x_63 + 1);
+ x_93 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_93;
break;
}
case 5: {
data.arr[x_63] = -1;
- x_91 = (x_63 + 1);
+ x_91 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_91;
break;
}
case 4: {
data.arr[x_63] = 0;
- x_89 = (x_63 + 1);
+ x_89 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_89;
break;
}
case 3: {
data.arr[x_63] = 1;
- x_87 = (x_63 + 1);
+ x_87 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_87;
break;
}
case 2: {
data.arr[x_63] = 2;
- x_85 = (x_63 + 1);
+ x_85 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_85;
break;
}
case 1: {
data.arr[x_63] = 3;
- x_83 = (x_63 + 1);
+ x_83 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_83;
break;
}
case 0: {
data.arr[x_63] = 4;
- x_81 = (x_63 + 1);
+ x_81 = as_type<int>((as_type<uint>(x_63) + as_type<uint>(1)));
x_64_phi = x_81;
break;
}
@@ -126,7 +126,7 @@
{
int const x_108 = data.arr[x_102];
temp.arr[x_102] = x_108;
- x_103 = (x_102 + 1);
+ x_103 = as_type<int>((as_type<uint>(x_102) + as_type<uint>(1)));
x_102_phi = x_103;
}
}
@@ -154,10 +154,10 @@
} 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<int>((as_type<uint>(x_118) + as_type<uint>(x_111)));
+ int const x_125 = as_type<int>((as_type<uint>(x_124) - as_type<uint>(1)));
+ int const x_119 = as_type<int>((as_type<uint>(x_118) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_111))))));
+ int const x_128 = min(as_type<int>((as_type<uint>(x_119) - as_type<uint>(1))), 9);
x_130_phi = x_118;
x_133_phi = x_124;
x_135_phi = x_118;
@@ -177,15 +177,15 @@
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<int>((x_130 + as_type<int>(1)));
+ int const x_131 = as_type<int>(as_type<int>((as_type<uint>(x_130) + as_type<uint>(as_type<int>(1)))));
if ((x_143 < x_145)) {
- x_150 = as_type<int>((x_135 + as_type<int>(1)));
+ x_150 = as_type<int>(as_type<int>((as_type<uint>(x_135) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_133) + as_type<uint>(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 @@
break;
}
{
- x_158 = (x_157 + 1);
- x_161 = (x_160 + 1);
+ x_158 = as_type<int>((as_type<uint>(x_157) + as_type<uint>(1)));
+ x_161 = as_type<int>((as_type<uint>(x_160) + as_type<uint>(1)));
int const x_167 = data.arr[x_160];
temp.arr[x_157] = x_167;
x_157_phi = x_158;
@@ -230,7 +230,7 @@
{
int const x_176 = temp.arr[x_170];
data.arr[x_170] = x_176;
- x_171 = (x_170 + 1);
+ x_171 = as_type<int>((as_type<uint>(x_170) + as_type<uint>(1)));
x_170_phi = x_171;
}
}
@@ -239,7 +239,7 @@
}
}
{
- x_112 = (2 * x_111);
+ x_112 = as_type<int>((as_type<uint>(2) * as_type<uint>(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 fd9f3b9..2403796 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 @@
int const x_252 = *(from);
i = x_252;
int const x_253 = *(mid);
- j = (x_253 + 1);
+ j = as_type<int>((as_type<uint>(x_253) + as_type<uint>(1)));
while (true) {
int const x_259 = i;
int const x_260 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_277) + as_type<uint>(1)));
int const x_279 = i;
- i = (x_279 + 1);
+ i = as_type<int>((as_type<uint>(x_279) + as_type<uint>(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<int>((as_type<uint>(x_284) + as_type<uint>(1)));
int const x_286 = j;
- j = (x_286 + 1);
+ j = as_type<int>((as_type<uint>(x_286) + as_type<uint>(1)));
int const x_289 = (*(tint_symbol_5)).arr[x_286];
(*(tint_symbol_6)).arr[x_284] = x_289;
}
@@ -63,9 +63,9 @@
break;
}
int const x_302 = k;
- k = (x_302 + 1);
+ k = as_type<int>((as_type<uint>(x_302) + as_type<uint>(1)));
int const x_304 = i;
- i = (x_304 + 1);
+ i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
int const x_307 = (*(tint_symbol_5)).arr[x_304];
(*(tint_symbol_6)).arr[x_302] = x_307;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_318] = x_321;
{
int const x_323 = i_1;
- i_1 = (x_323 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_323) + as_type<uint>(1)));
}
}
return;
@@ -124,11 +124,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_344) + as_type<uint>(x_345)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_348) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_349))))))) - as_type<uint>(1))), x_353);
int const x_355 = from_1;
param = x_355;
int const x_356 = mid_1;
@@ -139,12 +139,12 @@
{
int const x_359 = m;
int const x_361 = i_2;
- i_2 = (x_361 + (2 * x_359));
+ i_2 = as_type<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_359))))));
}
}
{
int const x_363 = m;
- m = (2 * x_363);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_363)));
}
}
return;
@@ -214,7 +214,7 @@
}
}
int const x_122 = i_3;
- i_3 = (x_122 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(1)));
{
int const x_124 = i_3;
if ((x_124 < 10)) {
@@ -236,7 +236,7 @@
(*(tint_symbol_10)).arr[x_133] = x_136;
{
int const x_138 = j_1;
- j_1 = (x_138 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_138) + as_type<uint>(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 6340b47..7d925d1 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 @@
int const x_252 = *(from);
i = x_252;
int const x_253 = *(mid);
- j = (x_253 + 1);
+ j = as_type<int>((as_type<uint>(x_253) + as_type<uint>(1)));
while (true) {
int const x_259 = i;
int const x_260 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_277) + as_type<uint>(1)));
int const x_279 = i;
- i = (x_279 + 1);
+ i = as_type<int>((as_type<uint>(x_279) + as_type<uint>(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<int>((as_type<uint>(x_284) + as_type<uint>(1)));
int const x_286 = j;
- j = (x_286 + 1);
+ j = as_type<int>((as_type<uint>(x_286) + as_type<uint>(1)));
int const x_289 = (*(tint_symbol_5)).arr[x_286];
(*(tint_symbol_6)).arr[x_284] = x_289;
}
@@ -63,9 +63,9 @@
break;
}
int const x_302 = k;
- k = (x_302 + 1);
+ k = as_type<int>((as_type<uint>(x_302) + as_type<uint>(1)));
int const x_304 = i;
- i = (x_304 + 1);
+ i = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
int const x_307 = (*(tint_symbol_5)).arr[x_304];
(*(tint_symbol_6)).arr[x_302] = x_307;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_318] = x_321;
{
int const x_323 = i_1;
- i_1 = (x_323 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_323) + as_type<uint>(1)));
}
}
return;
@@ -124,11 +124,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_344) + as_type<uint>(x_345)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_348) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_349))))))) - as_type<uint>(1))), x_353);
int const x_355 = from_1;
param = x_355;
int const x_356 = mid_1;
@@ -139,12 +139,12 @@
{
int const x_359 = m;
int const x_361 = i_2;
- i_2 = (x_361 + (2 * x_359));
+ i_2 = as_type<int>((as_type<uint>(x_361) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_359))))));
}
}
{
int const x_363 = m;
- m = (2 * x_363);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_363)));
}
}
return;
@@ -214,7 +214,7 @@
}
}
int const x_122 = i_3;
- i_3 = (x_122 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(1)));
{
int const x_124 = i_3;
if ((x_124 < 10)) {
@@ -236,7 +236,7 @@
(*(tint_symbol_10)).arr[x_133] = x_136;
{
int const x_138 = j_1;
- j_1 = (x_138 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_138) + as_type<uint>(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 83c2354..dcb5f46 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 @@
int const x_263 = *(from);
i = x_263;
int const x_264 = *(mid);
- j = (x_264 + 1);
+ j = as_type<int>((as_type<uint>(x_264) + as_type<uint>(1)));
while (true) {
int const x_270 = i;
int const x_271 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_288) + as_type<uint>(1)));
int const x_290 = i;
- i = (x_290 + 1);
+ i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(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<int>((as_type<uint>(x_295) + as_type<uint>(1)));
int const x_297 = j;
- j = (x_297 + 1);
+ j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
int const x_300 = (*(tint_symbol_5)).arr[x_297];
(*(tint_symbol_6)).arr[x_295] = x_300;
}
@@ -63,9 +63,9 @@
break;
}
int const x_313 = k;
- k = (x_313 + 1);
+ k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
int const x_315 = i;
- i = (x_315 + 1);
+ i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
int const x_318 = (*(tint_symbol_5)).arr[x_315];
(*(tint_symbol_6)).arr[x_313] = x_318;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_329] = x_332;
{
int const x_334 = i_1;
- i_1 = (x_334 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
}
}
return;
@@ -124,11 +124,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_355) + as_type<uint>(x_356)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_359) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_360))))))) - as_type<uint>(1))), x_364);
int const x_366 = from_1;
param = x_366;
int const x_367 = mid_1;
@@ -139,12 +139,12 @@
{
int const x_370 = m;
int const x_372 = i_2;
- i_2 = (x_372 + (2 * x_370));
+ i_2 = as_type<int>((as_type<uint>(x_372) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_370))))));
}
}
{
int const x_374 = m;
- m = (2 * x_374);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_374)));
}
}
return;
@@ -214,7 +214,7 @@
}
}
int const x_124 = i_3;
- i_3 = (x_124 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
{
int const x_126 = i_3;
if ((x_126 < 10)) {
@@ -241,7 +241,7 @@
(*(tint_symbol_10)).arr[x_140] = x_143;
{
int const x_145 = j_1;
- j_1 = (x_145 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_145) + as_type<uint>(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 941121e..45b927b 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 @@
int const x_263 = *(from);
i = x_263;
int const x_264 = *(mid);
- j = (x_264 + 1);
+ j = as_type<int>((as_type<uint>(x_264) + as_type<uint>(1)));
while (true) {
int const x_270 = i;
int const x_271 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_288) + as_type<uint>(1)));
int const x_290 = i;
- i = (x_290 + 1);
+ i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(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<int>((as_type<uint>(x_295) + as_type<uint>(1)));
int const x_297 = j;
- j = (x_297 + 1);
+ j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
int const x_300 = (*(tint_symbol_5)).arr[x_297];
(*(tint_symbol_6)).arr[x_295] = x_300;
}
@@ -63,9 +63,9 @@
break;
}
int const x_313 = k;
- k = (x_313 + 1);
+ k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
int const x_315 = i;
- i = (x_315 + 1);
+ i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
int const x_318 = (*(tint_symbol_5)).arr[x_315];
(*(tint_symbol_6)).arr[x_313] = x_318;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_329] = x_332;
{
int const x_334 = i_1;
- i_1 = (x_334 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
}
}
return;
@@ -124,11 +124,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_355) + as_type<uint>(x_356)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_359) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_360))))))) - as_type<uint>(1))), x_364);
int const x_366 = from_1;
param = x_366;
int const x_367 = mid_1;
@@ -139,12 +139,12 @@
{
int const x_370 = m;
int const x_372 = i_2;
- i_2 = (x_372 + (2 * x_370));
+ i_2 = as_type<int>((as_type<uint>(x_372) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_370))))));
}
}
{
int const x_374 = m;
- m = (2 * x_374);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_374)));
}
}
return;
@@ -214,7 +214,7 @@
}
}
int const x_124 = i_3;
- i_3 = (x_124 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(1)));
{
int const x_126 = i_3;
if ((x_126 < 10)) {
@@ -241,7 +241,7 @@
(*(tint_symbol_10)).arr[x_140] = x_143;
{
int const x_145 = j_1;
- j_1 = (x_145 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_145) + as_type<uint>(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 d184fe6..e9de4df 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 @@
int const x_256 = *(from);
i = x_256;
int const x_257 = *(mid);
- j = (x_257 + 1);
+ j = as_type<int>((as_type<uint>(x_257) + as_type<uint>(1)));
while (true) {
int x_285 = 0;
int x_286 = 0;
@@ -70,7 +70,7 @@
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<int>((as_type<uint>(x_287) + as_type<uint>(1)));
if (x_280) {
k = x_288;
float const x_293 = x_28.injectionSwitch.x;
@@ -95,7 +95,7 @@
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<int>((as_type<uint>(x_309) + as_type<uint>(1)));
}
int const x_315 = 0;
if (x_280) {
@@ -128,7 +128,7 @@
int const x_340 = x_340_phi;
if (x_280) {
} else {
- k = (x_340 + 1);
+ k = as_type<int>((as_type<uint>(x_340) + as_type<uint>(1)));
}
float const x_345 = x_28.injectionSwitch.x;
if (!((1.0f <= x_345))) {
@@ -147,7 +147,7 @@
int const x_357 = select(x_353, x_355, x_280);
if (x_280) {
} else {
- j = (x_357 + 1);
+ j = as_type<int>((as_type<uint>(x_357) + as_type<uint>(1)));
}
if (x_280) {
x_366 = 0;
@@ -171,9 +171,9 @@
break;
}
int const x_383 = k;
- k = (x_383 + 1);
+ k = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
int const x_385 = i;
- i = (x_385 + 1);
+ i = as_type<int>((as_type<uint>(x_385) + as_type<uint>(1)));
int const x_388 = (*(tint_symbol_5)).arr[x_385];
(*(tint_symbol_6)).arr[x_383] = x_388;
}
@@ -192,7 +192,7 @@
(*(tint_symbol_5)).arr[x_399] = x_402;
{
int const x_404 = i_1;
- i_1 = (x_404 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_404) + as_type<uint>(1)));
}
}
return;
@@ -232,11 +232,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_425) + as_type<uint>(x_426)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_429) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_430))))))) - as_type<uint>(1))), x_434);
int const x_436 = from_1;
param = x_436;
int const x_437 = mid_1;
@@ -247,12 +247,12 @@
{
int const x_440 = m;
int const x_442 = i_2;
- i_2 = (x_442 + (2 * x_440));
+ i_2 = as_type<int>((as_type<uint>(x_442) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_440))))));
}
}
{
int const x_444 = m;
- m = (2 * x_444);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_444)));
}
}
return;
@@ -322,7 +322,7 @@
}
}
int const x_126 = i_3;
- i_3 = (x_126 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_126) + as_type<uint>(1)));
{
int const x_128 = i_3;
if ((x_128 < 10)) {
@@ -344,7 +344,7 @@
(*(tint_symbol_10)).arr[x_137] = x_140;
{
int const x_142 = j_1;
- j_1 = (x_142 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(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 a023050..95f51be 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 @@
int const x_256 = *(from);
i = x_256;
int const x_257 = *(mid);
- j = (x_257 + 1);
+ j = as_type<int>((as_type<uint>(x_257) + as_type<uint>(1)));
while (true) {
int x_285 = 0;
int x_286 = 0;
@@ -70,7 +70,7 @@
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<int>((as_type<uint>(x_287) + as_type<uint>(1)));
if (x_280) {
k = x_288;
float const x_293 = x_28.injectionSwitch.x;
@@ -95,7 +95,7 @@
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<int>((as_type<uint>(x_309) + as_type<uint>(1)));
}
int const x_315 = 0;
if (x_280) {
@@ -128,7 +128,7 @@
int const x_340 = x_340_phi;
if (x_280) {
} else {
- k = (x_340 + 1);
+ k = as_type<int>((as_type<uint>(x_340) + as_type<uint>(1)));
}
float const x_345 = x_28.injectionSwitch.x;
if (!((1.0f <= x_345))) {
@@ -147,7 +147,7 @@
int const x_357 = select(x_353, x_355, x_280);
if (x_280) {
} else {
- j = (x_357 + 1);
+ j = as_type<int>((as_type<uint>(x_357) + as_type<uint>(1)));
}
if (x_280) {
x_366 = 0;
@@ -171,9 +171,9 @@
break;
}
int const x_383 = k;
- k = (x_383 + 1);
+ k = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
int const x_385 = i;
- i = (x_385 + 1);
+ i = as_type<int>((as_type<uint>(x_385) + as_type<uint>(1)));
int const x_388 = (*(tint_symbol_5)).arr[x_385];
(*(tint_symbol_6)).arr[x_383] = x_388;
}
@@ -192,7 +192,7 @@
(*(tint_symbol_5)).arr[x_399] = x_402;
{
int const x_404 = i_1;
- i_1 = (x_404 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_404) + as_type<uint>(1)));
}
}
return;
@@ -232,11 +232,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_425) + as_type<uint>(x_426)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_429) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_430))))))) - as_type<uint>(1))), x_434);
int const x_436 = from_1;
param = x_436;
int const x_437 = mid_1;
@@ -247,12 +247,12 @@
{
int const x_440 = m;
int const x_442 = i_2;
- i_2 = (x_442 + (2 * x_440));
+ i_2 = as_type<int>((as_type<uint>(x_442) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_440))))));
}
}
{
int const x_444 = m;
- m = (2 * x_444);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_444)));
}
}
return;
@@ -322,7 +322,7 @@
}
}
int const x_126 = i_3;
- i_3 = (x_126 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_126) + as_type<uint>(1)));
{
int const x_128 = i_3;
if ((x_128 < 10)) {
@@ -344,7 +344,7 @@
(*(tint_symbol_10)).arr[x_137] = x_140;
{
int const x_142 = j_1;
- j_1 = (x_142 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(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 3c42a41..a814f01 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 @@
int const x_256 = *(from);
i = x_256;
int const x_257 = *(mid);
- j = (x_257 + 1);
+ j = as_type<int>((as_type<uint>(x_257) + as_type<uint>(1)));
while (true) {
int x_283 = 0;
int x_284 = 0;
@@ -69,7 +69,7 @@
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<int>((as_type<uint>(x_285) + as_type<uint>(1)));
if (x_278) {
k = x_286;
float const x_291 = x_28.injectionSwitch.x;
@@ -94,7 +94,7 @@
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<int>((as_type<uint>(x_307) + as_type<uint>(1)));
}
int const x_313 = 0;
if (x_278) {
@@ -127,7 +127,7 @@
int const x_338 = x_338_phi;
if (x_278) {
} else {
- k = (x_338 + 1);
+ k = as_type<int>((as_type<uint>(x_338) + as_type<uint>(1)));
}
float const x_343 = x_28.injectionSwitch.x;
if (!((1.0f <= x_343))) {
@@ -146,7 +146,7 @@
int const x_355 = select(x_351, x_353, x_278);
if (x_278) {
} else {
- j = (x_355 + 1);
+ j = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
}
if (x_278) {
x_364 = 0;
@@ -170,9 +170,9 @@
break;
}
int const x_381 = k;
- k = (x_381 + 1);
+ k = as_type<int>((as_type<uint>(x_381) + as_type<uint>(1)));
int const x_383 = i;
- i = (x_383 + 1);
+ i = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
int const x_386 = (*(tint_symbol_5)).arr[x_383];
(*(tint_symbol_6)).arr[x_381] = x_386;
}
@@ -191,7 +191,7 @@
(*(tint_symbol_5)).arr[x_397] = x_400;
{
int const x_402 = i_1;
- i_1 = (x_402 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_402) + as_type<uint>(1)));
}
}
return;
@@ -231,11 +231,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_423) + as_type<uint>(x_424)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_427) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_428))))))) - as_type<uint>(1))), x_432);
int const x_434 = from_1;
param = x_434;
int const x_435 = mid_1;
@@ -246,12 +246,12 @@
{
int const x_438 = m;
int const x_440 = i_2;
- i_2 = (x_440 + (2 * x_438));
+ i_2 = as_type<int>((as_type<uint>(x_440) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_438))))));
}
}
{
int const x_442 = m;
- m = (2 * x_442);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_442)));
}
}
return;
@@ -321,7 +321,7 @@
}
}
int const x_126 = i_3;
- i_3 = (x_126 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_126) + as_type<uint>(1)));
{
int const x_128 = i_3;
if ((x_128 < 10)) {
@@ -343,7 +343,7 @@
(*(tint_symbol_10)).arr[x_137] = x_140;
{
int const x_142 = j_1;
- j_1 = (x_142 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(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 c3a165b..ce84bf6 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 @@
int const x_256 = *(from);
i = x_256;
int const x_257 = *(mid);
- j = (x_257 + 1);
+ j = as_type<int>((as_type<uint>(x_257) + as_type<uint>(1)));
while (true) {
int x_283 = 0;
int x_284 = 0;
@@ -69,7 +69,7 @@
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<int>((as_type<uint>(x_285) + as_type<uint>(1)));
if (x_278) {
k = x_286;
float const x_291 = x_28.injectionSwitch.x;
@@ -94,7 +94,7 @@
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<int>((as_type<uint>(x_307) + as_type<uint>(1)));
}
int const x_313 = 0;
if (x_278) {
@@ -127,7 +127,7 @@
int const x_338 = x_338_phi;
if (x_278) {
} else {
- k = (x_338 + 1);
+ k = as_type<int>((as_type<uint>(x_338) + as_type<uint>(1)));
}
float const x_343 = x_28.injectionSwitch.x;
if (!((1.0f <= x_343))) {
@@ -146,7 +146,7 @@
int const x_355 = select(x_351, x_353, x_278);
if (x_278) {
} else {
- j = (x_355 + 1);
+ j = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
}
if (x_278) {
x_364 = 0;
@@ -170,9 +170,9 @@
break;
}
int const x_381 = k;
- k = (x_381 + 1);
+ k = as_type<int>((as_type<uint>(x_381) + as_type<uint>(1)));
int const x_383 = i;
- i = (x_383 + 1);
+ i = as_type<int>((as_type<uint>(x_383) + as_type<uint>(1)));
int const x_386 = (*(tint_symbol_5)).arr[x_383];
(*(tint_symbol_6)).arr[x_381] = x_386;
}
@@ -191,7 +191,7 @@
(*(tint_symbol_5)).arr[x_397] = x_400;
{
int const x_402 = i_1;
- i_1 = (x_402 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_402) + as_type<uint>(1)));
}
}
return;
@@ -231,11 +231,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_423) + as_type<uint>(x_424)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_427) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_428))))))) - as_type<uint>(1))), x_432);
int const x_434 = from_1;
param = x_434;
int const x_435 = mid_1;
@@ -246,12 +246,12 @@
{
int const x_438 = m;
int const x_440 = i_2;
- i_2 = (x_440 + (2 * x_438));
+ i_2 = as_type<int>((as_type<uint>(x_440) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_438))))));
}
}
{
int const x_442 = m;
- m = (2 * x_442);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_442)));
}
}
return;
@@ -321,7 +321,7 @@
}
}
int const x_126 = i_3;
- i_3 = (x_126 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_126) + as_type<uint>(1)));
{
int const x_128 = i_3;
if ((x_128 < 10)) {
@@ -343,7 +343,7 @@
(*(tint_symbol_10)).arr[x_137] = x_140;
{
int const x_142 = j_1;
- j_1 = (x_142 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(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 e99a3a3..4f62633 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 @@
int const x_304 = *(from);
i = x_304;
int const x_305 = *(mid);
- j = (x_305 + 1);
+ j = as_type<int>((as_type<uint>(x_305) + as_type<uint>(1)));
while (true) {
int const x_311 = i;
int const x_312 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_329) + as_type<uint>(1)));
int const x_331 = i;
- i = (x_331 + 1);
+ i = as_type<int>((as_type<uint>(x_331) + as_type<uint>(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<int>((as_type<uint>(x_336) + as_type<uint>(1)));
int const x_338 = j;
- j = (x_338 + 1);
+ j = as_type<int>((as_type<uint>(x_338) + as_type<uint>(1)));
int const x_341 = (*(tint_symbol_6)).arr[x_338];
(*(tint_symbol_7)).arr[x_336] = x_341;
}
@@ -63,9 +63,9 @@
break;
}
int const x_354 = k;
- k = (x_354 + 1);
+ k = as_type<int>((as_type<uint>(x_354) + as_type<uint>(1)));
int const x_356 = i;
- i = (x_356 + 1);
+ i = as_type<int>((as_type<uint>(x_356) + as_type<uint>(1)));
int const x_359 = (*(tint_symbol_6)).arr[x_356];
(*(tint_symbol_7)).arr[x_354] = x_359;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_6)).arr[x_370] = x_373;
{
int const x_375 = i_1;
- i_1 = (x_375 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_375) + as_type<uint>(1)));
}
}
return;
@@ -164,7 +164,7 @@
}
}
int const x_134 = i_3;
- i_3 = (x_134 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_134) + as_type<uint>(1)));
{
int const x_136 = i_3;
if ((x_136 < 10)) {
@@ -186,7 +186,7 @@
(*(tint_symbol_9)).arr[x_145] = x_148;
{
int const x_150 = j_1;
- j_1 = (x_150 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
x_94 = 0;
@@ -216,11 +216,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_170) + as_type<uint>(x_171)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_175) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_176))))))) - as_type<uint>(1))), x_180);
int const x_182 = x_90;
x_87 = x_182;
int const x_183 = x_89;
@@ -231,12 +231,12 @@
{
int const x_186 = x_92;
int const x_188 = x_91;
- x_91 = (x_188 + (2 * x_186));
+ x_91 = as_type<int>((as_type<uint>(x_188) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_186))))));
}
}
{
int const x_190 = x_92;
- x_92 = (2 * x_190);
+ x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_190)));
}
}
float const x_194 = (*(tint_symbol_10)).y;
@@ -345,11 +345,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_396) + as_type<uint>(x_397)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_401))))))) - as_type<uint>(1))), x_405);
int const x_407 = from_1;
param = x_407;
int const x_408 = mid_1;
@@ -360,12 +360,12 @@
{
int const x_411 = m;
int const x_413 = i_2;
- i_2 = (x_413 + (2 * x_411));
+ i_2 = as_type<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_411))))));
}
}
{
int const x_415 = m;
- m = (2 * x_415);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(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 6506890..13c5382 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 @@
int const x_304 = *(from);
i = x_304;
int const x_305 = *(mid);
- j = (x_305 + 1);
+ j = as_type<int>((as_type<uint>(x_305) + as_type<uint>(1)));
while (true) {
int const x_311 = i;
int const x_312 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_329) + as_type<uint>(1)));
int const x_331 = i;
- i = (x_331 + 1);
+ i = as_type<int>((as_type<uint>(x_331) + as_type<uint>(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<int>((as_type<uint>(x_336) + as_type<uint>(1)));
int const x_338 = j;
- j = (x_338 + 1);
+ j = as_type<int>((as_type<uint>(x_338) + as_type<uint>(1)));
int const x_341 = (*(tint_symbol_6)).arr[x_338];
(*(tint_symbol_7)).arr[x_336] = x_341;
}
@@ -63,9 +63,9 @@
break;
}
int const x_354 = k;
- k = (x_354 + 1);
+ k = as_type<int>((as_type<uint>(x_354) + as_type<uint>(1)));
int const x_356 = i;
- i = (x_356 + 1);
+ i = as_type<int>((as_type<uint>(x_356) + as_type<uint>(1)));
int const x_359 = (*(tint_symbol_6)).arr[x_356];
(*(tint_symbol_7)).arr[x_354] = x_359;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_6)).arr[x_370] = x_373;
{
int const x_375 = i_1;
- i_1 = (x_375 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_375) + as_type<uint>(1)));
}
}
return;
@@ -164,7 +164,7 @@
}
}
int const x_134 = i_3;
- i_3 = (x_134 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_134) + as_type<uint>(1)));
{
int const x_136 = i_3;
if ((x_136 < 10)) {
@@ -186,7 +186,7 @@
(*(tint_symbol_9)).arr[x_145] = x_148;
{
int const x_150 = j_1;
- j_1 = (x_150 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
x_94 = 0;
@@ -216,11 +216,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_170) + as_type<uint>(x_171)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_175) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_176))))))) - as_type<uint>(1))), x_180);
int const x_182 = x_90;
x_87 = x_182;
int const x_183 = x_89;
@@ -231,12 +231,12 @@
{
int const x_186 = x_92;
int const x_188 = x_91;
- x_91 = (x_188 + (2 * x_186));
+ x_91 = as_type<int>((as_type<uint>(x_188) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_186))))));
}
}
{
int const x_190 = x_92;
- x_92 = (2 * x_190);
+ x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_190)));
}
}
float const x_194 = (*(tint_symbol_10)).y;
@@ -345,11 +345,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_396) + as_type<uint>(x_397)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_400) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_401))))))) - as_type<uint>(1))), x_405);
int const x_407 = from_1;
param = x_407;
int const x_408 = mid_1;
@@ -360,12 +360,12 @@
{
int const x_411 = m;
int const x_413 = i_2;
- i_2 = (x_413 + (2 * x_411));
+ i_2 = as_type<int>((as_type<uint>(x_413) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_411))))));
}
}
{
int const x_415 = m;
- m = (2 * x_415);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(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 12cf733..865de8f 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 @@
int const x_303 = *(from);
i = x_303;
int const x_304 = *(mid);
- j = (x_304 + 1);
+ j = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
while (true) {
int const x_310 = i;
int const x_311 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_328) + as_type<uint>(1)));
int const x_330 = i;
- i = (x_330 + 1);
+ i = as_type<int>((as_type<uint>(x_330) + as_type<uint>(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<int>((as_type<uint>(x_335) + as_type<uint>(1)));
int const x_337 = j;
- j = (x_337 + 1);
+ j = as_type<int>((as_type<uint>(x_337) + as_type<uint>(1)));
int const x_340 = (*(tint_symbol_5)).arr[x_337];
(*(tint_symbol_6)).arr[x_335] = x_340;
}
@@ -63,9 +63,9 @@
break;
}
int const x_353 = k;
- k = (x_353 + 1);
+ k = as_type<int>((as_type<uint>(x_353) + as_type<uint>(1)));
int const x_355 = i;
- i = (x_355 + 1);
+ i = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
int const x_358 = (*(tint_symbol_5)).arr[x_355];
(*(tint_symbol_6)).arr[x_353] = x_358;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_369] = x_372;
{
int const x_374 = i_1;
- i_1 = (x_374 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_374) + as_type<uint>(1)));
}
}
return;
@@ -164,7 +164,7 @@
}
}
int const x_134 = i_3;
- i_3 = (x_134 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_134) + as_type<uint>(1)));
{
int const x_136 = i_3;
if ((x_136 < 10)) {
@@ -186,7 +186,7 @@
(*(tint_symbol_8)).arr[x_145] = x_148;
{
int const x_150 = j_1;
- j_1 = (x_150 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
x_94 = 0;
@@ -212,11 +212,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_170) + as_type<uint>(x_171)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_174) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_175))))))) - as_type<uint>(1))), x_179);
int const x_181 = x_90;
x_87 = x_181;
int const x_182 = x_89;
@@ -227,12 +227,12 @@
{
int const x_185 = x_92;
int const x_187 = x_91;
- x_91 = (x_187 + (2 * x_185));
+ x_91 = as_type<int>((as_type<uint>(x_187) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_185))))));
}
}
{
int const x_189 = x_92;
- x_92 = (2 * x_189);
+ x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_189)));
}
}
float const x_193 = (*(tint_symbol_9)).y;
@@ -341,11 +341,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_395) + as_type<uint>(x_396)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_399) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_400))))))) - as_type<uint>(1))), x_404);
int const x_406 = from_1;
param = x_406;
int const x_407 = mid_1;
@@ -356,12 +356,12 @@
{
int const x_410 = m;
int const x_412 = i_2;
- i_2 = (x_412 + (2 * x_410));
+ i_2 = as_type<int>((as_type<uint>(x_412) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_410))))));
}
}
{
int const x_414 = m;
- m = (2 * x_414);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(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 a550d0f..c9c9307 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 @@
int const x_303 = *(from);
i = x_303;
int const x_304 = *(mid);
- j = (x_304 + 1);
+ j = as_type<int>((as_type<uint>(x_304) + as_type<uint>(1)));
while (true) {
int const x_310 = i;
int const x_311 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_328) + as_type<uint>(1)));
int const x_330 = i;
- i = (x_330 + 1);
+ i = as_type<int>((as_type<uint>(x_330) + as_type<uint>(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<int>((as_type<uint>(x_335) + as_type<uint>(1)));
int const x_337 = j;
- j = (x_337 + 1);
+ j = as_type<int>((as_type<uint>(x_337) + as_type<uint>(1)));
int const x_340 = (*(tint_symbol_5)).arr[x_337];
(*(tint_symbol_6)).arr[x_335] = x_340;
}
@@ -63,9 +63,9 @@
break;
}
int const x_353 = k;
- k = (x_353 + 1);
+ k = as_type<int>((as_type<uint>(x_353) + as_type<uint>(1)));
int const x_355 = i;
- i = (x_355 + 1);
+ i = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
int const x_358 = (*(tint_symbol_5)).arr[x_355];
(*(tint_symbol_6)).arr[x_353] = x_358;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_369] = x_372;
{
int const x_374 = i_1;
- i_1 = (x_374 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_374) + as_type<uint>(1)));
}
}
return;
@@ -164,7 +164,7 @@
}
}
int const x_134 = i_3;
- i_3 = (x_134 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_134) + as_type<uint>(1)));
{
int const x_136 = i_3;
if ((x_136 < 10)) {
@@ -186,7 +186,7 @@
(*(tint_symbol_8)).arr[x_145] = x_148;
{
int const x_150 = j_1;
- j_1 = (x_150 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
x_94 = 0;
@@ -212,11 +212,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_170) + as_type<uint>(x_171)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_174) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_175))))))) - as_type<uint>(1))), x_179);
int const x_181 = x_90;
x_87 = x_181;
int const x_182 = x_89;
@@ -227,12 +227,12 @@
{
int const x_185 = x_92;
int const x_187 = x_91;
- x_91 = (x_187 + (2 * x_185));
+ x_91 = as_type<int>((as_type<uint>(x_187) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_185))))));
}
}
{
int const x_189 = x_92;
- x_92 = (2 * x_189);
+ x_92 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_189)));
}
}
float const x_193 = (*(tint_symbol_9)).y;
@@ -341,11 +341,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_395) + as_type<uint>(x_396)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_399) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_400))))))) - as_type<uint>(1))), x_404);
int const x_406 = from_1;
param = x_406;
int const x_407 = mid_1;
@@ -356,12 +356,12 @@
{
int const x_410 = m;
int const x_412 = i_2;
- i_2 = (x_412 + (2 * x_410));
+ i_2 = as_type<int>((as_type<uint>(x_412) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_410))))));
}
}
{
int const x_414 = m;
- m = (2 * x_414);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(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 4266776..f711d31 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_63 & 5) | (x_66 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_66 & 5) | (x_63 & 10))))), 0);
x_77_phi = x_75;
x_80_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_77.y) - as_type<uint>(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<int>((as_type<uint>(x_92.y) + as_type<uint>(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<int>((as_type<uint>(x_100.x) + as_type<uint>((x_100.y / 2))));
int2 const x_78 = x_78_1;
{
- x_81 = (x_80 + 1);
+ x_81 = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
x_77_phi = x_78;
x_80_phi = x_81;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_114 = int2(0, 0);
- x_114.x = as_type<int>((x_116 - as_type<int>(16)));
+ x_114.x = as_type<int>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(as_type<int>(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 4266776..f711d31 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_63 & 5) | (x_66 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_66 & 5) | (x_63 & 10))))), 0);
x_77_phi = x_75;
x_80_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_77.y) - as_type<uint>(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<int>((as_type<uint>(x_92.y) + as_type<uint>(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<int>((as_type<uint>(x_100.x) + as_type<uint>((x_100.y / 2))));
int2 const x_78 = x_78_1;
{
- x_81 = (x_80 + 1);
+ x_81 = as_type<int>((as_type<uint>(x_80) + as_type<uint>(1)));
x_77_phi = x_78;
x_80_phi = x_81;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_114 = int2(0, 0);
- x_114.x = as_type<int>((x_116 - as_type<int>(16)));
+ x_114.x = as_type<int>(as_type<int>((as_type<uint>(x_116) - as_type<uint>(as_type<int>(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 0e7d864..49c5889 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_66 & 5) | (x_69 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_69 & 5) | (x_66 & 10))))), 0);
x_80_phi = x_78;
x_83_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_80.y) - as_type<uint>(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<int>((as_type<uint>(x_95.y) + as_type<uint>(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<int>((as_type<uint>(x_103.x) + as_type<uint>((x_103.y / 2))));
int2 const x_81 = x_81_1;
{
- x_84 = (x_83 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
x_80_phi = x_81;
x_83_phi = x_84;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_117 = int2(0, 0);
- x_117.x = as_type<int>((x_119 - as_type<int>(16)));
+ x_117.x = as_type<int>(as_type<int>((as_type<uint>(x_119) - as_type<uint>(as_type<int>(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 0e7d864..49c5889 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_66 & 5) | (x_69 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_69 & 5) | (x_66 & 10))))), 0);
x_80_phi = x_78;
x_83_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_80.y) - as_type<uint>(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<int>((as_type<uint>(x_95.y) + as_type<uint>(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<int>((as_type<uint>(x_103.x) + as_type<uint>((x_103.y / 2))));
int2 const x_81 = x_81_1;
{
- x_84 = (x_83 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
x_80_phi = x_81;
x_83_phi = x_84;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_117 = int2(0, 0);
- x_117.x = as_type<int>((x_119 - as_type<int>(16)));
+ x_117.x = as_type<int>(as_type<int>((as_type<uint>(x_119) - as_type<uint>(as_type<int>(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 e35ddd7..15febd0 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_62 & 5) | (x_65 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_65 & 5) | (x_62 & 10))))), 0);
x_76_phi = x_74;
x_79_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_76.y) - as_type<uint>(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<int>((as_type<uint>(x_91.y) + as_type<uint>(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<int>((as_type<uint>(x_99.x) + as_type<uint>((x_99.y / 2))));
int2 const x_77 = x_77_1;
{
- x_80 = (x_79 + 1);
+ x_80 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
x_76_phi = x_77;
x_79_phi = x_80;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_113 = x_112;
- x_113.x = as_type<int>((x_115 - as_type<int>(16)));
+ x_113.x = as_type<int>(as_type<int>((as_type<uint>(x_115) - as_type<uint>(as_type<int>(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 e35ddd7..15febd0 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_62 & 5) | (x_65 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_65 & 5) | (x_62 & 10))))), 0);
x_76_phi = x_74;
x_79_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_76.y) - as_type<uint>(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<int>((as_type<uint>(x_91.y) + as_type<uint>(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<int>((as_type<uint>(x_99.x) + as_type<uint>((x_99.y / 2))));
int2 const x_77 = x_77_1;
{
- x_80 = (x_79 + 1);
+ x_80 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
x_76_phi = x_77;
x_79_phi = x_80;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_113 = x_112;
- x_113.x = as_type<int>((x_115 - as_type<int>(16)));
+ x_113.x = as_type<int>(as_type<int>((as_type<uint>(x_115) - as_type<uint>(as_type<int>(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 6b28e63..c082298 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_65 & 5) | (x_69 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_69 & 5) | (x_65 & 10))))), 0);
x_80_phi = x_78;
x_83_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_80.y) - as_type<uint>(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<int>((as_type<uint>(x_95.y) + as_type<uint>(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<int>((as_type<uint>(x_103.x) + as_type<uint>((x_103.y / 2))));
int2 const x_81 = x_81_1;
{
- x_84 = (x_83 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
x_80_phi = x_81;
x_83_phi = x_84;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_117 = x_116;
- x_117.x = as_type<int>((x_119 - as_type<int>(16)));
+ x_117.x = as_type<int>(as_type<int>((as_type<uint>(x_119) - as_type<uint>(as_type<int>(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 6b28e63..c082298 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_65 & 5) | (x_69 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_69 & 5) | (x_65 & 10))))), 0);
x_80_phi = x_78;
x_83_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_80.y) - as_type<uint>(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<int>((as_type<uint>(x_95.y) + as_type<uint>(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<int>((as_type<uint>(x_103.x) + as_type<uint>((x_103.y / 2))));
int2 const x_81 = x_81_1;
{
- x_84 = (x_83 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
x_80_phi = x_81;
x_83_phi = x_84;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_117 = x_116;
- x_117.x = as_type<int>((x_119 - as_type<int>(16)));
+ x_117.x = as_type<int>(as_type<int>((as_type<uint>(x_119) - as_type<uint>(as_type<int>(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 14e3c2f..ca93b97 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_65 & 5) | (x_69 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_69 & 5) | (x_65 & 10))))), 0);
x_80_phi = x_78;
x_83_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_80.y) - as_type<uint>(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<int>((as_type<uint>(x_95.y) + as_type<uint>(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<int>((as_type<uint>(x_103.x) + as_type<uint>((x_103.y / 2))));
int2 const x_81 = x_81_1;
{
- x_84 = (x_83 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
x_80_phi = x_81;
x_83_phi = x_84;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_117 = x_116;
- x_117.x = as_type<int>((x_119 - as_type<int>(16)));
+ x_117.x = as_type<int>(as_type<int>((as_type<uint>(x_119) - as_type<uint>(as_type<int>(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 14e3c2f..ca93b97 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 <metal_stdlib>
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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(((x_65 & 5) | (x_69 & 10))) * as_type<uint>(8)))) + as_type<uint>(((x_69 & 5) | (x_65 & 10))))), 0);
x_80_phi = x_78;
x_83_phi = 0;
while (true) {
@@ -46,22 +51,22 @@
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<int>((as_type<uint>(x_80.y) - as_type<uint>(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<int>((as_type<uint>(x_95.y) + as_type<uint>(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<int>((as_type<uint>(x_103.x) + as_type<uint>((x_103.y / 2))));
int2 const x_81 = x_81_1;
{
- x_84 = (x_83 + 1);
+ x_84 = as_type<int>((as_type<uint>(x_83) + as_type<uint>(1)));
x_80_phi = x_81;
x_83_phi = x_84;
}
@@ -70,7 +75,7 @@
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 @@
}
{
x_117 = x_116;
- x_117.x = as_type<int>((x_119 - as_type<int>(16)));
+ x_117.x = as_type<int>(as_type<int>((as_type<uint>(x_119) - as_type<uint>(as_type<int>(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 72762dc..bd5afe6 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 @@
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<int>((as_type<uint>(x_223) + as_type<uint>(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 @@
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<int>((as_type<uint>(x_235) - as_type<uint>(15))));
if (x_225) {
x_241_phi = x_237;
} else {
@@ -73,14 +73,14 @@
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<int>((as_type<uint>(x_221) - as_type<uint>(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<int>((as_type<uint>(x_217) + as_type<uint>(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 72762dc..bd5afe6 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 @@
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<int>((as_type<uint>(x_223) + as_type<uint>(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 @@
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<int>((as_type<uint>(x_235) - as_type<uint>(15))));
if (x_225) {
x_241_phi = x_237;
} else {
@@ -73,14 +73,14 @@
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<int>((as_type<uint>(x_221) - as_type<uint>(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<int>((as_type<uint>(x_217) + as_type<uint>(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 0b8a803..da2762d 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 @@
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<int>((as_type<uint>(x_223) + as_type<uint>(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 @@
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<int>((as_type<uint>(x_235) - as_type<uint>(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<int>((as_type<uint>(x_221) - as_type<uint>(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<int>((as_type<uint>(x_217) + as_type<uint>(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 0b8a803..da2762d 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 @@
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<int>((as_type<uint>(x_223) + as_type<uint>(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 @@
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<int>((as_type<uint>(x_235) - as_type<uint>(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<int>((as_type<uint>(x_221) - as_type<uint>(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<int>((as_type<uint>(x_217) + as_type<uint>(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 f95df19..3ed9534 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 @@
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<int>((as_type<uint>(x_235) + as_type<uint>(15))));
x_248_phi = x_237;
if (x_237) {
int const x_241 = (*(pos)).x;
@@ -40,7 +40,7 @@
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<int>((as_type<uint>(x_245) - as_type<uint>(15))));
x_248_phi = x_247;
}
bool const x_248 = x_248_phi;
@@ -50,14 +50,14 @@
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<int>((as_type<uint>(x_252) - as_type<uint>(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<int>((as_type<uint>(x_267) + as_type<uint>(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 f95df19..3ed9534 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 @@
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<int>((as_type<uint>(x_235) + as_type<uint>(15))));
x_248_phi = x_237;
if (x_237) {
int const x_241 = (*(pos)).x;
@@ -40,7 +40,7 @@
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<int>((as_type<uint>(x_245) - as_type<uint>(15))));
x_248_phi = x_247;
}
bool const x_248 = x_248_phi;
@@ -50,14 +50,14 @@
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<int>((as_type<uint>(x_252) - as_type<uint>(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<int>((as_type<uint>(x_267) + as_type<uint>(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 aa07b66..7ecfd1f 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 @@
(*(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<int>((as_type<uint>(x_237) + as_type<uint>(15))));
x_252_phi = x_241;
if (x_241) {
int const x_245 = (*(pos)).x;
@@ -47,7 +47,7 @@
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<int>((as_type<uint>(x_249) - as_type<uint>(15))));
x_252_phi = x_251;
}
bool const x_252 = x_252_phi;
@@ -57,14 +57,14 @@
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<int>((as_type<uint>(x_256) - as_type<uint>(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<int>((as_type<uint>(x_271) + as_type<uint>(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 aa07b66..7ecfd1f 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 @@
(*(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<int>((as_type<uint>(x_237) + as_type<uint>(15))));
x_252_phi = x_241;
if (x_241) {
int const x_245 = (*(pos)).x;
@@ -47,7 +47,7 @@
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<int>((as_type<uint>(x_249) - as_type<uint>(15))));
x_252_phi = x_251;
}
bool const x_252 = x_252_phi;
@@ -57,14 +57,14 @@
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<int>((as_type<uint>(x_256) - as_type<uint>(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<int>((as_type<uint>(x_271) + as_type<uint>(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 7cd8892..19624f7 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 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<int>((as_type<uint>(x_240) - as_type<uint>(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<int>((as_type<uint>(x_248) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_259) + as_type<uint>(1)));
int const x_261 = i_1;
param = x_261;
int const x_262 = j_1;
@@ -68,11 +68,11 @@
}
{
int const x_264 = j_1;
- j_1 = (x_264 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_264) + as_type<uint>(1)));
}
}
int const x_266 = i_1;
- i_1 = (x_266 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_266) + as_type<uint>(1)));
int const x_268 = i_1;
param_2 = x_268;
int const x_269 = *(h);
@@ -94,12 +94,12 @@
h_1 = 9;
top = -1;
int const x_273 = top;
- int const x_274 = (x_273 + 1);
+ int const x_274 = as_type<int>((as_type<uint>(x_273) + as_type<uint>(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<int>((as_type<uint>(x_277) + as_type<uint>(1)));
top = x_278;
int const x_279 = h_1;
stack.arr[x_278] = x_279;
@@ -110,11 +110,11 @@
break;
}
int const x_288 = top;
- top = (x_288 - 1);
+ top = as_type<int>((as_type<uint>(x_288) - as_type<uint>(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<int>((as_type<uint>(x_292) - as_type<uint>(1)));
int const x_295 = stack.arr[x_292];
l_1 = x_295;
int const x_296 = l_1;
@@ -125,28 +125,28 @@
p = x_298;
int const x_299 = p;
int const x_301 = l_1;
- if (((x_299 - 1) > x_301)) {
+ if ((as_type<int>((as_type<uint>(x_299) - as_type<uint>(1))) > x_301)) {
int const x_305 = top;
- int const x_306 = (x_305 + 1);
+ int const x_306 = as_type<int>((as_type<uint>(x_305) + as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(1)));
top = x_310;
int const x_311 = p;
- stack.arr[x_310] = (x_311 - 1);
+ stack.arr[x_310] = as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)));
}
int const x_314 = p;
int const x_316 = h_1;
- if (((x_314 + 1) < x_316)) {
+ if ((as_type<int>((as_type<uint>(x_314) + as_type<uint>(1))) < x_316)) {
int const x_320 = top;
- int const x_321 = (x_320 + 1);
+ int const x_321 = as_type<int>((as_type<uint>(x_320) + as_type<uint>(1)));
top = x_321;
int const x_322 = p;
- stack.arr[x_321] = (x_322 + 1);
+ stack.arr[x_321] = as_type<int>((as_type<uint>(x_322) + as_type<uint>(1)));
int const x_325 = top;
- int const x_326 = (x_325 + 1);
+ int const x_326 = as_type<int>((as_type<uint>(x_325) + as_type<uint>(1)));
top = x_326;
int const x_327 = h_1;
stack.arr[x_326] = x_327;
@@ -168,16 +168,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_95) * as_type<uint>(x_98)));
{
int const x_101 = i_2;
- i_2 = (x_101 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 7cd8892..19624f7 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 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<int>((as_type<uint>(x_240) - as_type<uint>(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<int>((as_type<uint>(x_248) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_259) + as_type<uint>(1)));
int const x_261 = i_1;
param = x_261;
int const x_262 = j_1;
@@ -68,11 +68,11 @@
}
{
int const x_264 = j_1;
- j_1 = (x_264 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_264) + as_type<uint>(1)));
}
}
int const x_266 = i_1;
- i_1 = (x_266 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_266) + as_type<uint>(1)));
int const x_268 = i_1;
param_2 = x_268;
int const x_269 = *(h);
@@ -94,12 +94,12 @@
h_1 = 9;
top = -1;
int const x_273 = top;
- int const x_274 = (x_273 + 1);
+ int const x_274 = as_type<int>((as_type<uint>(x_273) + as_type<uint>(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<int>((as_type<uint>(x_277) + as_type<uint>(1)));
top = x_278;
int const x_279 = h_1;
stack.arr[x_278] = x_279;
@@ -110,11 +110,11 @@
break;
}
int const x_288 = top;
- top = (x_288 - 1);
+ top = as_type<int>((as_type<uint>(x_288) - as_type<uint>(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<int>((as_type<uint>(x_292) - as_type<uint>(1)));
int const x_295 = stack.arr[x_292];
l_1 = x_295;
int const x_296 = l_1;
@@ -125,28 +125,28 @@
p = x_298;
int const x_299 = p;
int const x_301 = l_1;
- if (((x_299 - 1) > x_301)) {
+ if ((as_type<int>((as_type<uint>(x_299) - as_type<uint>(1))) > x_301)) {
int const x_305 = top;
- int const x_306 = (x_305 + 1);
+ int const x_306 = as_type<int>((as_type<uint>(x_305) + as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(1)));
top = x_310;
int const x_311 = p;
- stack.arr[x_310] = (x_311 - 1);
+ stack.arr[x_310] = as_type<int>((as_type<uint>(x_311) - as_type<uint>(1)));
}
int const x_314 = p;
int const x_316 = h_1;
- if (((x_314 + 1) < x_316)) {
+ if ((as_type<int>((as_type<uint>(x_314) + as_type<uint>(1))) < x_316)) {
int const x_320 = top;
- int const x_321 = (x_320 + 1);
+ int const x_321 = as_type<int>((as_type<uint>(x_320) + as_type<uint>(1)));
top = x_321;
int const x_322 = p;
- stack.arr[x_321] = (x_322 + 1);
+ stack.arr[x_321] = as_type<int>((as_type<uint>(x_322) + as_type<uint>(1)));
int const x_325 = top;
- int const x_326 = (x_325 + 1);
+ int const x_326 = as_type<int>((as_type<uint>(x_325) + as_type<uint>(1)));
top = x_326;
int const x_327 = h_1;
stack.arr[x_326] = x_327;
@@ -168,16 +168,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_95) * as_type<uint>(x_98)));
{
int const x_101 = i_2;
- i_2 = (x_101 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 a97ee25..73e23ff 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 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<int>((as_type<uint>(x_245) - as_type<uint>(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<int>((as_type<uint>(x_253) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_264) + as_type<uint>(1)));
int const x_266 = i_1;
param = x_266;
int const x_267 = j_1;
@@ -68,11 +68,11 @@
}
{
int const x_269 = j_1;
- j_1 = (x_269 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_269) + as_type<uint>(1)));
}
}
int const x_271 = i_1;
- i_1 = (x_271 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_271) + as_type<uint>(1)));
int const x_273 = i_1;
param_2 = x_273;
int const x_274 = *(h);
@@ -94,12 +94,12 @@
h_1 = 9;
top = -1;
int const x_278 = top;
- int const x_279 = (x_278 + 1);
+ int const x_279 = as_type<int>((as_type<uint>(x_278) + as_type<uint>(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<int>((as_type<uint>(x_282) + as_type<uint>(1)));
top = x_283;
int const x_284 = h_1;
stack.arr[x_283] = x_284;
@@ -110,11 +110,11 @@
break;
}
int const x_293 = top;
- top = (x_293 - 1);
+ top = as_type<int>((as_type<uint>(x_293) - as_type<uint>(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<int>((as_type<uint>(x_297) - as_type<uint>(1)));
int const x_300 = stack.arr[x_297];
l_1 = x_300;
int const x_301 = l_1;
@@ -125,28 +125,28 @@
p = x_303;
int const x_304 = p;
int const x_306 = l_1;
- if (((x_304 - 1) > x_306)) {
+ if ((as_type<int>((as_type<uint>(x_304) - as_type<uint>(1))) > x_306)) {
int const x_310 = top;
- int const x_311 = (x_310 + 1);
+ int const x_311 = as_type<int>((as_type<uint>(x_310) + as_type<uint>(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<int>((as_type<uint>(x_314) + as_type<uint>(1)));
top = x_315;
int const x_316 = p;
- stack.arr[x_315] = (x_316 - 1);
+ stack.arr[x_315] = as_type<int>((as_type<uint>(x_316) - as_type<uint>(1)));
}
int const x_319 = p;
int const x_321 = h_1;
- if (((x_319 + 1) < x_321)) {
+ if ((as_type<int>((as_type<uint>(x_319) + as_type<uint>(1))) < x_321)) {
int const x_325 = top;
- int const x_326 = (x_325 + 1);
+ int const x_326 = as_type<int>((as_type<uint>(x_325) + as_type<uint>(1)));
top = x_326;
int const x_327 = p;
- stack.arr[x_326] = (x_327 + 1);
+ stack.arr[x_326] = as_type<int>((as_type<uint>(x_327) + as_type<uint>(1)));
int const x_330 = top;
- int const x_331 = (x_330 + 1);
+ int const x_331 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
top = x_331;
int const x_332 = h_1;
stack.arr[x_331] = x_332;
@@ -168,16 +168,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_99) * as_type<uint>(x_102)));
{
int const x_105 = i_2;
- i_2 = (x_105 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(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 a97ee25..73e23ff 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 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<int>((as_type<uint>(x_245) - as_type<uint>(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<int>((as_type<uint>(x_253) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_264) + as_type<uint>(1)));
int const x_266 = i_1;
param = x_266;
int const x_267 = j_1;
@@ -68,11 +68,11 @@
}
{
int const x_269 = j_1;
- j_1 = (x_269 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_269) + as_type<uint>(1)));
}
}
int const x_271 = i_1;
- i_1 = (x_271 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_271) + as_type<uint>(1)));
int const x_273 = i_1;
param_2 = x_273;
int const x_274 = *(h);
@@ -94,12 +94,12 @@
h_1 = 9;
top = -1;
int const x_278 = top;
- int const x_279 = (x_278 + 1);
+ int const x_279 = as_type<int>((as_type<uint>(x_278) + as_type<uint>(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<int>((as_type<uint>(x_282) + as_type<uint>(1)));
top = x_283;
int const x_284 = h_1;
stack.arr[x_283] = x_284;
@@ -110,11 +110,11 @@
break;
}
int const x_293 = top;
- top = (x_293 - 1);
+ top = as_type<int>((as_type<uint>(x_293) - as_type<uint>(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<int>((as_type<uint>(x_297) - as_type<uint>(1)));
int const x_300 = stack.arr[x_297];
l_1 = x_300;
int const x_301 = l_1;
@@ -125,28 +125,28 @@
p = x_303;
int const x_304 = p;
int const x_306 = l_1;
- if (((x_304 - 1) > x_306)) {
+ if ((as_type<int>((as_type<uint>(x_304) - as_type<uint>(1))) > x_306)) {
int const x_310 = top;
- int const x_311 = (x_310 + 1);
+ int const x_311 = as_type<int>((as_type<uint>(x_310) + as_type<uint>(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<int>((as_type<uint>(x_314) + as_type<uint>(1)));
top = x_315;
int const x_316 = p;
- stack.arr[x_315] = (x_316 - 1);
+ stack.arr[x_315] = as_type<int>((as_type<uint>(x_316) - as_type<uint>(1)));
}
int const x_319 = p;
int const x_321 = h_1;
- if (((x_319 + 1) < x_321)) {
+ if ((as_type<int>((as_type<uint>(x_319) + as_type<uint>(1))) < x_321)) {
int const x_325 = top;
- int const x_326 = (x_325 + 1);
+ int const x_326 = as_type<int>((as_type<uint>(x_325) + as_type<uint>(1)));
top = x_326;
int const x_327 = p;
- stack.arr[x_326] = (x_327 + 1);
+ stack.arr[x_326] = as_type<int>((as_type<uint>(x_327) + as_type<uint>(1)));
int const x_330 = top;
- int const x_331 = (x_330 + 1);
+ int const x_331 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
top = x_331;
int const x_332 = h_1;
stack.arr[x_331] = x_332;
@@ -168,16 +168,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_99) * as_type<uint>(x_102)));
{
int const x_105 = i_2;
- i_2 = (x_105 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(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 c69c232..f6b0d6f 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
x_96_phi = x_143;
}
float4 const x_96 = x_96_phi;
{
- x_99 = (x_98 + 1);
+ x_99 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 c69c232..f6b0d6f 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
x_96_phi = x_143;
}
float4 const x_96 = x_96_phi;
{
- x_99 = (x_98 + 1);
+ x_99 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 f5eb2e7..dd850d8 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
x_96_phi = x_142;
}
float4 const x_96 = x_96_phi;
{
- x_99 = (x_98 + 1);
+ x_99 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 f5eb2e7..dd850d8 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_131)) * as_type<uint>(int(x_134))))) + as_type<uint>(as_type<int>((as_type<uint>(x_98) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
x_96_phi = x_142;
}
float4 const x_96 = x_96_phi;
{
- x_99 = (x_98 + 1);
+ x_99 = as_type<int>((as_type<uint>(x_98) + as_type<uint>(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 752c6ed..1f650e5 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 @@
case 17: {
x_391_phi = x_356;
if ((x_354 == as_type<int>(x_358))) {
- x_390 = as_type<int>((x_356 + as_type<int>(1)));
+ x_390 = as_type<int>(as_type<int>((as_type<uint>(x_356) + as_type<uint>(as_type<int>(1)))));
x_391_phi = x_390;
}
x_391 = x_391_phi;
@@ -728,7 +728,7 @@
default: {
x_396_phi = x_356;
if ((x_354 == as_type<int>(-1))) {
- x_395 = as_type<int>((x_356 + as_type<int>(1)));
+ x_395 = as_type<int>(as_type<int>((as_type<uint>(x_356) + as_type<uint>(as_type<int>(1)))));
x_396_phi = x_395;
}
x_396 = x_396_phi;
@@ -738,7 +738,7 @@
}
int const x_357 = x_357_phi;
{
- x_359 = (x_358 + 1);
+ x_359 = as_type<int>((as_type<uint>(x_358) + as_type<uint>(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 752c6ed..1f650e5 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 @@
case 17: {
x_391_phi = x_356;
if ((x_354 == as_type<int>(x_358))) {
- x_390 = as_type<int>((x_356 + as_type<int>(1)));
+ x_390 = as_type<int>(as_type<int>((as_type<uint>(x_356) + as_type<uint>(as_type<int>(1)))));
x_391_phi = x_390;
}
x_391 = x_391_phi;
@@ -728,7 +728,7 @@
default: {
x_396_phi = x_356;
if ((x_354 == as_type<int>(-1))) {
- x_395 = as_type<int>((x_356 + as_type<int>(1)));
+ x_395 = as_type<int>(as_type<int>((as_type<uint>(x_356) + as_type<uint>(as_type<int>(1)))));
x_396_phi = x_395;
}
x_396 = x_396_phi;
@@ -738,7 +738,7 @@
}
int const x_357 = x_357_phi;
{
- x_359 = (x_358 + 1);
+ x_359 = as_type<int>((as_type<uint>(x_358) + as_type<uint>(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 5025022..7b88398 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 @@
}
}
{
- x_120 = (x_119 + 1);
+ x_120 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(1)));
x_119_phi = x_120;
}
}
@@ -1070,7 +1070,7 @@
case 17: {
x_607_phi = x_572;
if ((x_570 == as_type<int>(x_574))) {
- x_606 = as_type<int>((x_572 + as_type<int>(1)));
+ x_606 = as_type<int>(as_type<int>((as_type<uint>(x_572) + as_type<uint>(as_type<int>(1)))));
x_607_phi = x_606;
}
x_607 = x_607_phi;
@@ -1080,7 +1080,7 @@
default: {
x_612_phi = x_572;
if ((x_570 == as_type<int>(-1))) {
- x_611 = as_type<int>((x_572 + as_type<int>(1)));
+ x_611 = as_type<int>(as_type<int>((as_type<uint>(x_572) + as_type<uint>(as_type<int>(1)))));
x_612_phi = x_611;
}
x_612 = x_612_phi;
@@ -1090,7 +1090,7 @@
}
int const x_573 = x_573_phi;
{
- x_575 = (x_574 + 1);
+ x_575 = as_type<int>((as_type<uint>(x_574) + as_type<uint>(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 5025022..7b88398 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 @@
}
}
{
- x_120 = (x_119 + 1);
+ x_120 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(1)));
x_119_phi = x_120;
}
}
@@ -1070,7 +1070,7 @@
case 17: {
x_607_phi = x_572;
if ((x_570 == as_type<int>(x_574))) {
- x_606 = as_type<int>((x_572 + as_type<int>(1)));
+ x_606 = as_type<int>(as_type<int>((as_type<uint>(x_572) + as_type<uint>(as_type<int>(1)))));
x_607_phi = x_606;
}
x_607 = x_607_phi;
@@ -1080,7 +1080,7 @@
default: {
x_612_phi = x_572;
if ((x_570 == as_type<int>(-1))) {
- x_611 = as_type<int>((x_572 + as_type<int>(1)));
+ x_611 = as_type<int>(as_type<int>((as_type<uint>(x_572) + as_type<uint>(as_type<int>(1)))));
x_612_phi = x_611;
}
x_612 = x_612_phi;
@@ -1090,7 +1090,7 @@
}
int const x_573 = x_573_phi;
{
- x_575 = (x_574 + 1);
+ x_575 = as_type<int>((as_type<uint>(x_574) + as_type<uint>(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 f509724..0ddc6e7 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 @@
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<int>((as_type<uint>(x_88) + as_type<uint>(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<int>((as_type<uint>(x_92) + as_type<uint>(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<int>((as_type<uint>(x_96) + as_type<uint>(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<int>((as_type<uint>(x_100) + as_type<uint>(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<int>((as_type<uint>(x_104) + as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(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<int>((as_type<uint>(x_112) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(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<int>((as_type<uint>(x_120) + as_type<uint>(1)));
int const x_122 = treeIndex_1;
param_22 = x_122;
param_23 = 13;
@@ -243,7 +243,7 @@
int const x_144 = i;
if ((x_143 == x_144)) {
int const x_148 = count;
- count = (x_148 + 1);
+ count = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
break;
}
@@ -251,14 +251,14 @@
int const x_137 = result;
if ((x_137 == -1)) {
int const x_141 = count;
- count = (x_141 + 1);
+ count = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
}
break;
}
}
{
int const x_150 = i;
- i = (x_150 + 1);
+ i = as_type<int>((as_type<uint>(x_150) + as_type<uint>(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 f509724..0ddc6e7 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 @@
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<int>((as_type<uint>(x_88) + as_type<uint>(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<int>((as_type<uint>(x_92) + as_type<uint>(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<int>((as_type<uint>(x_96) + as_type<uint>(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<int>((as_type<uint>(x_100) + as_type<uint>(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<int>((as_type<uint>(x_104) + as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(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<int>((as_type<uint>(x_112) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(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<int>((as_type<uint>(x_120) + as_type<uint>(1)));
int const x_122 = treeIndex_1;
param_22 = x_122;
param_23 = 13;
@@ -243,7 +243,7 @@
int const x_144 = i;
if ((x_143 == x_144)) {
int const x_148 = count;
- count = (x_148 + 1);
+ count = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
break;
}
@@ -251,14 +251,14 @@
int const x_137 = result;
if ((x_137 == -1)) {
int const x_141 = count;
- count = (x_141 + 1);
+ count = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
}
break;
}
}
{
int const x_150 = i;
- i = (x_150 + 1);
+ i = as_type<int>((as_type<uint>(x_150) + as_type<uint>(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 80d83c8..8a78d71 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 @@
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<int>((as_type<uint>(x_92) + as_type<uint>(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<int>((as_type<uint>(x_96) + as_type<uint>(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<int>((as_type<uint>(x_100) + as_type<uint>(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<int>((as_type<uint>(x_104) + as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(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<int>((as_type<uint>(x_112) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(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<int>((as_type<uint>(x_120) + as_type<uint>(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<int>((as_type<uint>(x_124) + as_type<uint>(1)));
int const x_126 = treeIndex_1;
param_22 = x_126;
param_23 = 13;
@@ -253,7 +253,7 @@
bool const x_156 = x_156_phi;
if (x_156) {
int const x_159 = count;
- count = (x_159 + 1);
+ count = as_type<int>((as_type<uint>(x_159) + as_type<uint>(1)));
}
break;
}
@@ -261,14 +261,14 @@
int const x_141 = result;
if ((x_141 == -1)) {
int const x_145 = count;
- count = (x_145 + 1);
+ count = as_type<int>((as_type<uint>(x_145) + as_type<uint>(1)));
}
break;
}
}
{
int const x_161 = i;
- i = (x_161 + 1);
+ i = as_type<int>((as_type<uint>(x_161) + as_type<uint>(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 80d83c8..8a78d71 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 @@
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<int>((as_type<uint>(x_92) + as_type<uint>(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<int>((as_type<uint>(x_96) + as_type<uint>(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<int>((as_type<uint>(x_100) + as_type<uint>(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<int>((as_type<uint>(x_104) + as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(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<int>((as_type<uint>(x_112) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(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<int>((as_type<uint>(x_120) + as_type<uint>(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<int>((as_type<uint>(x_124) + as_type<uint>(1)));
int const x_126 = treeIndex_1;
param_22 = x_126;
param_23 = 13;
@@ -253,7 +253,7 @@
bool const x_156 = x_156_phi;
if (x_156) {
int const x_159 = count;
- count = (x_159 + 1);
+ count = as_type<int>((as_type<uint>(x_159) + as_type<uint>(1)));
}
break;
}
@@ -261,14 +261,14 @@
int const x_141 = result;
if ((x_141 == -1)) {
int const x_145 = count;
- count = (x_145 + 1);
+ count = as_type<int>((as_type<uint>(x_145) + as_type<uint>(1)));
}
break;
}
}
{
int const x_161 = i;
- i = (x_161 + 1);
+ i = as_type<int>((as_type<uint>(x_161) + as_type<uint>(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 17bc280..30f0bea 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 @@
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<int>((as_type<uint>(x_95) + as_type<uint>(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<int>((as_type<uint>(x_99) + as_type<uint>(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<int>((as_type<uint>(x_103) + as_type<uint>(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<int>((as_type<uint>(x_107) + as_type<uint>(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<int>((as_type<uint>(x_111) + as_type<uint>(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<int>((as_type<uint>(x_115) + as_type<uint>(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<int>((as_type<uint>(x_119) + as_type<uint>(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<int>((as_type<uint>(x_123) + as_type<uint>(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<int>((as_type<uint>(x_127) + as_type<uint>(1)));
int const x_129 = treeIndex_1;
param_22 = x_129;
param_23 = 13;
@@ -268,7 +268,7 @@
int const x_151 = i;
if ((x_150 == x_151)) {
int const x_155 = count;
- count = (x_155 + 1);
+ count = as_type<int>((as_type<uint>(x_155) + as_type<uint>(1)));
}
break;
}
@@ -276,14 +276,14 @@
int const x_144 = result;
if ((x_144 == -1)) {
int const x_148 = count;
- count = (x_148 + 1);
+ count = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
break;
}
}
{
int const x_157 = i;
- i = (x_157 + 1);
+ i = as_type<int>((as_type<uint>(x_157) + as_type<uint>(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 17bc280..30f0bea 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 @@
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<int>((as_type<uint>(x_95) + as_type<uint>(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<int>((as_type<uint>(x_99) + as_type<uint>(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<int>((as_type<uint>(x_103) + as_type<uint>(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<int>((as_type<uint>(x_107) + as_type<uint>(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<int>((as_type<uint>(x_111) + as_type<uint>(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<int>((as_type<uint>(x_115) + as_type<uint>(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<int>((as_type<uint>(x_119) + as_type<uint>(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<int>((as_type<uint>(x_123) + as_type<uint>(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<int>((as_type<uint>(x_127) + as_type<uint>(1)));
int const x_129 = treeIndex_1;
param_22 = x_129;
param_23 = 13;
@@ -268,7 +268,7 @@
int const x_151 = i;
if ((x_150 == x_151)) {
int const x_155 = count;
- count = (x_155 + 1);
+ count = as_type<int>((as_type<uint>(x_155) + as_type<uint>(1)));
}
break;
}
@@ -276,14 +276,14 @@
int const x_144 = result;
if ((x_144 == -1)) {
int const x_148 = count;
- count = (x_148 + 1);
+ count = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
break;
}
}
{
int const x_157 = i;
- i = (x_157 + 1);
+ i = as_type<int>((as_type<uint>(x_157) + as_type<uint>(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 02ef450..3679d60 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 @@
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<int>((as_type<uint>(x_88) + as_type<uint>(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<int>((as_type<uint>(x_92) + as_type<uint>(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<int>((as_type<uint>(x_96) + as_type<uint>(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<int>((as_type<uint>(x_100) + as_type<uint>(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<int>((as_type<uint>(x_104) + as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(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<int>((as_type<uint>(x_112) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(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<int>((as_type<uint>(x_120) + as_type<uint>(1)));
int const x_122 = treeIndex_1;
param_22 = x_122;
param_23 = 13;
@@ -243,7 +243,7 @@
int const x_144 = i;
if ((x_143 == x_144)) {
int const x_148 = count;
- count = (x_148 + 1);
+ count = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
break;
}
@@ -251,14 +251,14 @@
int const x_137 = result;
if ((x_137 == -1)) {
int const x_141 = count;
- count = (x_141 + 1);
+ count = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
}
break;
}
}
{
int const x_150 = i;
- i = (x_150 + 1);
+ i = as_type<int>((as_type<uint>(x_150) + as_type<uint>(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 02ef450..3679d60 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 @@
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<int>((as_type<uint>(x_88) + as_type<uint>(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<int>((as_type<uint>(x_92) + as_type<uint>(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<int>((as_type<uint>(x_96) + as_type<uint>(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<int>((as_type<uint>(x_100) + as_type<uint>(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<int>((as_type<uint>(x_104) + as_type<uint>(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<int>((as_type<uint>(x_108) + as_type<uint>(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<int>((as_type<uint>(x_112) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(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<int>((as_type<uint>(x_120) + as_type<uint>(1)));
int const x_122 = treeIndex_1;
param_22 = x_122;
param_23 = 13;
@@ -243,7 +243,7 @@
int const x_144 = i;
if ((x_143 == x_144)) {
int const x_148 = count;
- count = (x_148 + 1);
+ count = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
}
break;
}
@@ -251,14 +251,14 @@
int const x_137 = result;
if ((x_137 == -1)) {
int const x_141 = count;
- count = (x_141 + 1);
+ count = as_type<int>((as_type<uint>(x_141) + as_type<uint>(1)));
}
break;
}
}
{
int const x_150 = i;
- i = (x_150 + 1);
+ i = as_type<int>((as_type<uint>(x_150) + as_type<uint>(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 c0e8e43..f4569b5 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 @@
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<int>((as_type<uint>(x_105) + as_type<uint>(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<int>((as_type<uint>(x_109) + as_type<uint>(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<int>((as_type<uint>(x_113) + as_type<uint>(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<int>((as_type<uint>(x_117) + as_type<uint>(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<int>((as_type<uint>(x_121) + as_type<uint>(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<int>((as_type<uint>(x_125) + as_type<uint>(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<int>((as_type<uint>(x_129) + as_type<uint>(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<int>((as_type<uint>(x_133) + as_type<uint>(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<int>((as_type<uint>(x_137) + as_type<uint>(1)));
int const x_139 = treeIndex_1;
param_22 = x_139;
param_23 = 13;
@@ -249,16 +249,16 @@
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<int>((as_type<uint>(1) + as_type<uint>(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<int>((as_type<uint>(x_160) + as_type<uint>(1)));
{
int const x_162 = i;
- i = (x_162 + 1);
+ i = as_type<int>((as_type<uint>(x_162) + as_type<uint>(1)));
}
}
int const x_164 = pp;
@@ -293,7 +293,7 @@
int const x_188 = i_1;
if ((x_187 == x_188)) {
int const x_192 = count;
- count = (x_192 + 1);
+ count = as_type<int>((as_type<uint>(x_192) + as_type<uint>(1)));
}
break;
}
@@ -301,14 +301,14 @@
int const x_181 = result;
if ((x_181 == -1)) {
int const x_185 = count;
- count = (x_185 + 1);
+ count = as_type<int>((as_type<uint>(x_185) + as_type<uint>(1)));
}
break;
}
}
{
int const x_194 = i_1;
- i_1 = (x_194 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_194) + as_type<uint>(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 c0e8e43..f4569b5 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 @@
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<int>((as_type<uint>(x_105) + as_type<uint>(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<int>((as_type<uint>(x_109) + as_type<uint>(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<int>((as_type<uint>(x_113) + as_type<uint>(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<int>((as_type<uint>(x_117) + as_type<uint>(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<int>((as_type<uint>(x_121) + as_type<uint>(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<int>((as_type<uint>(x_125) + as_type<uint>(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<int>((as_type<uint>(x_129) + as_type<uint>(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<int>((as_type<uint>(x_133) + as_type<uint>(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<int>((as_type<uint>(x_137) + as_type<uint>(1)));
int const x_139 = treeIndex_1;
param_22 = x_139;
param_23 = 13;
@@ -249,16 +249,16 @@
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<int>((as_type<uint>(1) + as_type<uint>(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<int>((as_type<uint>(x_160) + as_type<uint>(1)));
{
int const x_162 = i;
- i = (x_162 + 1);
+ i = as_type<int>((as_type<uint>(x_162) + as_type<uint>(1)));
}
}
int const x_164 = pp;
@@ -293,7 +293,7 @@
int const x_188 = i_1;
if ((x_187 == x_188)) {
int const x_192 = count;
- count = (x_192 + 1);
+ count = as_type<int>((as_type<uint>(x_192) + as_type<uint>(1)));
}
break;
}
@@ -301,14 +301,14 @@
int const x_181 = result;
if ((x_181 == -1)) {
int const x_185 = count;
- count = (x_185 + 1);
+ count = as_type<int>((as_type<uint>(x_185) + as_type<uint>(1)));
}
break;
}
}
{
int const x_194 = i_1;
- i_1 = (x_194 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_194) + as_type<uint>(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 94420a4..e563769 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 const x_92 = *(v);
if (((x_92 & 1) == 1)) {
int const x_98 = *(v);
- *(v) = ((3 * x_98) + 1);
+ *(v) = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_98)))) + as_type<uint>(1)));
} else {
int const x_101 = *(v);
*(v) = (x_101 / 2);
}
int const x_103 = count;
- count = (x_103 + 1);
+ count = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
}
int const x_105 = count;
return x_105;
@@ -50,7 +50,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_72)) * as_type<uint>(8)))) + as_type<uint>(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 94420a4..e563769 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 const x_92 = *(v);
if (((x_92 & 1) == 1)) {
int const x_98 = *(v);
- *(v) = ((3 * x_98) + 1);
+ *(v) = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(3) * as_type<uint>(x_98)))) + as_type<uint>(1)));
} else {
int const x_101 = *(v);
*(v) = (x_101 / 2);
}
int const x_103 = count;
- count = (x_103 + 1);
+ count = as_type<int>((as_type<uint>(x_103) + as_type<uint>(1)));
}
int const x_105 = count;
return x_105;
@@ -50,7 +50,7 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_72)) * as_type<uint>(8)))) + as_type<uint>(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 3f4d5cb..a7377e3 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 @@
break;
}
{
- x_62 = (x_61 + 1);
+ x_62 = as_type<int>((as_type<uint>(x_61) + as_type<uint>(1)));
x_58_phi = x_59;
x_61_phi = x_62;
}
@@ -152,7 +152,7 @@
break;
}
{
- x_106 = (x_105 + 1);
+ x_106 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
x_102_phi = x_103;
x_105_phi = x_106;
}
@@ -194,7 +194,7 @@
}
}
{
- x_147 = (x_146 + 1);
+ x_147 = as_type<int>((as_type<uint>(x_146) + as_type<uint>(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 b5f9f63..fc69ea6 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 @@
break;
}
{
- x_62 = (x_61 + 1);
+ x_62 = as_type<int>((as_type<uint>(x_61) + as_type<uint>(1)));
x_58_phi = x_59;
x_61_phi = x_62;
}
@@ -152,7 +152,7 @@
break;
}
{
- x_106 = (x_105 + 1);
+ x_106 = as_type<int>((as_type<uint>(x_105) + as_type<uint>(1)));
x_102_phi = x_103;
x_105_phi = x_106;
}
@@ -194,7 +194,7 @@
}
}
{
- x_147 = (x_146 + 1);
+ x_147 = as_type<int>((as_type<uint>(x_146) + as_type<uint>(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 b31b105..258c77b 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 @@
}
{
int const x_139 = i;
- i = (x_139 + 1);
+ i = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
}
}
float const x_141 = result;
@@ -94,7 +94,7 @@
}
{
int const x_97 = i_1;
- i_1 = (x_97 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_97) + as_type<uint>(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 8d2c08a..18723da 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 @@
}
{
int const x_139 = i;
- i = (x_139 + 1);
+ i = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
}
}
float const x_141 = result;
@@ -94,7 +94,7 @@
}
{
int const x_97 = i_1;
- i_1 = (x_97 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_97) + as_type<uint>(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 e87d98f..0021c50 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 @@
}
{
int const x_153 = i;
- i = (x_153 + 1);
+ i = as_type<int>((as_type<uint>(x_153) + as_type<uint>(1)));
}
}
float const x_155 = result;
@@ -98,7 +98,7 @@
}
{
int const x_101 = i_1;
- i_1 = (x_101 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 2877362..70aae88 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 @@
}
{
int const x_153 = i;
- i = (x_153 + 1);
+ i = as_type<int>((as_type<uint>(x_153) + as_type<uint>(1)));
}
}
float const x_155 = result;
@@ -98,7 +98,7 @@
}
{
int const x_101 = i_1;
- i_1 = (x_101 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 27db58e..5d64b781 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 @@
return x_92;
}
{
- x_95 = (x_94 + 1);
+ x_95 = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
x_91_phi = x_92;
x_94_phi = x_95;
}
@@ -97,7 +97,7 @@
c[x_74_save] = (x_79 * x_80);
}
{
- x_69 = (x_68 + 1);
+ x_69 = as_type<int>((as_type<uint>(x_68) + as_type<uint>(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 bd3bd6f..4635d6f 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 @@
return x_92;
}
{
- x_95 = (x_94 + 1);
+ x_95 = as_type<int>((as_type<uint>(x_94) + as_type<uint>(1)));
x_91_phi = x_92;
x_94_phi = x_95;
}
@@ -97,7 +97,7 @@
c[x_74_save] = (x_79 * x_80);
}
{
- x_69 = (x_68 + 1);
+ x_69 = as_type<int>((as_type<uint>(x_68) + as_type<uint>(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 a314658..cd4c8e2 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 @@
return x_105;
}
{
- x_108 = (x_107 + 1);
+ x_108 = as_type<int>((as_type<uint>(x_107) + as_type<uint>(1)));
x_104_phi = x_105;
x_107_phi = x_108;
}
@@ -108,7 +108,7 @@
c[x_80_save] = (x_92 * x_93);
}
{
- x_75 = (x_74 + 1);
+ x_75 = as_type<int>((as_type<uint>(x_74) + as_type<uint>(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 d609e54..04458e7 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 @@
return x_105;
}
{
- x_108 = (x_107 + 1);
+ x_108 = as_type<int>((as_type<uint>(x_107) + as_type<uint>(1)));
x_104_phi = x_105;
x_107_phi = x_108;
}
@@ -108,7 +108,7 @@
c[x_80_save] = (x_92 * x_93);
}
{
- x_75 = (x_74 + 1);
+ x_75 = as_type<int>((as_type<uint>(x_74) + as_type<uint>(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 ac14c85..025db52 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 @@
}
{
int const x_172 = i;
- i = (x_172 + 1);
+ i = as_type<int>((as_type<uint>(x_172) + as_type<uint>(1)));
}
}
float const x_174 = result;
@@ -123,7 +123,7 @@
}
{
int const x_130 = i_1;
- i_1 = (x_130 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(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 e9ded5d..5515f82 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 @@
}
{
int const x_172 = i;
- i = (x_172 + 1);
+ i = as_type<int>((as_type<uint>(x_172) + as_type<uint>(1)));
}
}
float const x_174 = result;
@@ -123,7 +123,7 @@
}
{
int const x_130 = i_1;
- i_1 = (x_130 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(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 f0268f3..0af13fc 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 @@
}
{
int const x_164 = i;
- i = (x_164 + 1);
+ i = as_type<int>((as_type<uint>(x_164) + as_type<uint>(1)));
}
}
float const x_166 = result;
@@ -99,7 +99,7 @@
}
{
int const x_122 = i_1;
- i_1 = (x_122 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(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 2d76e0b..4324bef 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 @@
}
{
int const x_164 = i;
- i = (x_164 + 1);
+ i = as_type<int>((as_type<uint>(x_164) + as_type<uint>(1)));
}
}
float const x_166 = result;
@@ -99,7 +99,7 @@
}
{
int const x_122 = i_1;
- i_1 = (x_122 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_122) + as_type<uint>(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 f5841d1..f9b3b82 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 @@
int const x_261 = *(from);
i = x_261;
int const x_262 = *(mid);
- j = (x_262 + 1);
+ j = as_type<int>((as_type<uint>(x_262) + as_type<uint>(1)));
while (true) {
int const x_268 = i;
int const x_269 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_286) + as_type<uint>(1)));
int const x_288 = i;
- i = (x_288 + 1);
+ i = as_type<int>((as_type<uint>(x_288) + as_type<uint>(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<int>((as_type<uint>(x_293) + as_type<uint>(1)));
int const x_295 = j;
- j = (x_295 + 1);
+ j = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
int const x_298 = (*(tint_symbol_5)).arr[x_295];
(*(tint_symbol_6)).arr[x_293] = x_298;
}
@@ -63,9 +63,9 @@
break;
}
int const x_311 = k;
- k = (x_311 + 1);
+ k = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
int const x_313 = i;
- i = (x_313 + 1);
+ i = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
int const x_316 = (*(tint_symbol_5)).arr[x_313];
(*(tint_symbol_6)).arr[x_311] = x_316;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_327] = x_330;
{
int const x_332 = i_1;
- i_1 = (x_332 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_332) + as_type<uint>(1)));
}
}
return;
@@ -98,12 +98,12 @@
if ((x_338 >= 0.0f)) {
if (false) {
int const x_346 = *(high);
- x_336 = (x_346 << as_type<uint>(0));
+ x_336 = as_type<int>((as_type<uint>(x_346) << as_type<uint>(0)));
} else {
x_336 = 4;
}
int const x_348 = x_336;
- x_335 = (1 << as_type<uint>(x_348));
+ x_335 = as_type<int>((as_type<uint>(1) << as_type<uint>(x_348)));
} else {
x_335 = 1;
}
@@ -115,7 +115,7 @@
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<int>((as_type<uint>(2) * as_type<uint>(x_353))), as_type<int>((as_type<uint>(2) * as_type<uint>(x_355))), (as_type<int>((as_type<uint>(2) * as_type<uint>(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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_381) + as_type<uint>(x_382)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_385) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_386))))))) - as_type<uint>(1))), x_390);
int const x_392 = from_1;
param = x_392;
int const x_393 = mid_1;
@@ -173,12 +173,12 @@
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<int>((as_type<uint>(x_399) + as_type<uint>(x_398)));
}
}
{
int const x_401 = m_1;
- m_1 = (2 * x_401);
+ m_1 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_401)));
}
}
return;
@@ -248,7 +248,7 @@
}
}
int const x_131 = i_3;
- i_3 = (x_131 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_131) + as_type<uint>(1)));
{
int const x_133 = i_3;
if ((x_133 < 10)) {
@@ -270,7 +270,7 @@
(*(tint_symbol_12)).arr[x_142] = x_145;
{
int const x_147 = j_1;
- j_1 = (x_147 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_147) + as_type<uint>(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 eb075ff..20eced1 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 @@
int const x_261 = *(from);
i = x_261;
int const x_262 = *(mid);
- j = (x_262 + 1);
+ j = as_type<int>((as_type<uint>(x_262) + as_type<uint>(1)));
while (true) {
int const x_268 = i;
int const x_269 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_286) + as_type<uint>(1)));
int const x_288 = i;
- i = (x_288 + 1);
+ i = as_type<int>((as_type<uint>(x_288) + as_type<uint>(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<int>((as_type<uint>(x_293) + as_type<uint>(1)));
int const x_295 = j;
- j = (x_295 + 1);
+ j = as_type<int>((as_type<uint>(x_295) + as_type<uint>(1)));
int const x_298 = (*(tint_symbol_5)).arr[x_295];
(*(tint_symbol_6)).arr[x_293] = x_298;
}
@@ -63,9 +63,9 @@
break;
}
int const x_311 = k;
- k = (x_311 + 1);
+ k = as_type<int>((as_type<uint>(x_311) + as_type<uint>(1)));
int const x_313 = i;
- i = (x_313 + 1);
+ i = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
int const x_316 = (*(tint_symbol_5)).arr[x_313];
(*(tint_symbol_6)).arr[x_311] = x_316;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_327] = x_330;
{
int const x_332 = i_1;
- i_1 = (x_332 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_332) + as_type<uint>(1)));
}
}
return;
@@ -98,12 +98,12 @@
if ((x_338 >= 0.0f)) {
if (false) {
int const x_346 = *(high);
- x_336 = (x_346 << as_type<uint>(0));
+ x_336 = as_type<int>((as_type<uint>(x_346) << as_type<uint>(0)));
} else {
x_336 = 4;
}
int const x_348 = x_336;
- x_335 = (1 << as_type<uint>(x_348));
+ x_335 = as_type<int>((as_type<uint>(1) << as_type<uint>(x_348)));
} else {
x_335 = 1;
}
@@ -115,7 +115,7 @@
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<int>((as_type<uint>(2) * as_type<uint>(x_353))), as_type<int>((as_type<uint>(2) * as_type<uint>(x_355))), (as_type<int>((as_type<uint>(2) * as_type<uint>(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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_381) + as_type<uint>(x_382)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_385) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_386))))))) - as_type<uint>(1))), x_390);
int const x_392 = from_1;
param = x_392;
int const x_393 = mid_1;
@@ -173,12 +173,12 @@
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<int>((as_type<uint>(x_399) + as_type<uint>(x_398)));
}
}
{
int const x_401 = m_1;
- m_1 = (2 * x_401);
+ m_1 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_401)));
}
}
return;
@@ -248,7 +248,7 @@
}
}
int const x_131 = i_3;
- i_3 = (x_131 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_131) + as_type<uint>(1)));
{
int const x_133 = i_3;
if ((x_133 < 10)) {
@@ -270,7 +270,7 @@
(*(tint_symbol_12)).arr[x_142] = x_145;
{
int const x_147 = j_1;
- j_1 = (x_147 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_147) + as_type<uint>(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 80b6ad8..f04cff3 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 @@
break;
}
}
- int const x_66 = (x_65 + 1);
+ int const x_66 = as_type<int>((as_type<uint>(x_65) + as_type<uint>(1)));
{
x_65_phi = x_66;
if ((x_66 < 10)) {
@@ -93,7 +93,7 @@
{
int const x_99 = data.arr[x_93];
temp.arr[x_93] = x_99;
- x_94 = (x_93 + 1);
+ x_94 = as_type<int>((as_type<uint>(x_93) + as_type<uint>(1)));
x_93_phi = x_94;
}
}
@@ -121,10 +121,10 @@
} 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<int>((as_type<uint>(x_109) + as_type<uint>(x_102)));
+ int const x_116 = as_type<int>((as_type<uint>(x_115) - as_type<uint>(1)));
+ int const x_110 = as_type<int>((as_type<uint>(x_109) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_102))))));
+ int const x_119 = min(as_type<int>((as_type<uint>(x_110) - as_type<uint>(1))), 9);
x_121_phi = x_109;
x_124_phi = x_115;
x_126_phi = x_109;
@@ -144,15 +144,15 @@
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<int>((x_121 + as_type<int>(1)));
+ int const x_122 = as_type<int>(as_type<int>((as_type<uint>(x_121) + as_type<uint>(as_type<int>(1)))));
if ((x_134 < x_136)) {
- x_141 = as_type<int>((x_126 + as_type<int>(1)));
+ x_141 = as_type<int>(as_type<int>((as_type<uint>(x_126) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_124) + as_type<uint>(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 @@
break;
}
{
- x_149 = (x_148 + 1);
- x_152 = (x_151 + 1);
+ x_149 = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
+ x_152 = as_type<int>((as_type<uint>(x_151) + as_type<uint>(1)));
int const x_158 = data.arr[x_151];
temp.arr[x_148] = x_158;
x_148_phi = x_149;
@@ -197,7 +197,7 @@
{
int const x_167 = temp.arr[x_161];
data.arr[x_161] = x_167;
- x_162 = (x_161 + 1);
+ x_162 = as_type<int>((as_type<uint>(x_161) + as_type<uint>(1)));
x_161_phi = x_162;
}
}
@@ -206,7 +206,7 @@
}
}
{
- x_103 = (2 * x_102);
+ x_103 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_102)));
x_102_phi = x_103;
}
}
@@ -317,7 +317,7 @@
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<int>((as_type<uint>(x_259) + as_type<uint>(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 ae3ef06..3236547 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 @@
break;
}
}
- int const x_66 = (x_65 + 1);
+ int const x_66 = as_type<int>((as_type<uint>(x_65) + as_type<uint>(1)));
{
x_65_phi = x_66;
if ((x_66 < 10)) {
@@ -93,7 +93,7 @@
{
int const x_99 = data.arr[x_93];
temp.arr[x_93] = x_99;
- x_94 = (x_93 + 1);
+ x_94 = as_type<int>((as_type<uint>(x_93) + as_type<uint>(1)));
x_93_phi = x_94;
}
}
@@ -121,10 +121,10 @@
} 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<int>((as_type<uint>(x_109) + as_type<uint>(x_102)));
+ int const x_116 = as_type<int>((as_type<uint>(x_115) - as_type<uint>(1)));
+ int const x_110 = as_type<int>((as_type<uint>(x_109) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_102))))));
+ int const x_119 = min(as_type<int>((as_type<uint>(x_110) - as_type<uint>(1))), 9);
x_121_phi = x_109;
x_124_phi = x_115;
x_126_phi = x_109;
@@ -144,15 +144,15 @@
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<int>((x_121 + as_type<int>(1)));
+ int const x_122 = as_type<int>(as_type<int>((as_type<uint>(x_121) + as_type<uint>(as_type<int>(1)))));
if ((x_134 < x_136)) {
- x_141 = as_type<int>((x_126 + as_type<int>(1)));
+ x_141 = as_type<int>(as_type<int>((as_type<uint>(x_126) + as_type<uint>(as_type<int>(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<int>((as_type<uint>(x_124) + as_type<uint>(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 @@
break;
}
{
- x_149 = (x_148 + 1);
- x_152 = (x_151 + 1);
+ x_149 = as_type<int>((as_type<uint>(x_148) + as_type<uint>(1)));
+ x_152 = as_type<int>((as_type<uint>(x_151) + as_type<uint>(1)));
int const x_158 = data.arr[x_151];
temp.arr[x_148] = x_158;
x_148_phi = x_149;
@@ -197,7 +197,7 @@
{
int const x_167 = temp.arr[x_161];
data.arr[x_161] = x_167;
- x_162 = (x_161 + 1);
+ x_162 = as_type<int>((as_type<uint>(x_161) + as_type<uint>(1)));
x_161_phi = x_162;
}
}
@@ -206,7 +206,7 @@
}
}
{
- x_103 = (2 * x_102);
+ x_103 = as_type<int>((as_type<uint>(2) * as_type<uint>(x_102)));
x_102_phi = x_103;
}
}
@@ -317,7 +317,7 @@
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<int>((as_type<uint>(x_259) + as_type<uint>(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 0e73bb3..ad39028 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 @@
int const x_263 = *(from);
i = x_263;
int const x_264 = *(mid);
- j = (x_264 + 1);
+ j = as_type<int>((as_type<uint>(x_264) + as_type<uint>(1)));
while (true) {
int const x_270 = i;
int const x_271 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_288) + as_type<uint>(1)));
int const x_290 = i;
- i = (x_290 + 1);
+ i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(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<int>((as_type<uint>(x_295) + as_type<uint>(1)));
int const x_297 = j;
- j = (x_297 + 1);
+ j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
int const x_300 = (*(tint_symbol_5)).arr[x_297];
(*(tint_symbol_6)).arr[x_295] = x_300;
}
@@ -63,9 +63,9 @@
break;
}
int const x_313 = k;
- k = (x_313 + 1);
+ k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
int const x_315 = i;
- i = (x_315 + 1);
+ i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
int const x_318 = (*(tint_symbol_5)).arr[x_315];
(*(tint_symbol_6)).arr[x_313] = x_318;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_329] = x_332;
{
int const x_334 = i_1;
- i_1 = (x_334 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
}
}
return;
@@ -124,11 +124,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_355) + as_type<uint>(x_356)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_359) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_360))))))) - as_type<uint>(1))), x_364);
int const x_366 = from_1;
param = x_366;
int const x_367 = mid_1;
@@ -139,12 +139,12 @@
{
int const x_370 = m;
int const x_372 = i_2;
- i_2 = (x_372 + (2 * x_370));
+ i_2 = as_type<int>((as_type<uint>(x_372) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_370))))));
}
}
{
int const x_374 = m;
- m = (2 * x_374);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_374)));
}
}
return;
@@ -215,7 +215,7 @@
}
}
int const x_123 = i_3;
- i_3 = (x_123 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
{
int const x_125 = i_3;
if ((x_125 < 10)) {
@@ -237,7 +237,7 @@
(*(tint_symbol_10)).arr[x_134] = x_137;
{
int const x_139 = j_1;
- j_1 = (x_139 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(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 23be1b2..ba34077 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 @@
int const x_263 = *(from);
i = x_263;
int const x_264 = *(mid);
- j = (x_264 + 1);
+ j = as_type<int>((as_type<uint>(x_264) + as_type<uint>(1)));
while (true) {
int const x_270 = i;
int const x_271 = *(mid);
@@ -40,16 +40,16 @@
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<int>((as_type<uint>(x_288) + as_type<uint>(1)));
int const x_290 = i;
- i = (x_290 + 1);
+ i = as_type<int>((as_type<uint>(x_290) + as_type<uint>(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<int>((as_type<uint>(x_295) + as_type<uint>(1)));
int const x_297 = j;
- j = (x_297 + 1);
+ j = as_type<int>((as_type<uint>(x_297) + as_type<uint>(1)));
int const x_300 = (*(tint_symbol_5)).arr[x_297];
(*(tint_symbol_6)).arr[x_295] = x_300;
}
@@ -63,9 +63,9 @@
break;
}
int const x_313 = k;
- k = (x_313 + 1);
+ k = as_type<int>((as_type<uint>(x_313) + as_type<uint>(1)));
int const x_315 = i;
- i = (x_315 + 1);
+ i = as_type<int>((as_type<uint>(x_315) + as_type<uint>(1)));
int const x_318 = (*(tint_symbol_5)).arr[x_315];
(*(tint_symbol_6)).arr[x_313] = x_318;
}
@@ -84,7 +84,7 @@
(*(tint_symbol_5)).arr[x_329] = x_332;
{
int const x_334 = i_1;
- i_1 = (x_334 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
}
}
return;
@@ -124,11 +124,11 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_355) + as_type<uint>(x_356)))) - as_type<uint>(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<int>((as_type<uint>(as_type<int>((as_type<uint>(x_359) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_360))))))) - as_type<uint>(1))), x_364);
int const x_366 = from_1;
param = x_366;
int const x_367 = mid_1;
@@ -139,12 +139,12 @@
{
int const x_370 = m;
int const x_372 = i_2;
- i_2 = (x_372 + (2 * x_370));
+ i_2 = as_type<int>((as_type<uint>(x_372) + as_type<uint>(as_type<int>((as_type<uint>(2) * as_type<uint>(x_370))))));
}
}
{
int const x_374 = m;
- m = (2 * x_374);
+ m = as_type<int>((as_type<uint>(2) * as_type<uint>(x_374)));
}
}
return;
@@ -215,7 +215,7 @@
}
}
int const x_123 = i_3;
- i_3 = (x_123 + 1);
+ i_3 = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
{
int const x_125 = i_3;
if ((x_125 < 10)) {
@@ -237,7 +237,7 @@
(*(tint_symbol_10)).arr[x_134] = x_137;
{
int const x_139 = j_1;
- j_1 = (x_139 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(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 825cedb..fe68f09 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 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<int>((as_type<uint>(x_245) - as_type<uint>(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<int>((as_type<uint>(x_253) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_264) + as_type<uint>(1)));
int const x_266 = i_1;
param = x_266;
int const x_267 = j_1;
@@ -68,11 +68,11 @@
}
{
int const x_269 = j_1;
- j_1 = (x_269 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_269) + as_type<uint>(1)));
}
}
int const x_271 = i_1;
- i_1 = (x_271 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_271) + as_type<uint>(1)));
int const x_273 = i_1;
param_2 = x_273;
int const x_274 = *(h);
@@ -98,7 +98,7 @@
h_1 = 9;
top = -1;
int const x_280 = top;
- int const x_281 = (x_280 + 1);
+ int const x_281 = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
top = x_281;
int const x_282 = l_1;
stack.arr[x_281] = x_282;
@@ -109,7 +109,7 @@
x_279 = 1;
} else {
int const x_294 = h_1;
- x_279 = (x_294 << as_type<uint>(0));
+ x_279 = as_type<int>((as_type<uint>(x_294) << as_type<uint>(0)));
}
int const x_296 = x_279;
x_278 = (x_290 | x_296);
@@ -123,7 +123,7 @@
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<int>((as_type<uint>(x_303) + as_type<uint>(1)));
top = x_304;
int const x_305 = clamp_a;
stack.arr[x_304] = (x_305 / 1);
@@ -134,11 +134,11 @@
break;
}
int const x_315 = top;
- top = (x_315 - 1);
+ top = as_type<int>((as_type<uint>(x_315) - as_type<uint>(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<int>((as_type<uint>(x_319) - as_type<uint>(1)));
int const x_322 = stack.arr[x_319];
l_1 = x_322;
int const x_323 = l_1;
@@ -149,28 +149,28 @@
p = x_325;
int const x_326 = p;
int const x_328 = l_1;
- if (((x_326 - 1) > x_328)) {
+ if ((as_type<int>((as_type<uint>(x_326) - as_type<uint>(1))) > x_328)) {
int const x_332 = top;
- int const x_333 = (x_332 + 1);
+ int const x_333 = as_type<int>((as_type<uint>(x_332) + as_type<uint>(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<int>((as_type<uint>(x_336) + as_type<uint>(1)));
top = x_337;
int const x_338 = p;
- stack.arr[x_337] = (x_338 - 1);
+ stack.arr[x_337] = as_type<int>((as_type<uint>(x_338) - as_type<uint>(1)));
}
int const x_341 = p;
int const x_343 = h_1;
- if (((x_341 + 1) < x_343)) {
+ if ((as_type<int>((as_type<uint>(x_341) + as_type<uint>(1))) < x_343)) {
int const x_347 = top;
- int const x_348 = (x_347 + 1);
+ int const x_348 = as_type<int>((as_type<uint>(x_347) + as_type<uint>(1)));
top = x_348;
int const x_349 = p;
- stack.arr[x_348] = (x_349 + 1);
+ stack.arr[x_348] = as_type<int>((as_type<uint>(x_349) + as_type<uint>(1)));
int const x_352 = top;
- int const x_353 = (x_352 + 1);
+ int const x_353 = as_type<int>((as_type<uint>(x_352) + as_type<uint>(1)));
top = x_353;
int const x_354 = h_1;
stack.arr[x_353] = x_354;
@@ -192,16 +192,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_100) * as_type<uint>(x_103)));
{
int const x_106 = i_2;
- i_2 = (x_106 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_106) + as_type<uint>(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 825cedb..fe68f09 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 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<int>((as_type<uint>(x_245) - as_type<uint>(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<int>((as_type<uint>(x_253) - as_type<uint>(1))))) {
} else {
break;
}
@@ -59,7 +59,7 @@
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<int>((as_type<uint>(x_264) + as_type<uint>(1)));
int const x_266 = i_1;
param = x_266;
int const x_267 = j_1;
@@ -68,11 +68,11 @@
}
{
int const x_269 = j_1;
- j_1 = (x_269 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_269) + as_type<uint>(1)));
}
}
int const x_271 = i_1;
- i_1 = (x_271 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_271) + as_type<uint>(1)));
int const x_273 = i_1;
param_2 = x_273;
int const x_274 = *(h);
@@ -98,7 +98,7 @@
h_1 = 9;
top = -1;
int const x_280 = top;
- int const x_281 = (x_280 + 1);
+ int const x_281 = as_type<int>((as_type<uint>(x_280) + as_type<uint>(1)));
top = x_281;
int const x_282 = l_1;
stack.arr[x_281] = x_282;
@@ -109,7 +109,7 @@
x_279 = 1;
} else {
int const x_294 = h_1;
- x_279 = (x_294 << as_type<uint>(0));
+ x_279 = as_type<int>((as_type<uint>(x_294) << as_type<uint>(0)));
}
int const x_296 = x_279;
x_278 = (x_290 | x_296);
@@ -123,7 +123,7 @@
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<int>((as_type<uint>(x_303) + as_type<uint>(1)));
top = x_304;
int const x_305 = clamp_a;
stack.arr[x_304] = (x_305 / 1);
@@ -134,11 +134,11 @@
break;
}
int const x_315 = top;
- top = (x_315 - 1);
+ top = as_type<int>((as_type<uint>(x_315) - as_type<uint>(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<int>((as_type<uint>(x_319) - as_type<uint>(1)));
int const x_322 = stack.arr[x_319];
l_1 = x_322;
int const x_323 = l_1;
@@ -149,28 +149,28 @@
p = x_325;
int const x_326 = p;
int const x_328 = l_1;
- if (((x_326 - 1) > x_328)) {
+ if ((as_type<int>((as_type<uint>(x_326) - as_type<uint>(1))) > x_328)) {
int const x_332 = top;
- int const x_333 = (x_332 + 1);
+ int const x_333 = as_type<int>((as_type<uint>(x_332) + as_type<uint>(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<int>((as_type<uint>(x_336) + as_type<uint>(1)));
top = x_337;
int const x_338 = p;
- stack.arr[x_337] = (x_338 - 1);
+ stack.arr[x_337] = as_type<int>((as_type<uint>(x_338) - as_type<uint>(1)));
}
int const x_341 = p;
int const x_343 = h_1;
- if (((x_341 + 1) < x_343)) {
+ if ((as_type<int>((as_type<uint>(x_341) + as_type<uint>(1))) < x_343)) {
int const x_347 = top;
- int const x_348 = (x_347 + 1);
+ int const x_348 = as_type<int>((as_type<uint>(x_347) + as_type<uint>(1)));
top = x_348;
int const x_349 = p;
- stack.arr[x_348] = (x_349 + 1);
+ stack.arr[x_348] = as_type<int>((as_type<uint>(x_349) + as_type<uint>(1)));
int const x_352 = top;
- int const x_353 = (x_352 + 1);
+ int const x_353 = as_type<int>((as_type<uint>(x_352) + as_type<uint>(1)));
top = x_353;
int const x_354 = h_1;
stack.arr[x_353] = x_354;
@@ -192,16 +192,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_100) * as_type<uint>(x_103)));
{
int const x_106 = i_2;
- i_2 = (x_106 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_106) + as_type<uint>(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 f82023b..ea7fc7a 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 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<int>((as_type<uint>(x_254) - as_type<uint>(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<int>((as_type<uint>(x_262) - as_type<uint>(1))))) {
} else {
break;
}
@@ -64,7 +64,7 @@
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<int>((as_type<uint>(x_273) + as_type<uint>(1)));
int const x_275 = i_1;
param = x_275;
int const x_276 = j_1;
@@ -73,16 +73,16 @@
}
{
int const x_278 = j_1;
- j_1 = (x_278 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_278) + as_type<uint>(1)));
}
}
int const x_280 = i_1;
- param_2 = (x_280 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_280) + as_type<uint>(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<int>((as_type<uint>(x_284) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_8) {
@@ -97,12 +97,12 @@
h_1 = 9;
top = -1;
int const x_287 = top;
- int const x_288 = (x_287 + 1);
+ int const x_288 = as_type<int>((as_type<uint>(x_287) + as_type<uint>(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<int>((as_type<uint>(x_291) + as_type<uint>(1)));
top = x_292;
int const x_293 = h_1;
stack.arr[x_292] = x_293;
@@ -113,11 +113,11 @@
break;
}
int const x_302 = top;
- top = (x_302 - 1);
+ top = as_type<int>((as_type<uint>(x_302) - as_type<uint>(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<int>((as_type<uint>(x_306) - as_type<uint>(1)));
int const x_309 = stack.arr[x_306];
l_1 = x_309;
int const x_310 = l_1;
@@ -128,28 +128,28 @@
p = x_312;
int const x_313 = p;
int const x_315 = l_1;
- if (((x_313 - 1) > x_315)) {
+ if ((as_type<int>((as_type<uint>(x_313) - as_type<uint>(1))) > x_315)) {
int const x_319 = top;
- int const x_320 = (x_319 + 1);
+ int const x_320 = as_type<int>((as_type<uint>(x_319) + as_type<uint>(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<int>((as_type<uint>(x_323) + as_type<uint>(1)));
top = x_324;
int const x_325 = p;
- stack.arr[x_324] = (x_325 - 1);
+ stack.arr[x_324] = as_type<int>((as_type<uint>(x_325) - as_type<uint>(1)));
}
int const x_328 = p;
int const x_330 = h_1;
- if (((x_328 + 1) < x_330)) {
+ if ((as_type<int>((as_type<uint>(x_328) + as_type<uint>(1))) < x_330)) {
int const x_334 = top;
- int const x_335 = (x_334 + 1);
+ int const x_335 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
top = x_335;
int const x_336 = p;
- stack.arr[x_335] = (x_336 + 1);
+ stack.arr[x_335] = as_type<int>((as_type<uint>(x_336) + as_type<uint>(1)));
int const x_339 = top;
- int const x_340 = (x_339 + 1);
+ int const x_340 = as_type<int>((as_type<uint>(x_339) + as_type<uint>(1)));
top = x_340;
int const x_341 = h_1;
stack.arr[x_340] = x_341;
@@ -173,16 +173,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_107) * as_type<uint>(x_110)));
{
int const x_113 = i_2;
- i_2 = (x_113 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(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 f82023b..ea7fc7a 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 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<int>((as_type<uint>(x_254) - as_type<uint>(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<int>((as_type<uint>(x_262) - as_type<uint>(1))))) {
} else {
break;
}
@@ -64,7 +64,7 @@
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<int>((as_type<uint>(x_273) + as_type<uint>(1)));
int const x_275 = i_1;
param = x_275;
int const x_276 = j_1;
@@ -73,16 +73,16 @@
}
{
int const x_278 = j_1;
- j_1 = (x_278 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_278) + as_type<uint>(1)));
}
}
int const x_280 = i_1;
- param_2 = (x_280 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_280) + as_type<uint>(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<int>((as_type<uint>(x_284) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_8) {
@@ -97,12 +97,12 @@
h_1 = 9;
top = -1;
int const x_287 = top;
- int const x_288 = (x_287 + 1);
+ int const x_288 = as_type<int>((as_type<uint>(x_287) + as_type<uint>(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<int>((as_type<uint>(x_291) + as_type<uint>(1)));
top = x_292;
int const x_293 = h_1;
stack.arr[x_292] = x_293;
@@ -113,11 +113,11 @@
break;
}
int const x_302 = top;
- top = (x_302 - 1);
+ top = as_type<int>((as_type<uint>(x_302) - as_type<uint>(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<int>((as_type<uint>(x_306) - as_type<uint>(1)));
int const x_309 = stack.arr[x_306];
l_1 = x_309;
int const x_310 = l_1;
@@ -128,28 +128,28 @@
p = x_312;
int const x_313 = p;
int const x_315 = l_1;
- if (((x_313 - 1) > x_315)) {
+ if ((as_type<int>((as_type<uint>(x_313) - as_type<uint>(1))) > x_315)) {
int const x_319 = top;
- int const x_320 = (x_319 + 1);
+ int const x_320 = as_type<int>((as_type<uint>(x_319) + as_type<uint>(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<int>((as_type<uint>(x_323) + as_type<uint>(1)));
top = x_324;
int const x_325 = p;
- stack.arr[x_324] = (x_325 - 1);
+ stack.arr[x_324] = as_type<int>((as_type<uint>(x_325) - as_type<uint>(1)));
}
int const x_328 = p;
int const x_330 = h_1;
- if (((x_328 + 1) < x_330)) {
+ if ((as_type<int>((as_type<uint>(x_328) + as_type<uint>(1))) < x_330)) {
int const x_334 = top;
- int const x_335 = (x_334 + 1);
+ int const x_335 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
top = x_335;
int const x_336 = p;
- stack.arr[x_335] = (x_336 + 1);
+ stack.arr[x_335] = as_type<int>((as_type<uint>(x_336) + as_type<uint>(1)));
int const x_339 = top;
- int const x_340 = (x_339 + 1);
+ int const x_340 = as_type<int>((as_type<uint>(x_339) + as_type<uint>(1)));
top = x_340;
int const x_341 = h_1;
stack.arr[x_340] = x_341;
@@ -173,16 +173,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_107) * as_type<uint>(x_110)));
{
int const x_113 = i_2;
- i_2 = (x_113 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_113) + as_type<uint>(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 fae0fc6..865d472 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 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<int>((as_type<uint>(x_265) - as_type<uint>(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<int>((as_type<uint>(x_273) - as_type<uint>(1))))) {
} else {
break;
}
@@ -67,7 +67,7 @@
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<int>((as_type<uint>(x_284) + as_type<uint>(1)));
int const x_286 = i_1;
param = x_286;
int const x_287 = j_1;
@@ -76,16 +76,16 @@
}
{
int const x_289 = j_1;
- j_1 = (x_289 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
}
}
int const x_291 = i_1;
- param_2 = (x_291 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(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<int>((as_type<uint>(x_295) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_8) {
@@ -100,12 +100,12 @@
h_1 = 9;
top = -1;
int const x_298 = top;
- int const x_299 = (x_298 + 1);
+ int const x_299 = as_type<int>((as_type<uint>(x_298) + as_type<uint>(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<int>((as_type<uint>(x_302) + as_type<uint>(1)));
top = x_303;
int const x_304 = h_1;
stack.arr[x_303] = x_304;
@@ -116,11 +116,11 @@
break;
}
int const x_313 = top;
- top = (x_313 - 1);
+ top = as_type<int>((as_type<uint>(x_313) - as_type<uint>(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<int>((as_type<uint>(x_317) - as_type<uint>(1)));
int const x_320 = stack.arr[x_317];
l_1 = x_320;
int const x_321 = l_1;
@@ -131,28 +131,28 @@
p = x_323;
int const x_324 = p;
int const x_326 = l_1;
- if (((x_324 - 1) > x_326)) {
+ if ((as_type<int>((as_type<uint>(x_324) - as_type<uint>(1))) > x_326)) {
int const x_330 = top;
- int const x_331 = (x_330 + 1);
+ int const x_331 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(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<int>((as_type<uint>(x_334) + as_type<uint>(1)));
top = x_335;
int const x_336 = p;
- stack.arr[x_335] = (x_336 - 1);
+ stack.arr[x_335] = as_type<int>((as_type<uint>(x_336) - as_type<uint>(1)));
}
int const x_339 = p;
int const x_341 = h_1;
- if (((x_339 + 1) < x_341)) {
+ if ((as_type<int>((as_type<uint>(x_339) + as_type<uint>(1))) < x_341)) {
int const x_345 = top;
- int const x_346 = (x_345 + 1);
+ int const x_346 = as_type<int>((as_type<uint>(x_345) + as_type<uint>(1)));
top = x_346;
int const x_347 = p;
- stack.arr[x_346] = (x_347 + 1);
+ stack.arr[x_346] = as_type<int>((as_type<uint>(x_347) + as_type<uint>(1)));
int const x_350 = top;
- int const x_351 = (x_350 + 1);
+ int const x_351 = as_type<int>((as_type<uint>(x_350) + as_type<uint>(1)));
top = x_351;
int const x_352 = h_1;
stack.arr[x_351] = x_352;
@@ -176,7 +176,7 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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 @@
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<int>((as_type<uint>(x_118) * as_type<uint>(x_121)));
{
int const x_124 = i_2;
- i_2 = (x_124 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(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 fae0fc6..865d472 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 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<int>((as_type<uint>(x_265) - as_type<uint>(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<int>((as_type<uint>(x_273) - as_type<uint>(1))))) {
} else {
break;
}
@@ -67,7 +67,7 @@
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<int>((as_type<uint>(x_284) + as_type<uint>(1)));
int const x_286 = i_1;
param = x_286;
int const x_287 = j_1;
@@ -76,16 +76,16 @@
}
{
int const x_289 = j_1;
- j_1 = (x_289 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_289) + as_type<uint>(1)));
}
}
int const x_291 = i_1;
- param_2 = (x_291 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_291) + as_type<uint>(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<int>((as_type<uint>(x_295) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_8) {
@@ -100,12 +100,12 @@
h_1 = 9;
top = -1;
int const x_298 = top;
- int const x_299 = (x_298 + 1);
+ int const x_299 = as_type<int>((as_type<uint>(x_298) + as_type<uint>(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<int>((as_type<uint>(x_302) + as_type<uint>(1)));
top = x_303;
int const x_304 = h_1;
stack.arr[x_303] = x_304;
@@ -116,11 +116,11 @@
break;
}
int const x_313 = top;
- top = (x_313 - 1);
+ top = as_type<int>((as_type<uint>(x_313) - as_type<uint>(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<int>((as_type<uint>(x_317) - as_type<uint>(1)));
int const x_320 = stack.arr[x_317];
l_1 = x_320;
int const x_321 = l_1;
@@ -131,28 +131,28 @@
p = x_323;
int const x_324 = p;
int const x_326 = l_1;
- if (((x_324 - 1) > x_326)) {
+ if ((as_type<int>((as_type<uint>(x_324) - as_type<uint>(1))) > x_326)) {
int const x_330 = top;
- int const x_331 = (x_330 + 1);
+ int const x_331 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(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<int>((as_type<uint>(x_334) + as_type<uint>(1)));
top = x_335;
int const x_336 = p;
- stack.arr[x_335] = (x_336 - 1);
+ stack.arr[x_335] = as_type<int>((as_type<uint>(x_336) - as_type<uint>(1)));
}
int const x_339 = p;
int const x_341 = h_1;
- if (((x_339 + 1) < x_341)) {
+ if ((as_type<int>((as_type<uint>(x_339) + as_type<uint>(1))) < x_341)) {
int const x_345 = top;
- int const x_346 = (x_345 + 1);
+ int const x_346 = as_type<int>((as_type<uint>(x_345) + as_type<uint>(1)));
top = x_346;
int const x_347 = p;
- stack.arr[x_346] = (x_347 + 1);
+ stack.arr[x_346] = as_type<int>((as_type<uint>(x_347) + as_type<uint>(1)));
int const x_350 = top;
- int const x_351 = (x_350 + 1);
+ int const x_351 = as_type<int>((as_type<uint>(x_350) + as_type<uint>(1)));
top = x_351;
int const x_352 = h_1;
stack.arr[x_351] = x_352;
@@ -176,7 +176,7 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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 @@
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<int>((as_type<uint>(x_118) * as_type<uint>(x_121)));
{
int const x_124 = i_2;
- i_2 = (x_124 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_124) + as_type<uint>(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 45ba09a..c34f593 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 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_124) * as_type<uint>(x_127)));
{
int const x_130 = i_2;
- i_2 = (x_130 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(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<int>((as_type<uint>(x_132) + as_type<uint>(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<int>((as_type<uint>(x_136) + as_type<uint>(1)));
x_102 = x_137;
int const x_138 = x_101;
x_103.arr[x_137] = x_138;
@@ -86,11 +86,11 @@
break;
}
int const x_147 = x_102;
- x_102 = (x_147 - 1);
+ x_102 = as_type<int>((as_type<uint>(x_147) - as_type<uint>(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<int>((as_type<uint>(x_151) - as_type<uint>(1)));
int const x_154 = x_103.arr[x_151];
x_100 = x_154;
int const x_155 = x_100;
@@ -101,13 +101,13 @@
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<int>((as_type<uint>(x_160) - as_type<uint>(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<int>((as_type<uint>(x_168) - as_type<uint>(1))))) {
} else {
break;
}
@@ -116,7 +116,7 @@
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<int>((as_type<uint>(x_179) + as_type<uint>(1)));
int const x_181 = x_93;
x_95 = x_181;
int const x_182 = x_94;
@@ -134,11 +134,11 @@
}
{
int const x_194 = x_94;
- x_94 = (x_194 + 1);
+ x_94 = as_type<int>((as_type<uint>(x_194) + as_type<uint>(1)));
}
}
int const x_196 = x_93;
- x_97 = (x_196 + 1);
+ x_97 = as_type<int>((as_type<uint>(x_196) + as_type<uint>(1)));
int const x_198 = x_106;
x_98 = x_198;
int const x_199 = x_97;
@@ -152,33 +152,33 @@
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<int>((as_type<uint>(x_210) + as_type<uint>(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<int>((as_type<uint>(x_213) - as_type<uint>(1))) > x_215)) {
int const x_219 = x_102;
- int const x_220 = (x_219 + 1);
+ int const x_220 = as_type<int>((as_type<uint>(x_219) + as_type<uint>(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<int>((as_type<uint>(x_223) + as_type<uint>(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<int>((as_type<uint>(x_225) - as_type<uint>(1)));
}
int const x_228 = x_104;
int const x_230 = x_101;
- if (((x_228 + 1) < x_230)) {
+ if ((as_type<int>((as_type<uint>(x_228) + as_type<uint>(1))) < x_230)) {
int const x_234 = x_102;
- int const x_235 = (x_234 + 1);
+ int const x_235 = as_type<int>((as_type<uint>(x_234) + as_type<uint>(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<int>((as_type<uint>(x_236) + as_type<uint>(1)));
int const x_239 = x_102;
- int const x_240 = (x_239 + 1);
+ int const x_240 = as_type<int>((as_type<uint>(x_239) + as_type<uint>(1)));
x_102 = x_240;
int const x_241 = x_101;
x_103.arr[x_240] = x_241;
@@ -289,13 +289,13 @@
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<int>((as_type<uint>(x_381) - as_type<uint>(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<int>((as_type<uint>(x_389) - as_type<uint>(1))))) {
} else {
break;
}
@@ -304,7 +304,7 @@
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<int>((as_type<uint>(x_400) + as_type<uint>(1)));
int const x_402 = i_1;
param = x_402;
int const x_403 = j_1;
@@ -313,16 +313,16 @@
}
{
int const x_405 = j_1;
- j_1 = (x_405 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_405) + as_type<uint>(1)));
}
}
int const x_407 = i_1;
- param_2 = (x_407 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_407) + as_type<uint>(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<int>((as_type<uint>(x_411) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_18) {
@@ -337,12 +337,12 @@
h_1 = 9;
top = -1;
int const x_414 = top;
- int const x_415 = (x_414 + 1);
+ int const x_415 = as_type<int>((as_type<uint>(x_414) + as_type<uint>(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<int>((as_type<uint>(x_418) + as_type<uint>(1)));
top = x_419;
int const x_420 = h_1;
stack.arr[x_419] = x_420;
@@ -353,11 +353,11 @@
break;
}
int const x_429 = top;
- top = (x_429 - 1);
+ top = as_type<int>((as_type<uint>(x_429) - as_type<uint>(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<int>((as_type<uint>(x_433) - as_type<uint>(1)));
int const x_436 = stack.arr[x_433];
l_1 = x_436;
int const x_437 = l_1;
@@ -368,28 +368,28 @@
p = x_439;
int const x_440 = p;
int const x_442 = l_1;
- if (((x_440 - 1) > x_442)) {
+ if ((as_type<int>((as_type<uint>(x_440) - as_type<uint>(1))) > x_442)) {
int const x_446 = top;
- int const x_447 = (x_446 + 1);
+ int const x_447 = as_type<int>((as_type<uint>(x_446) + as_type<uint>(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<int>((as_type<uint>(x_450) + as_type<uint>(1)));
top = x_451;
int const x_452 = p;
- stack.arr[x_451] = (x_452 - 1);
+ stack.arr[x_451] = as_type<int>((as_type<uint>(x_452) - as_type<uint>(1)));
}
int const x_455 = p;
int const x_457 = h_1;
- if (((x_455 + 1) < x_457)) {
+ if ((as_type<int>((as_type<uint>(x_455) + as_type<uint>(1))) < x_457)) {
int const x_461 = top;
- int const x_462 = (x_461 + 1);
+ int const x_462 = as_type<int>((as_type<uint>(x_461) + as_type<uint>(1)));
top = x_462;
int const x_463 = p;
- stack.arr[x_462] = (x_463 + 1);
+ stack.arr[x_462] = as_type<int>((as_type<uint>(x_463) + as_type<uint>(1)));
int const x_466 = top;
- int const x_467 = (x_466 + 1);
+ int const x_467 = as_type<int>((as_type<uint>(x_466) + as_type<uint>(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 45ba09a..c34f593 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 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_124) * as_type<uint>(x_127)));
{
int const x_130 = i_2;
- i_2 = (x_130 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_130) + as_type<uint>(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<int>((as_type<uint>(x_132) + as_type<uint>(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<int>((as_type<uint>(x_136) + as_type<uint>(1)));
x_102 = x_137;
int const x_138 = x_101;
x_103.arr[x_137] = x_138;
@@ -86,11 +86,11 @@
break;
}
int const x_147 = x_102;
- x_102 = (x_147 - 1);
+ x_102 = as_type<int>((as_type<uint>(x_147) - as_type<uint>(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<int>((as_type<uint>(x_151) - as_type<uint>(1)));
int const x_154 = x_103.arr[x_151];
x_100 = x_154;
int const x_155 = x_100;
@@ -101,13 +101,13 @@
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<int>((as_type<uint>(x_160) - as_type<uint>(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<int>((as_type<uint>(x_168) - as_type<uint>(1))))) {
} else {
break;
}
@@ -116,7 +116,7 @@
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<int>((as_type<uint>(x_179) + as_type<uint>(1)));
int const x_181 = x_93;
x_95 = x_181;
int const x_182 = x_94;
@@ -134,11 +134,11 @@
}
{
int const x_194 = x_94;
- x_94 = (x_194 + 1);
+ x_94 = as_type<int>((as_type<uint>(x_194) + as_type<uint>(1)));
}
}
int const x_196 = x_93;
- x_97 = (x_196 + 1);
+ x_97 = as_type<int>((as_type<uint>(x_196) + as_type<uint>(1)));
int const x_198 = x_106;
x_98 = x_198;
int const x_199 = x_97;
@@ -152,33 +152,33 @@
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<int>((as_type<uint>(x_210) + as_type<uint>(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<int>((as_type<uint>(x_213) - as_type<uint>(1))) > x_215)) {
int const x_219 = x_102;
- int const x_220 = (x_219 + 1);
+ int const x_220 = as_type<int>((as_type<uint>(x_219) + as_type<uint>(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<int>((as_type<uint>(x_223) + as_type<uint>(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<int>((as_type<uint>(x_225) - as_type<uint>(1)));
}
int const x_228 = x_104;
int const x_230 = x_101;
- if (((x_228 + 1) < x_230)) {
+ if ((as_type<int>((as_type<uint>(x_228) + as_type<uint>(1))) < x_230)) {
int const x_234 = x_102;
- int const x_235 = (x_234 + 1);
+ int const x_235 = as_type<int>((as_type<uint>(x_234) + as_type<uint>(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<int>((as_type<uint>(x_236) + as_type<uint>(1)));
int const x_239 = x_102;
- int const x_240 = (x_239 + 1);
+ int const x_240 = as_type<int>((as_type<uint>(x_239) + as_type<uint>(1)));
x_102 = x_240;
int const x_241 = x_101;
x_103.arr[x_240] = x_241;
@@ -289,13 +289,13 @@
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<int>((as_type<uint>(x_381) - as_type<uint>(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<int>((as_type<uint>(x_389) - as_type<uint>(1))))) {
} else {
break;
}
@@ -304,7 +304,7 @@
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<int>((as_type<uint>(x_400) + as_type<uint>(1)));
int const x_402 = i_1;
param = x_402;
int const x_403 = j_1;
@@ -313,16 +313,16 @@
}
{
int const x_405 = j_1;
- j_1 = (x_405 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_405) + as_type<uint>(1)));
}
}
int const x_407 = i_1;
- param_2 = (x_407 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_407) + as_type<uint>(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<int>((as_type<uint>(x_411) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_18) {
@@ -337,12 +337,12 @@
h_1 = 9;
top = -1;
int const x_414 = top;
- int const x_415 = (x_414 + 1);
+ int const x_415 = as_type<int>((as_type<uint>(x_414) + as_type<uint>(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<int>((as_type<uint>(x_418) + as_type<uint>(1)));
top = x_419;
int const x_420 = h_1;
stack.arr[x_419] = x_420;
@@ -353,11 +353,11 @@
break;
}
int const x_429 = top;
- top = (x_429 - 1);
+ top = as_type<int>((as_type<uint>(x_429) - as_type<uint>(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<int>((as_type<uint>(x_433) - as_type<uint>(1)));
int const x_436 = stack.arr[x_433];
l_1 = x_436;
int const x_437 = l_1;
@@ -368,28 +368,28 @@
p = x_439;
int const x_440 = p;
int const x_442 = l_1;
- if (((x_440 - 1) > x_442)) {
+ if ((as_type<int>((as_type<uint>(x_440) - as_type<uint>(1))) > x_442)) {
int const x_446 = top;
- int const x_447 = (x_446 + 1);
+ int const x_447 = as_type<int>((as_type<uint>(x_446) + as_type<uint>(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<int>((as_type<uint>(x_450) + as_type<uint>(1)));
top = x_451;
int const x_452 = p;
- stack.arr[x_451] = (x_452 - 1);
+ stack.arr[x_451] = as_type<int>((as_type<uint>(x_452) - as_type<uint>(1)));
}
int const x_455 = p;
int const x_457 = h_1;
- if (((x_455 + 1) < x_457)) {
+ if ((as_type<int>((as_type<uint>(x_455) + as_type<uint>(1))) < x_457)) {
int const x_461 = top;
- int const x_462 = (x_461 + 1);
+ int const x_462 = as_type<int>((as_type<uint>(x_461) + as_type<uint>(1)));
top = x_462;
int const x_463 = p;
- stack.arr[x_462] = (x_463 + 1);
+ stack.arr[x_462] = as_type<int>((as_type<uint>(x_463) + as_type<uint>(1)));
int const x_466 = top;
- int const x_467 = (x_466 + 1);
+ int const x_467 = as_type<int>((as_type<uint>(x_466) + as_type<uint>(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 f6f5a8a..c4cabb8 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 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<int>((as_type<uint>(x_319) - as_type<uint>(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<int>((as_type<uint>(x_327) - as_type<uint>(1))))) {
} else {
break;
}
@@ -51,7 +51,7 @@
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<int>((as_type<uint>(x_338) + as_type<uint>(1)));
int const x_340 = i_1;
param = x_340;
int const x_341 = j_1;
@@ -69,11 +69,11 @@
}
{
int const x_353 = j_1;
- j_1 = (x_353 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_353) + as_type<uint>(1)));
}
}
int const x_355 = i_1;
- param_2 = (x_355 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
int const x_357 = *(h);
param_3 = x_357;
int const x_358 = param_2;
@@ -89,7 +89,7 @@
if (false) {
} else {
int const x_372 = i_1;
- return (x_372 + 1);
+ return as_type<int>((as_type<uint>(x_372) + as_type<uint>(1)));
}
return 0;
}
@@ -116,28 +116,28 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_115) * as_type<uint>(x_118)));
{
int const x_121 = i_2;
- i_2 = (x_121 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_121) + as_type<uint>(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<int>((as_type<uint>(x_123) + as_type<uint>(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<int>((as_type<uint>(x_127) + as_type<uint>(1)));
x_93 = x_128;
int const x_129 = x_92;
x_94.arr[x_128] = x_129;
@@ -148,11 +148,11 @@
break;
}
int const x_138 = x_93;
- x_93 = (x_138 - 1);
+ x_93 = as_type<int>((as_type<uint>(x_138) - as_type<uint>(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<int>((as_type<uint>(x_142) - as_type<uint>(1)));
int const x_145 = x_94.arr[x_142];
x_91 = x_145;
int const x_146 = x_91;
@@ -163,28 +163,28 @@
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<int>((as_type<uint>(x_149) - as_type<uint>(1))) > x_151)) {
int const x_155 = x_93;
- int const x_156 = (x_155 + 1);
+ int const x_156 = as_type<int>((as_type<uint>(x_155) + as_type<uint>(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<int>((as_type<uint>(x_159) + as_type<uint>(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<int>((as_type<uint>(x_161) - as_type<uint>(1)));
}
int const x_164 = x_95;
int const x_166 = x_92;
- if (((x_164 + 1) < x_166)) {
+ if ((as_type<int>((as_type<uint>(x_164) + as_type<uint>(1))) < x_166)) {
int const x_170 = x_93;
- int const x_171 = (x_170 + 1);
+ int const x_171 = as_type<int>((as_type<uint>(x_170) + as_type<uint>(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<int>((as_type<uint>(x_172) + as_type<uint>(1)));
int const x_175 = x_93;
- int const x_176 = (x_175 + 1);
+ int const x_176 = as_type<int>((as_type<uint>(x_175) + as_type<uint>(1)));
x_93 = x_176;
int const x_177 = x_92;
x_94.arr[x_176] = x_177;
@@ -295,12 +295,12 @@
h_1 = 9;
top = -1;
int const x_376 = top;
- int const x_377 = (x_376 + 1);
+ int const x_377 = as_type<int>((as_type<uint>(x_376) + as_type<uint>(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<int>((as_type<uint>(x_380) + as_type<uint>(1)));
top = x_381;
int const x_382 = h_1;
stack.arr[x_381] = x_382;
@@ -311,11 +311,11 @@
break;
}
int const x_391 = top;
- top = (x_391 - 1);
+ top = as_type<int>((as_type<uint>(x_391) - as_type<uint>(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<int>((as_type<uint>(x_395) - as_type<uint>(1)));
int const x_398 = stack.arr[x_395];
l_1 = x_398;
int const x_399 = l_1;
@@ -326,28 +326,28 @@
p = x_401;
int const x_402 = p;
int const x_404 = l_1;
- if (((x_402 - 1) > x_404)) {
+ if ((as_type<int>((as_type<uint>(x_402) - as_type<uint>(1))) > x_404)) {
int const x_408 = top;
- int const x_409 = (x_408 + 1);
+ int const x_409 = as_type<int>((as_type<uint>(x_408) + as_type<uint>(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<int>((as_type<uint>(x_412) + as_type<uint>(1)));
top = x_413;
int const x_414 = p;
- stack.arr[x_413] = (x_414 - 1);
+ stack.arr[x_413] = as_type<int>((as_type<uint>(x_414) - as_type<uint>(1)));
}
int const x_417 = p;
int const x_419 = h_1;
- if (((x_417 + 1) < x_419)) {
+ if ((as_type<int>((as_type<uint>(x_417) + as_type<uint>(1))) < x_419)) {
int const x_423 = top;
- int const x_424 = (x_423 + 1);
+ int const x_424 = as_type<int>((as_type<uint>(x_423) + as_type<uint>(1)));
top = x_424;
int const x_425 = p;
- stack.arr[x_424] = (x_425 + 1);
+ stack.arr[x_424] = as_type<int>((as_type<uint>(x_425) + as_type<uint>(1)));
int const x_428 = top;
- int const x_429 = (x_428 + 1);
+ int const x_429 = as_type<int>((as_type<uint>(x_428) + as_type<uint>(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 f6f5a8a..c4cabb8 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 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<int>((as_type<uint>(x_319) - as_type<uint>(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<int>((as_type<uint>(x_327) - as_type<uint>(1))))) {
} else {
break;
}
@@ -51,7 +51,7 @@
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<int>((as_type<uint>(x_338) + as_type<uint>(1)));
int const x_340 = i_1;
param = x_340;
int const x_341 = j_1;
@@ -69,11 +69,11 @@
}
{
int const x_353 = j_1;
- j_1 = (x_353 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_353) + as_type<uint>(1)));
}
}
int const x_355 = i_1;
- param_2 = (x_355 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_355) + as_type<uint>(1)));
int const x_357 = *(h);
param_3 = x_357;
int const x_358 = param_2;
@@ -89,7 +89,7 @@
if (false) {
} else {
int const x_372 = i_1;
- return (x_372 + 1);
+ return as_type<int>((as_type<uint>(x_372) + as_type<uint>(1)));
}
return 0;
}
@@ -116,28 +116,28 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_115) * as_type<uint>(x_118)));
{
int const x_121 = i_2;
- i_2 = (x_121 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_121) + as_type<uint>(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<int>((as_type<uint>(x_123) + as_type<uint>(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<int>((as_type<uint>(x_127) + as_type<uint>(1)));
x_93 = x_128;
int const x_129 = x_92;
x_94.arr[x_128] = x_129;
@@ -148,11 +148,11 @@
break;
}
int const x_138 = x_93;
- x_93 = (x_138 - 1);
+ x_93 = as_type<int>((as_type<uint>(x_138) - as_type<uint>(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<int>((as_type<uint>(x_142) - as_type<uint>(1)));
int const x_145 = x_94.arr[x_142];
x_91 = x_145;
int const x_146 = x_91;
@@ -163,28 +163,28 @@
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<int>((as_type<uint>(x_149) - as_type<uint>(1))) > x_151)) {
int const x_155 = x_93;
- int const x_156 = (x_155 + 1);
+ int const x_156 = as_type<int>((as_type<uint>(x_155) + as_type<uint>(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<int>((as_type<uint>(x_159) + as_type<uint>(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<int>((as_type<uint>(x_161) - as_type<uint>(1)));
}
int const x_164 = x_95;
int const x_166 = x_92;
- if (((x_164 + 1) < x_166)) {
+ if ((as_type<int>((as_type<uint>(x_164) + as_type<uint>(1))) < x_166)) {
int const x_170 = x_93;
- int const x_171 = (x_170 + 1);
+ int const x_171 = as_type<int>((as_type<uint>(x_170) + as_type<uint>(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<int>((as_type<uint>(x_172) + as_type<uint>(1)));
int const x_175 = x_93;
- int const x_176 = (x_175 + 1);
+ int const x_176 = as_type<int>((as_type<uint>(x_175) + as_type<uint>(1)));
x_93 = x_176;
int const x_177 = x_92;
x_94.arr[x_176] = x_177;
@@ -295,12 +295,12 @@
h_1 = 9;
top = -1;
int const x_376 = top;
- int const x_377 = (x_376 + 1);
+ int const x_377 = as_type<int>((as_type<uint>(x_376) + as_type<uint>(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<int>((as_type<uint>(x_380) + as_type<uint>(1)));
top = x_381;
int const x_382 = h_1;
stack.arr[x_381] = x_382;
@@ -311,11 +311,11 @@
break;
}
int const x_391 = top;
- top = (x_391 - 1);
+ top = as_type<int>((as_type<uint>(x_391) - as_type<uint>(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<int>((as_type<uint>(x_395) - as_type<uint>(1)));
int const x_398 = stack.arr[x_395];
l_1 = x_398;
int const x_399 = l_1;
@@ -326,28 +326,28 @@
p = x_401;
int const x_402 = p;
int const x_404 = l_1;
- if (((x_402 - 1) > x_404)) {
+ if ((as_type<int>((as_type<uint>(x_402) - as_type<uint>(1))) > x_404)) {
int const x_408 = top;
- int const x_409 = (x_408 + 1);
+ int const x_409 = as_type<int>((as_type<uint>(x_408) + as_type<uint>(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<int>((as_type<uint>(x_412) + as_type<uint>(1)));
top = x_413;
int const x_414 = p;
- stack.arr[x_413] = (x_414 - 1);
+ stack.arr[x_413] = as_type<int>((as_type<uint>(x_414) - as_type<uint>(1)));
}
int const x_417 = p;
int const x_419 = h_1;
- if (((x_417 + 1) < x_419)) {
+ if ((as_type<int>((as_type<uint>(x_417) + as_type<uint>(1))) < x_419)) {
int const x_423 = top;
- int const x_424 = (x_423 + 1);
+ int const x_424 = as_type<int>((as_type<uint>(x_423) + as_type<uint>(1)));
top = x_424;
int const x_425 = p;
- stack.arr[x_424] = (x_425 + 1);
+ stack.arr[x_424] = as_type<int>((as_type<uint>(x_425) + as_type<uint>(1)));
int const x_428 = top;
- int const x_429 = (x_428 + 1);
+ int const x_429 = as_type<int>((as_type<uint>(x_428) + as_type<uint>(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 99d5039..f8dc575 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 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<int>((as_type<uint>(x_272) - as_type<uint>(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<int>((as_type<uint>(x_280) - as_type<uint>(1))))) {
} else {
break;
}
@@ -67,7 +67,7 @@
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<int>((as_type<uint>(x_291) + as_type<uint>(1)));
int const x_293 = i_1;
param = x_293;
int const x_294 = j_1;
@@ -76,16 +76,16 @@
}
{
int const x_296 = j_1;
- j_1 = (x_296 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_296) + as_type<uint>(1)));
}
}
int const x_298 = i_1;
- param_2 = (x_298 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_298) + as_type<uint>(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<int>((as_type<uint>(x_302) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_8) {
@@ -100,12 +100,12 @@
h_1 = 9;
top = -1;
int const x_305 = top;
- int const x_306 = (x_305 + 1);
+ int const x_306 = as_type<int>((as_type<uint>(x_305) + as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(1)));
top = x_310;
int const x_311 = h_1;
stack.arr[x_310] = x_311;
@@ -116,11 +116,11 @@
break;
}
int const x_320 = top;
- top = (x_320 - 1);
+ top = as_type<int>((as_type<uint>(x_320) - as_type<uint>(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<int>((as_type<uint>(x_324) - as_type<uint>(1)));
int const x_327 = stack.arr[x_324];
l_1 = x_327;
int const x_328 = l_1;
@@ -131,28 +131,28 @@
p = x_330;
int const x_331 = p;
int const x_333 = l_1;
- if (((x_331 - 1) > x_333)) {
+ if ((as_type<int>((as_type<uint>(x_331) - as_type<uint>(1))) > x_333)) {
int const x_337 = top;
- int const x_338 = (x_337 + 1);
+ int const x_338 = as_type<int>((as_type<uint>(x_337) + as_type<uint>(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<int>((as_type<uint>(x_341) + as_type<uint>(1)));
top = x_342;
int const x_343 = p;
- stack.arr[x_342] = (x_343 - 1);
+ stack.arr[x_342] = as_type<int>((as_type<uint>(x_343) - as_type<uint>(1)));
}
int const x_346 = p;
int const x_348 = h_1;
- if (((x_346 + 1) < x_348)) {
+ if ((as_type<int>((as_type<uint>(x_346) + as_type<uint>(1))) < x_348)) {
int const x_352 = top;
- int const x_353 = (x_352 + 1);
+ int const x_353 = as_type<int>((as_type<uint>(x_352) + as_type<uint>(1)));
top = x_353;
int const x_354 = p;
- stack.arr[x_353] = (x_354 + 1);
+ stack.arr[x_353] = as_type<int>((as_type<uint>(x_354) + as_type<uint>(1)));
int const x_357 = top;
- int const x_358 = (x_357 + 1);
+ int const x_358 = as_type<int>((as_type<uint>(x_357) + as_type<uint>(1)));
top = x_358;
int const x_359 = h_1;
stack.arr[x_358] = x_359;
@@ -176,16 +176,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_111) * as_type<uint>(x_114)));
{
int const x_117 = i_2;
- i_2 = (x_117 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
}
}
quicksort_(tint_symbol_11);
@@ -205,9 +205,9 @@
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<int>((as_type<uint>(2) * as_type<uint>(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<int>((as_type<uint>(2) * as_type<uint>(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 99d5039..f8dc575 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 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<int>((as_type<uint>(x_272) - as_type<uint>(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<int>((as_type<uint>(x_280) - as_type<uint>(1))))) {
} else {
break;
}
@@ -67,7 +67,7 @@
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<int>((as_type<uint>(x_291) + as_type<uint>(1)));
int const x_293 = i_1;
param = x_293;
int const x_294 = j_1;
@@ -76,16 +76,16 @@
}
{
int const x_296 = j_1;
- j_1 = (x_296 + 1);
+ j_1 = as_type<int>((as_type<uint>(x_296) + as_type<uint>(1)));
}
}
int const x_298 = i_1;
- param_2 = (x_298 + 1);
+ param_2 = as_type<int>((as_type<uint>(x_298) + as_type<uint>(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<int>((as_type<uint>(x_302) + as_type<uint>(1)));
}
void quicksort_(thread QuicksortObject* const tint_symbol_8) {
@@ -100,12 +100,12 @@
h_1 = 9;
top = -1;
int const x_305 = top;
- int const x_306 = (x_305 + 1);
+ int const x_306 = as_type<int>((as_type<uint>(x_305) + as_type<uint>(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<int>((as_type<uint>(x_309) + as_type<uint>(1)));
top = x_310;
int const x_311 = h_1;
stack.arr[x_310] = x_311;
@@ -116,11 +116,11 @@
break;
}
int const x_320 = top;
- top = (x_320 - 1);
+ top = as_type<int>((as_type<uint>(x_320) - as_type<uint>(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<int>((as_type<uint>(x_324) - as_type<uint>(1)));
int const x_327 = stack.arr[x_324];
l_1 = x_327;
int const x_328 = l_1;
@@ -131,28 +131,28 @@
p = x_330;
int const x_331 = p;
int const x_333 = l_1;
- if (((x_331 - 1) > x_333)) {
+ if ((as_type<int>((as_type<uint>(x_331) - as_type<uint>(1))) > x_333)) {
int const x_337 = top;
- int const x_338 = (x_337 + 1);
+ int const x_338 = as_type<int>((as_type<uint>(x_337) + as_type<uint>(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<int>((as_type<uint>(x_341) + as_type<uint>(1)));
top = x_342;
int const x_343 = p;
- stack.arr[x_342] = (x_343 - 1);
+ stack.arr[x_342] = as_type<int>((as_type<uint>(x_343) - as_type<uint>(1)));
}
int const x_346 = p;
int const x_348 = h_1;
- if (((x_346 + 1) < x_348)) {
+ if ((as_type<int>((as_type<uint>(x_346) + as_type<uint>(1))) < x_348)) {
int const x_352 = top;
- int const x_353 = (x_352 + 1);
+ int const x_353 = as_type<int>((as_type<uint>(x_352) + as_type<uint>(1)));
top = x_353;
int const x_354 = p;
- stack.arr[x_353] = (x_354 + 1);
+ stack.arr[x_353] = as_type<int>((as_type<uint>(x_354) + as_type<uint>(1)));
int const x_357 = top;
- int const x_358 = (x_357 + 1);
+ int const x_358 = as_type<int>((as_type<uint>(x_357) + as_type<uint>(1)));
top = x_358;
int const x_359 = h_1;
stack.arr[x_358] = x_359;
@@ -176,16 +176,16 @@
}
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<int>((as_type<uint>(10) - as_type<uint>(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<int>((as_type<uint>(x_111) * as_type<uint>(x_114)));
{
int const x_117 = i_2;
- i_2 = (x_117 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_117) + as_type<uint>(1)));
}
}
quicksort_(tint_symbol_11);
@@ -205,9 +205,9 @@
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<int>((as_type<uint>(2) * as_type<uint>(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<int>((as_type<uint>(2) * as_type<uint>(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 840a67c..29a6f01 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_183)) * as_type<uint>(int(x_187))))) + as_type<uint>(as_type<int>((as_type<uint>(x_190) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
res = x_196;
}
{
int const x_197 = i;
- i = (x_197 + 1);
+ i = as_type<int>((as_type<uint>(x_197) + as_type<uint>(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 840a67c..29a6f01 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(int(x_183)) * as_type<uint>(int(x_187))))) + as_type<uint>(as_type<int>((as_type<uint>(x_190) * as_type<uint>(9))))))) + as_type<uint>(11))) % 16)];
res = x_196;
}
{
int const x_197 = i;
- i = (x_197 + 1);
+ i = as_type<int>((as_type<uint>(x_197) + as_type<uint>(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 a726115..40e2a56 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 @@
}
*(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
{
- x_165 = (x_164 + 1);
+ x_165 = as_type<int>((as_type<uint>(x_164) + as_type<uint>(1)));
x_164_phi = x_165;
}
}
{
- x_154 = (x_153 + 1);
+ x_154 = as_type<int>((as_type<uint>(x_153) + as_type<uint>(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 6537e89..17d0242 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 @@
}
*(tint_symbol_5) = float4(1.0f, 1.0f, 1.0f, 1.0f);
{
- x_165 = (x_164 + 1);
+ x_165 = as_type<int>((as_type<uint>(x_164) + as_type<uint>(1)));
x_164_phi = x_165;
}
}
{
- x_154 = (x_153 + 1);
+ x_154 = as_type<int>((as_type<uint>(x_153) + as_type<uint>(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 c9860b9..61dfc81 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 @@
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<int>((as_type<uint>(x_13.f0) + as_type<uint>(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 c9860b9..61dfc81 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 @@
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<int>((as_type<uint>(x_13.f0) + as_type<uint>(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 dbb6a91..b2d8ae5 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 @@
case 0: {
while (true) {
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
int const x_11 = i;
switch(x_11) {
case 2: {
int const x_12 = i;
- i = (x_12 + 5);
+ i = as_type<int>((as_type<uint>(x_12) + as_type<uint>(5)));
break;
}
case 1: {
@@ -41,7 +41,7 @@
}
default: {
int const x_14 = i;
- i = (x_14 + 7);
+ i = as_type<int>((as_type<uint>(x_14) + as_type<uint>(7)));
break;
}
}
@@ -56,14 +56,14 @@
int const x_17 = i;
if ((x_17 > 100)) {
int const x_18 = i;
- i = (x_18 - 2);
+ i = as_type<int>((as_type<uint>(x_18) - as_type<uint>(2)));
break;
}
/* fallthrough */
}
default: {
int const x_20 = i;
- i = (x_20 - 3);
+ i = as_type<int>((as_type<uint>(x_20) - as_type<uint>(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 dbb6a91..b2d8ae5 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 @@
case 0: {
while (true) {
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
int const x_11 = i;
switch(x_11) {
case 2: {
int const x_12 = i;
- i = (x_12 + 5);
+ i = as_type<int>((as_type<uint>(x_12) + as_type<uint>(5)));
break;
}
case 1: {
@@ -41,7 +41,7 @@
}
default: {
int const x_14 = i;
- i = (x_14 + 7);
+ i = as_type<int>((as_type<uint>(x_14) + as_type<uint>(7)));
break;
}
}
@@ -56,14 +56,14 @@
int const x_17 = i;
if ((x_17 > 100)) {
int const x_18 = i;
- i = (x_18 - 2);
+ i = as_type<int>((as_type<uint>(x_18) - as_type<uint>(2)));
break;
}
/* fallthrough */
}
default: {
int const x_20 = i;
- i = (x_20 - 3);
+ i = as_type<int>((as_type<uint>(x_20) - as_type<uint>(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 084529b..3f25a16 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 @@
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<int>((as_type<uint>(2) + as_type<uint>(int(x_37)))))) {
} else {
break;
}
@@ -51,14 +51,14 @@
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<int>((as_type<uint>(x_31) + as_type<uint>(1)))), 0.0f, 0.0f, 1.0f);
return;
}
break;
}
}
{
- int const x_32 = (x_31 + 1);
+ int const x_32 = as_type<int>((as_type<uint>(x_31) + as_type<uint>(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 084529b..3f25a16 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 @@
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<int>((as_type<uint>(2) + as_type<uint>(int(x_37)))))) {
} else {
break;
}
@@ -51,14 +51,14 @@
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<int>((as_type<uint>(x_31) + as_type<uint>(1)))), 0.0f, 0.0f, 1.0f);
return;
}
break;
}
}
{
- int const x_32 = (x_31 + 1);
+ int const x_32 = as_type<int>((as_type<uint>(x_31) + as_type<uint>(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 67500c5..a21c19e 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 @@
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<int>((as_type<uint>(x_12) + as_type<uint>(1)));
}
even_index = 1;
while (true) {
@@ -72,12 +72,12 @@
break;
}
int const x_17 = ll;
- ll = (x_17 + 1);
+ ll = as_type<int>((as_type<uint>(x_17) + as_type<uint>(1)));
int const x_19 = j;
if ((as_type<uint>(x_19) < 1u)) {
{
int const x_20 = j;
- j = (x_20 + 1);
+ j = as_type<int>((as_type<uint>(x_20) + as_type<uint>(1)));
}
continue;
}
@@ -88,7 +88,7 @@
}
{
int const x_20 = j;
- j = (x_20 + 1);
+ j = as_type<int>((as_type<uint>(x_20) + as_type<uint>(1)));
}
}
float const x_113 = x_8.injectionSwitch.x;
@@ -97,7 +97,7 @@
*(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<int>((as_type<uint>(x_22) - as_type<uint>(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 67500c5..a21c19e 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 @@
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<int>((as_type<uint>(x_12) + as_type<uint>(1)));
}
even_index = 1;
while (true) {
@@ -72,12 +72,12 @@
break;
}
int const x_17 = ll;
- ll = (x_17 + 1);
+ ll = as_type<int>((as_type<uint>(x_17) + as_type<uint>(1)));
int const x_19 = j;
if ((as_type<uint>(x_19) < 1u)) {
{
int const x_20 = j;
- j = (x_20 + 1);
+ j = as_type<int>((as_type<uint>(x_20) + as_type<uint>(1)));
}
continue;
}
@@ -88,7 +88,7 @@
}
{
int const x_20 = j;
- j = (x_20 + 1);
+ j = as_type<int>((as_type<uint>(x_20) + as_type<uint>(1)));
}
}
float const x_113 = x_8.injectionSwitch.x;
@@ -97,7 +97,7 @@
*(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<int>((as_type<uint>(x_22) - as_type<uint>(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 e1b045e..469427d 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 @@
}
{
int const x_76 = j;
- j = (x_76 + 1);
+ j = as_type<int>((as_type<uint>(x_76) + as_type<uint>(1)));
}
}
break;
}
{
int const x_78 = i;
- i = (x_78 + 1);
+ i = as_type<int>((as_type<uint>(x_78) + as_type<uint>(1)));
}
}
float const x_81 = x_9.injectionSwitch.x;
@@ -75,7 +75,7 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_101 = GLF_dead3k;
- GLF_dead3k = (x_101 + 1);
+ GLF_dead3k = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 e1b045e..469427d 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 @@
}
{
int const x_76 = j;
- j = (x_76 + 1);
+ j = as_type<int>((as_type<uint>(x_76) + as_type<uint>(1)));
}
}
break;
}
{
int const x_78 = i;
- i = (x_78 + 1);
+ i = as_type<int>((as_type<uint>(x_78) + as_type<uint>(1)));
}
}
float const x_81 = x_9.injectionSwitch.x;
@@ -75,7 +75,7 @@
threadgroup_barrier(mem_flags::mem_threadgroup);
{
int const x_101 = GLF_dead3k;
- GLF_dead3k = (x_101 + 1);
+ GLF_dead3k = as_type<int>((as_type<uint>(x_101) + as_type<uint>(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 3b8cbfc..4958a8e 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 @@
matrix_u[x_11] = 1.0f;
{
int const x_12 = x;
- x = (x_12 - 1);
+ x = as_type<int>((as_type<uint>(x_12) - as_type<uint>(1)));
}
}
b = 4;
@@ -52,7 +52,7 @@
matrix_b[x_14] = x_67;
{
int const x_16 = b;
- b = (x_16 - 1);
+ b = as_type<int>((as_type<uint>(x_16) - as_type<uint>(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 3b8cbfc..4958a8e 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 @@
matrix_u[x_11] = 1.0f;
{
int const x_12 = x;
- x = (x_12 - 1);
+ x = as_type<int>((as_type<uint>(x_12) - as_type<uint>(1)));
}
}
b = 4;
@@ -52,7 +52,7 @@
matrix_b[x_14] = x_67;
{
int const x_16 = b;
- b = (x_16 - 1);
+ b = as_type<int>((as_type<uint>(x_16) - as_type<uint>(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 51c44be..8092888 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 @@
{
x_34 = x_33;
x_34.col = float3(1.0f, 0.0f, 0.0f);
- x_7 = (x_9 + 1);
+ x_7 = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
x_33_phi = x_34;
x_9_phi = x_7;
}
@@ -59,7 +59,7 @@
{
x_43 = x_42;
x_43.col = float3(1.0f, 0.0f, 0.0f);
- x_8 = (x_10 + 1);
+ x_8 = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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 51c44be..8092888 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 @@
{
x_34 = x_33;
x_34.col = float3(1.0f, 0.0f, 0.0f);
- x_7 = (x_9 + 1);
+ x_7 = as_type<int>((as_type<uint>(x_9) + as_type<uint>(1)));
x_33_phi = x_34;
x_9_phi = x_7;
}
@@ -59,7 +59,7 @@
{
x_43 = x_42;
x_43.col = float3(1.0f, 0.0f, 0.0f);
- x_8 = (x_10 + 1);
+ x_8 = as_type<int>((as_type<uint>(x_10) + as_type<uint>(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 afbd08f..0cb64a4 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 @@
}
{
int const x_11 = GLF_live15i;
- GLF_live15i = (x_11 + 1);
+ GLF_live15i = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
}
}
GLF_live15d = float4(0.0f, 0.0f, 0.0f, 0.0f);
@@ -54,7 +54,7 @@
}
{
int const x_16 = GLF_live15i_1;
- GLF_live15i_1 = (x_16 + 1);
+ GLF_live15i_1 = as_type<int>((as_type<uint>(x_16) + as_type<uint>(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 afbd08f..0cb64a4 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 @@
}
{
int const x_11 = GLF_live15i;
- GLF_live15i = (x_11 + 1);
+ GLF_live15i = as_type<int>((as_type<uint>(x_11) + as_type<uint>(1)));
}
}
GLF_live15d = float4(0.0f, 0.0f, 0.0f, 0.0f);
@@ -54,7 +54,7 @@
}
{
int const x_16 = GLF_live15i_1;
- GLF_live15i_1 = (x_16 + 1);
+ GLF_live15i_1 = as_type<int>((as_type<uint>(x_16) + as_type<uint>(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 4489a5b..d76e41a 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 @@
}
{
int const x_70 = i_2;
- i_2 = (x_70 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
{
int const x_72 = i_1;
- i_1 = (x_72 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(1)));
}
continue;
}
return;
{
int const x_72 = i_1;
- i_1 = (x_72 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 4489a5b..d76e41a 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 @@
}
{
int const x_70 = i_2;
- i_2 = (x_70 + 1);
+ i_2 = as_type<int>((as_type<uint>(x_70) + as_type<uint>(1)));
}
}
{
int const x_72 = i_1;
- i_1 = (x_72 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(1)));
}
continue;
}
return;
{
int const x_72 = i_1;
- i_1 = (x_72 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_72) + as_type<uint>(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 a4f03c0..7138b3e 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 @@
}
{
int const x_73 = i;
- i = (x_73 + 1);
+ i = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
}
}
while (true) {
@@ -65,12 +65,12 @@
}
{
int const x_106 = l;
- l = (x_106 + 1);
+ l = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
{
int const x_108 = m;
- m = (x_108 + 1);
+ m = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
}
n = 0;
@@ -87,7 +87,7 @@
}
{
int const x_124 = n;
- n = (x_124 + 1);
+ n = as_type<int>((as_type<uint>(x_124) + as_type<uint>(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 a4f03c0..7138b3e 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 @@
}
{
int const x_73 = i;
- i = (x_73 + 1);
+ i = as_type<int>((as_type<uint>(x_73) + as_type<uint>(1)));
}
}
while (true) {
@@ -65,12 +65,12 @@
}
{
int const x_106 = l;
- l = (x_106 + 1);
+ l = as_type<int>((as_type<uint>(x_106) + as_type<uint>(1)));
}
}
{
int const x_108 = m;
- m = (x_108 + 1);
+ m = as_type<int>((as_type<uint>(x_108) + as_type<uint>(1)));
}
}
n = 0;
@@ -87,7 +87,7 @@
}
{
int const x_124 = n;
- n = (x_124 + 1);
+ n = as_type<int>((as_type<uint>(x_124) + as_type<uint>(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 73ff170..e65fcde 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 @@
{
float3 const x_38 = mand_();
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(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 73ff170..e65fcde 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 @@
{
float3 const x_38 = mand_();
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(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 cc9b3ff..58160d1 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 @@
}
{
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(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 cc9b3ff..58160d1 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 @@
}
{
int const x_9 = i;
- i = (x_9 + 1);
+ i = as_type<int>((as_type<uint>(x_9) + as_type<uint>(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 04778b9..7da4273 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 @@
return;
{
int const x_7 = i;
- i = (x_7 + 1);
+ i = as_type<int>((as_type<uint>(x_7) + as_type<uint>(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 04778b9..7da4273 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 @@
return;
{
int const x_7 = i;
- i = (x_7 + 1);
+ i = as_type<int>((as_type<uint>(x_7) + as_type<uint>(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 282221c..58c2140 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 @@
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<int>((as_type<uint>(int(x_104)) + as_type<uint>(1))))) {
} else {
break;
}
@@ -50,7 +50,7 @@
value.x = float(x_109);
{
int const x_112 = i;
- i = (x_112 + 1);
+ i = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
}
}
float const x_115 = value.x;
@@ -78,16 +78,16 @@
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<int>((as_type<uint>(int(x_53)) + as_type<uint>(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<int>((as_type<uint>(x_60) + as_type<uint>(int(x_58))));
{
int const x_62 = i_1;
- i_1 = (x_62 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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 282221c..58c2140 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 @@
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<int>((as_type<uint>(int(x_104)) + as_type<uint>(1))))) {
} else {
break;
}
@@ -50,7 +50,7 @@
value.x = float(x_109);
{
int const x_112 = i;
- i = (x_112 + 1);
+ i = as_type<int>((as_type<uint>(x_112) + as_type<uint>(1)));
}
}
float const x_115 = value.x;
@@ -78,16 +78,16 @@
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<int>((as_type<uint>(int(x_53)) + as_type<uint>(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<int>((as_type<uint>(x_60) + as_type<uint>(int(x_58))));
{
int const x_62 = i_1;
- i_1 = (x_62 + 1);
+ i_1 = as_type<int>((as_type<uint>(x_62) + as_type<uint>(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 0536ebc..1c6f19b 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 @@
break;
}
int const x_20 = ll_1;
- ll_1 = (x_20 + 1);
+ ll_1 = as_type<int>((as_type<uint>(x_20) + as_type<uint>(1)));
int const x_22 = x_9.injected;
z = x_22;
ll_2 = 0;
@@ -56,7 +56,7 @@
break;
}
int const x_26 = ll_2;
- ll_2 = (x_26 + 1);
+ ll_2 = as_type<int>((as_type<uint>(x_26) + as_type<uint>(1)));
float4x3 const x_98 = m43;
tempm43 = x_98;
ll_3 = 0;
@@ -77,7 +77,7 @@
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<int>((as_type<uint>(x_35) + as_type<uint>(1)));
}
}
int const x_37 = idx;
@@ -90,11 +90,11 @@
GLF_live6sums.arr[x_117] = (x_121 + x_119);
{
int const x_41 = ctr;
- ctr = (x_41 + 1);
+ ctr = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
}
}
int const x_43 = idx;
- idx = (x_43 + 1);
+ idx = as_type<int>((as_type<uint>(x_43) + as_type<uint>(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 aa5c43e..cbdb09f 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 @@
break;
}
int const x_20 = ll_1;
- ll_1 = (x_20 + 1);
+ ll_1 = as_type<int>((as_type<uint>(x_20) + as_type<uint>(1)));
int const x_22 = x_9.injected;
z = x_22;
ll_2 = 0;
@@ -56,7 +56,7 @@
break;
}
int const x_26 = ll_2;
- ll_2 = (x_26 + 1);
+ ll_2 = as_type<int>((as_type<uint>(x_26) + as_type<uint>(1)));
float4x3 const x_98 = m43;
tempm43 = x_98;
ll_3 = 0;
@@ -77,7 +77,7 @@
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<int>((as_type<uint>(x_35) + as_type<uint>(1)));
}
}
int const x_37 = idx;
@@ -90,11 +90,11 @@
GLF_live6sums.arr[x_117] = (x_121 + x_119);
{
int const x_41 = ctr;
- ctr = (x_41 + 1);
+ ctr = as_type<int>((as_type<uint>(x_41) + as_type<uint>(1)));
}
}
int const x_43 = idx;
- idx = (x_43 + 1);
+ idx = as_type<int>((as_type<uint>(x_43) + as_type<uint>(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 ff8271a..6ef3d6f 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 @@
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<int>((as_type<uint>(x_113) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(1)));
GLF_live1_looplimiter2 = 0;
GLF_live1i = 0;
while (true) {
@@ -263,10 +263,10 @@
break;
}
int const x_119 = GLF_live1_looplimiter2;
- GLF_live1_looplimiter2 = (x_119 + 1);
+ GLF_live1_looplimiter2 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(1)));
{
int const x_121 = GLF_live1i;
- GLF_live1i = (x_121 + 1);
+ GLF_live1i = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
}
}
int const x_123 = treeIndex_1;
@@ -274,37 +274,37 @@
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<int>((as_type<uint>(x_124) + as_type<uint>(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<int>((as_type<uint>(x_127) + as_type<uint>(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<int>((as_type<uint>(x_130) + as_type<uint>(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<int>((as_type<uint>(x_133) + as_type<uint>(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<int>((as_type<uint>(x_136) + as_type<uint>(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<int>((as_type<uint>(x_139) + as_type<uint>(1)));
GLF_live4_looplimiter3 = 0;
GLF_live4i = 0;
while (true) {
@@ -317,7 +317,7 @@
break;
}
int const x_142 = GLF_live4_looplimiter3;
- GLF_live4_looplimiter3 = (x_142 + 1);
+ GLF_live4_looplimiter3 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
GLF_live4index = 1;
int const x_144 = GLF_live4index;
int const x_145 = GLF_live4index;
@@ -330,7 +330,7 @@
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<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
int const x_152 = treeIndex_1;
@@ -343,7 +343,7 @@
return;
}
int const x_153 = treeIndex_1;
- treeIndex_1 = (x_153 + 1);
+ treeIndex_1 = as_type<int>((as_type<uint>(x_153) + as_type<uint>(1)));
int const x_155 = treeIndex_1;
param_26 = x_155;
param_27 = 13;
@@ -381,7 +381,7 @@
}
case -1: {
int const x_161 = sum;
- sum = (x_161 + 1);
+ sum = as_type<int>((as_type<uint>(x_161) + as_type<uint>(1)));
break;
}
default: {
@@ -391,7 +391,7 @@
}
{
int const x_163 = target_1;
- target_1 = (x_163 + 1);
+ target_1 = as_type<int>((as_type<uint>(x_163) + as_type<uint>(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 10ddae2..fae9d9d 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 @@
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<int>((as_type<uint>(x_113) + as_type<uint>(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<int>((as_type<uint>(x_116) + as_type<uint>(1)));
GLF_live1_looplimiter2 = 0;
GLF_live1i = 0;
while (true) {
@@ -263,10 +263,10 @@
break;
}
int const x_119 = GLF_live1_looplimiter2;
- GLF_live1_looplimiter2 = (x_119 + 1);
+ GLF_live1_looplimiter2 = as_type<int>((as_type<uint>(x_119) + as_type<uint>(1)));
{
int const x_121 = GLF_live1i;
- GLF_live1i = (x_121 + 1);
+ GLF_live1i = as_type<int>((as_type<uint>(x_121) + as_type<uint>(1)));
}
}
int const x_123 = treeIndex_1;
@@ -274,37 +274,37 @@
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<int>((as_type<uint>(x_124) + as_type<uint>(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<int>((as_type<uint>(x_127) + as_type<uint>(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<int>((as_type<uint>(x_130) + as_type<uint>(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<int>((as_type<uint>(x_133) + as_type<uint>(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<int>((as_type<uint>(x_136) + as_type<uint>(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<int>((as_type<uint>(x_139) + as_type<uint>(1)));
GLF_live4_looplimiter3 = 0;
GLF_live4i = 0;
while (true) {
@@ -317,7 +317,7 @@
break;
}
int const x_142 = GLF_live4_looplimiter3;
- GLF_live4_looplimiter3 = (x_142 + 1);
+ GLF_live4_looplimiter3 = as_type<int>((as_type<uint>(x_142) + as_type<uint>(1)));
GLF_live4index = 1;
int const x_144 = GLF_live4index;
int const x_145 = GLF_live4index;
@@ -330,7 +330,7 @@
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<int>((as_type<uint>(x_150) + as_type<uint>(1)));
}
}
int const x_152 = treeIndex_1;
@@ -343,7 +343,7 @@
return;
}
int const x_153 = treeIndex_1;
- treeIndex_1 = (x_153 + 1);
+ treeIndex_1 = as_type<int>((as_type<uint>(x_153) + as_type<uint>(1)));
int const x_155 = treeIndex_1;
param_26 = x_155;
param_27 = 13;
@@ -381,7 +381,7 @@
}
case -1: {
int const x_161 = sum;
- sum = (x_161 + 1);
+ sum = as_type<int>((as_type<uint>(x_161) + as_type<uint>(1)));
break;
}
default: {
@@ -391,7 +391,7 @@
}
{
int const x_163 = target_1;
- target_1 = (x_163 + 1);
+ target_1 = as_type<int>((as_type<uint>(x_163) + as_type<uint>(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 534ff4c..9701645 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 @@
break;
}
int const x_17 = ll1;
- ll1 = (x_17 + 1);
+ ll1 = as_type<int>((as_type<uint>(x_17) + as_type<uint>(1)));
ll4 = 10;
ll2 = 0;
c = 0;
@@ -53,7 +53,7 @@
break;
}
int const x_21 = ll2;
- ll2 = (x_21 + 1);
+ ll2 = as_type<int>((as_type<uint>(x_21) + as_type<uint>(1)));
float4x3 const x_92 = m43;
tempm43 = x_92;
ll3 = 0;
@@ -73,7 +73,7 @@
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<int>((as_type<uint>(x_30) + as_type<uint>(1)));
}
}
int const x_32 = idx;
@@ -86,11 +86,11 @@
sums.arr[x_111] = (x_115 + x_113);
{
int const x_36 = c;
- c = (x_36 + 1);
+ c = as_type<int>((as_type<uint>(x_36) + as_type<uint>(1)));
}
}
int const x_38 = idx;
- idx = (x_38 + 1);
+ idx = as_type<int>((as_type<uint>(x_38) + as_type<uint>(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 2070937..4900c8c 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 @@
break;
}
int const x_17 = ll1;
- ll1 = (x_17 + 1);
+ ll1 = as_type<int>((as_type<uint>(x_17) + as_type<uint>(1)));
ll4 = 10;
ll2 = 0;
c = 0;
@@ -53,7 +53,7 @@
break;
}
int const x_21 = ll2;
- ll2 = (x_21 + 1);
+ ll2 = as_type<int>((as_type<uint>(x_21) + as_type<uint>(1)));
float4x3 const x_92 = m43;
tempm43 = x_92;
ll3 = 0;
@@ -73,7 +73,7 @@
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<int>((as_type<uint>(x_30) + as_type<uint>(1)));
}
}
int const x_32 = idx;
@@ -86,11 +86,11 @@
sums.arr[x_111] = (x_115 + x_113);
{
int const x_36 = c;
- c = (x_36 + 1);
+ c = as_type<int>((as_type<uint>(x_36) + as_type<uint>(1)));
}
}
int const x_38 = idx;
- idx = (x_38 + 1);
+ idx = as_type<int>((as_type<uint>(x_38) + as_type<uint>(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 be9d456..d0db516 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 @@
int const x_86 = x_17.data_in1.arr[(x_81 + as_type<uint>(x_82))];
x_15.data_out0.arr[(x_77 + as_type<uint>(x_78))] = x_86;
int const x_88 = index_out0;
- index_out0 = (x_88 - 1);
+ index_out0 = as_type<int>((as_type<uint>(x_88) - as_type<uint>(1)));
int const x_90 = index_in1;
- index_in1 = (x_90 - 1);
+ index_in1 = as_type<int>((as_type<uint>(x_90) - as_type<uint>(1)));
} else {
uint const x_92 = base_index_out;
int const x_93 = index_out1;
@@ -71,14 +71,14 @@
int const x_101 = x_19.data_in0.arr[(x_96 + as_type<uint>(x_97))];
x_15.data_out0.arr[(x_92 + as_type<uint>(x_93))] = x_101;
int const x_103 = index_out1;
- index_out1 = (x_103 - 1);
+ index_out1 = as_type<int>((as_type<uint>(x_103) - as_type<uint>(1)));
int const x_105 = index_in1;
- index_in1 = (x_105 - 1);
+ index_in1 = as_type<int>((as_type<uint>(x_105) - as_type<uint>(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<int>((as_type<uint>(x_107) + as_type<uint>(1)))];
int const x_111 = condition_index;
- condition_index = (x_111 + x_110);
+ condition_index = as_type<int>((as_type<uint>(x_111) + as_type<uint>(x_110)));
int const x_113 = index_in0;
temp0 = x_113;
int const x_114 = index_in1;
@@ -93,7 +93,7 @@
index_out1 = x_118;
{
int const x_119 = i;
- i = (x_119 + 1);
+ i = as_type<int>((as_type<uint>(x_119) + as_type<uint>(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 be9d456..d0db516 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 @@
int const x_86 = x_17.data_in1.arr[(x_81 + as_type<uint>(x_82))];
x_15.data_out0.arr[(x_77 + as_type<uint>(x_78))] = x_86;
int const x_88 = index_out0;
- index_out0 = (x_88 - 1);
+ index_out0 = as_type<int>((as_type<uint>(x_88) - as_type<uint>(1)));
int const x_90 = index_in1;
- index_in1 = (x_90 - 1);
+ index_in1 = as_type<int>((as_type<uint>(x_90) - as_type<uint>(1)));
} else {
uint const x_92 = base_index_out;
int const x_93 = index_out1;
@@ -71,14 +71,14 @@
int const x_101 = x_19.data_in0.arr[(x_96 + as_type<uint>(x_97))];
x_15.data_out0.arr[(x_92 + as_type<uint>(x_93))] = x_101;
int const x_103 = index_out1;
- index_out1 = (x_103 - 1);
+ index_out1 = as_type<int>((as_type<uint>(x_103) - as_type<uint>(1)));
int const x_105 = index_in1;
- index_in1 = (x_105 - 1);
+ index_in1 = as_type<int>((as_type<uint>(x_105) - as_type<uint>(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<int>((as_type<uint>(x_107) + as_type<uint>(1)))];
int const x_111 = condition_index;
- condition_index = (x_111 + x_110);
+ condition_index = as_type<int>((as_type<uint>(x_111) + as_type<uint>(x_110)));
int const x_113 = index_in0;
temp0 = x_113;
int const x_114 = index_in1;
@@ -93,7 +93,7 @@
index_out1 = x_118;
{
int const x_119 = i;
- i = (x_119 + 1);
+ i = as_type<int>((as_type<uint>(x_119) + as_type<uint>(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 734a346..5063da4 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 @@
int const x_84 = x_17.data_in0.arr[(x_79 + as_type<uint>(x_80))];
x_15.data_out0.arr[(x_75 + as_type<uint>(x_76))] = x_84;
int const x_86 = index_out0;
- index_out0 = (x_86 + 1);
+ index_out0 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
int const x_88 = index_in1;
- index_in1 = (x_88 + 1);
+ index_in1 = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
} else {
uint const x_90 = base_index_out;
int const x_91 = index_out1;
@@ -71,14 +71,14 @@
int const x_99 = x_19.data_in1.arr[(x_94 + as_type<uint>(x_95))];
x_15.data_out0.arr[(x_90 + as_type<uint>(x_91))] = x_99;
int const x_101 = index_out1;
- index_out1 = (x_101 + 1);
+ index_out1 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
int const x_103 = index_in1;
- index_in1 = (x_103 + 1);
+ index_in1 = as_type<int>((as_type<uint>(x_103) + as_type<uint>(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<int>((as_type<uint>(x_105) + as_type<uint>(1)))];
int const x_109 = condition_index;
- condition_index = (x_109 + x_108);
+ condition_index = as_type<int>((as_type<uint>(x_109) + as_type<uint>(x_108)));
int const x_111 = index_in0;
temp0 = x_111;
int const x_112 = index_in1;
@@ -93,7 +93,7 @@
index_out1 = x_116;
{
int const x_117 = i;
- i = (x_117 + 1);
+ i = as_type<int>((as_type<uint>(x_117) + as_type<uint>(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 734a346..5063da4 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 @@
int const x_84 = x_17.data_in0.arr[(x_79 + as_type<uint>(x_80))];
x_15.data_out0.arr[(x_75 + as_type<uint>(x_76))] = x_84;
int const x_86 = index_out0;
- index_out0 = (x_86 + 1);
+ index_out0 = as_type<int>((as_type<uint>(x_86) + as_type<uint>(1)));
int const x_88 = index_in1;
- index_in1 = (x_88 + 1);
+ index_in1 = as_type<int>((as_type<uint>(x_88) + as_type<uint>(1)));
} else {
uint const x_90 = base_index_out;
int const x_91 = index_out1;
@@ -71,14 +71,14 @@
int const x_99 = x_19.data_in1.arr[(x_94 + as_type<uint>(x_95))];
x_15.data_out0.arr[(x_90 + as_type<uint>(x_91))] = x_99;
int const x_101 = index_out1;
- index_out1 = (x_101 + 1);
+ index_out1 = as_type<int>((as_type<uint>(x_101) + as_type<uint>(1)));
int const x_103 = index_in1;
- index_in1 = (x_103 + 1);
+ index_in1 = as_type<int>((as_type<uint>(x_103) + as_type<uint>(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<int>((as_type<uint>(x_105) + as_type<uint>(1)))];
int const x_109 = condition_index;
- condition_index = (x_109 + x_108);
+ condition_index = as_type<int>((as_type<uint>(x_109) + as_type<uint>(x_108)));
int const x_111 = index_in0;
temp0 = x_111;
int const x_112 = index_in1;
@@ -93,7 +93,7 @@
index_out1 = x_116;
{
int const x_117 = i;
- i = (x_117 + 1);
+ i = as_type<int>((as_type<uint>(x_117) + as_type<uint>(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 d7828a3..d0c4825 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 <metal_stdlib>
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 @@
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<uint>(-(as_type<int>(x_22)));
+ x_6.field0[x_20] = as_type<uint>(tint_unary_minus(as_type<int>(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 d7828a3..d0c4825 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 <metal_stdlib>
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 @@
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<uint>(-(as_type<int>(x_22)));
+ x_6.field0[x_20] = as_type<uint>(tint_unary_minus(as_type<int>(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 88c8f1c..7f6fbb6 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(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 88c8f1c..7f6fbb6 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(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 a72a509..a50bd6e 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(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 a72a509..a50bd6e 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(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 06facd9..5a727de 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(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 06facd9..5a727de 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_16.x) & 1)) + as_type<uint>((int(x_16.y) & 1))))) + as_type<uint>(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 bf23c88..b8e78d8 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
}
- x_5.field0[(x_27 + (x_28 * 8))] = x_27;
+ x_5.field0[as_type<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(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 bf23c88..b8e78d8 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(x_33))) == int(x_23.z))) {
}
- x_5.field0[(x_27 + (x_28 * 8))] = x_27;
+ x_5.field0[as_type<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(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 893315f..59d9bdb 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 @@
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<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(8))))))] = x_27;
+ if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(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 893315f..59d9bdb 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 @@
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<int>((as_type<uint>(x_27) + as_type<uint>(as_type<int>((as_type<uint>(x_28) * as_type<uint>(8))))))] = x_27;
+ if ((as_type<int>((as_type<uint>(as_type<int>((as_type<uint>((x_27 & 1)) + as_type<uint>((x_28 & 1))))) + as_type<uint>(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 27b481f..2715be4 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_18.x) & 1)) + as_type<uint>((int(x_18.y) & 1))))) + as_type<uint>(x_28))) == int(x_18.z))) {
while (true) {
int x_34 = 0;
int const x_33 = x_33_phi;
@@ -25,7 +25,7 @@
break;
}
{
- x_34 = (x_33 + 1);
+ x_34 = as_type<int>((as_type<uint>(x_33) + as_type<uint>(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 27b481f..2715be4 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 @@
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<int>((as_type<uint>(as_type<int>((as_type<uint>((int(x_18.x) & 1)) + as_type<uint>((int(x_18.y) & 1))))) + as_type<uint>(x_28))) == int(x_18.z))) {
while (true) {
int x_34 = 0;
int const x_33 = x_33_phi;
@@ -25,7 +25,7 @@
break;
}
{
- x_34 = (x_33 + 1);
+ x_34 = as_type<int>((as_type<uint>(x_33) + as_type<uint>(1)));
x_33_phi = x_34;
}
}