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

@@ -718,7 +718,7 @@ void main_1(thread float4* const tint_symbol_23) {
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 @@ void main_1(thread float4* const tint_symbol_23) {
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 @@ void main_1(thread float4* const tint_symbol_23) {
}
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;

View File

@@ -718,7 +718,7 @@ void main_1(thread float4* const tint_symbol_23) {
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 @@ void main_1(thread float4* const tint_symbol_23) {
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 @@ void main_1(thread float4* const tint_symbol_23) {
}
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;

View File

@@ -258,7 +258,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
}
}
{
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 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
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 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
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 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
}
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;

View File

@@ -258,7 +258,7 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
}
}
{
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 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
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 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
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 @@ void main_1(constant buf0& x_8, thread float4* const tint_symbol_24, thread floa
}
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;