mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +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
@@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui
|
||||
int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104];
|
||||
pivot = x_106;
|
||||
int const x_107 = *(l);
|
||||
i_1 = (x_107 - 1);
|
||||
i_1 = as_type<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 performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui
|
||||
int const x_122 = pivot;
|
||||
if ((x_121 <= x_122)) {
|
||||
int const x_126 = i_1;
|
||||
i_1 = (x_126 + 1);
|
||||
i_1 = as_type<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 performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui
|
||||
}
|
||||
{
|
||||
int const x_131 = j_1;
|
||||
j_1 = (x_131 + 1);
|
||||
j_1 = as_type<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 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) {
|
||||
h_1 = 9;
|
||||
top = -1;
|
||||
int const x_140 = top;
|
||||
int const x_141 = (x_140 + 1);
|
||||
int const x_141 = as_type<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 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) {
|
||||
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 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) {
|
||||
p = x_165;
|
||||
int const x_166 = p;
|
||||
int const x_168 = l_1;
|
||||
if (((x_166 - 1) > x_168)) {
|
||||
if ((as_type<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 @@ void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const ti
|
||||
}
|
||||
int const x_67 = i_2;
|
||||
int const x_68 = i_2;
|
||||
(*(tint_symbol_7)).numbers.arr[x_67] = (10 - x_68);
|
||||
(*(tint_symbol_7)).numbers.arr[x_67] = as_type<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);
|
||||
|
||||
@@ -44,13 +44,13 @@ int performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui
|
||||
int const x_106 = (*(tint_symbol_5)).numbers.arr[x_104];
|
||||
pivot = x_106;
|
||||
int const x_107 = *(l);
|
||||
i_1 = (x_107 - 1);
|
||||
i_1 = as_type<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 performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui
|
||||
int const x_122 = pivot;
|
||||
if ((x_121 <= x_122)) {
|
||||
int const x_126 = i_1;
|
||||
i_1 = (x_126 + 1);
|
||||
i_1 = as_type<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 performPartition_i1_i1_(thread int* const l, thread int* const h, thread Qui
|
||||
}
|
||||
{
|
||||
int const x_131 = j_1;
|
||||
j_1 = (x_131 + 1);
|
||||
j_1 = as_type<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 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) {
|
||||
h_1 = 9;
|
||||
top = -1;
|
||||
int const x_140 = top;
|
||||
int const x_141 = (x_140 + 1);
|
||||
int const x_141 = as_type<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 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) {
|
||||
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 @@ void quicksort_(thread QuicksortObject* const tint_symbol_6) {
|
||||
p = x_165;
|
||||
int const x_166 = p;
|
||||
int const x_168 = l_1;
|
||||
if (((x_166 - 1) > x_168)) {
|
||||
if ((as_type<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 @@ void main_1(thread QuicksortObject* const tint_symbol_7, thread float4* const ti
|
||||
}
|
||||
int const x_67 = i_2;
|
||||
int const x_68 = i_2;
|
||||
(*(tint_symbol_7)).numbers.arr[x_67] = (10 - x_68);
|
||||
(*(tint_symbol_7)).numbers.arr[x_67] = as_type<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);
|
||||
|
||||
Reference in New Issue
Block a user