Restore "MSL writer: make signed int overflow defined behaviour"

This reverts commit e33b0baa08.

Added tests/expressions/literals/intmin.wgsl test.

Bug: tint:124
Change-Id: I3d46f939ff20fa377ddb5fcb52f9afe728b8e430
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60441
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Antonio Maiorano
2021-07-30 18:59:06 +00:00
committed by Tint LUCI CQ
parent 9bdf2dcc6b
commit d388bc9b36
686 changed files with 4111 additions and 3079 deletions

View File

@@ -80,7 +80,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_122 = limiter0;
limiter0 = (x_122 + 1);
limiter0 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_143 = limiter1;
limiter1 = (x_143 + 1);
limiter1 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_159 = limiter2;
limiter2 = (x_159 + 1);
limiter2 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_179 = limiter3;
limiter3 = (x_179 + 1);
limiter3 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
}
{
int const x_193 = a;
a = (x_193 + 1);
a = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
}
{
int const x_285 = i;
i = (x_285 + 1);
i = as_type<int>((as_type<uint>(x_285) + as_type<uint>(1)));
}
}
return;

View File

@@ -80,7 +80,7 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_122 = limiter0;
limiter0 = (x_122 + 1);
limiter0 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_143 = limiter1;
limiter1 = (x_143 + 1);
limiter1 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_159 = limiter2;
limiter2 = (x_159 + 1);
limiter2 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
break;
}
int const x_179 = limiter3;
limiter3 = (x_179 + 1);
limiter3 = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
}
{
int const x_193 = a;
a = (x_193 + 1);
a = as_type<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 @@ void main_1(constant buf0& x_6, thread float4* const tint_symbol_8) {
}
{
int const x_285 = i;
i = (x_285 + 1);
i = as_type<int>((as_type<uint>(x_285) + as_type<uint>(1)));
}
}
return;