mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
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:
committed by
Tint LUCI CQ
parent
9bdf2dcc6b
commit
d388bc9b36
@@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_263 = *(from);
|
||||
i = x_263;
|
||||
int const x_264 = *(mid);
|
||||
j = (x_264 + 1);
|
||||
j = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_283 = (*(tint_symbol_5)).arr[x_281];
|
||||
if ((x_280 < x_283)) {
|
||||
int const x_288 = k;
|
||||
k = (x_288 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
break;
|
||||
}
|
||||
int const x_313 = k;
|
||||
k = (x_313 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
(*(tint_symbol_5)).arr[x_329] = x_332;
|
||||
{
|
||||
int const x_334 = i_1;
|
||||
i_1 = (x_334 + 1);
|
||||
i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
from_1 = x_354;
|
||||
int const x_355 = i_2;
|
||||
int const x_356 = m;
|
||||
mid_1 = ((x_355 + x_356) - 1);
|
||||
mid_1 = as_type<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 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
{
|
||||
int const x_370 = m;
|
||||
int const x_372 = i_2;
|
||||
i_2 = (x_372 + (2 * x_370));
|
||||
i_2 = as_type<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 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
}
|
||||
}
|
||||
int const x_123 = i_3;
|
||||
i_3 = (x_123 + 1);
|
||||
i_3 = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
|
||||
{
|
||||
int const x_125 = i_3;
|
||||
if ((x_125 < 10)) {
|
||||
@@ -237,7 +237,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
(*(tint_symbol_10)).arr[x_134] = x_137;
|
||||
{
|
||||
int const x_139 = j_1;
|
||||
j_1 = (x_139 + 1);
|
||||
j_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
mergeSort_(tint_symbol_9, tint_symbol_10);
|
||||
|
||||
@@ -24,7 +24,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_263 = *(from);
|
||||
i = x_263;
|
||||
int const x_264 = *(mid);
|
||||
j = (x_264 + 1);
|
||||
j = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_283 = (*(tint_symbol_5)).arr[x_281];
|
||||
if ((x_280 < x_283)) {
|
||||
int const x_288 = k;
|
||||
k = (x_288 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
break;
|
||||
}
|
||||
int const x_313 = k;
|
||||
k = (x_313 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
(*(tint_symbol_5)).arr[x_329] = x_332;
|
||||
{
|
||||
int const x_334 = i_1;
|
||||
i_1 = (x_334 + 1);
|
||||
i_1 = as_type<int>((as_type<uint>(x_334) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -124,11 +124,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
from_1 = x_354;
|
||||
int const x_355 = i_2;
|
||||
int const x_356 = m;
|
||||
mid_1 = ((x_355 + x_356) - 1);
|
||||
mid_1 = as_type<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 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
{
|
||||
int const x_370 = m;
|
||||
int const x_372 = i_2;
|
||||
i_2 = (x_372 + (2 * x_370));
|
||||
i_2 = as_type<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 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
}
|
||||
}
|
||||
int const x_123 = i_3;
|
||||
i_3 = (x_123 + 1);
|
||||
i_3 = as_type<int>((as_type<uint>(x_123) + as_type<uint>(1)));
|
||||
{
|
||||
int const x_125 = i_3;
|
||||
if ((x_125 < 10)) {
|
||||
@@ -237,7 +237,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
(*(tint_symbol_10)).arr[x_134] = x_137;
|
||||
{
|
||||
int const x_139 = j_1;
|
||||
j_1 = (x_139 + 1);
|
||||
j_1 = as_type<int>((as_type<uint>(x_139) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
mergeSort_(tint_symbol_9, tint_symbol_10);
|
||||
|
||||
Reference in New Issue
Block a user