mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-18 01:15:39 +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
@@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_257 = *(from);
|
||||
i = x_257;
|
||||
int const x_258 = *(mid);
|
||||
j = (x_258 + 1);
|
||||
j = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_277 = (*(tint_symbol_5)).arr[x_275];
|
||||
if ((x_274 < x_277)) {
|
||||
int const x_282 = k;
|
||||
k = (x_282 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
break;
|
||||
}
|
||||
int const x_309 = k;
|
||||
k = (x_309 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
(*(tint_symbol_5)).arr[x_325] = x_328;
|
||||
{
|
||||
int const x_330 = i_1;
|
||||
i_1 = (x_330 + 1);
|
||||
i_1 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -131,11 +131,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
from_1 = x_350;
|
||||
int const x_351 = i_2;
|
||||
int const x_352 = m;
|
||||
mid_1 = ((x_351 + x_352) - 1);
|
||||
mid_1 = as_type<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 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
{
|
||||
int const x_366 = m;
|
||||
int const x_368 = i_2;
|
||||
i_2 = (x_368 + (2 * x_366));
|
||||
i_2 = as_type<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 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
}
|
||||
}
|
||||
int const x_127 = i_3;
|
||||
i_3 = (x_127 + 1);
|
||||
i_3 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
|
||||
{
|
||||
int const x_129 = i_3;
|
||||
if ((x_129 < 10)) {
|
||||
@@ -243,7 +243,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
(*(tint_symbol_10)).arr[x_138] = x_141;
|
||||
{
|
||||
int const x_143 = j_1;
|
||||
j_1 = (x_143 + 1);
|
||||
j_1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
mergeSort_(tint_symbol_9, tint_symbol_10);
|
||||
|
||||
@@ -27,7 +27,7 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_257 = *(from);
|
||||
i = x_257;
|
||||
int const x_258 = *(mid);
|
||||
j = (x_258 + 1);
|
||||
j = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
int const x_277 = (*(tint_symbol_5)).arr[x_275];
|
||||
if ((x_274 < x_277)) {
|
||||
int const x_282 = k;
|
||||
k = (x_282 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
break;
|
||||
}
|
||||
int const x_309 = k;
|
||||
k = (x_309 + 1);
|
||||
k = as_type<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 @@ void merge_i1_i1_i1_(thread int* const from, thread int* const mid, thread int*
|
||||
(*(tint_symbol_5)).arr[x_325] = x_328;
|
||||
{
|
||||
int const x_330 = i_1;
|
||||
i_1 = (x_330 + 1);
|
||||
i_1 = as_type<int>((as_type<uint>(x_330) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -131,11 +131,11 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
from_1 = x_350;
|
||||
int const x_351 = i_2;
|
||||
int const x_352 = m;
|
||||
mid_1 = ((x_351 + x_352) - 1);
|
||||
mid_1 = as_type<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 @@ void mergeSort_(thread tint_array_wrapper* const tint_symbol_7, thread tint_arra
|
||||
{
|
||||
int const x_366 = m;
|
||||
int const x_368 = i_2;
|
||||
i_2 = (x_368 + (2 * x_366));
|
||||
i_2 = as_type<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 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
}
|
||||
}
|
||||
int const x_127 = i_3;
|
||||
i_3 = (x_127 + 1);
|
||||
i_3 = as_type<int>((as_type<uint>(x_127) + as_type<uint>(1)));
|
||||
{
|
||||
int const x_129 = i_3;
|
||||
if ((x_129 < 10)) {
|
||||
@@ -243,7 +243,7 @@ void main_1(constant buf0& x_28, thread tint_array_wrapper* const tint_symbol_9,
|
||||
(*(tint_symbol_10)).arr[x_138] = x_141;
|
||||
{
|
||||
int const x_143 = j_1;
|
||||
j_1 = (x_143 + 1);
|
||||
j_1 = as_type<int>((as_type<uint>(x_143) + as_type<uint>(1)));
|
||||
}
|
||||
}
|
||||
mergeSort_(tint_symbol_9, tint_symbol_10);
|
||||
|
||||
Reference in New Issue
Block a user