mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
MSL writer: make signed int overflow defined behaviour
Bug: tint:124 Change-Id: Icf545b633d6390ceb7f639e80111390005e311a1 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60100 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
1f0200a3ff
commit
e5dbe24e94
@@ -37,7 +37,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
|
||||
} else {
|
||||
S const x_60 = arr.arr[1];
|
||||
param = x_60;
|
||||
param_1 = (2 + as_type<int>(x_50));
|
||||
param_1 = as_type<int>((as_type<uint>(2) + as_type<uint>(as_type<int>(x_50))));
|
||||
int const x_61 = param_1;
|
||||
S const x_63 = param;
|
||||
S x_64_1 = x_63;
|
||||
@@ -55,13 +55,13 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
|
||||
int const x_72 = param_1;
|
||||
S const x_75 = param;
|
||||
S x_76_1 = x_75;
|
||||
x_76_1.b = (x_72 + 1);
|
||||
x_76_1.b = as_type<int>((as_type<uint>(x_72) + as_type<uint>(1)));
|
||||
S const x_76 = x_76_1;
|
||||
param = x_76;
|
||||
int const x_77 = param_1;
|
||||
S const x_80 = param;
|
||||
S x_81_1 = x_80;
|
||||
x_81_1.c = (x_77 + 2);
|
||||
x_81_1.c = as_type<int>((as_type<uint>(x_77) + as_type<uint>(2)));
|
||||
S const x_81 = x_81_1;
|
||||
param = x_81;
|
||||
S const x_82 = param;
|
||||
@@ -75,7 +75,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
|
||||
S const x_89 = param;
|
||||
S const x_91 = param;
|
||||
S const x_94 = param;
|
||||
x_43 = ((x_89.a + x_91.b) + x_94.c);
|
||||
x_43 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_89.a) + as_type<uint>(x_91.b)))) + as_type<uint>(x_94.c)));
|
||||
int const x_97 = x_43;
|
||||
if ((x_97 == 12)) {
|
||||
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
@@ -105,9 +105,9 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) {
|
||||
(*(s)).a = 9;
|
||||
}
|
||||
int const x_109 = *(x);
|
||||
(*(s)).b = (x_109 + 1);
|
||||
(*(s)).b = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
|
||||
int const x_112 = *(x);
|
||||
(*(s)).c = (x_112 + 2);
|
||||
(*(s)).c = as_type<int>((as_type<uint>(x_112) + as_type<uint>(2)));
|
||||
int const x_115 = (*(s)).b;
|
||||
if ((x_115 == 2)) {
|
||||
(*(s)).b = 7;
|
||||
@@ -115,6 +115,6 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) {
|
||||
int const x_119 = (*(s)).a;
|
||||
int const x_120 = (*(s)).b;
|
||||
int const x_122 = (*(s)).c;
|
||||
return ((x_119 + x_120) + x_122);
|
||||
return as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_119) + as_type<uint>(x_120)))) + as_type<uint>(x_122)));
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
|
||||
} else {
|
||||
S const x_60 = arr.arr[1];
|
||||
param = x_60;
|
||||
param_1 = (2 + as_type<int>(x_50));
|
||||
param_1 = as_type<int>((as_type<uint>(2) + as_type<uint>(as_type<int>(x_50))));
|
||||
int const x_61 = param_1;
|
||||
S const x_63 = param;
|
||||
S x_64_1 = x_63;
|
||||
@@ -55,13 +55,13 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
|
||||
int const x_72 = param_1;
|
||||
S const x_75 = param;
|
||||
S x_76_1 = x_75;
|
||||
x_76_1.b = (x_72 + 1);
|
||||
x_76_1.b = as_type<int>((as_type<uint>(x_72) + as_type<uint>(1)));
|
||||
S const x_76 = x_76_1;
|
||||
param = x_76;
|
||||
int const x_77 = param_1;
|
||||
S const x_80 = param;
|
||||
S x_81_1 = x_80;
|
||||
x_81_1.c = (x_77 + 2);
|
||||
x_81_1.c = as_type<int>((as_type<uint>(x_77) + as_type<uint>(2)));
|
||||
S const x_81 = x_81_1;
|
||||
param = x_81;
|
||||
S const x_82 = param;
|
||||
@@ -75,7 +75,7 @@ void main_1(constant buf0& x_10, thread float4* const tint_symbol_4) {
|
||||
S const x_89 = param;
|
||||
S const x_91 = param;
|
||||
S const x_94 = param;
|
||||
x_43 = ((x_89.a + x_91.b) + x_94.c);
|
||||
x_43 = as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_89.a) + as_type<uint>(x_91.b)))) + as_type<uint>(x_94.c)));
|
||||
int const x_97 = x_43;
|
||||
if ((x_97 == 12)) {
|
||||
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
@@ -105,9 +105,9 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) {
|
||||
(*(s)).a = 9;
|
||||
}
|
||||
int const x_109 = *(x);
|
||||
(*(s)).b = (x_109 + 1);
|
||||
(*(s)).b = as_type<int>((as_type<uint>(x_109) + as_type<uint>(1)));
|
||||
int const x_112 = *(x);
|
||||
(*(s)).c = (x_112 + 2);
|
||||
(*(s)).c = as_type<int>((as_type<uint>(x_112) + as_type<uint>(2)));
|
||||
int const x_115 = (*(s)).b;
|
||||
if ((x_115 == 2)) {
|
||||
(*(s)).b = 7;
|
||||
@@ -115,6 +115,6 @@ int func_struct_S_i1_i1_i11_i1_(thread S* const s, thread int* const x) {
|
||||
int const x_119 = (*(s)).a;
|
||||
int const x_120 = (*(s)).b;
|
||||
int const x_122 = (*(s)).c;
|
||||
return ((x_119 + x_120) + x_122);
|
||||
return as_type<int>((as_type<uint>(as_type<int>((as_type<uint>(x_119) + as_type<uint>(x_120)))) + as_type<uint>(x_122)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user