spirv-reader: fix mapping of OpLogicalOr, OpLogicalAnd
These work on scalar and vector of bool, and map to ast::BinaryOp::kOr
and kAnd.
Bug: tint:1043
Change-Id: I009edf8e43c21cb75ccfdcde1106ec177d2fe50e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59561
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: David Neto <dneto@google.com>
diff --git a/src/reader/spirv/function.cc b/src/reader/spirv/function.cc
index fcf87f5..aaa6a13 100644
--- a/src/reader/spirv/function.cc
+++ b/src/reader/spirv/function.cc
@@ -230,9 +230,9 @@
case SpvOpBitwiseXor:
return ast::BinaryOp::kXor;
case SpvOpLogicalAnd:
- return ast::BinaryOp::kLogicalAnd;
+ return ast::BinaryOp::kAnd;
case SpvOpLogicalOr:
- return ast::BinaryOp::kLogicalOr;
+ return ast::BinaryOp::kOr;
case SpvOpUGreaterThan:
case SpvOpSGreaterThan:
case SpvOpFOrdGreaterThan:
diff --git a/src/reader/spirv/function_logical_test.cc b/src/reader/spirv/function_logical_test.cc
index 173a17e..bb0005b 100644
--- a/src/reader/spirv/function_logical_test.cc
+++ b/src/reader/spirv/function_logical_test.cc
@@ -440,11 +440,10 @@
SpvBinaryLogicalTest,
::testing::Values(BinaryData{"bool", "true", "OpLogicalAnd", "false",
"__bool", "ScalarConstructor[not set]{true}",
- "logical_and",
- "ScalarConstructor[not set]{false}"},
+ "and", "ScalarConstructor[not set]{false}"},
BinaryData{"v2bool", "v2bool_t_f", "OpLogicalAnd",
"v2bool_f_t", "__vec_2__bool",
- AstFor("v2bool_t_f"), "logical_and",
+ AstFor("v2bool_t_f"), "and",
AstFor("v2bool_f_t")}));
INSTANTIATE_TEST_SUITE_P(
@@ -452,11 +451,10 @@
SpvBinaryLogicalTest,
::testing::Values(BinaryData{"bool", "true", "OpLogicalOr", "false",
"__bool", "ScalarConstructor[not set]{true}",
- "logical_or",
- "ScalarConstructor[not set]{false}"},
+ "or", "ScalarConstructor[not set]{false}"},
BinaryData{"v2bool", "v2bool_t_f", "OpLogicalOr",
"v2bool_f_t", "__vec_2__bool",
- AstFor("v2bool_t_f"), "logical_or",
+ AstFor("v2bool_t_f"), "or",
AstFor("v2bool_f_t")}));
INSTANTIATE_TEST_SUITE_P(
diff --git a/src/reader/spirv/function_var_test.cc b/src/reader/spirv/function_var_test.cc
index 0030a82..d78d1ca 100644
--- a/src/reader/spirv/function_var_test.cc
+++ b/src/reader/spirv/function_var_test.cc
@@ -2399,7 +2399,7 @@
{
Binary[not set]{
ScalarConstructor[not set]{true}
- logical_and
+ and
ScalarConstructor[not set]{true}
}
}
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl
index 1907070..0ab6d5a 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.hlsl
@@ -102,27 +102,11 @@
break;
}
GLF_live7_looplimiter0 = (GLF_live7_looplimiter0 + 1);
- bool tint_tmp = (GLF_live7c >= 0);
- if (tint_tmp) {
- tint_tmp = (GLF_live7c < 3);
- }
- bool tint_tmp_1 = (GLF_live7r >= 0);
- if (tint_tmp_1) {
- tint_tmp_1 = (GLF_live7r < 3);
- }
- set_float3(GLF_live7m33[((tint_tmp) ? GLF_live7c : 0)], ((tint_tmp_1) ? GLF_live7r : 0), 1.0f);
+ set_float3(GLF_live7m33[(((GLF_live7c >= 0) & (GLF_live7c < 3)) ? GLF_live7c : 0)], (((GLF_live7r >= 0) & (GLF_live7r < 3)) ? GLF_live7r : 0), 1.0f);
const float x_267 = asfloat(x_25[0].y);
if ((0.0f > x_267)) {
} else {
- bool tint_tmp_2 = (GLF_live7c >= 0);
- if (tint_tmp_2) {
- tint_tmp_2 = (GLF_live7c < 4);
- }
- bool tint_tmp_3 = (GLF_live7r >= 0);
- if (tint_tmp_3) {
- tint_tmp_3 = (GLF_live7r < 2);
- }
- set_float2(GLF_live7m42[((tint_tmp_2) ? GLF_live7c : 0)], ((tint_tmp_3) ? GLF_live7r : 0), 1.0f);
+ set_float2(GLF_live7m42[(((GLF_live7c >= 0) & (GLF_live7c < 4)) ? GLF_live7c : 0)], (((GLF_live7r >= 0) & (GLF_live7r < 2)) ? GLF_live7r : 0), 1.0f);
}
}
}
@@ -142,22 +126,14 @@
}
GLF_live7_looplimiter7 = (GLF_live7_looplimiter7 + 1);
GLF_live7rows_1 = 2;
- bool tint_tmp_4 = (GLF_live7sum_index >= 0);
- if (tint_tmp_4) {
- tint_tmp_4 = (GLF_live7sum_index < 9);
- }
- GLF_live7sums[((tint_tmp_4) ? GLF_live7sum_index : 0)] = 0.0f;
+ GLF_live7sums[(((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0)] = 0.0f;
GLF_live7c_1 = 0;
{
for(; (GLF_live7c_1 < 1); GLF_live7c_1 = (GLF_live7c_1 + 1)) {
GLF_live7r_1 = 0;
{
for(; (GLF_live7r_1 < GLF_live7rows_1); GLF_live7r_1 = (GLF_live7r_1 + 1)) {
- bool tint_tmp_5 = (GLF_live7sum_index >= 0);
- if (tint_tmp_5) {
- tint_tmp_5 = (GLF_live7sum_index < 9);
- }
- const int x_310 = ((tint_tmp_5) ? GLF_live7sum_index : 0);
+ const int x_310 = (((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0);
const float3x3 x_312 = transpose(GLF_live7m33);
if ((GLF_live7c_1 < 3)) {
x_180 = 1;
@@ -171,11 +147,7 @@
const float x_324 = indexable[x_320][((x_93 < 3) ? 1 : 0)];
const float x_326 = GLF_live7sums[x_310];
GLF_live7sums[x_310] = (x_326 + x_324);
- bool tint_tmp_6 = (GLF_live7sum_index >= 0);
- if (tint_tmp_6) {
- tint_tmp_6 = (GLF_live7sum_index < 9);
- }
- const int x_332 = ((tint_tmp_6) ? GLF_live7sum_index : 0);
+ const int x_332 = (((GLF_live7sum_index >= 0) & (GLF_live7sum_index < 9)) ? GLF_live7sum_index : 0);
const float x_334 = GLF_live7m42[1][GLF_live7r_1];
const float x_336 = GLF_live7sums[x_332];
GLF_live7sums[x_332] = (x_336 + x_334);
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl
index 9f3a7ed..cb848ea 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.msl
@@ -145,7 +145,7 @@
int const x_62 = GLF_live7r;
int const x_63 = GLF_live7r;
int const x_64 = GLF_live7r;
- GLF_live7m33[select(0, x_61, ((x_59 >= 0) && (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) && (x_63 < 3)))] = 1.0f;
+ GLF_live7m33[select(0, x_61, ((x_59 >= 0) & (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) & (x_63 < 3)))] = 1.0f;
float const x_267 = x_25.injectionSwitch.y;
if ((0.0f > x_267)) {
} else {
@@ -155,7 +155,7 @@
int const x_68 = GLF_live7r;
int const x_69 = GLF_live7r;
int const x_70 = GLF_live7r;
- GLF_live7m42[select(0, x_67, ((x_65 >= 0) && (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) && (x_69 < 2)))] = 1.0f;
+ GLF_live7m42[select(0, x_67, ((x_65 >= 0) & (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) & (x_69 < 2)))] = 1.0f;
}
{
int const x_71 = GLF_live7r;
@@ -196,7 +196,7 @@
int const x_83 = GLF_live7sum_index;
int const x_84 = GLF_live7sum_index;
int const x_85 = GLF_live7sum_index;
- GLF_live7sums.arr[select(0, x_85, ((x_83 >= 0) && (x_84 < 9)))] = 0.0f;
+ GLF_live7sums.arr[select(0, x_85, ((x_83 >= 0) & (x_84 < 9)))] = 0.0f;
GLF_live7c_1 = 0;
while (true) {
int const x_86 = GLF_live7c_1;
@@ -215,7 +215,7 @@
int const x_89 = GLF_live7sum_index;
int const x_90 = GLF_live7sum_index;
int const x_91 = GLF_live7sum_index;
- int const x_310 = select(0, x_91, ((x_89 >= 0) && (x_90 < 9)));
+ int const x_310 = select(0, x_91, ((x_89 >= 0) & (x_90 < 9)));
float3x3 const x_311 = GLF_live7m33;
float3x3 const x_312 = transpose(x_311);
int const x_92 = GLF_live7c_1;
@@ -234,7 +234,7 @@
int const x_94 = GLF_live7sum_index;
int const x_95 = GLF_live7sum_index;
int const x_96 = GLF_live7sum_index;
- int const x_332 = select(0, x_96, ((x_94 >= 0) && (x_95 < 9)));
+ int const x_332 = select(0, x_96, ((x_94 >= 0) & (x_95 < 9)));
int const x_97 = GLF_live7r_1;
float const x_334 = GLF_live7m42[1][x_97];
float const x_336 = GLF_live7sums.arr[x_332];
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.spvasm
index 694e352..ba3b2d9 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 403
+; Bound: 389
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -119,13 +119,13 @@
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_9 = OpConstant %int 9
%void = OpTypeVoid
- %348 = OpTypeFunction %void
- %353 = OpConstantNull %v2float
+ %334 = OpTypeFunction %void
+ %339 = OpConstantNull %v2float
%float_2 = OpConstant %float 2
%int_25 = OpConstant %int 25
- %389 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %375 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %390 = OpTypeFunction %void %main_out
+ %376 = OpTypeFunction %void %main_out
%drawShape_vf2_ = OpFunction %v3float None %15
%pos = OpFunctionParameter %_ptr_Function_v2float
%20 = OpLabel
@@ -341,323 +341,288 @@
%199 = OpLoad %int %GLF_live7r
%200 = OpLoad %int %GLF_live7r
%202 = OpSGreaterThanEqual %bool %195 %int_0
- OpSelectionMerge %203 None
- OpBranchConditional %202 %204 %203
- %204 = OpLabel
- %205 = OpSLessThan %bool %196 %int_3
- OpBranch %203
- %203 = OpLabel
- %206 = OpPhi %bool %202 %191 %205 %204
- %201 = OpSelect %int %206 %197 %int_0
- %208 = OpSGreaterThanEqual %bool %198 %int_0
- OpSelectionMerge %209 None
- OpBranchConditional %208 %210 %209
- %210 = OpLabel
- %211 = OpSLessThan %bool %199 %int_3
- OpBranch %209
- %209 = OpLabel
- %212 = OpPhi %bool %208 %203 %211 %210
- %207 = OpSelect %int %212 %200 %int_0
- %213 = OpAccessChain %_ptr_Function_float %GLF_live7m33 %201 %207
- OpStore %213 %float_1
- %215 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_1
- %216 = OpLoad %float %215
- %217 = OpFOrdGreaterThan %bool %float_0 %216
- OpSelectionMerge %218 None
- OpBranchConditional %217 %219 %220
- %219 = OpLabel
- OpBranch %218
- %220 = OpLabel
- %221 = OpLoad %int %GLF_live7c
- %222 = OpLoad %int %GLF_live7c
- %223 = OpLoad %int %GLF_live7c
- %224 = OpLoad %int %GLF_live7r
- %225 = OpLoad %int %GLF_live7r
- %226 = OpLoad %int %GLF_live7r
- %228 = OpSGreaterThanEqual %bool %221 %int_0
- OpSelectionMerge %229 None
- OpBranchConditional %228 %230 %229
- %230 = OpLabel
- %231 = OpSLessThan %bool %222 %int_4
- OpBranch %229
- %229 = OpLabel
- %232 = OpPhi %bool %228 %220 %231 %230
- %227 = OpSelect %int %232 %223 %int_0
- %234 = OpSGreaterThanEqual %bool %224 %int_0
- OpSelectionMerge %235 None
- OpBranchConditional %234 %236 %235
- %236 = OpLabel
- %237 = OpSLessThan %bool %225 %int_2
- OpBranch %235
- %235 = OpLabel
- %238 = OpPhi %bool %234 %229 %237 %236
- %233 = OpSelect %int %238 %226 %int_0
- %239 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %227 %233
- OpStore %239 %float_1
- OpBranch %218
- %218 = OpLabel
+ %203 = OpSLessThan %bool %196 %int_3
+ %204 = OpLogicalAnd %bool %202 %203
+ %201 = OpSelect %int %204 %197 %int_0
+ %206 = OpSGreaterThanEqual %bool %198 %int_0
+ %207 = OpSLessThan %bool %199 %int_3
+ %208 = OpLogicalAnd %bool %206 %207
+ %205 = OpSelect %int %208 %200 %int_0
+ %209 = OpAccessChain %_ptr_Function_float %GLF_live7m33 %201 %205
+ OpStore %209 %float_1
+ %211 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_1
+ %212 = OpLoad %float %211
+ %213 = OpFOrdGreaterThan %bool %float_0 %212
+ OpSelectionMerge %214 None
+ OpBranchConditional %213 %215 %216
+ %215 = OpLabel
+ OpBranch %214
+ %216 = OpLabel
+ %217 = OpLoad %int %GLF_live7c
+ %218 = OpLoad %int %GLF_live7c
+ %219 = OpLoad %int %GLF_live7c
+ %220 = OpLoad %int %GLF_live7r
+ %221 = OpLoad %int %GLF_live7r
+ %222 = OpLoad %int %GLF_live7r
+ %224 = OpSGreaterThanEqual %bool %217 %int_0
+ %225 = OpSLessThan %bool %218 %int_4
+ %226 = OpLogicalAnd %bool %224 %225
+ %223 = OpSelect %int %226 %219 %int_0
+ %228 = OpSGreaterThanEqual %bool %220 %int_0
+ %229 = OpSLessThan %bool %221 %int_2
+ %230 = OpLogicalAnd %bool %228 %229
+ %227 = OpSelect %int %230 %222 %int_0
+ %231 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %223 %227
+ OpStore %231 %float_1
+ OpBranch %214
+ %214 = OpLabel
OpBranch %182
%182 = OpLabel
- %240 = OpLoad %int %GLF_live7r
- %241 = OpIAdd %int %240 %int_1
- OpStore %GLF_live7r %241
+ %232 = OpLoad %int %GLF_live7r
+ %233 = OpIAdd %int %232 %int_1
+ OpStore %GLF_live7r %233
OpBranch %180
%181 = OpLabel
OpBranch %166
%166 = OpLabel
- %242 = OpLoad %int %GLF_live7c
- %243 = OpIAdd %int %242 %int_1
- OpStore %GLF_live7c %243
+ %234 = OpLoad %int %GLF_live7c
+ %235 = OpIAdd %int %234 %int_1
+ OpStore %GLF_live7c %235
OpBranch %164
%165 = OpLabel
OpBranch %151
%151 = OpLabel
- %244 = OpLoad %int %GLF_live7rows
- %245 = OpIAdd %int %244 %int_1
- OpStore %GLF_live7rows %245
+ %236 = OpLoad %int %GLF_live7rows
+ %237 = OpIAdd %int %236 %int_1
+ OpStore %GLF_live7rows %237
OpBranch %149
%150 = OpLabel
OpBranch %136
%136 = OpLabel
- %246 = OpLoad %int %GLF_live7cols
- %247 = OpIAdd %int %246 %int_1
- OpStore %GLF_live7cols %247
+ %238 = OpLoad %int %GLF_live7cols
+ %239 = OpIAdd %int %238 %int_1
+ OpStore %GLF_live7cols %239
OpBranch %134
%135 = OpLabel
OpStore %GLF_live7sum_index %int_0
OpStore %GLF_live7_looplimiter7 %int_0
OpStore %GLF_live7cols_1 %int_2
- OpBranch %248
+ OpBranch %240
+ %240 = OpLabel
+ OpLoopMerge %241 %242 None
+ OpBranch %243
+ %243 = OpLabel
+ %244 = OpLoad %int %GLF_live7cols_1
+ %245 = OpSLessThan %bool %244 %int_4
+ OpSelectionMerge %246 None
+ OpBranchConditional %245 %247 %248
+ %247 = OpLabel
+ OpBranch %246
%248 = OpLabel
- OpLoopMerge %249 %250 None
- OpBranch %251
+ OpBranch %241
+ %246 = OpLabel
+ %249 = OpLoad %int %GLF_live7_looplimiter7
+ %250 = OpSGreaterThanEqual %bool %249 %int_7
+ OpSelectionMerge %251 None
+ OpBranchConditional %250 %252 %251
+ %252 = OpLabel
+ OpBranch %241
%251 = OpLabel
- %252 = OpLoad %int %GLF_live7cols_1
- %253 = OpSLessThan %bool %252 %int_4
- OpSelectionMerge %254 None
- OpBranchConditional %253 %255 %256
- %255 = OpLabel
- OpBranch %254
- %256 = OpLabel
- OpBranch %249
- %254 = OpLabel
- %257 = OpLoad %int %GLF_live7_looplimiter7
- %258 = OpSGreaterThanEqual %bool %257 %int_7
- OpSelectionMerge %259 None
- OpBranchConditional %258 %260 %259
- %260 = OpLabel
- OpBranch %249
- %259 = OpLabel
- %261 = OpLoad %int %GLF_live7_looplimiter7
- %262 = OpIAdd %int %261 %int_1
- OpStore %GLF_live7_looplimiter7 %262
+ %253 = OpLoad %int %GLF_live7_looplimiter7
+ %254 = OpIAdd %int %253 %int_1
+ OpStore %GLF_live7_looplimiter7 %254
OpStore %GLF_live7rows_1 %int_2
- %263 = OpLoad %int %GLF_live7sum_index
- %264 = OpLoad %int %GLF_live7sum_index
- %265 = OpLoad %int %GLF_live7sum_index
- %267 = OpSGreaterThanEqual %bool %263 %int_0
- OpSelectionMerge %268 None
- OpBranchConditional %267 %269 %268
- %269 = OpLabel
- %271 = OpSLessThan %bool %264 %int_9
- OpBranch %268
- %268 = OpLabel
- %272 = OpPhi %bool %267 %259 %271 %269
- %266 = OpSelect %int %272 %265 %int_0
- %273 = OpAccessChain %_ptr_Function_float %GLF_live7sums %266
- OpStore %273 %float_0
+ %255 = OpLoad %int %GLF_live7sum_index
+ %256 = OpLoad %int %GLF_live7sum_index
+ %257 = OpLoad %int %GLF_live7sum_index
+ %259 = OpSGreaterThanEqual %bool %255 %int_0
+ %261 = OpSLessThan %bool %256 %int_9
+ %262 = OpLogicalAnd %bool %259 %261
+ %258 = OpSelect %int %262 %257 %int_0
+ %263 = OpAccessChain %_ptr_Function_float %GLF_live7sums %258
+ OpStore %263 %float_0
OpStore %GLF_live7c_1 %int_0
- OpBranch %274
- %274 = OpLabel
- OpLoopMerge %275 %276 None
- OpBranch %277
- %277 = OpLabel
- %278 = OpLoad %int %GLF_live7c_1
- %279 = OpSLessThan %bool %278 %int_1
+ OpBranch %264
+ %264 = OpLabel
+ OpLoopMerge %265 %266 None
+ OpBranch %267
+ %267 = OpLabel
+ %268 = OpLoad %int %GLF_live7c_1
+ %269 = OpSLessThan %bool %268 %int_1
+ OpSelectionMerge %270 None
+ OpBranchConditional %269 %271 %272
+ %271 = OpLabel
+ OpBranch %270
+ %272 = OpLabel
+ OpBranch %265
+ %270 = OpLabel
+ OpStore %GLF_live7r_1 %int_0
+ OpBranch %273
+ %273 = OpLabel
+ OpLoopMerge %274 %275 None
+ OpBranch %276
+ %276 = OpLabel
+ %277 = OpLoad %int %GLF_live7r_1
+ %278 = OpLoad %int %GLF_live7rows_1
+ %279 = OpSLessThan %bool %277 %278
OpSelectionMerge %280 None
OpBranchConditional %279 %281 %282
%281 = OpLabel
OpBranch %280
%282 = OpLabel
- OpBranch %275
- %280 = OpLabel
- OpStore %GLF_live7r_1 %int_0
- OpBranch %283
- %283 = OpLabel
- OpLoopMerge %284 %285 None
- OpBranch %286
- %286 = OpLabel
- %287 = OpLoad %int %GLF_live7r_1
- %288 = OpLoad %int %GLF_live7rows_1
- %289 = OpSLessThan %bool %287 %288
- OpSelectionMerge %290 None
- OpBranchConditional %289 %291 %292
- %291 = OpLabel
- OpBranch %290
- %292 = OpLabel
- OpBranch %284
- %290 = OpLabel
- %293 = OpLoad %int %GLF_live7sum_index
- %294 = OpLoad %int %GLF_live7sum_index
- %295 = OpLoad %int %GLF_live7sum_index
- %297 = OpSGreaterThanEqual %bool %293 %int_0
- OpSelectionMerge %298 None
- OpBranchConditional %297 %299 %298
- %299 = OpLabel
- %300 = OpSLessThan %bool %294 %int_9
- OpBranch %298
- %298 = OpLabel
- %301 = OpPhi %bool %297 %290 %300 %299
- %296 = OpSelect %int %301 %295 %int_0
- %302 = OpLoad %mat3v3float %GLF_live7m33
- %303 = OpTranspose %mat3v3float %302
- %304 = OpLoad %int %GLF_live7c_1
- %305 = OpSLessThan %bool %304 %int_3
- OpSelectionMerge %306 None
- OpBranchConditional %305 %307 %308
- %307 = OpLabel
- OpStore %x_180 %int_1
- OpBranch %306
- %308 = OpLabel
- %309 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
- %310 = OpLoad %float %309
- %311 = OpConvertFToS %int %310
- OpStore %x_180 %311
- OpBranch %306
- %306 = OpLabel
- %312 = OpLoad %int %x_180
- %313 = OpLoad %int %GLF_live7r_1
- OpStore %indexable %303
- %315 = OpSLessThan %bool %313 %int_3
- %314 = OpSelect %int %315 %int_1 %int_0
- %316 = OpAccessChain %_ptr_Function_float %indexable %312 %314
- %317 = OpLoad %float %316
- %318 = OpAccessChain %_ptr_Function_float %GLF_live7sums %296
- %319 = OpLoad %float %318
- %320 = OpAccessChain %_ptr_Function_float %GLF_live7sums %296
- %321 = OpFAdd %float %319 %317
- OpStore %320 %321
- %322 = OpLoad %int %GLF_live7sum_index
- %323 = OpLoad %int %GLF_live7sum_index
- %324 = OpLoad %int %GLF_live7sum_index
- %326 = OpSGreaterThanEqual %bool %322 %int_0
- OpSelectionMerge %327 None
- OpBranchConditional %326 %328 %327
- %328 = OpLabel
- %329 = OpSLessThan %bool %323 %int_9
- OpBranch %327
- %327 = OpLabel
- %330 = OpPhi %bool %326 %306 %329 %328
- %325 = OpSelect %int %330 %324 %int_0
- %331 = OpLoad %int %GLF_live7r_1
- %332 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %int_1 %331
- %333 = OpLoad %float %332
- %334 = OpAccessChain %_ptr_Function_float %GLF_live7sums %325
- %335 = OpLoad %float %334
- %336 = OpAccessChain %_ptr_Function_float %GLF_live7sums %325
- %337 = OpFAdd %float %335 %333
- OpStore %336 %337
- OpBranch %285
- %285 = OpLabel
- %338 = OpLoad %int %GLF_live7r_1
- %339 = OpIAdd %int %338 %int_1
- OpStore %GLF_live7r_1 %339
- OpBranch %283
- %284 = OpLabel
- OpBranch %276
- %276 = OpLabel
- %340 = OpLoad %int %GLF_live7c_1
- %341 = OpIAdd %int %340 %int_1
- OpStore %GLF_live7c_1 %341
OpBranch %274
+ %280 = OpLabel
+ %283 = OpLoad %int %GLF_live7sum_index
+ %284 = OpLoad %int %GLF_live7sum_index
+ %285 = OpLoad %int %GLF_live7sum_index
+ %287 = OpSGreaterThanEqual %bool %283 %int_0
+ %288 = OpSLessThan %bool %284 %int_9
+ %289 = OpLogicalAnd %bool %287 %288
+ %286 = OpSelect %int %289 %285 %int_0
+ %290 = OpLoad %mat3v3float %GLF_live7m33
+ %291 = OpTranspose %mat3v3float %290
+ %292 = OpLoad %int %GLF_live7c_1
+ %293 = OpSLessThan %bool %292 %int_3
+ OpSelectionMerge %294 None
+ OpBranchConditional %293 %295 %296
+ %295 = OpLabel
+ OpStore %x_180 %int_1
+ OpBranch %294
+ %296 = OpLabel
+ %297 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
+ %298 = OpLoad %float %297
+ %299 = OpConvertFToS %int %298
+ OpStore %x_180 %299
+ OpBranch %294
+ %294 = OpLabel
+ %300 = OpLoad %int %x_180
+ %301 = OpLoad %int %GLF_live7r_1
+ OpStore %indexable %291
+ %303 = OpSLessThan %bool %301 %int_3
+ %302 = OpSelect %int %303 %int_1 %int_0
+ %304 = OpAccessChain %_ptr_Function_float %indexable %300 %302
+ %305 = OpLoad %float %304
+ %306 = OpAccessChain %_ptr_Function_float %GLF_live7sums %286
+ %307 = OpLoad %float %306
+ %308 = OpAccessChain %_ptr_Function_float %GLF_live7sums %286
+ %309 = OpFAdd %float %307 %305
+ OpStore %308 %309
+ %310 = OpLoad %int %GLF_live7sum_index
+ %311 = OpLoad %int %GLF_live7sum_index
+ %312 = OpLoad %int %GLF_live7sum_index
+ %314 = OpSGreaterThanEqual %bool %310 %int_0
+ %315 = OpSLessThan %bool %311 %int_9
+ %316 = OpLogicalAnd %bool %314 %315
+ %313 = OpSelect %int %316 %312 %int_0
+ %317 = OpLoad %int %GLF_live7r_1
+ %318 = OpAccessChain %_ptr_Function_float %GLF_live7m42 %int_1 %317
+ %319 = OpLoad %float %318
+ %320 = OpAccessChain %_ptr_Function_float %GLF_live7sums %313
+ %321 = OpLoad %float %320
+ %322 = OpAccessChain %_ptr_Function_float %GLF_live7sums %313
+ %323 = OpFAdd %float %321 %319
+ OpStore %322 %323
+ OpBranch %275
%275 = OpLabel
- %342 = OpLoad %int %GLF_live7sum_index
- %343 = OpIAdd %int %342 %int_1
- OpStore %GLF_live7sum_index %343
- OpBranch %250
- %250 = OpLabel
- %344 = OpLoad %int %GLF_live7cols_1
- %345 = OpIAdd %int %344 %int_1
- OpStore %GLF_live7cols_1 %345
- OpBranch %248
- %249 = OpLabel
+ %324 = OpLoad %int %GLF_live7r_1
+ %325 = OpIAdd %int %324 %int_1
+ OpStore %GLF_live7r_1 %325
+ OpBranch %273
+ %274 = OpLabel
+ OpBranch %266
+ %266 = OpLabel
+ %326 = OpLoad %int %GLF_live7c_1
+ %327 = OpIAdd %int %326 %int_1
+ OpStore %GLF_live7c_1 %327
+ OpBranch %264
+ %265 = OpLabel
+ %328 = OpLoad %int %GLF_live7sum_index
+ %329 = OpIAdd %int %328 %int_1
+ OpStore %GLF_live7sum_index %329
+ OpBranch %242
+ %242 = OpLabel
+ %330 = OpLoad %int %GLF_live7cols_1
+ %331 = OpIAdd %int %330 %int_1
+ OpStore %GLF_live7cols_1 %331
+ OpBranch %240
+ %241 = OpLabel
OpBranch %108
%108 = OpLabel
- %346 = OpLoad %int %GLF_live4i
- %347 = OpIAdd %int %346 %int_1
- OpStore %GLF_live4i %347
+ %332 = OpLoad %int %GLF_live4i
+ %333 = OpIAdd %int %332 %int_1
+ OpStore %GLF_live4i %333
OpBranch %106
%107 = OpLabel
OpReturnValue %74
OpFunctionEnd
- %main_1 = OpFunction %void None %348
- %351 = OpLabel
- %position = OpVariable %_ptr_Function_v2float Function %353
- %param = OpVariable %_ptr_Function_v2float Function %353
- %param_1 = OpVariable %_ptr_Function_v2float Function %353
+ %main_1 = OpFunction %void None %334
+ %337 = OpLabel
+ %position = OpVariable %_ptr_Function_v2float Function %339
+ %param = OpVariable %_ptr_Function_v2float Function %339
+ %param_1 = OpVariable %_ptr_Function_v2float Function %339
%i = OpVariable %_ptr_Function_int Function %32
- %param_2 = OpVariable %_ptr_Function_v2float Function %353
- %358 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
- %359 = OpLoad %float %358
- %361 = OpFOrdGreaterThanEqual %bool %359 %float_2
- OpSelectionMerge %362 None
- OpBranchConditional %361 %363 %362
- %363 = OpLabel
- %364 = OpLoad %v4float %gl_FragCoord
- %365 = OpCompositeExtract %float %364 0
- %366 = OpCompositeExtract %float %364 1
- %367 = OpCompositeConstruct %v2float %365 %366
- OpStore %position %367
- %368 = OpLoad %v2float %position
- OpStore %param %368
- %369 = OpFunctionCall %v3float %drawShape_vf2_ %param
- %371 = OpLoad %v2float %position
- OpStore %param_1 %371
- %372 = OpFunctionCall %v3float %drawShape_vf2_ %param_1
+ %param_2 = OpVariable %_ptr_Function_v2float Function %339
+ %344 = OpAccessChain %_ptr_Uniform_float %x_25 %uint_0 %uint_0
+ %345 = OpLoad %float %344
+ %347 = OpFOrdGreaterThanEqual %bool %345 %float_2
+ OpSelectionMerge %348 None
+ OpBranchConditional %347 %349 %348
+ %349 = OpLabel
+ %350 = OpLoad %v4float %gl_FragCoord
+ %351 = OpCompositeExtract %float %350 0
+ %352 = OpCompositeExtract %float %350 1
+ %353 = OpCompositeConstruct %v2float %351 %352
+ OpStore %position %353
+ %354 = OpLoad %v2float %position
+ OpStore %param %354
+ %355 = OpFunctionCall %v3float %drawShape_vf2_ %param
+ %357 = OpLoad %v2float %position
+ OpStore %param_1 %357
+ %358 = OpFunctionCall %v3float %drawShape_vf2_ %param_1
OpStore %i %int_25
- OpBranch %375
- %375 = OpLabel
- OpLoopMerge %376 %377 None
- OpBranch %378
- %378 = OpLabel
- %379 = OpLoad %int %i
- %380 = OpSGreaterThan %bool %379 %int_0
- OpSelectionMerge %381 None
- OpBranchConditional %380 %382 %383
- %382 = OpLabel
- OpBranch %381
- %383 = OpLabel
- OpBranch %376
- %381 = OpLabel
- %384 = OpLoad %v2float %position
- OpStore %param_2 %384
- %385 = OpFunctionCall %v3float %drawShape_vf2_ %param_2
- OpBranch %377
- %377 = OpLabel
- %387 = OpLoad %int %i
- %388 = OpISub %int %387 %int_1
- OpStore %i %388
- OpBranch %375
- %376 = OpLabel
+ OpBranch %361
+ %361 = OpLabel
+ OpLoopMerge %362 %363 None
+ OpBranch %364
+ %364 = OpLabel
+ %365 = OpLoad %int %i
+ %366 = OpSGreaterThan %bool %365 %int_0
+ OpSelectionMerge %367 None
+ OpBranchConditional %366 %368 %369
+ %368 = OpLabel
+ OpBranch %367
+ %369 = OpLabel
OpBranch %362
+ %367 = OpLabel
+ %370 = OpLoad %v2float %position
+ OpStore %param_2 %370
+ %371 = OpFunctionCall %v3float %drawShape_vf2_ %param_2
+ OpBranch %363
+ %363 = OpLabel
+ %373 = OpLoad %int %i
+ %374 = OpISub %int %373 %int_1
+ OpStore %i %374
+ OpBranch %361
%362 = OpLabel
- OpStore %x_GLF_color %389
+ OpBranch %348
+ %348 = OpLabel
+ OpStore %x_GLF_color %375
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %390
+%tint_symbol_3 = OpFunction %void None %376
%tint_symbol_1 = OpFunctionParameter %main_out
- %394 = OpLabel
- %395 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %395
+ %380 = OpLabel
+ %381 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %381
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %348
- %397 = OpLabel
- %398 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %398
- %399 = OpFunctionCall %void %main_1
- %401 = OpLoad %v4float %x_GLF_color
- %402 = OpCompositeConstruct %main_out %401
- %400 = OpFunctionCall %void %tint_symbol_3 %402
+ %main = OpFunction %void None %334
+ %383 = OpLabel
+ %384 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %384
+ %385 = OpFunctionCall %void %main_1
+ %387 = OpLoad %v4float %x_GLF_color
+ %388 = OpCompositeConstruct %main_out %387
+ %386 = OpFunctionCall %void %tint_symbol_3 %388
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.wgsl
index 9ca6d37..0730594 100644
--- a/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/control-flow-in-function/0-opt.spvasm.expected.wgsl
@@ -140,7 +140,7 @@
let x_62 : i32 = GLF_live7r;
let x_63 : i32 = GLF_live7r;
let x_64 : i32 = GLF_live7r;
- GLF_live7m33[select(0, x_61, ((x_59 >= 0) && (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) && (x_63 < 3)))] = 1.0;
+ GLF_live7m33[select(0, x_61, ((x_59 >= 0) & (x_60 < 3)))][select(0, x_64, ((x_62 >= 0) & (x_63 < 3)))] = 1.0;
let x_267 : f32 = x_25.injectionSwitch.y;
if ((0.0 > x_267)) {
} else {
@@ -150,7 +150,7 @@
let x_68 : i32 = GLF_live7r;
let x_69 : i32 = GLF_live7r;
let x_70 : i32 = GLF_live7r;
- GLF_live7m42[select(0, x_67, ((x_65 >= 0) && (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) && (x_69 < 2)))] = 1.0;
+ GLF_live7m42[select(0, x_67, ((x_65 >= 0) & (x_66 < 4)))][select(0, x_70, ((x_68 >= 0) & (x_69 < 2)))] = 1.0;
}
continuing {
@@ -195,7 +195,7 @@
let x_83 : i32 = GLF_live7sum_index;
let x_84 : i32 = GLF_live7sum_index;
let x_85 : i32 = GLF_live7sum_index;
- GLF_live7sums[select(0, x_85, ((x_83 >= 0) && (x_84 < 9)))] = 0.0;
+ GLF_live7sums[select(0, x_85, ((x_83 >= 0) & (x_84 < 9)))] = 0.0;
GLF_live7c_1 = 0;
loop {
let x_86 : i32 = GLF_live7c_1;
@@ -214,7 +214,7 @@
let x_89 : i32 = GLF_live7sum_index;
let x_90 : i32 = GLF_live7sum_index;
let x_91 : i32 = GLF_live7sum_index;
- let x_310 : i32 = select(0, x_91, ((x_89 >= 0) && (x_90 < 9)));
+ let x_310 : i32 = select(0, x_91, ((x_89 >= 0) & (x_90 < 9)));
let x_311 : mat3x3<f32> = GLF_live7m33;
let x_312 : mat3x3<f32> = transpose(x_311);
let x_92 : i32 = GLF_live7c_1;
@@ -233,7 +233,7 @@
let x_94 : i32 = GLF_live7sum_index;
let x_95 : i32 = GLF_live7sum_index;
let x_96 : i32 = GLF_live7sum_index;
- let x_332 : i32 = select(0, x_96, ((x_94 >= 0) && (x_95 < 9)));
+ let x_332 : i32 = select(0, x_96, ((x_94 >= 0) & (x_95 < 9)));
let x_97 : i32 = GLF_live7r_1;
let x_334 : f32 = GLF_live7m42[1][x_97];
let x_336 : f32 = GLF_live7sums[x_332];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl
index a13eb73..0886ad0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.hlsl
@@ -23,41 +23,25 @@
bool x_72_phi = false;
const float x_42 = s1;
f1 = (10.0f - (x_42 * floor((10.0f / x_42))));
- bool tint_tmp = isinf(f1);
- if (!tint_tmp) {
- tint_tmp = (s1 == 1.0f);
- }
- const bool x_48 = (tint_tmp);
+ const bool x_48 = (isinf(f1) | (s1 == 1.0f));
x_73_phi = x_48;
if (!(x_48)) {
const bool x_54 = (f0 == f1);
x_63_phi = x_54;
if (!(x_54)) {
- bool tint_tmp_1 = (f0 > 0.99000001f);
- if (tint_tmp_1) {
- tint_tmp_1 = (f0 < 0.01f);
- }
- x_62 = (tint_tmp_1);
+ x_62 = ((f0 > 0.99000001f) & (f0 < 0.01f));
x_63_phi = x_62;
}
const bool x_63 = x_63_phi;
x_72_phi = x_63;
if (!(x_63)) {
- bool tint_tmp_2 = (f1 > 0.99000001f);
- if (tint_tmp_2) {
- tint_tmp_2 = (f1 < 0.01f);
- }
- x_71 = (tint_tmp_2);
+ x_71 = ((f1 > 0.99000001f) & (f1 < 0.01f));
x_72_phi = x_71;
}
x_72 = x_72_phi;
x_73_phi = x_72;
}
- bool tint_tmp_3 = x_73_phi;
- if (!tint_tmp_3) {
- tint_tmp_3 = (f1 == 10.0f);
- }
- if ((tint_tmp_3)) {
+ if ((x_73_phi | (f1 == 10.0f))) {
const int x_81 = asint(x_8[1].x);
const uint scalar_offset = ((16u * uint(0))) / 4;
const int x_84 = asint(x_8[scalar_offset / 4][scalar_offset % 4]);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
index eed1df1..d72281e 100755
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.msl
@@ -48,7 +48,7 @@
f1 = (10.0f - (x_42 * floor((10.0f / x_42))));
float const x_44 = f1;
float const x_46 = s1;
- bool const x_48 = (isinf(x_44) || (x_46 == 1.0f));
+ bool const x_48 = (isinf(x_44) | (x_46 == 1.0f));
x_73_phi = x_48;
if (!(x_48)) {
float const x_52 = f0;
@@ -58,7 +58,7 @@
if (!(x_54)) {
float const x_58 = f0;
float const x_60 = f0;
- x_62 = ((x_58 > 0.99000001f) && (x_60 < 0.01f));
+ x_62 = ((x_58 > 0.99000001f) & (x_60 < 0.01f));
x_63_phi = x_62;
}
bool const x_63 = x_63_phi;
@@ -66,7 +66,7 @@
if (!(x_63)) {
float const x_67 = f1;
float const x_69 = f1;
- x_71 = ((x_67 > 0.99000001f) && (x_69 < 0.01f));
+ x_71 = ((x_67 > 0.99000001f) & (x_69 < 0.01f));
x_72_phi = x_71;
}
x_72 = x_72_phi;
@@ -74,7 +74,7 @@
}
bool const x_73 = x_73_phi;
float const x_74 = f1;
- if ((x_73 || (x_74 == 10.0f))) {
+ if ((x_73 | (x_74 == 10.0f))) {
int const x_81 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_84 = x_8.x_GLF_uniform_int_values.arr[0].el;
int const x_87 = x_8.x_GLF_uniform_int_values.arr[0].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.spvasm
index d7b1097..a8b7c7b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 139
+; Bound: 131
; Schema: 0
OpCapability Shader
%37 = OpExtInstImport "GLSL.std.450"
@@ -83,7 +83,7 @@
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%main_out = OpTypeStruct %v4float
- %127 = OpTypeFunction %void %main_out
+ %119 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%f0 = OpVariable %_ptr_Function_float Function %26
@@ -118,117 +118,97 @@
%57 = OpLoad %float %f1
%58 = OpLoad %float %s1
%59 = OpIsInf %bool %57
- OpSelectionMerge %60 None
- OpBranchConditional %59 %60 %61
- %61 = OpLabel
- %62 = OpFOrdEqual %bool %58 %float_1
- OpBranch %60
- %60 = OpLabel
- %63 = OpPhi %bool %59 %45 %62 %61
- OpStore %x_73_phi %63
- %64 = OpLogicalNot %bool %63
- OpSelectionMerge %65 None
- OpBranchConditional %64 %66 %65
- %66 = OpLabel
- %67 = OpLoad %float %f0
- %68 = OpLoad %float %f1
- %69 = OpFOrdEqual %bool %67 %68
- OpStore %x_63_phi %69
- %70 = OpLogicalNot %bool %69
- OpSelectionMerge %71 None
- OpBranchConditional %70 %72 %71
- %72 = OpLabel
- %73 = OpLoad %float %f0
- %74 = OpLoad %float %f0
- %76 = OpFOrdGreaterThan %bool %73 %float_0_99000001
- OpSelectionMerge %77 None
- OpBranchConditional %76 %78 %77
- %78 = OpLabel
- %80 = OpFOrdLessThan %bool %74 %float_0_00999999978
- OpBranch %77
- %77 = OpLabel
- %81 = OpPhi %bool %76 %72 %80 %78
- OpStore %x_62 %81
- %82 = OpLoad %bool %x_62
- OpStore %x_63_phi %82
- OpBranch %71
- %71 = OpLabel
- %83 = OpLoad %bool %x_63_phi
- OpStore %x_72_phi %83
- %84 = OpLogicalNot %bool %83
- OpSelectionMerge %85 None
- OpBranchConditional %84 %86 %85
- %86 = OpLabel
- %87 = OpLoad %float %f1
- %88 = OpLoad %float %f1
- %89 = OpFOrdGreaterThan %bool %87 %float_0_99000001
- OpSelectionMerge %90 None
- OpBranchConditional %89 %91 %90
- %91 = OpLabel
- %92 = OpFOrdLessThan %bool %88 %float_0_00999999978
- OpBranch %90
- %90 = OpLabel
- %93 = OpPhi %bool %89 %86 %92 %91
- OpStore %x_71 %93
- %94 = OpLoad %bool %x_71
- OpStore %x_72_phi %94
- OpBranch %85
- %85 = OpLabel
- %95 = OpLoad %bool %x_72_phi
- OpStore %x_72 %95
- %96 = OpLoad %bool %x_72
- OpStore %x_73_phi %96
- OpBranch %65
- %65 = OpLabel
- %97 = OpLoad %bool %x_73_phi
- %98 = OpLoad %float %f1
- OpSelectionMerge %99 None
- OpBranchConditional %97 %99 %100
- %100 = OpLabel
- %101 = OpFOrdEqual %bool %98 %float_10
- OpBranch %99
- %99 = OpLabel
- %102 = OpPhi %bool %97 %65 %101 %100
- OpSelectionMerge %103 None
- OpBranchConditional %102 %104 %105
- %104 = OpLabel
- %109 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
- %110 = OpLoad %int %109
- %112 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
- %113 = OpLoad %int %112
- %114 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
- %115 = OpLoad %int %114
- %116 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
- %117 = OpLoad %int %116
- %118 = OpConvertSToF %float %110
- %119 = OpConvertSToF %float %113
- %120 = OpConvertSToF %float %115
- %121 = OpConvertSToF %float %117
- %122 = OpCompositeConstruct %v4float %118 %119 %120 %121
- OpStore %x_GLF_color %122
- OpBranch %103
- %105 = OpLabel
- %123 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
- %124 = OpLoad %int %123
- %125 = OpConvertSToF %float %124
- %126 = OpCompositeConstruct %v4float %125 %125 %125 %125
- OpStore %x_GLF_color %126
- OpBranch %103
- %103 = OpLabel
+ %60 = OpFOrdEqual %bool %58 %float_1
+ %61 = OpLogicalOr %bool %59 %60
+ OpStore %x_73_phi %61
+ %62 = OpLogicalNot %bool %61
+ OpSelectionMerge %63 None
+ OpBranchConditional %62 %64 %63
+ %64 = OpLabel
+ %65 = OpLoad %float %f0
+ %66 = OpLoad %float %f1
+ %67 = OpFOrdEqual %bool %65 %66
+ OpStore %x_63_phi %67
+ %68 = OpLogicalNot %bool %67
+ OpSelectionMerge %69 None
+ OpBranchConditional %68 %70 %69
+ %70 = OpLabel
+ %71 = OpLoad %float %f0
+ %72 = OpLoad %float %f0
+ %74 = OpFOrdGreaterThan %bool %71 %float_0_99000001
+ %76 = OpFOrdLessThan %bool %72 %float_0_00999999978
+ %77 = OpLogicalAnd %bool %74 %76
+ OpStore %x_62 %77
+ %78 = OpLoad %bool %x_62
+ OpStore %x_63_phi %78
+ OpBranch %69
+ %69 = OpLabel
+ %79 = OpLoad %bool %x_63_phi
+ OpStore %x_72_phi %79
+ %80 = OpLogicalNot %bool %79
+ OpSelectionMerge %81 None
+ OpBranchConditional %80 %82 %81
+ %82 = OpLabel
+ %83 = OpLoad %float %f1
+ %84 = OpLoad %float %f1
+ %85 = OpFOrdGreaterThan %bool %83 %float_0_99000001
+ %86 = OpFOrdLessThan %bool %84 %float_0_00999999978
+ %87 = OpLogicalAnd %bool %85 %86
+ OpStore %x_71 %87
+ %88 = OpLoad %bool %x_71
+ OpStore %x_72_phi %88
+ OpBranch %81
+ %81 = OpLabel
+ %89 = OpLoad %bool %x_72_phi
+ OpStore %x_72 %89
+ %90 = OpLoad %bool %x_72
+ OpStore %x_73_phi %90
+ OpBranch %63
+ %63 = OpLabel
+ %91 = OpLoad %bool %x_73_phi
+ %92 = OpLoad %float %f1
+ %93 = OpFOrdEqual %bool %92 %float_10
+ %94 = OpLogicalOr %bool %91 %93
+ OpSelectionMerge %95 None
+ OpBranchConditional %94 %96 %97
+ %96 = OpLabel
+ %101 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
+ %102 = OpLoad %int %101
+ %104 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
+ %105 = OpLoad %int %104
+ %106 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
+ %107 = OpLoad %int %106
+ %108 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
+ %109 = OpLoad %int %108
+ %110 = OpConvertSToF %float %102
+ %111 = OpConvertSToF %float %105
+ %112 = OpConvertSToF %float %107
+ %113 = OpConvertSToF %float %109
+ %114 = OpCompositeConstruct %v4float %110 %111 %112 %113
+ OpStore %x_GLF_color %114
+ OpBranch %95
+ %97 = OpLabel
+ %115 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
+ %116 = OpLoad %int %115
+ %117 = OpConvertSToF %float %116
+ %118 = OpCompositeConstruct %v4float %117 %117 %117 %117
+ OpStore %x_GLF_color %118
+ OpBranch %95
+ %95 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %127
+%tint_symbol_2 = OpFunction %void None %119
%tint_symbol = OpFunctionParameter %main_out
- %131 = OpLabel
- %132 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %132
+ %123 = OpLabel
+ %124 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %124
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
- %134 = OpLabel
- %135 = OpFunctionCall %void %main_1
- %137 = OpLoad %v4float %x_GLF_color
- %138 = OpCompositeConstruct %main_out %137
- %136 = OpFunctionCall %void %tint_symbol_2 %138
+ %126 = OpLabel
+ %127 = OpFunctionCall %void %main_1
+ %129 = OpLoad %v4float %x_GLF_color
+ %130 = OpCompositeConstruct %main_out %129
+ %128 = OpFunctionCall %void %tint_symbol_2 %130
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.wgsl
index 69a4451..6c98a92 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-module-small-number/0-opt.spvasm.expected.wgsl
@@ -38,7 +38,7 @@
f1 = (10.0 - (x_42 * floor((10.0 / x_42))));
let x_44 : f32 = f1;
let x_46 : f32 = s1;
- let x_48 : bool = (isInf(x_44) || (x_46 == 1.0));
+ let x_48 : bool = (isInf(x_44) | (x_46 == 1.0));
x_73_phi = x_48;
if (!(x_48)) {
let x_52 : f32 = f0;
@@ -48,7 +48,7 @@
if (!(x_54)) {
let x_58 : f32 = f0;
let x_60 : f32 = f0;
- x_62 = ((x_58 > 0.99000001) && (x_60 < 0.01));
+ x_62 = ((x_58 > 0.99000001) & (x_60 < 0.01));
x_63_phi = x_62;
}
let x_63 : bool = x_63_phi;
@@ -56,7 +56,7 @@
if (!(x_63)) {
let x_67 : f32 = f1;
let x_69 : f32 = f1;
- x_71 = ((x_67 > 0.99000001) && (x_69 < 0.01));
+ x_71 = ((x_67 > 0.99000001) & (x_69 < 0.01));
x_72_phi = x_71;
}
x_72 = x_72_phi;
@@ -64,7 +64,7 @@
}
let x_73 : bool = x_73_phi;
let x_74 : f32 = f1;
- if ((x_73 || (x_74 == 10.0))) {
+ if ((x_73 | (x_74 == 10.0))) {
let x_81 : i32 = x_8.x_GLF_uniform_int_values[1];
let x_84 : i32 = x_8.x_GLF_uniform_int_values[0];
let x_87 : i32 = x_8.x_GLF_uniform_int_values[0];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl
index 5cb60bd..f7fa990 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.hlsl
@@ -7,11 +7,7 @@
v = float4(1.0f, 2.0f, 3.0f, 4.0f);
dist1 = distance(tanh(v), (sinh(v) / cosh(v)));
dist2 = distance(tanh(v), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f));
- bool tint_tmp = (dist1 < 0.100000001f);
- if (tint_tmp) {
- tint_tmp = (dist2 < 0.100000001f);
- }
- if ((tint_tmp)) {
+ if (((dist1 < 0.100000001f) & (dist2 < 0.100000001f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl
index 3b940f3..1659188 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
dist2 = distance(tanh(x_38), float4(0.761590004f, 0.964030027f, 0.995050013f, 0.999329984f));
float const x_41 = dist1;
float const x_43 = dist2;
- if (((x_41 < 0.100000001f) && (x_43 < 0.100000001f))) {
+ if (((x_41 < 0.100000001f) & (x_43 < 0.100000001f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.spvasm
index 1f2f4f7..ad52ff1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 67
+; Bound: 65
; Schema: 0
OpCapability Shader
%27 = OpExtInstImport "GLSL.std.450"
@@ -46,10 +46,10 @@
%float_0_100000001 = OpConstant %float 0.100000001
%bool = OpTypeBool
%float_0 = OpConstant %float 0
- %53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %54 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %55 = OpTypeFunction %void %main_out
+ %53 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%v = OpVariable %_ptr_Function_v4float Function %5
@@ -72,36 +72,31 @@
%40 = OpLoad %float %dist1
%41 = OpLoad %float %dist2
%43 = OpFOrdLessThan %bool %40 %float_0_100000001
- OpSelectionMerge %45 None
- OpBranchConditional %43 %46 %45
- %46 = OpLabel
- %47 = OpFOrdLessThan %bool %41 %float_0_100000001
- OpBranch %45
- %45 = OpLabel
- %48 = OpPhi %bool %43 %11 %47 %46
- OpSelectionMerge %49 None
- OpBranchConditional %48 %50 %51
- %50 = OpLabel
- OpStore %x_GLF_color %53
- OpBranch %49
- %51 = OpLabel
- OpStore %x_GLF_color %54
- OpBranch %49
+ %45 = OpFOrdLessThan %bool %41 %float_0_100000001
+ %46 = OpLogicalAnd %bool %43 %45
+ OpSelectionMerge %47 None
+ OpBranchConditional %46 %48 %49
+ %48 = OpLabel
+ OpStore %x_GLF_color %51
+ OpBranch %47
%49 = OpLabel
+ OpStore %x_GLF_color %52
+ OpBranch %47
+ %47 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %55
+%tint_symbol_2 = OpFunction %void None %53
%tint_symbol = OpFunctionParameter %main_out
- %59 = OpLabel
- %60 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %60
+ %57 = OpLabel
+ %58 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %58
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %62 = OpLabel
- %63 = OpFunctionCall %void %main_1
- %65 = OpLoad %v4float %x_GLF_color
- %66 = OpCompositeConstruct %main_out %65
- %64 = OpFunctionCall %void %tint_symbol_2 %66
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %main_1
+ %63 = OpLoad %v4float %x_GLF_color
+ %64 = OpCompositeConstruct %main_out %63
+ %62 = OpFunctionCall %void %tint_symbol_2 %64
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.wgsl
index 8bcb3a5..64816ce 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-apfloat-tanh/0-opt.spvasm.expected.wgsl
@@ -13,7 +13,7 @@
dist2 = distance(tanh(x_38), vec4<f32>(0.761590004, 0.964030027, 0.995050013, 0.999329984));
let x_41 : f32 = dist1;
let x_43 : f32 = dist2;
- if (((x_41 < 0.100000001) && (x_43 < 0.100000001))) {
+ if (((x_41 < 0.100000001) & (x_43 < 0.100000001))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl
index cef004d..e12b4af 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.hlsl
@@ -13,11 +13,7 @@
i = (i + 1);
j = (j + 1);
}
- bool tint_tmp = (i == 9);
- if (tint_tmp) {
- tint_tmp = (j == 10);
- }
- if ((tint_tmp)) {
+ if (((i == 9) & (j == 10))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl
index 35f0b9c..6c19a66 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.msl
@@ -27,7 +27,7 @@
}
int const x_37 = i;
int const x_39 = j;
- if (((x_37 == 9) && (x_39 == 10))) {
+ if (((x_37 == 9) & (x_39 == 10))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.spvasm
index 99a8be5..e3f49f8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 65
+; Bound: 63
; Schema: 0
OpCapability Shader
%26 = OpExtInstImport "GLSL.std.450"
@@ -40,10 +40,10 @@
%int_10 = OpConstant %int 10
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
- %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %49 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %50 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %53 = OpTypeFunction %void %main_out
+ %51 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%i = OpVariable %_ptr_Function_int Function %15
@@ -79,36 +79,31 @@
%38 = OpLoad %int %i
%39 = OpLoad %int %j
%40 = OpIEqual %bool %38 %int_9
- OpSelectionMerge %41 None
- OpBranchConditional %40 %42 %41
- %42 = OpLabel
- %44 = OpIEqual %bool %39 %int_10
- OpBranch %41
- %41 = OpLabel
- %45 = OpPhi %bool %40 %20 %44 %42
- OpSelectionMerge %46 None
- OpBranchConditional %45 %47 %48
- %47 = OpLabel
- OpStore %x_GLF_color %51
- OpBranch %46
- %48 = OpLabel
- OpStore %x_GLF_color %52
- OpBranch %46
+ %42 = OpIEqual %bool %39 %int_10
+ %43 = OpLogicalAnd %bool %40 %42
+ OpSelectionMerge %44 None
+ OpBranchConditional %43 %45 %46
+ %45 = OpLabel
+ OpStore %x_GLF_color %49
+ OpBranch %44
%46 = OpLabel
+ OpStore %x_GLF_color %50
+ OpBranch %44
+ %44 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %53
+%tint_symbol_2 = OpFunction %void None %51
%tint_symbol = OpFunctionParameter %main_out
- %57 = OpLabel
- %58 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %58
+ %55 = OpLabel
+ %56 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %56
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %60 = OpLabel
- %61 = OpFunctionCall %void %main_1
- %63 = OpLoad %v4float %x_GLF_color
- %64 = OpCompositeConstruct %main_out %63
- %62 = OpFunctionCall %void %tint_symbol_2 %64
+ %58 = OpLabel
+ %59 = OpFunctionCall %void %main_1
+ %61 = OpLoad %v4float %x_GLF_color
+ %62 = OpCompositeConstruct %main_out %61
+ %60 = OpFunctionCall %void %tint_symbol_2 %62
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.wgsl
index 367bf40..25c0dac 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-const-folding-clamp-inside-while/0-opt.spvasm.expected.wgsl
@@ -19,7 +19,7 @@
}
let x_37 : i32 = i;
let x_39 : i32 = j;
- if (((x_37 == 9) && (x_39 == 10))) {
+ if (((x_37 == 9) & (x_39 == 10))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl
index c627f2d..3067c8a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.hlsl
@@ -3,11 +3,7 @@
void main_1() {
float f = 0.0f;
f = atan2(1.0f, tanh(1.0f));
- bool tint_tmp = (f > 0.910000026f);
- if (tint_tmp) {
- tint_tmp = (f < 0.930000007f);
- }
- if ((tint_tmp)) {
+ if (((f > 0.910000026f) & (f < 0.930000007f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl
index 2bef818..b162726 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.msl
@@ -13,7 +13,7 @@
f = atan2(1.0f, tanh(1.0f));
float const x_21 = f;
float const x_23 = f;
- if (((x_21 > 0.910000026f) && (x_23 < 0.930000007f))) {
+ if (((x_21 > 0.910000026f) & (x_23 < 0.930000007f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.spvasm
index b1523b5..ad265d4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 47
+; Bound: 45
; Schema: 0
OpCapability Shader
%16 = OpExtInstImport "GLSL.std.450"
@@ -35,10 +35,10 @@
%bool = OpTypeBool
%float_0_930000007 = OpConstant %float 0.930000007
%float_0 = OpConstant %float 0
- %33 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %34 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %31 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %32 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %35 = OpTypeFunction %void %main_out
+ %33 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%f = OpVariable %_ptr_Function_float Function %14
@@ -48,36 +48,31 @@
%19 = OpLoad %float %f
%20 = OpLoad %float %f
%22 = OpFOrdGreaterThan %bool %19 %float_0_910000026
- OpSelectionMerge %24 None
- OpBranchConditional %22 %25 %24
- %25 = OpLabel
- %27 = OpFOrdLessThan %bool %20 %float_0_930000007
- OpBranch %24
- %24 = OpLabel
- %28 = OpPhi %bool %22 %11 %27 %25
- OpSelectionMerge %29 None
- OpBranchConditional %28 %30 %31
- %30 = OpLabel
- OpStore %x_GLF_color %33
- OpBranch %29
- %31 = OpLabel
- OpStore %x_GLF_color %34
- OpBranch %29
+ %25 = OpFOrdLessThan %bool %20 %float_0_930000007
+ %26 = OpLogicalAnd %bool %22 %25
+ OpSelectionMerge %27 None
+ OpBranchConditional %26 %28 %29
+ %28 = OpLabel
+ OpStore %x_GLF_color %31
+ OpBranch %27
%29 = OpLabel
+ OpStore %x_GLF_color %32
+ OpBranch %27
+ %27 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %35
+%tint_symbol_2 = OpFunction %void None %33
%tint_symbol = OpFunctionParameter %main_out
- %39 = OpLabel
- %40 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %40
+ %37 = OpLabel
+ %38 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %38
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %42 = OpLabel
- %43 = OpFunctionCall %void %main_1
- %45 = OpLoad %v4float %x_GLF_color
- %46 = OpCompositeConstruct %main_out %45
- %44 = OpFunctionCall %void %tint_symbol_2 %46
+ %40 = OpLabel
+ %41 = OpFunctionCall %void %main_1
+ %43 = OpLoad %v4float %x_GLF_color
+ %44 = OpCompositeConstruct %main_out %43
+ %42 = OpFunctionCall %void %tint_symbol_2 %44
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.wgsl
index aa69903..12ed859 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-constant-folding-atan-over-tanh/0-opt.spvasm.expected.wgsl
@@ -5,7 +5,7 @@
f = atan2(1.0, tanh(1.0));
let x_21 : f32 = f;
let x_23 : f32 = f;
- if (((x_21 > 0.910000026) && (x_23 < 0.930000007))) {
+ if (((x_21 > 0.910000026) & (x_23 < 0.930000007))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl
index c9c5e08..14fc706 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.hlsl
@@ -4,11 +4,7 @@
float2x2 m = float2x2(0.0f, 0.0f, 0.0f, 0.0f);
m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
const float2x2 x_33 = m;
- bool tint_tmp = all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u]));
- if (tint_tmp) {
- tint_tmp = all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u]));
- }
- if ((tint_tmp)) {
+ if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) & all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl
index 6ff0e42..abb0900 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.msl
@@ -12,7 +12,7 @@
float2x2 m = float2x2(0.0f);
m = (transpose(float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))) * (1.0f / 2.0f));
float2x2 const x_33 = m;
- if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) && all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
+ if ((all((x_33[0u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[0u])) & all((x_33[1u] == float2x2(float2(0.5f, 1.5f), float2(1.0f, 2.0f))[1u])))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.spvasm
index e11c805..50d4c1b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 66
+; Bound: 64
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -48,10 +48,10 @@
%v2bool = OpTypeVector %bool 2
%uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0
- %52 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %53 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %50 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %54 = OpTypeFunction %void %main_out
+ %52 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %16
@@ -64,39 +64,34 @@
%37 = OpCompositeExtract %v2float %36 0
%38 = OpFOrdEqual %v2bool %32 %37
%28 = OpAll %bool %38
- OpSelectionMerge %40 None
- OpBranchConditional %28 %41 %40
- %41 = OpLabel
- %44 = OpCompositeExtract %v2float %27 1
- %45 = OpCompositeExtract %v2float %36 1
- %46 = OpFOrdEqual %v2bool %44 %45
- %42 = OpAll %bool %46
- OpBranch %40
- %40 = OpLabel
- %47 = OpPhi %bool %28 %11 %42 %41
- OpSelectionMerge %48 None
- OpBranchConditional %47 %49 %50
- %49 = OpLabel
- OpStore %x_GLF_color %52
- OpBranch %48
- %50 = OpLabel
- OpStore %x_GLF_color %53
- OpBranch %48
+ %42 = OpCompositeExtract %v2float %27 1
+ %43 = OpCompositeExtract %v2float %36 1
+ %44 = OpFOrdEqual %v2bool %42 %43
+ %40 = OpAll %bool %44
+ %45 = OpLogicalAnd %bool %28 %40
+ OpSelectionMerge %46 None
+ OpBranchConditional %45 %47 %48
+ %47 = OpLabel
+ OpStore %x_GLF_color %50
+ OpBranch %46
%48 = OpLabel
+ OpStore %x_GLF_color %51
+ OpBranch %46
+ %46 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %54
+%tint_symbol_2 = OpFunction %void None %52
%tint_symbol = OpFunctionParameter %main_out
- %58 = OpLabel
- %59 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %59
+ %56 = OpLabel
+ %57 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %57
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %61 = OpLabel
- %62 = OpFunctionCall %void %main_1
- %64 = OpLoad %v4float %x_GLF_color
- %65 = OpCompositeConstruct %main_out %64
- %63 = OpFunctionCall %void %tint_symbol_2 %65
+ %59 = OpLabel
+ %60 = OpFunctionCall %void %main_1
+ %62 = OpLoad %v4float %x_GLF_color
+ %63 = OpCompositeConstruct %main_out %62
+ %61 = OpFunctionCall %void %tint_symbol_2 %63
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.wgsl
index af5a1c1..1b73939 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-divide-matrix-transpose-by-constant/0-opt.spvasm.expected.wgsl
@@ -4,7 +4,7 @@
var m : mat2x2<f32>;
m = (transpose(mat2x2<f32>(vec2<f32>(1.0, 2.0), vec2<f32>(3.0, 4.0))) * (1.0 / 2.0));
let x_33 : mat2x2<f32> = m;
- if ((all((x_33[0u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[0u])) && all((x_33[1u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[1u])))) {
+ if ((all((x_33[0u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[0u])) & all((x_33[1u] == mat2x2<f32>(vec2<f32>(0.5, 1.5), vec2<f32>(1.0, 2.0))[1u])))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl
index 205d238..63f7da2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.hlsl
@@ -3,11 +3,7 @@
void main_1() {
bool a = false;
a = false;
- bool tint_tmp = true;
- if (tint_tmp) {
- tint_tmp = a;
- }
- if ((tint_tmp)) {
+ if ((true & a)) {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
} else {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl
index c5fe7c9..dd7b01c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.msl
@@ -12,7 +12,7 @@
bool a = false;
a = false;
bool const x_19 = a;
- if ((true && x_19)) {
+ if ((true & x_19)) {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
} else {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.spvasm
index ae7b276..772fda6 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 41
+; Bound: 39
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -33,45 +33,40 @@
%false = OpConstantFalse %bool
%true = OpConstantTrue %bool
%float_0 = OpConstant %float 0
- %26 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %24 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%float_1 = OpConstant %float 1
- %28 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %26 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %29 = OpTypeFunction %void %main_out
+ %27 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%a = OpVariable %_ptr_Function_bool Function %15
OpStore %a %false
%17 = OpLoad %bool %a
- OpSelectionMerge %19 None
- OpBranchConditional %true %20 %19
- %20 = OpLabel
- OpBranch %19
- %19 = OpLabel
- %21 = OpPhi %bool %true %11 %17 %20
- OpSelectionMerge %22 None
- OpBranchConditional %21 %23 %24
- %23 = OpLabel
- OpStore %x_GLF_color %26
- OpBranch %22
- %24 = OpLabel
- OpStore %x_GLF_color %28
- OpBranch %22
+ %19 = OpLogicalAnd %bool %true %17
+ OpSelectionMerge %20 None
+ OpBranchConditional %19 %21 %22
+ %21 = OpLabel
+ OpStore %x_GLF_color %24
+ OpBranch %20
%22 = OpLabel
+ OpStore %x_GLF_color %26
+ OpBranch %20
+ %20 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %29
+%tint_symbol_2 = OpFunction %void None %27
%tint_symbol = OpFunctionParameter %main_out
- %33 = OpLabel
- %34 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %34
+ %31 = OpLabel
+ %32 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %32
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %36 = OpLabel
- %37 = OpFunctionCall %void %main_1
- %39 = OpLoad %v4float %x_GLF_color
- %40 = OpCompositeConstruct %main_out %39
- %38 = OpFunctionCall %void %tint_symbol_2 %40
+ %34 = OpLabel
+ %35 = OpFunctionCall %void %main_1
+ %37 = OpLoad %v4float %x_GLF_color
+ %38 = OpCompositeConstruct %main_out %37
+ %36 = OpFunctionCall %void %tint_symbol_2 %38
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.wgsl
index 3d02048..bcb055a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-const-variable/0.spvasm.expected.wgsl
@@ -4,7 +4,7 @@
var a : bool;
a = false;
let x_19 : bool = a;
- if ((true && x_19)) {
+ if ((true & x_19)) {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
} else {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl
index 52e6a55..64d9a98 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.hlsl
@@ -8,11 +8,7 @@
i = (i + 1);
{
const float x_35 = gl_FragCoord.x;
- bool tint_tmp = (x_35 >= 0.0f);
- if (tint_tmp) {
- tint_tmp = false;
- }
- if ((tint_tmp)) {
+ if (((x_35 >= 0.0f) & false)) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl
index a3fb456..fdfaeeb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.msl
@@ -16,7 +16,7 @@
i = (x_6 + 1);
{
float const x_35 = (*(tint_symbol_5)).x;
- if (((x_35 >= 0.0f) && false)) {
+ if (((x_35 >= 0.0f) & false)) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.wgsl
index 4fa9901..de1d092 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-and-constant/0-opt.spvasm.expected.wgsl
@@ -11,7 +11,7 @@
continuing {
let x_35 : f32 = gl_FragCoord.x;
- if (((x_35 >= 0.0) && false)) {
+ if (((x_35 >= 0.0) & false)) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl
index e1f6bdd..62ce799 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.hlsl
@@ -3,11 +3,7 @@
void main_1() {
const float x_22 = gl_FragCoord.x;
- bool tint_tmp = (x_22 < 0.0f);
- if (!tint_tmp) {
- tint_tmp = true;
- }
- if ((tint_tmp)) {
+ if (((x_22 < 0.0f) | true)) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl
index c32c624..6262310 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.msl
@@ -10,7 +10,7 @@
void main_1(thread float4* const tint_symbol_5, thread float4* const tint_symbol_6) {
float const x_22 = (*(tint_symbol_5)).x;
- if (((x_22 < 0.0f) || true)) {
+ if (((x_22 < 0.0f) | true)) {
*(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.spvasm
index 53bc076..9bea875 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 46
+; Bound: 44
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -39,46 +39,41 @@
%bool = OpTypeBool
%true = OpConstantTrue %bool
%float_1 = OpConstant %float 1
- %31 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %32 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %29 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %30 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %33 = OpTypeFunction %void %main_out
+ %31 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%18 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%19 = OpLoad %float %18
%21 = OpFOrdLessThan %bool %19 %float_0
- OpSelectionMerge %23 None
- OpBranchConditional %21 %23 %24
- %24 = OpLabel
- OpBranch %23
- %23 = OpLabel
- %26 = OpPhi %bool %21 %14 %true %24
- OpSelectionMerge %27 None
- OpBranchConditional %26 %28 %29
- %28 = OpLabel
- OpStore %x_GLF_color %31
- OpBranch %27
- %29 = OpLabel
- OpStore %x_GLF_color %32
- OpBranch %27
+ %24 = OpLogicalOr %bool %21 %true
+ OpSelectionMerge %25 None
+ OpBranchConditional %24 %26 %27
+ %26 = OpLabel
+ OpStore %x_GLF_color %29
+ OpBranch %25
%27 = OpLabel
+ OpStore %x_GLF_color %30
+ OpBranch %25
+ %25 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %33
+%tint_symbol_3 = OpFunction %void None %31
%tint_symbol_1 = OpFunctionParameter %main_out
- %37 = OpLabel
- %38 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %38
+ %35 = OpLabel
+ %36 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %36
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
- %40 = OpLabel
- %41 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %41
- %42 = OpFunctionCall %void %main_1
- %44 = OpLoad %v4float %x_GLF_color
- %45 = OpCompositeConstruct %main_out %44
- %43 = OpFunctionCall %void %tint_symbol_3 %45
+ %38 = OpLabel
+ %39 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %39
+ %40 = OpFunctionCall %void %main_1
+ %42 = OpLoad %v4float %x_GLF_color
+ %43 = OpCompositeConstruct %main_out %42
+ %41 = OpFunctionCall %void %tint_symbol_3 %43
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.wgsl
index 56678ab..c44609f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-logical-or-constant/0.spvasm.expected.wgsl
@@ -4,7 +4,7 @@
fn main_1() {
let x_22 : f32 = gl_FragCoord.x;
- if (((x_22 < 0.0) || true)) {
+ if (((x_22 < 0.0) | true)) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl
index 44f7ed6..4db9a87 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.hlsl
@@ -40,27 +40,7 @@
if ((f != 0u)) {
f = 0u;
}
- bool tint_tmp_4 = (a == 1u);
- if (tint_tmp_4) {
- tint_tmp_4 = (b == 0u);
- }
- bool tint_tmp_3 = (tint_tmp_4);
- if (tint_tmp_3) {
- tint_tmp_3 = (c == 1u);
- }
- bool tint_tmp_2 = (tint_tmp_3);
- if (tint_tmp_2) {
- tint_tmp_2 = (d == 0u);
- }
- bool tint_tmp_1 = (tint_tmp_2);
- if (tint_tmp_1) {
- tint_tmp_1 = (e == 1u);
- }
- bool tint_tmp = (tint_tmp_1);
- if (tint_tmp) {
- tint_tmp = (f == 0u);
- }
- if ((tint_tmp)) {
+ if (((((((a == 1u) & (b == 0u)) & (c == 1u)) & (d == 0u)) & (e == 1u)) & (f == 0u))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl
index 5d8fa54..c8f07e8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.msl
@@ -60,7 +60,7 @@
uint const x_96 = d;
uint const x_99 = e;
uint const x_102 = f;
- if (((((((x_88 == 1u) && (x_90 == 0u)) && (x_93 == 1u)) && (x_96 == 0u)) && (x_99 == 1u)) && (x_102 == 0u))) {
+ if (((((((x_88 == 1u) & (x_90 == 0u)) & (x_93 == 1u)) & (x_96 == 0u)) & (x_99 == 1u)) & (x_102 == 0u))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.spvasm
index 8468b80..b31bcda 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 131
+; Bound: 121
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -61,10 +61,10 @@
%bool = OpTypeBool
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
- %117 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %118 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %107 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %108 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %119 = OpTypeFunction %void %main_out
+ %109 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%a = OpVariable %_ptr_Function_uint Function %18
@@ -158,64 +158,39 @@
%89 = OpLoad %uint %e
%90 = OpLoad %uint %f
%91 = OpIEqual %bool %85 %uint_1
- OpSelectionMerge %92 None
- OpBranchConditional %91 %93 %92
- %93 = OpLabel
- %94 = OpIEqual %bool %86 %uint_0
- OpBranch %92
- %92 = OpLabel
- %95 = OpPhi %bool %91 %83 %94 %93
- OpSelectionMerge %96 None
- OpBranchConditional %95 %97 %96
- %97 = OpLabel
- %98 = OpIEqual %bool %87 %uint_1
- OpBranch %96
- %96 = OpLabel
- %99 = OpPhi %bool %95 %92 %98 %97
- OpSelectionMerge %100 None
- OpBranchConditional %99 %101 %100
- %101 = OpLabel
- %102 = OpIEqual %bool %88 %uint_0
- OpBranch %100
- %100 = OpLabel
- %103 = OpPhi %bool %99 %96 %102 %101
- OpSelectionMerge %104 None
- OpBranchConditional %103 %105 %104
- %105 = OpLabel
- %106 = OpIEqual %bool %89 %uint_1
- OpBranch %104
+ %92 = OpIEqual %bool %86 %uint_0
+ %93 = OpLogicalAnd %bool %91 %92
+ %94 = OpIEqual %bool %87 %uint_1
+ %95 = OpLogicalAnd %bool %93 %94
+ %96 = OpIEqual %bool %88 %uint_0
+ %97 = OpLogicalAnd %bool %95 %96
+ %98 = OpIEqual %bool %89 %uint_1
+ %99 = OpLogicalAnd %bool %97 %98
+ %100 = OpIEqual %bool %90 %uint_0
+ %101 = OpLogicalAnd %bool %99 %100
+ OpSelectionMerge %102 None
+ OpBranchConditional %101 %103 %104
+ %103 = OpLabel
+ OpStore %x_GLF_color %107
+ OpBranch %102
%104 = OpLabel
- %107 = OpPhi %bool %103 %100 %106 %105
- OpSelectionMerge %108 None
- OpBranchConditional %107 %109 %108
- %109 = OpLabel
- %110 = OpIEqual %bool %90 %uint_0
- OpBranch %108
- %108 = OpLabel
- %111 = OpPhi %bool %107 %104 %110 %109
- OpSelectionMerge %112 None
- OpBranchConditional %111 %113 %114
- %113 = OpLabel
- OpStore %x_GLF_color %117
- OpBranch %112
- %114 = OpLabel
- OpStore %x_GLF_color %118
- OpBranch %112
- %112 = OpLabel
+ OpStore %x_GLF_color %108
+ OpBranch %102
+ %102 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %119
+%tint_symbol_2 = OpFunction %void None %109
%tint_symbol = OpFunctionParameter %main_out
- %123 = OpLabel
- %124 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %124
+ %113 = OpLabel
+ %114 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %114
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
- %126 = OpLabel
- %127 = OpFunctionCall %void %main_1
- %129 = OpLoad %v4float %x_GLF_color
- %130 = OpCompositeConstruct %main_out %129
- %128 = OpFunctionCall %void %tint_symbol_2 %130
+ %116 = OpLabel
+ %117 = OpFunctionCall %void %main_1
+ %119 = OpLoad %v4float %x_GLF_color
+ %120 = OpCompositeConstruct %main_out %119
+ %118 = OpFunctionCall %void %tint_symbol_2 %120
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.wgsl
index ec6d634..02b3570 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-fold-shift-gte32/0.spvasm.expected.wgsl
@@ -56,7 +56,7 @@
let x_96 : u32 = d;
let x_99 : u32 = e;
let x_102 : u32 = f;
- if (((((((x_88 == 1u) && (x_90 == 0u)) && (x_93 == 1u)) && (x_96 == 0u)) && (x_99 == 1u)) && (x_102 == 0u))) {
+ if (((((((x_88 == 1u) & (x_90 == 0u)) & (x_93 == 1u)) & (x_96 == 0u)) & (x_99 == 1u)) & (x_102 == 0u))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl
index d20ee0a..f5e4574 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.hlsl
@@ -7,11 +7,7 @@
float f = 0.0f;
const float x_28 = asfloat(x_6[0].x);
f = (4.0f / (2.0f * x_28));
- bool tint_tmp = (f > 1.899999976f);
- if (tint_tmp) {
- tint_tmp = (f < 2.099999905f);
- }
- if ((tint_tmp)) {
+ if (((f > 1.899999976f) & (f < 2.099999905f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl
index b807292..9823f42 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
f = (4.0f / (2.0f * x_28));
float const x_31 = f;
float const x_33 = f;
- if (((x_31 > 1.899999976f) && (x_33 < 2.099999905f))) {
+ if (((x_31 > 1.899999976f) & (x_33 < 2.099999905f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.spvasm
index 056fe41..ea91153 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -50,10 +50,10 @@
%float_2_0999999 = OpConstant %float 2.0999999
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
- %42 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %43 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %40 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %41 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %44 = OpTypeFunction %void %main_out
+ %42 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%f = OpVariable %_ptr_Function_float Function %17
@@ -65,36 +65,31 @@
%27 = OpLoad %float %f
%28 = OpLoad %float %f
%30 = OpFOrdGreaterThan %bool %27 %float_1_89999998
- OpSelectionMerge %32 None
- OpBranchConditional %30 %33 %32
- %33 = OpLabel
- %35 = OpFOrdLessThan %bool %28 %float_2_0999999
- OpBranch %32
- %32 = OpLabel
- %36 = OpPhi %bool %30 %14 %35 %33
- OpSelectionMerge %37 None
- OpBranchConditional %36 %38 %39
- %38 = OpLabel
- OpStore %x_GLF_color %42
- OpBranch %37
- %39 = OpLabel
- OpStore %x_GLF_color %43
- OpBranch %37
+ %33 = OpFOrdLessThan %bool %28 %float_2_0999999
+ %34 = OpLogicalAnd %bool %30 %33
+ OpSelectionMerge %35 None
+ OpBranchConditional %34 %36 %37
+ %36 = OpLabel
+ OpStore %x_GLF_color %40
+ OpBranch %35
%37 = OpLabel
+ OpStore %x_GLF_color %41
+ OpBranch %35
+ %35 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %44
+%tint_symbol_2 = OpFunction %void None %42
%tint_symbol = OpFunctionParameter %main_out
- %48 = OpLabel
- %49 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %49
+ %46 = OpLabel
+ %47 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %47
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
- %51 = OpLabel
- %52 = OpFunctionCall %void %main_1
- %54 = OpLoad %v4float %x_GLF_color
- %55 = OpCompositeConstruct %main_out %54
- %53 = OpFunctionCall %void %tint_symbol_2 %55
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %main_1
+ %52 = OpLoad %v4float %x_GLF_color
+ %53 = OpCompositeConstruct %main_out %52
+ %51 = OpFunctionCall %void %tint_symbol_2 %53
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.wgsl
index 5b77b48..59a8d67 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-div-mul/0-opt.spvasm.expected.wgsl
@@ -13,7 +13,7 @@
f = (4.0 / (2.0 * x_28));
let x_31 : f32 = f;
let x_33 : f32 = f;
- if (((x_31 > 1.899999976) && (x_33 < 2.099999905))) {
+ if (((x_31 > 1.899999976) & (x_33 < 2.099999905))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl
index 1b0d83d..02ede34 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.hlsl
@@ -7,11 +7,7 @@
float a = 0.0f;
const float x_27 = asfloat(x_6[0].x);
a = (2.0f / (1.0f / x_27));
- bool tint_tmp = (a > 7.900000095f);
- if (tint_tmp) {
- tint_tmp = (a < 8.100000381f);
- }
- if ((tint_tmp)) {
+ if (((a > 7.900000095f) & (a < 8.100000381f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl
index 21d1062..2a1c1bb 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
a = (2.0f / (1.0f / x_27));
float const x_30 = a;
float const x_32 = a;
- if (((x_30 > 7.900000095f) && (x_32 < 8.100000381f))) {
+ if (((x_30 > 7.900000095f) & (x_32 < 8.100000381f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.spvasm
index 595ed70..83d0a8f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 55
+; Bound: 53
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -49,10 +49,10 @@
%bool = OpTypeBool
%float_8_10000038 = OpConstant %float 8.10000038
%float_0 = OpConstant %float 0
- %41 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %42 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %39 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %40 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %43 = OpTypeFunction %void %main_out
+ %41 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%a = OpVariable %_ptr_Function_float Function %17
@@ -64,36 +64,31 @@
%27 = OpLoad %float %a
%28 = OpLoad %float %a
%30 = OpFOrdGreaterThan %bool %27 %float_7_9000001
- OpSelectionMerge %32 None
- OpBranchConditional %30 %33 %32
- %33 = OpLabel
- %35 = OpFOrdLessThan %bool %28 %float_8_10000038
- OpBranch %32
- %32 = OpLabel
- %36 = OpPhi %bool %30 %14 %35 %33
- OpSelectionMerge %37 None
- OpBranchConditional %36 %38 %39
- %38 = OpLabel
- OpStore %x_GLF_color %41
- OpBranch %37
- %39 = OpLabel
- OpStore %x_GLF_color %42
- OpBranch %37
+ %33 = OpFOrdLessThan %bool %28 %float_8_10000038
+ %34 = OpLogicalAnd %bool %30 %33
+ OpSelectionMerge %35 None
+ OpBranchConditional %34 %36 %37
+ %36 = OpLabel
+ OpStore %x_GLF_color %39
+ OpBranch %35
%37 = OpLabel
+ OpStore %x_GLF_color %40
+ OpBranch %35
+ %35 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %43
+%tint_symbol_2 = OpFunction %void None %41
%tint_symbol = OpFunctionParameter %main_out
- %47 = OpLabel
- %48 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %48
+ %45 = OpLabel
+ %46 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %46
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
- %50 = OpLabel
- %51 = OpFunctionCall %void %main_1
- %53 = OpLoad %v4float %x_GLF_color
- %54 = OpCompositeConstruct %main_out %53
- %52 = OpFunctionCall %void %tint_symbol_2 %54
+ %48 = OpLabel
+ %49 = OpFunctionCall %void %main_1
+ %51 = OpLoad %v4float %x_GLF_color
+ %52 = OpCompositeConstruct %main_out %51
+ %50 = OpFunctionCall %void %tint_symbol_2 %52
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.wgsl
index 8900821..4d638ec 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-divs/0-opt.spvasm.expected.wgsl
@@ -13,7 +13,7 @@
a = (2.0 / (1.0 / x_27));
let x_30 : f32 = a;
let x_32 : f32 = a;
- if (((x_30 > 7.900000095) && (x_32 < 8.100000381))) {
+ if (((x_30 > 7.900000095) & (x_32 < 8.100000381))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl
index 33b44f0..1020e3b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.hlsl
@@ -7,11 +7,7 @@
float f = 0.0f;
const float x_28 = asfloat(x_6[0].x);
f = (4.0f * (2.0f / x_28));
- bool tint_tmp = (f > 7.900000095f);
- if (tint_tmp) {
- tint_tmp = (f < 8.100000381f);
- }
- if ((tint_tmp)) {
+ if (((f > 7.900000095f) & (f < 8.100000381f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl
index 8ca949d..c7f8ae3 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
f = (4.0f * (2.0f / x_28));
float const x_31 = f;
float const x_33 = f;
- if (((x_31 > 7.900000095f) && (x_33 < 8.100000381f))) {
+ if (((x_31 > 7.900000095f) & (x_33 < 8.100000381f))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.spvasm
index a3e6ce2..3380bc1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 56
+; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -50,10 +50,10 @@
%float_8_10000038 = OpConstant %float 8.10000038
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
- %42 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %43 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %40 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %41 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %44 = OpTypeFunction %void %main_out
+ %42 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %11
%14 = OpLabel
%f = OpVariable %_ptr_Function_float Function %17
@@ -65,36 +65,31 @@
%27 = OpLoad %float %f
%28 = OpLoad %float %f
%30 = OpFOrdGreaterThan %bool %27 %float_7_9000001
- OpSelectionMerge %32 None
- OpBranchConditional %30 %33 %32
- %33 = OpLabel
- %35 = OpFOrdLessThan %bool %28 %float_8_10000038
- OpBranch %32
- %32 = OpLabel
- %36 = OpPhi %bool %30 %14 %35 %33
- OpSelectionMerge %37 None
- OpBranchConditional %36 %38 %39
- %38 = OpLabel
- OpStore %x_GLF_color %42
- OpBranch %37
- %39 = OpLabel
- OpStore %x_GLF_color %43
- OpBranch %37
+ %33 = OpFOrdLessThan %bool %28 %float_8_10000038
+ %34 = OpLogicalAnd %bool %30 %33
+ OpSelectionMerge %35 None
+ OpBranchConditional %34 %36 %37
+ %36 = OpLabel
+ OpStore %x_GLF_color %40
+ OpBranch %35
%37 = OpLabel
+ OpStore %x_GLF_color %41
+ OpBranch %35
+ %35 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %44
+%tint_symbol_2 = OpFunction %void None %42
%tint_symbol = OpFunctionParameter %main_out
- %48 = OpLabel
- %49 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %49
+ %46 = OpLabel
+ %47 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %47
OpReturn
OpFunctionEnd
%main = OpFunction %void None %11
- %51 = OpLabel
- %52 = OpFunctionCall %void %main_1
- %54 = OpLoad %v4float %x_GLF_color
- %55 = OpCompositeConstruct %main_out %54
- %53 = OpFunctionCall %void %tint_symbol_2 %55
+ %49 = OpLabel
+ %50 = OpFunctionCall %void %main_1
+ %52 = OpLoad %v4float %x_GLF_color
+ %53 = OpCompositeConstruct %main_out %52
+ %51 = OpFunctionCall %void %tint_symbol_2 %53
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.wgsl
index fd79096..4fce1b0 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-folding-rules-merge-mul-div/0-opt.spvasm.expected.wgsl
@@ -13,7 +13,7 @@
f = (4.0 * (2.0 / x_28));
let x_31 : f32 = f;
let x_33 : f32 = f;
- if (((x_31 > 7.900000095) && (x_33 < 8.100000381))) {
+ if (((x_31 > 7.900000095) & (x_33 < 8.100000381))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl
index d19bc36..3187dfa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.hlsl
@@ -28,11 +28,7 @@
return;
}
{
- bool tint_tmp = true;
- if (tint_tmp) {
- tint_tmp = (x_GLF_global_loop_count < 100);
- }
- if ((tint_tmp)) {
+ if ((true & (x_GLF_global_loop_count < 100))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl
index e3bf7ba..6527266 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.msl
@@ -45,7 +45,7 @@
}
{
int const x_39 = *(tint_symbol_5);
- if ((true && (x_39 < 100))) {
+ if ((true & (x_39 < 100))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.wgsl
index 96fb7f7..15ffb7c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-global-loop-counter-main-function-call/0-opt.spvasm.expected.wgsl
@@ -39,7 +39,7 @@
continuing {
let x_39 : i32 = x_GLF_global_loop_count;
- if ((true && (x_39 < 100))) {
+ if ((true & (x_39 < 100))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl
index 1693e5c..525515f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.hlsl
@@ -20,11 +20,7 @@
while (true) {
const int x_38 = b;
const int x_40 = asint(x_6[4].x);
- bool tint_tmp = (x_38 < x_40);
- if (tint_tmp) {
- tint_tmp = (a < 10);
- }
- if ((tint_tmp)) {
+ if (((x_38 < x_40) & (a < 10))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl
index 2c946fe..45a90bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.msl
@@ -35,7 +35,7 @@
int const x_38 = b;
int const x_40 = x_6.x_GLF_uniform_int_values.arr[4].el;
int const x_42 = a;
- if (((x_38 < x_40) && (x_42 < 10))) {
+ if (((x_38 < x_40) & (x_42 < 10))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.spvasm
index 94f92e8..0a7063b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 135
+; Bound: 133
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -64,7 +64,7 @@
%int_5 = OpConstant %int 5
%int_3 = OpConstant %int 3
%main_out = OpTypeStruct %v4float
- %123 = OpTypeFunction %void %main_out
+ %121 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%a = OpVariable %_ptr_Function_int Function %21
@@ -91,135 +91,130 @@
%47 = OpLoad %int %46
%48 = OpLoad %int %a
%49 = OpSLessThan %bool %44 %47
- OpSelectionMerge %50 None
- OpBranchConditional %49 %51 %50
- %51 = OpLabel
- %53 = OpSLessThan %bool %48 %int_10
- OpBranch %50
- %50 = OpLabel
- %54 = OpPhi %bool %49 %43 %53 %51
- OpSelectionMerge %55 None
- OpBranchConditional %54 %56 %57
- %56 = OpLabel
- OpBranch %55
- %57 = OpLabel
- OpBranch %41
+ %51 = OpSLessThan %bool %48 %int_10
+ %52 = OpLogicalAnd %bool %49 %51
+ OpSelectionMerge %53 None
+ OpBranchConditional %52 %54 %55
+ %54 = OpLabel
+ OpBranch %53
%55 = OpLabel
- %58 = OpLoad %int %c
- %60 = OpSGreaterThan %bool %58 %int_5
- OpSelectionMerge %61 None
- OpBranchConditional %60 %62 %61
- %62 = OpLabel
OpBranch %41
- %61 = OpLabel
- %63 = OpLoad %int %a
+ %53 = OpLabel
+ %56 = OpLoad %int %c
+ %58 = OpSGreaterThan %bool %56 %int_5
+ OpSelectionMerge %59 None
+ OpBranchConditional %58 %60 %59
+ %60 = OpLabel
+ OpBranch %41
+ %59 = OpLabel
+ %61 = OpLoad %int %a
+ %62 = OpIAdd %int %61 %int_1
+ OpStore %a %62
+ %63 = OpLoad %int %c
%64 = OpIAdd %int %63 %int_1
- OpStore %a %64
- %65 = OpLoad %int %c
+ OpStore %c %64
+ %65 = OpLoad %int %b
%66 = OpIAdd %int %65 %int_1
- OpStore %c %66
- %67 = OpLoad %int %b
- %68 = OpIAdd %int %67 %int_1
- OpStore %b %68
+ OpStore %b %66
OpBranch %42
%42 = OpLabel
OpBranch %40
%41 = OpLabel
+ OpBranch %67
+ %67 = OpLabel
+ OpLoopMerge %68 %69 None
+ OpBranch %70
+ %70 = OpLabel
+ %71 = OpLoad %int %a
+ %72 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %73 = OpLoad %int %72
+ %74 = OpSLessThan %bool %71 %73
+ OpSelectionMerge %75 None
+ OpBranchConditional %74 %76 %77
+ %76 = OpLabel
+ OpBranch %75
+ %77 = OpLabel
+ OpBranch %68
+ %75 = OpLabel
OpBranch %69
%69 = OpLabel
- OpLoopMerge %70 %71 None
- OpBranch %72
- %72 = OpLabel
- %73 = OpLoad %int %a
- %74 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %75 = OpLoad %int %74
- %76 = OpSLessThan %bool %73 %75
- OpSelectionMerge %77 None
- OpBranchConditional %76 %78 %79
- %78 = OpLabel
- OpBranch %77
- %79 = OpLabel
- OpBranch %70
- %77 = OpLabel
- OpBranch %71
- %71 = OpLabel
+ %78 = OpLoad %int %a
+ %79 = OpIAdd %int %78 %int_1
+ OpStore %a %79
+ OpBranch %67
+ %68 = OpLabel
%80 = OpLoad %int %a
- %81 = OpIAdd %int %80 %int_1
- OpStore %a %81
- OpBranch %69
- %70 = OpLabel
- %82 = OpLoad %int %a
- %83 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %84 = OpLoad %int %83
- %85 = OpIEqual %bool %82 %84
- OpStore %x_77_phi %85
- OpSelectionMerge %86 None
- OpBranchConditional %85 %87 %86
- %87 = OpLabel
- %88 = OpLoad %int %b
- %90 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
- %91 = OpLoad %int %90
- %92 = OpIEqual %bool %88 %91
- OpStore %x_76 %92
- %93 = OpLoad %bool %x_76
- OpStore %x_77_phi %93
- OpBranch %86
- %86 = OpLabel
- %94 = OpLoad %bool %x_77_phi
- OpStore %x_84_phi %94
- OpSelectionMerge %95 None
- OpBranchConditional %94 %96 %95
- %96 = OpLabel
- %97 = OpLoad %int %c
- %98 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
- %99 = OpLoad %int %98
- %100 = OpIEqual %bool %97 %99
- OpStore %x_83 %100
- %101 = OpLoad %bool %x_83
- OpStore %x_84_phi %101
- OpBranch %95
- %95 = OpLabel
- %102 = OpLoad %bool %x_84_phi
- OpSelectionMerge %103 None
- OpBranchConditional %102 %104 %105
- %104 = OpLabel
- %106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
+ %81 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %82 = OpLoad %int %81
+ %83 = OpIEqual %bool %80 %82
+ OpStore %x_77_phi %83
+ OpSelectionMerge %84 None
+ OpBranchConditional %83 %85 %84
+ %85 = OpLabel
+ %86 = OpLoad %int %b
+ %88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
+ %89 = OpLoad %int %88
+ %90 = OpIEqual %bool %86 %89
+ OpStore %x_76 %90
+ %91 = OpLoad %bool %x_76
+ OpStore %x_77_phi %91
+ OpBranch %84
+ %84 = OpLabel
+ %92 = OpLoad %bool %x_77_phi
+ OpStore %x_84_phi %92
+ OpSelectionMerge %93 None
+ OpBranchConditional %92 %94 %93
+ %94 = OpLabel
+ %95 = OpLoad %int %c
+ %96 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
+ %97 = OpLoad %int %96
+ %98 = OpIEqual %bool %95 %97
+ OpStore %x_83 %98
+ %99 = OpLoad %bool %x_83
+ OpStore %x_84_phi %99
+ OpBranch %93
+ %93 = OpLabel
+ %100 = OpLoad %bool %x_84_phi
+ OpSelectionMerge %101 None
+ OpBranchConditional %100 %102 %103
+ %102 = OpLabel
+ %104 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
+ %105 = OpLoad %int %104
+ %106 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%107 = OpLoad %int %106
%108 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%109 = OpLoad %int %108
- %110 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %110 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%111 = OpLoad %int %110
- %112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
- %113 = OpLoad %int %112
- %114 = OpConvertSToF %float %107
- %115 = OpConvertSToF %float %109
- %116 = OpConvertSToF %float %111
- %117 = OpConvertSToF %float %113
- %118 = OpCompositeConstruct %v4float %114 %115 %116 %117
- OpStore %x_GLF_color %118
- OpBranch %103
- %105 = OpLabel
- %119 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
- %120 = OpLoad %int %119
- %121 = OpConvertSToF %float %120
- %122 = OpCompositeConstruct %v4float %121 %121 %121 %121
- OpStore %x_GLF_color %122
- OpBranch %103
+ %112 = OpConvertSToF %float %105
+ %113 = OpConvertSToF %float %107
+ %114 = OpConvertSToF %float %109
+ %115 = OpConvertSToF %float %111
+ %116 = OpCompositeConstruct %v4float %112 %113 %114 %115
+ OpStore %x_GLF_color %116
+ OpBranch %101
%103 = OpLabel
+ %117 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %118 = OpLoad %int %117
+ %119 = OpConvertSToF %float %118
+ %120 = OpCompositeConstruct %v4float %119 %119 %119 %119
+ OpStore %x_GLF_color %120
+ OpBranch %101
+ %101 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %123
+%tint_symbol_2 = OpFunction %void None %121
%tint_symbol = OpFunctionParameter %main_out
- %127 = OpLabel
- %128 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %128
+ %125 = OpLabel
+ %126 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %126
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
- %130 = OpLabel
- %131 = OpFunctionCall %void %main_1
- %133 = OpLoad %v4float %x_GLF_color
- %134 = OpCompositeConstruct %main_out %133
- %132 = OpFunctionCall %void %tint_symbol_2 %134
+ %128 = OpLabel
+ %129 = OpFunctionCall %void %main_1
+ %131 = OpLoad %v4float %x_GLF_color
+ %132 = OpCompositeConstruct %main_out %131
+ %130 = OpFunctionCall %void %tint_symbol_2 %132
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.wgsl
index 5a769f4..5501dd7 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-increment-multiple-integers/0-opt.spvasm.expected.wgsl
@@ -26,7 +26,7 @@
let x_38 : i32 = b;
let x_40 : i32 = x_6.x_GLF_uniform_int_values[4];
let x_42 : i32 = a;
- if (((x_38 < x_40) && (x_42 < 10))) {
+ if (((x_38 < x_40) & (x_42 < 10))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl
index b3077db..32a0a50 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.hlsl
@@ -23,11 +23,7 @@
if (true) {
const uint scalar_offset = ((16u * uint(0))) / 4;
const int x_46 = asint(x_6[scalar_offset / 4][scalar_offset % 4]);
- bool tint_tmp = (x_46 == 1);
- if (tint_tmp) {
- tint_tmp = (index <= 1);
- }
- x_51 = !((tint_tmp));
+ x_51 = !(((x_46 == 1) & (index <= 1)));
x_52_phi = x_51;
}
if (!(x_52_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl
index 028ec7e..49fff4f 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.msl
@@ -41,7 +41,7 @@
if (true) {
int const x_46 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_48 = index;
- x_51 = !(((x_46 == 1) && (x_48 <= 1)));
+ x_51 = !(((x_46 == 1) & (x_48 <= 1)));
x_52_phi = x_51;
}
bool const x_52 = x_52_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.spvasm
index 35f7480..8425cb2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 141
+; Bound: 139
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -70,7 +70,7 @@
%int_0 = OpConstant %int 0
%int_4 = OpConstant %int 4
%main_out = OpTypeStruct %v4float
- %129 = OpTypeFunction %void %main_out
+ %127 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%arr = OpVariable %_ptr_Function__arr_int_uint_3 Function %23
@@ -103,122 +103,117 @@
%58 = OpLoad %int %57
%59 = OpLoad %int %index
%61 = OpIEqual %bool %58 %int_1
- OpSelectionMerge %62 None
- OpBranchConditional %61 %63 %62
- %63 = OpLabel
- %64 = OpSLessThanEqual %bool %59 %int_1
- OpBranch %62
- %62 = OpLabel
- %65 = OpPhi %bool %61 %55 %64 %63
- %60 = OpLogicalNot %bool %65
+ %62 = OpSLessThanEqual %bool %59 %int_1
+ %63 = OpLogicalAnd %bool %61 %62
+ %60 = OpLogicalNot %bool %63
OpStore %x_51 %60
- %66 = OpLoad %bool %x_51
- OpStore %x_52_phi %66
+ %64 = OpLoad %bool %x_51
+ OpStore %x_52_phi %64
OpBranch %54
%54 = OpLabel
- %67 = OpLoad %bool %x_52_phi
- %68 = OpLogicalNot %bool %67
- OpSelectionMerge %69 None
- OpBranchConditional %68 %70 %71
- %70 = OpLabel
- OpBranch %69
- %71 = OpLabel
- OpBranch %48
+ %65 = OpLoad %bool %x_52_phi
+ %66 = OpLogicalNot %bool %65
+ OpSelectionMerge %67 None
+ OpBranchConditional %66 %68 %69
+ %68 = OpLabel
+ OpBranch %67
%69 = OpLabel
- %72 = OpLoad %int %index
- %73 = OpAccessChain %_ptr_Function_int %arr %72
- %74 = OpLoad %int %73
- %75 = OpAccessChain %_ptr_Function_int %arr %72
- %76 = OpIAdd %int %74 %int_1
- OpStore %75 %76
- %77 = OpLoad %int %index
- %78 = OpIAdd %int %77 %int_1
- OpStore %index %78
+ OpBranch %48
+ %67 = OpLabel
+ %70 = OpLoad %int %index
+ %71 = OpAccessChain %_ptr_Function_int %arr %70
+ %72 = OpLoad %int %71
+ %73 = OpAccessChain %_ptr_Function_int %arr %70
+ %74 = OpIAdd %int %72 %int_1
+ OpStore %73 %74
+ %75 = OpLoad %int %index
+ %76 = OpIAdd %int %75 %int_1
+ OpStore %index %76
OpBranch %49
%49 = OpLabel
OpBranch %47
%48 = OpLabel
- %79 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %77 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %78 = OpLoad %int %77
+ %79 = OpAccessChain %_ptr_Function_int %arr %78
%80 = OpLoad %int %79
- %81 = OpAccessChain %_ptr_Function_int %arr %80
+ %81 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
%82 = OpLoad %int %81
- %83 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
- %84 = OpLoad %int %83
- %85 = OpIEqual %bool %82 %84
- OpStore %x_77_phi %85
- OpSelectionMerge %86 None
- OpBranchConditional %85 %87 %86
- %87 = OpLabel
- %88 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %83 = OpIEqual %bool %80 %82
+ OpStore %x_77_phi %83
+ OpSelectionMerge %84 None
+ OpBranchConditional %83 %85 %84
+ %85 = OpLabel
+ %86 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %87 = OpLoad %int %86
+ %88 = OpAccessChain %_ptr_Function_int %arr %87
%89 = OpLoad %int %88
- %90 = OpAccessChain %_ptr_Function_int %arr %89
- %91 = OpLoad %int %90
- %93 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
- %94 = OpLoad %int %93
- %95 = OpIEqual %bool %91 %94
- OpStore %x_76 %95
- %96 = OpLoad %bool %x_76
- OpStore %x_77_phi %96
- OpBranch %86
- %86 = OpLabel
- %97 = OpLoad %bool %x_77_phi
- OpStore %x_87_phi %97
- OpSelectionMerge %98 None
- OpBranchConditional %97 %99 %98
- %99 = OpLabel
- %100 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
+ %91 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_4
+ %92 = OpLoad %int %91
+ %93 = OpIEqual %bool %89 %92
+ OpStore %x_76 %93
+ %94 = OpLoad %bool %x_76
+ OpStore %x_77_phi %94
+ OpBranch %84
+ %84 = OpLabel
+ %95 = OpLoad %bool %x_77_phi
+ OpStore %x_87_phi %95
+ OpSelectionMerge %96 None
+ OpBranchConditional %95 %97 %96
+ %97 = OpLabel
+ %98 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_3
+ %99 = OpLoad %int %98
+ %100 = OpAccessChain %_ptr_Function_int %arr %99
%101 = OpLoad %int %100
- %102 = OpAccessChain %_ptr_Function_int %arr %101
+ %102 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%103 = OpLoad %int %102
- %104 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
- %105 = OpLoad %int %104
- %106 = OpIEqual %bool %103 %105
- OpStore %x_86 %106
- %107 = OpLoad %bool %x_86
- OpStore %x_87_phi %107
- OpBranch %98
- %98 = OpLabel
- %108 = OpLoad %bool %x_87_phi
- OpSelectionMerge %109 None
- OpBranchConditional %108 %110 %111
- %110 = OpLabel
- %112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %104 = OpIEqual %bool %101 %103
+ OpStore %x_86 %104
+ %105 = OpLoad %bool %x_86
+ OpStore %x_87_phi %105
+ OpBranch %96
+ %96 = OpLabel
+ %106 = OpLoad %bool %x_87_phi
+ OpSelectionMerge %107 None
+ OpBranchConditional %106 %108 %109
+ %108 = OpLabel
+ %110 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %111 = OpLoad %int %110
+ %112 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%113 = OpLoad %int %112
%114 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%115 = OpLoad %int %114
- %116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %116 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%117 = OpLoad %int %116
- %118 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
- %119 = OpLoad %int %118
- %120 = OpConvertSToF %float %113
- %121 = OpConvertSToF %float %115
- %122 = OpConvertSToF %float %117
- %123 = OpConvertSToF %float %119
- %124 = OpCompositeConstruct %v4float %120 %121 %122 %123
- OpStore %x_GLF_color %124
- OpBranch %109
- %111 = OpLabel
- %125 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %126 = OpLoad %int %125
- %127 = OpConvertSToF %float %126
- %128 = OpCompositeConstruct %v4float %127 %127 %127 %127
- OpStore %x_GLF_color %128
- OpBranch %109
+ %118 = OpConvertSToF %float %111
+ %119 = OpConvertSToF %float %113
+ %120 = OpConvertSToF %float %115
+ %121 = OpConvertSToF %float %117
+ %122 = OpCompositeConstruct %v4float %118 %119 %120 %121
+ OpStore %x_GLF_color %122
+ OpBranch %107
%109 = OpLabel
+ %123 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %124 = OpLoad %int %123
+ %125 = OpConvertSToF %float %124
+ %126 = OpCompositeConstruct %v4float %125 %125 %125 %125
+ OpStore %x_GLF_color %126
+ OpBranch %107
+ %107 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %129
+%tint_symbol_2 = OpFunction %void None %127
%tint_symbol = OpFunctionParameter %main_out
- %133 = OpLabel
- %134 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %134
+ %131 = OpLabel
+ %132 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %132
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
- %136 = OpLabel
- %137 = OpFunctionCall %void %main_1
- %139 = OpLoad %v4float %x_GLF_color
- %140 = OpCompositeConstruct %main_out %139
- %138 = OpFunctionCall %void %tint_symbol_2 %140
+ %134 = OpLabel
+ %135 = OpFunctionCall %void %main_1
+ %137 = OpLoad %v4float %x_GLF_color
+ %138 = OpCompositeConstruct %main_out %137
+ %136 = OpFunctionCall %void %tint_symbol_2 %138
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.wgsl
index 3e3cb21..68b192c 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-condition-double-negate/0-opt.spvasm.expected.wgsl
@@ -28,7 +28,7 @@
if (true) {
let x_46 : i32 = x_6.x_GLF_uniform_int_values[0];
let x_48 : i32 = index;
- x_51 = !(((x_46 == 1) && (x_48 <= 1)));
+ x_51 = !(((x_46 == 1) & (x_48 <= 1)));
x_52_phi = x_51;
}
let x_52 : bool = x_52_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.hlsl
index a507a03..98be400 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.hlsl
@@ -60,11 +60,7 @@
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
const int x_104 = asint(x_10[scalar_offset_3 / 4][scalar_offset_3 % 4]);
const float2x3 x_108 = float2x3(float3(float(x_89), float(x_92), float(x_95)), float3(float(x_98), float(x_101), float(x_104)));
- bool tint_tmp = all((x_87[0u] == x_108[0u]));
- if (tint_tmp) {
- tint_tmp = all((x_87[1u] == x_108[1u]));
- }
- if ((tint_tmp)) {
+ if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
const uint scalar_offset_4 = ((16u * uint(0))) / 4;
const int x_122 = asint(x_10[scalar_offset_4 / 4][scalar_offset_4 % 4]);
const int x_125 = asint(x_10[1].x);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
index 6b34014..5bef25a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.msl
@@ -75,7 +75,7 @@
int const x_101 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_104 = x_10.x_GLF_uniform_int_values.arr[0].el;
float2x3 const x_108 = float2x3(float3(float(x_89), float(x_92), float(x_95)), float3(float(x_98), float(x_101), float(x_104)));
- if ((all((x_87[0u] == x_108[0u])) && all((x_87[1u] == x_108[1u])))) {
+ if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
int const x_122 = x_10.x_GLF_uniform_int_values.arr[0].el;
int const x_125 = x_10.x_GLF_uniform_int_values.arr[1].el;
int const x_128 = x_10.x_GLF_uniform_int_values.arr[1].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.spvasm
index c421db8..06a7de4 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 164
+; Bound: 162
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -89,7 +89,7 @@
%true = OpConstantTrue %bool
%v3bool = OpTypeVector %bool 3
%main_out = OpTypeStruct %v4float
- %151 = OpTypeFunction %void %main_out
+ %149 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23
%26 = OpLabel
%m23 = OpVariable %_ptr_Function_mat2v3float Function %31
@@ -192,58 +192,53 @@
%121 = OpCompositeExtract %v3float %118 0
%122 = OpFOrdEqual %v3bool %120 %121
%119 = OpAll %bool %122
- OpSelectionMerge %124 None
- OpBranchConditional %119 %125 %124
- %125 = OpLabel
- %127 = OpCompositeExtract %v3float %97 1
- %128 = OpCompositeExtract %v3float %118 1
- %129 = OpFOrdEqual %v3bool %127 %128
- %126 = OpAll %bool %129
- OpBranch %124
- %124 = OpLabel
- %130 = OpPhi %bool %119 %45 %126 %125
- OpSelectionMerge %131 None
- OpBranchConditional %130 %132 %133
- %132 = OpLabel
- %134 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
+ %125 = OpCompositeExtract %v3float %97 1
+ %126 = OpCompositeExtract %v3float %118 1
+ %127 = OpFOrdEqual %v3bool %125 %126
+ %124 = OpAll %bool %127
+ %128 = OpLogicalAnd %bool %119 %124
+ OpSelectionMerge %129 None
+ OpBranchConditional %128 %130 %131
+ %130 = OpLabel
+ %132 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
+ %133 = OpLoad %int %132
+ %134 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%135 = OpLoad %int %134
%136 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%137 = OpLoad %int %136
- %138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
+ %138 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%139 = OpLoad %int %138
- %140 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
- %141 = OpLoad %int %140
- %142 = OpConvertSToF %float %135
- %143 = OpConvertSToF %float %137
- %144 = OpConvertSToF %float %139
- %145 = OpConvertSToF %float %141
- %146 = OpCompositeConstruct %v4float %142 %143 %144 %145
- OpStore %x_GLF_color %146
- OpBranch %131
- %133 = OpLabel
- %147 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
- %148 = OpLoad %int %147
- %149 = OpConvertSToF %float %148
- %150 = OpCompositeConstruct %v4float %149 %149 %149 %149
- OpStore %x_GLF_color %150
- OpBranch %131
+ %140 = OpConvertSToF %float %133
+ %141 = OpConvertSToF %float %135
+ %142 = OpConvertSToF %float %137
+ %143 = OpConvertSToF %float %139
+ %144 = OpCompositeConstruct %v4float %140 %141 %142 %143
+ OpStore %x_GLF_color %144
+ OpBranch %129
%131 = OpLabel
+ %145 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
+ %146 = OpLoad %int %145
+ %147 = OpConvertSToF %float %146
+ %148 = OpCompositeConstruct %v4float %147 %147 %147 %147
+ OpStore %x_GLF_color %148
+ OpBranch %129
+ %129 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %151
+%tint_symbol_3 = OpFunction %void None %149
%tint_symbol_1 = OpFunctionParameter %main_out
- %155 = OpLabel
- %156 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %156
+ %153 = OpLabel
+ %154 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %154
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
- %158 = OpLabel
- %159 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %159
- %160 = OpFunctionCall %void %main_1
- %162 = OpLoad %v4float %x_GLF_color
- %163 = OpCompositeConstruct %main_out %162
- %161 = OpFunctionCall %void %tint_symbol_3 %163
+ %156 = OpLabel
+ %157 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %157
+ %158 = OpFunctionCall %void %main_1
+ %160 = OpLoad %v4float %x_GLF_color
+ %161 = OpCompositeConstruct %main_out %160
+ %159 = OpFunctionCall %void %tint_symbol_3 %161
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.wgsl
index b9b8a36..73908f5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-loop-increment-matrix-element-break-after-first-iteration/0-opt.spvasm.expected.wgsl
@@ -68,7 +68,7 @@
let x_101 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_104 : i32 = x_10.x_GLF_uniform_int_values[0];
let x_108 : mat2x3<f32> = mat2x3<f32>(vec3<f32>(f32(x_89), f32(x_92), f32(x_95)), vec3<f32>(f32(x_98), f32(x_101), f32(x_104)));
- if ((all((x_87[0u] == x_108[0u])) && all((x_87[1u] == x_108[1u])))) {
+ if ((all((x_87[0u] == x_108[0u])) & all((x_87[1u] == x_108[1u])))) {
let x_122 : i32 = x_10.x_GLF_uniform_int_values[0];
let x_125 : i32 = x_10.x_GLF_uniform_int_values[1];
let x_128 : i32 = x_10.x_GLF_uniform_int_values[1];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl
index 7362602..9d26f7b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.hlsl
@@ -14,11 +14,7 @@
const int x_38 = asint(x_6[scalar_offset_1 / 4][scalar_offset_1 % 4]);
const float x_39 = float(x_38);
const float2x2 x_42 = float2x2(float2(x_39, 0.0f), float2(0.0f, x_39));
- bool tint_tmp = all((x_36[0u] == x_42[0u]));
- if (tint_tmp) {
- tint_tmp = all((x_36[1u] == x_42[1u]));
- }
- if ((tint_tmp)) {
+ if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
const uint scalar_offset_2 = ((16u * uint(0))) / 4;
const int x_56 = asint(x_6[scalar_offset_2 / 4][scalar_offset_2 % 4]);
const int x_59 = asint(x_6[1].x);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl
index 4cfd1b7..295a024 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.msl
@@ -27,7 +27,7 @@
int const x_38 = x_6.x_GLF_uniform_int_values.arr[0].el;
float const x_39 = float(x_38);
float2x2 const x_42 = float2x2(float2(x_39, 0.0f), float2(0.0f, x_39));
- if ((all((x_36[0u] == x_42[0u])) && all((x_36[1u] == x_42[1u])))) {
+ if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
int const x_56 = x_6.x_GLF_uniform_int_values.arr[0].el;
int const x_59 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_62 = x_6.x_GLF_uniform_int_values.arr[1].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.spvasm
index b279bcf..ee3c7b8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 90
+; Bound: 88
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -56,7 +56,7 @@
%uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
- %78 = OpTypeFunction %void %main_out
+ %76 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %23
@@ -80,56 +80,51 @@
%46 = OpCompositeExtract %v2float %42 0
%47 = OpFOrdEqual %v2bool %45 %46
%43 = OpAll %bool %47
- OpSelectionMerge %49 None
- OpBranchConditional %43 %50 %49
- %50 = OpLabel
- %53 = OpCompositeExtract %v2float %36 1
- %54 = OpCompositeExtract %v2float %42 1
- %55 = OpFOrdEqual %v2bool %53 %54
- %51 = OpAll %bool %55
- OpBranch %49
- %49 = OpLabel
- %56 = OpPhi %bool %43 %18 %51 %50
- OpSelectionMerge %57 None
- OpBranchConditional %56 %58 %59
- %58 = OpLabel
- %60 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
- %61 = OpLoad %int %60
+ %51 = OpCompositeExtract %v2float %36 1
+ %52 = OpCompositeExtract %v2float %42 1
+ %53 = OpFOrdEqual %v2bool %51 %52
+ %49 = OpAll %bool %53
+ %54 = OpLogicalAnd %bool %43 %49
+ OpSelectionMerge %55 None
+ OpBranchConditional %54 %56 %57
+ %56 = OpLabel
+ %58 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
+ %59 = OpLoad %int %58
+ %61 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %62 = OpLoad %int %61
%63 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
%64 = OpLoad %int %63
- %65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %65 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
%66 = OpLoad %int %65
- %67 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_0
- %68 = OpLoad %int %67
- %69 = OpConvertSToF %float %61
- %70 = OpConvertSToF %float %64
- %71 = OpConvertSToF %float %66
- %72 = OpConvertSToF %float %68
- %73 = OpCompositeConstruct %v4float %69 %70 %71 %72
- OpStore %x_GLF_color %73
- OpBranch %57
- %59 = OpLabel
- %74 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %75 = OpLoad %int %74
- %76 = OpConvertSToF %float %75
- %77 = OpCompositeConstruct %v4float %76 %76 %76 %76
- OpStore %x_GLF_color %77
- OpBranch %57
+ %67 = OpConvertSToF %float %59
+ %68 = OpConvertSToF %float %62
+ %69 = OpConvertSToF %float %64
+ %70 = OpConvertSToF %float %66
+ %71 = OpCompositeConstruct %v4float %67 %68 %69 %70
+ OpStore %x_GLF_color %71
+ OpBranch %55
%57 = OpLabel
+ %72 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %73 = OpLoad %int %72
+ %74 = OpConvertSToF %float %73
+ %75 = OpCompositeConstruct %v4float %74 %74 %74 %74
+ OpStore %x_GLF_color %75
+ OpBranch %55
+ %55 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %78
+%tint_symbol_2 = OpFunction %void None %76
%tint_symbol = OpFunctionParameter %main_out
- %82 = OpLabel
- %83 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %83
+ %80 = OpLabel
+ %81 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %81
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
- %85 = OpLabel
- %86 = OpFunctionCall %void %main_1
- %88 = OpLoad %v4float %x_GLF_color
- %89 = OpCompositeConstruct %main_out %88
- %87 = OpFunctionCall %void %tint_symbol_2 %89
+ %83 = OpLabel
+ %84 = OpFunctionCall %void %main_1
+ %86 = OpLoad %v4float %x_GLF_color
+ %87 = OpCompositeConstruct %main_out %86
+ %85 = OpFunctionCall %void %tint_symbol_2 %87
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.wgsl
index 510e118..0eeddbc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-matrix-double-transpose/0-opt.spvasm.expected.wgsl
@@ -18,7 +18,7 @@
let x_38 : i32 = x_6.x_GLF_uniform_int_values[0];
let x_39 : f32 = f32(x_38);
let x_42 : mat2x2<f32> = mat2x2<f32>(vec2<f32>(x_39, 0.0), vec2<f32>(0.0, x_39));
- if ((all((x_36[0u] == x_42[0u])) && all((x_36[1u] == x_42[1u])))) {
+ if ((all((x_36[0u] == x_42[0u])) & all((x_36[1u] == x_42[1u])))) {
let x_56 : i32 = x_6.x_GLF_uniform_int_values[0];
let x_59 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_62 : i32 = x_6.x_GLF_uniform_int_values[1];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl
index 2327dda..39c1dc1 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.hlsl
@@ -97,19 +97,7 @@
const uint scalar_offset_8 = ((16u * uint(0))) / 4;
const int x_77 = asint(x_16[scalar_offset_8 / 4][scalar_offset_8 % 4]);
const float4x2 x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
- bool tint_tmp_2 = all((x_54[0u] == x_83[0u]));
- if (tint_tmp_2) {
- tint_tmp_2 = all((x_54[1u] == x_83[1u]));
- }
- bool tint_tmp_1 = (tint_tmp_2);
- if (tint_tmp_1) {
- tint_tmp_1 = all((x_54[2u] == x_83[2u]));
- }
- bool tint_tmp = (tint_tmp_1);
- if (tint_tmp) {
- tint_tmp = all((x_54[3u] == x_83[3u]));
- }
- if ((tint_tmp)) {
+ if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
const int x_107 = asint(x_16[3].x);
const uint scalar_offset_9 = ((16u * uint(0))) / 4;
const int x_110 = asint(x_16[scalar_offset_9 / 4][scalar_offset_9 % 4]);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
index 5cd7a35..1a1463b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.msl
@@ -107,7 +107,7 @@
int const x_74 = x_16.x_GLF_uniform_int_values.arr[0].el;
int const x_77 = x_16.x_GLF_uniform_int_values.arr[0].el;
float4x2 const x_83 = float4x2(float2(float(x_56), float(x_59)), float2(float(x_62), float(x_65)), float2(float(x_68), float(x_71)), float2(float(x_74), float(x_77)));
- if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
+ if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
int const x_107 = x_16.x_GLF_uniform_int_values.arr[3].el;
int const x_110 = x_16.x_GLF_uniform_int_values.arr[0].el;
int const x_113 = x_16.x_GLF_uniform_int_values.arr[0].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.spvasm
index b4e8fcf..c0ceb3e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 214
+; Bound: 208
; Schema: 0
OpCapability Shader
%92 = OpExtInstImport "GLSL.std.450"
@@ -110,7 +110,7 @@
%uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3
%main_out = OpTypeStruct %v4float
- %201 = OpTypeFunction %void %main_out
+ %195 = OpTypeFunction %void %main_out
%func0_i1_ = OpFunction %void None %31
%x = OpFunctionParameter %_ptr_Function_int
%36 = OpLabel
@@ -252,78 +252,63 @@
%155 = OpCompositeExtract %v2float %152 0
%156 = OpFOrdEqual %v2bool %154 %155
%153 = OpAll %bool %156
- OpSelectionMerge %158 None
- OpBranchConditional %153 %159 %158
- %159 = OpLabel
- %161 = OpCompositeExtract %v2float %122 1
- %162 = OpCompositeExtract %v2float %152 1
- %163 = OpFOrdEqual %v2bool %161 %162
- %160 = OpAll %bool %163
- OpBranch %158
- %158 = OpLabel
- %164 = OpPhi %bool %153 %117 %160 %159
- OpSelectionMerge %165 None
- OpBranchConditional %164 %166 %165
- %166 = OpLabel
- %169 = OpCompositeExtract %v2float %122 2
- %170 = OpCompositeExtract %v2float %152 2
- %171 = OpFOrdEqual %v2bool %169 %170
- %167 = OpAll %bool %171
- OpBranch %165
- %165 = OpLabel
- %172 = OpPhi %bool %164 %158 %167 %166
- OpSelectionMerge %173 None
- OpBranchConditional %172 %174 %173
- %174 = OpLabel
- %177 = OpCompositeExtract %v2float %122 3
- %178 = OpCompositeExtract %v2float %152 3
- %179 = OpFOrdEqual %v2bool %177 %178
- %175 = OpAll %bool %179
- OpBranch %173
- %173 = OpLabel
- %180 = OpPhi %bool %172 %165 %175 %174
- OpSelectionMerge %181 None
- OpBranchConditional %180 %182 %183
- %182 = OpLabel
+ %159 = OpCompositeExtract %v2float %122 1
+ %160 = OpCompositeExtract %v2float %152 1
+ %161 = OpFOrdEqual %v2bool %159 %160
+ %158 = OpAll %bool %161
+ %162 = OpLogicalAnd %bool %153 %158
+ %165 = OpCompositeExtract %v2float %122 2
+ %166 = OpCompositeExtract %v2float %152 2
+ %167 = OpFOrdEqual %v2bool %165 %166
+ %163 = OpAll %bool %167
+ %168 = OpLogicalAnd %bool %162 %163
+ %171 = OpCompositeExtract %v2float %122 3
+ %172 = OpCompositeExtract %v2float %152 3
+ %173 = OpFOrdEqual %v2bool %171 %172
+ %169 = OpAll %bool %173
+ %174 = OpLogicalAnd %bool %168 %169
+ OpSelectionMerge %175 None
+ OpBranchConditional %174 %176 %177
+ %176 = OpLabel
+ %178 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
+ %179 = OpLoad %int %178
+ %180 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
+ %181 = OpLoad %int %180
+ %182 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
+ %183 = OpLoad %int %182
%184 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
%185 = OpLoad %int %184
- %186 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
- %187 = OpLoad %int %186
- %188 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
- %189 = OpLoad %int %188
- %190 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_3
- %191 = OpLoad %int %190
- %192 = OpConvertSToF %float %185
- %193 = OpConvertSToF %float %187
- %194 = OpConvertSToF %float %189
- %195 = OpConvertSToF %float %191
- %196 = OpCompositeConstruct %v4float %192 %193 %194 %195
- OpStore %x_GLF_color %196
- OpBranch %181
- %183 = OpLabel
- %197 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
- %198 = OpLoad %int %197
- %199 = OpConvertSToF %float %198
- %200 = OpCompositeConstruct %v4float %199 %199 %199 %199
- OpStore %x_GLF_color %200
- OpBranch %181
- %181 = OpLabel
+ %186 = OpConvertSToF %float %179
+ %187 = OpConvertSToF %float %181
+ %188 = OpConvertSToF %float %183
+ %189 = OpConvertSToF %float %185
+ %190 = OpCompositeConstruct %v4float %186 %187 %188 %189
+ OpStore %x_GLF_color %190
+ OpBranch %175
+ %177 = OpLabel
+ %191 = OpAccessChain %_ptr_Uniform_int %x_16 %uint_0 %int_0
+ %192 = OpLoad %int %191
+ %193 = OpConvertSToF %float %192
+ %194 = OpCompositeConstruct %v4float %193 %193 %193 %193
+ OpStore %x_GLF_color %194
+ OpBranch %175
+ %175 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %201
+%tint_symbol_3 = OpFunction %void None %195
%tint_symbol_1 = OpFunctionParameter %main_out
- %205 = OpLabel
- %206 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %206
+ %199 = OpLabel
+ %200 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %200
OpReturn
OpFunctionEnd
%main = OpFunction %void None %104
- %208 = OpLabel
- %209 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %209
- %210 = OpFunctionCall %void %main_1
- %212 = OpLoad %v4float %x_GLF_color
- %213 = OpCompositeConstruct %main_out %212
- %211 = OpFunctionCall %void %tint_symbol_3 %213
+ %202 = OpLabel
+ %203 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %203
+ %204 = OpFunctionCall %void %main_1
+ %206 = OpLoad %v4float %x_GLF_color
+ %207 = OpCompositeConstruct %main_out %206
+ %205 = OpFunctionCall %void %tint_symbol_3 %207
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.wgsl
index 7e9de86..a847c9a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-nested-functions-accumulate-global-matrix/0-opt.spvasm.expected.wgsl
@@ -106,7 +106,7 @@
let x_74 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_77 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_83 : mat4x2<f32> = mat4x2<f32>(vec2<f32>(f32(x_56), f32(x_59)), vec2<f32>(f32(x_62), f32(x_65)), vec2<f32>(f32(x_68), f32(x_71)), vec2<f32>(f32(x_74), f32(x_77)));
- if ((((all((x_54[0u] == x_83[0u])) && all((x_54[1u] == x_83[1u]))) && all((x_54[2u] == x_83[2u]))) && all((x_54[3u] == x_83[3u])))) {
+ if ((((all((x_54[0u] == x_83[0u])) & all((x_54[1u] == x_83[1u]))) & all((x_54[2u] == x_83[2u]))) & all((x_54[3u] == x_83[3u])))) {
let x_107 : i32 = x_16.x_GLF_uniform_int_values[3];
let x_110 : i32 = x_16.x_GLF_uniform_int_values[0];
let x_113 : i32 = x_16.x_GLF_uniform_int_values[0];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl
index 132221e..223f8fa 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.hlsl
@@ -12,11 +12,7 @@
c = pow(a, b);
const float x_30 = c;
x_GLF_color = float4(x_30, x_30, x_30, x_30);
- bool tint_tmp = (a == -1.0f);
- if (tint_tmp) {
- tint_tmp = (b == 1.700000048f);
- }
- if ((tint_tmp)) {
+ if (((a == -1.0f) & (b == 1.700000048f))) {
const uint scalar_offset = ((16u * uint(0))) / 4;
const float x_41 = asfloat(x_8[scalar_offset / 4][scalar_offset % 4]);
const float x_43 = asfloat(x_8[1].x);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl
index 8000e84..d5cbb31 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.msl
@@ -31,7 +31,7 @@
*(tint_symbol_4) = float4(x_30, x_30, x_30, x_30);
float const x_32 = a;
float const x_34 = b;
- if (((x_32 == -1.0f) && (x_34 == 1.700000048f))) {
+ if (((x_32 == -1.0f) & (x_34 == 1.700000048f))) {
float const x_41 = x_8.x_GLF_uniform_float_values.arr[0].el;
float const x_43 = x_8.x_GLF_uniform_float_values.arr[1].el;
float const x_45 = x_8.x_GLF_uniform_float_values.arr[1].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.spvasm
index 60826bb..35787a8 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 71
+; Bound: 69
; Schema: 0
OpCapability Shader
%28 = OpExtInstImport "GLSL.std.450"
@@ -56,7 +56,7 @@
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
- %59 = OpTypeFunction %void %main_out
+ %57 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14
%17 = OpLabel
%a = OpVariable %_ptr_Function_float Function %20
@@ -74,48 +74,43 @@
%31 = OpLoad %float %a
%32 = OpLoad %float %b
%33 = OpFOrdEqual %bool %31 %float_n1
- OpSelectionMerge %35 None
- OpBranchConditional %33 %36 %35
- %36 = OpLabel
- %37 = OpFOrdEqual %bool %32 %float_1_70000005
- OpBranch %35
- %35 = OpLabel
- %38 = OpPhi %bool %33 %17 %37 %36
- OpSelectionMerge %39 None
- OpBranchConditional %38 %40 %41
- %40 = OpLabel
- %46 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
- %47 = OpLoad %float %46
+ %35 = OpFOrdEqual %bool %32 %float_1_70000005
+ %36 = OpLogicalAnd %bool %33 %35
+ OpSelectionMerge %37 None
+ OpBranchConditional %36 %38 %39
+ %38 = OpLabel
+ %44 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %45 = OpLoad %float %44
+ %47 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
+ %48 = OpLoad %float %47
%49 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%50 = OpLoad %float %49
- %51 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
+ %51 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%52 = OpLoad %float %51
- %53 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
- %54 = OpLoad %float %53
- %55 = OpCompositeConstruct %v4float %47 %50 %52 %54
- OpStore %x_GLF_color %55
- OpBranch %39
- %41 = OpLabel
- %56 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
- %57 = OpLoad %float %56
- %58 = OpCompositeConstruct %v4float %57 %57 %57 %57
- OpStore %x_GLF_color %58
- OpBranch %39
+ %53 = OpCompositeConstruct %v4float %45 %48 %50 %52
+ OpStore %x_GLF_color %53
+ OpBranch %37
%39 = OpLabel
+ %54 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
+ %55 = OpLoad %float %54
+ %56 = OpCompositeConstruct %v4float %55 %55 %55 %55
+ OpStore %x_GLF_color %56
+ OpBranch %37
+ %37 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %59
+%tint_symbol_2 = OpFunction %void None %57
%tint_symbol = OpFunctionParameter %main_out
- %63 = OpLabel
- %64 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %64
+ %61 = OpLabel
+ %62 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %62
OpReturn
OpFunctionEnd
%main = OpFunction %void None %14
- %66 = OpLabel
- %67 = OpFunctionCall %void %main_1
- %69 = OpLoad %v4float %x_GLF_color
- %70 = OpCompositeConstruct %main_out %69
- %68 = OpFunctionCall %void %tint_symbol_2 %70
+ %64 = OpLabel
+ %65 = OpFunctionCall %void %main_1
+ %67 = OpLoad %v4float %x_GLF_color
+ %68 = OpCompositeConstruct %main_out %67
+ %66 = OpFunctionCall %void %tint_symbol_2 %68
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.wgsl
index 4be05e5..b62bb38 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-pow-undefined/0-opt.spvasm.expected.wgsl
@@ -22,7 +22,7 @@
x_GLF_color = vec4<f32>(x_30, x_30, x_30, x_30);
let x_32 : f32 = a;
let x_34 : f32 = b;
- if (((x_32 == -1.0) && (x_34 == 1.700000048))) {
+ if (((x_32 == -1.0) & (x_34 == 1.700000048))) {
let x_41 : f32 = x_8.x_GLF_uniform_float_values[0];
let x_43 : f32 = x_8.x_GLF_uniform_float_values[1];
let x_45 : f32 = x_8.x_GLF_uniform_float_values[1];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl
index 2c7bb9e..883cfd2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.hlsl
@@ -19,11 +19,7 @@
break;
}
const int x_10 = x_10_phi;
- bool tint_tmp = (x_10 == 1);
- if (!tint_tmp) {
- tint_tmp = (x_10 == 2);
- }
- if ((tint_tmp)) {
+ if (((x_10 == 1) | (x_10 == 2))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl
index fc24e78..3c3c805 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.msl
@@ -31,7 +31,7 @@
break;
}
int const x_10 = x_10_phi;
- if (((x_10 == 1) || (x_10 == 2))) {
+ if (((x_10 == 1) | (x_10 == 2))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.spvasm
index e24ad6d..7a86628 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 68
+; Bound: 66
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -56,9 +56,9 @@
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%float_1 = OpConstant %float 1
- %55 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %56 = OpTypeFunction %void %main_out
+ %54 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%x_9 = OpVariable %_ptr_Function__arr_int_uint_1 Function %21
@@ -89,36 +89,31 @@
%29 = OpLabel
%45 = OpLoad %int %x_10_phi
%46 = OpIEqual %bool %45 %int_1
- OpSelectionMerge %47 None
- OpBranchConditional %46 %47 %48
- %48 = OpLabel
- %49 = OpIEqual %bool %45 %int_2
- OpBranch %47
- %47 = OpLabel
- %50 = OpPhi %bool %46 %29 %49 %48
- OpSelectionMerge %51 None
- OpBranchConditional %50 %52 %53
- %52 = OpLabel
- OpStore %x_GLF_color %55
- OpBranch %51
- %53 = OpLabel
- OpStore %x_GLF_color %33
- OpBranch %51
+ %47 = OpIEqual %bool %45 %int_2
+ %48 = OpLogicalOr %bool %46 %47
+ OpSelectionMerge %49 None
+ OpBranchConditional %48 %50 %51
+ %50 = OpLabel
+ OpStore %x_GLF_color %53
+ OpBranch %49
%51 = OpLabel
+ OpStore %x_GLF_color %33
+ OpBranch %49
+ %49 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %56
+%tint_symbol_2 = OpFunction %void None %54
%tint_symbol = OpFunctionParameter %main_out
- %60 = OpLabel
- %61 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %61
+ %58 = OpLabel
+ %59 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %59
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
- %63 = OpLabel
- %64 = OpFunctionCall %void %main_1
- %66 = OpLoad %v4float %x_GLF_color
- %67 = OpCompositeConstruct %main_out %66
- %65 = OpFunctionCall %void %tint_symbol_2 %67
+ %61 = OpLabel
+ %62 = OpFunctionCall %void %main_1
+ %64 = OpLoad %v4float %x_GLF_color
+ %65 = OpCompositeConstruct %main_out %64
+ %63 = OpFunctionCall %void %tint_symbol_2 %65
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.wgsl
index d5ebd09..d8229f2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reduce-load-array-replace-extract/0.spvasm.expected.wgsl
@@ -24,7 +24,7 @@
break;
}
let x_10 : i32 = x_10_phi;
- if (((x_10 == 1) || (x_10 == 2))) {
+ if (((x_10 == 1) | (x_10 == 2))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.hlsl
index 34889ee..1a025de 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.hlsl
@@ -58,11 +58,7 @@
const int x_88 = asint(x_5[scalar_offset_3 / 4][scalar_offset_3 % 4]);
const int x_91 = asint(x_5[3].x);
const float2x2 x_95 = float2x2(float2(float(x_82), float(x_85)), float2(float(x_88), float(x_91)));
- bool tint_tmp = all((x_80[0u] == x_95[0u]));
- if (tint_tmp) {
- tint_tmp = all((x_80[1u] == x_95[1u]));
- }
- if ((tint_tmp)) {
+ if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
const int x_109 = asint(x_5[2].x);
const int x_112 = asint(x_5[1].x);
const int x_115 = asint(x_5[1].x);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl
index d6a3fcf..d580cda 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.msl
@@ -68,7 +68,7 @@
int const x_88 = x_5.x_GLF_uniform_int_values.arr[0].el;
int const x_91 = x_5.x_GLF_uniform_int_values.arr[3].el;
float2x2 const x_95 = float2x2(float2(float(x_82), float(x_85)), float2(float(x_88), float(x_91)));
- if ((all((x_80[0u] == x_95[0u])) && all((x_80[1u] == x_95[1u])))) {
+ if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
int const x_109 = x_5.x_GLF_uniform_int_values.arr[2].el;
int const x_112 = x_5.x_GLF_uniform_int_values.arr[1].el;
int const x_115 = x_5.x_GLF_uniform_int_values.arr[1].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.spvasm
index 2f12b21..23d5183 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 149
+; Bound: 147
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -65,7 +65,7 @@
%v2bool = OpTypeVector %bool 2
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
- %137 = OpTypeFunction %void %main_out
+ %135 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %23
@@ -168,56 +168,51 @@
%106 = OpCompositeExtract %v2float %103 0
%107 = OpFOrdEqual %v2bool %105 %106
%104 = OpAll %bool %107
- OpSelectionMerge %109 None
- OpBranchConditional %104 %110 %109
- %110 = OpLabel
- %113 = OpCompositeExtract %v2float %86 1
- %114 = OpCompositeExtract %v2float %103 1
- %115 = OpFOrdEqual %v2bool %113 %114
- %111 = OpAll %bool %115
- OpBranch %109
- %109 = OpLabel
- %116 = OpPhi %bool %104 %48 %111 %110
- OpSelectionMerge %117 None
- OpBranchConditional %116 %118 %119
- %118 = OpLabel
- %120 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
+ %111 = OpCompositeExtract %v2float %86 1
+ %112 = OpCompositeExtract %v2float %103 1
+ %113 = OpFOrdEqual %v2bool %111 %112
+ %109 = OpAll %bool %113
+ %114 = OpLogicalAnd %bool %104 %109
+ OpSelectionMerge %115 None
+ OpBranchConditional %114 %116 %117
+ %116 = OpLabel
+ %118 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
+ %119 = OpLoad %int %118
+ %120 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%121 = OpLoad %int %120
%122 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%123 = OpLoad %int %122
- %124 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
+ %124 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
%125 = OpLoad %int %124
- %126 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_2
- %127 = OpLoad %int %126
- %128 = OpConvertSToF %float %121
- %129 = OpConvertSToF %float %123
- %130 = OpConvertSToF %float %125
- %131 = OpConvertSToF %float %127
- %132 = OpCompositeConstruct %v4float %128 %129 %130 %131
- OpStore %x_GLF_color %132
- OpBranch %117
- %119 = OpLabel
- %133 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
- %134 = OpLoad %int %133
- %135 = OpConvertSToF %float %134
- %136 = OpCompositeConstruct %v4float %135 %135 %135 %135
- OpStore %x_GLF_color %136
- OpBranch %117
+ %126 = OpConvertSToF %float %119
+ %127 = OpConvertSToF %float %121
+ %128 = OpConvertSToF %float %123
+ %129 = OpConvertSToF %float %125
+ %130 = OpCompositeConstruct %v4float %126 %127 %128 %129
+ OpStore %x_GLF_color %130
+ OpBranch %115
%117 = OpLabel
+ %131 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
+ %132 = OpLoad %int %131
+ %133 = OpConvertSToF %float %132
+ %134 = OpCompositeConstruct %v4float %133 %133 %133 %133
+ OpStore %x_GLF_color %134
+ OpBranch %115
+ %115 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %137
+%tint_symbol_2 = OpFunction %void None %135
%tint_symbol = OpFunctionParameter %main_out
- %141 = OpLabel
- %142 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %142
+ %139 = OpLabel
+ %140 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %140
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
- %144 = OpLabel
- %145 = OpFunctionCall %void %main_1
- %147 = OpLoad %v4float %x_GLF_color
- %148 = OpCompositeConstruct %main_out %147
- %146 = OpFunctionCall %void %tint_symbol_2 %148
+ %142 = OpLabel
+ %143 = OpFunctionCall %void %main_1
+ %145 = OpLoad %v4float %x_GLF_color
+ %146 = OpCompositeConstruct %main_out %145
+ %144 = OpFunctionCall %void %tint_symbol_2 %146
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.wgsl
index 3ad4f9b..90bc862 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-reinitialize-matrix-after-undefined-value/0-opt.spvasm.expected.wgsl
@@ -61,7 +61,7 @@
let x_88 : i32 = x_5.x_GLF_uniform_int_values[0];
let x_91 : i32 = x_5.x_GLF_uniform_int_values[3];
let x_95 : mat2x2<f32> = mat2x2<f32>(vec2<f32>(f32(x_82), f32(x_85)), vec2<f32>(f32(x_88), f32(x_91)));
- if ((all((x_80[0u] == x_95[0u])) && all((x_80[1u] == x_95[1u])))) {
+ if ((all((x_80[0u] == x_95[0u])) & all((x_80[1u] == x_95[1u])))) {
let x_109 : i32 = x_5.x_GLF_uniform_int_values[2];
let x_112 : i32 = x_5.x_GLF_uniform_int_values[1];
let x_115 : i32 = x_5.x_GLF_uniform_int_values[1];
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl
index f5d4020..d7bfdcc 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.hlsl
@@ -11,11 +11,7 @@
a = ddx(cos(x_33));
const float x_37 = asfloat(x_8[0].x);
b = lerp(2.0f, x_37, a);
- bool tint_tmp = (b >= 1.899999976f);
- if (tint_tmp) {
- tint_tmp = (b <= 2.099999905f);
- }
- if ((tint_tmp)) {
+ if (((b >= 1.899999976f) & (b <= 2.099999905f))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl
index 31f4571..d8ea250 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.msl
@@ -21,7 +21,7 @@
b = mix(2.0f, x_37, x_38);
float const x_40 = b;
float const x_42 = b;
- if (((x_40 >= 1.899999976f) && (x_42 <= 2.099999905f))) {
+ if (((x_40 >= 1.899999976f) & (x_42 <= 2.099999905f))) {
*(tint_symbol_6) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.spvasm
index 7858785..3b09286 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 66
+; Bound: 64
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
@@ -58,10 +58,10 @@
%float_2_0999999 = OpConstant %float 2.0999999
%float_1 = OpConstant %float 1
%float_0 = OpConstant %float 0
- %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %49 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %50 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %53 = OpTypeFunction %void %main_out
+ %51 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14
%17 = OpLabel
%a = OpVariable %_ptr_Function_float Function %20
@@ -79,38 +79,33 @@
%36 = OpLoad %float %b
%37 = OpLoad %float %b
%39 = OpFOrdGreaterThanEqual %bool %36 %float_1_89999998
- OpSelectionMerge %41 None
- OpBranchConditional %39 %42 %41
- %42 = OpLabel
- %44 = OpFOrdLessThanEqual %bool %37 %float_2_0999999
- OpBranch %41
- %41 = OpLabel
- %45 = OpPhi %bool %39 %17 %44 %42
- OpSelectionMerge %46 None
- OpBranchConditional %45 %47 %48
- %47 = OpLabel
- OpStore %x_GLF_color %51
- OpBranch %46
- %48 = OpLabel
- OpStore %x_GLF_color %52
- OpBranch %46
+ %42 = OpFOrdLessThanEqual %bool %37 %float_2_0999999
+ %43 = OpLogicalAnd %bool %39 %42
+ OpSelectionMerge %44 None
+ OpBranchConditional %43 %45 %46
+ %45 = OpLabel
+ OpStore %x_GLF_color %49
+ OpBranch %44
%46 = OpLabel
+ OpStore %x_GLF_color %50
+ OpBranch %44
+ %44 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %53
+%tint_symbol_3 = OpFunction %void None %51
%tint_symbol_1 = OpFunctionParameter %main_out
- %57 = OpLabel
- %58 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %58
+ %55 = OpLabel
+ %56 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %56
OpReturn
OpFunctionEnd
%main = OpFunction %void None %14
- %60 = OpLabel
- %61 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %61
- %62 = OpFunctionCall %void %main_1
- %64 = OpLoad %v4float %x_GLF_color
- %65 = OpCompositeConstruct %main_out %64
- %63 = OpFunctionCall %void %tint_symbol_3 %65
+ %58 = OpLabel
+ %59 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %59
+ %60 = OpFunctionCall %void %main_1
+ %62 = OpLoad %v4float %x_GLF_color
+ %63 = OpCompositeConstruct %main_out %62
+ %61 = OpFunctionCall %void %tint_symbol_3 %63
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.wgsl
index 7165a35..2973115 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-target-lowering-dfdx-cos/0-opt.spvasm.expected.wgsl
@@ -19,7 +19,7 @@
b = mix(2.0, x_37, x_38);
let x_40 : f32 = b;
let x_42 : f32 = b;
- if (((x_40 >= 1.899999976) && (x_42 <= 2.099999905))) {
+ if (((x_40 >= 1.899999976) & (x_42 <= 2.099999905))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl
index 256b8ea..1012c9a 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.hlsl
@@ -5,11 +5,7 @@
m = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f));
const float2x2 x_30 = mul(transpose(m), transpose(m));
const float2x2 x_34 = transpose(mul(m, m));
- bool tint_tmp = all((x_30[0u] == x_34[0u]));
- if (tint_tmp) {
- tint_tmp = all((x_30[1u] == x_34[1u]));
- }
- if ((tint_tmp)) {
+ if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
x_GLF_color = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
x_GLF_color = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl
index 452c4cf..f8856db 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
float2x2 const x_31 = m;
float2x2 const x_32 = m;
float2x2 const x_34 = transpose((x_31 * x_32));
- if ((all((x_30[0u] == x_34[0u])) && all((x_30[1u] == x_34[1u])))) {
+ if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
*(tint_symbol_4) = float4(1.0f, 0.0f, 0.0f, 1.0f);
} else {
*(tint_symbol_4) = float4(0.0f, 0.0f, 0.0f, 0.0f);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.spvasm
index b135837..69eb7bd 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 67
+; Bound: 65
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -44,10 +44,10 @@
%v2bool = OpTypeVector %bool 2
%uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0
- %53 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %54 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %51 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %52 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%main_out = OpTypeStruct %v4float
- %55 = OpTypeFunction %void %main_out
+ %53 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%m = OpVariable %_ptr_Function_mat2v2float Function %16
@@ -65,39 +65,34 @@
%38 = OpCompositeExtract %v2float %31 0
%39 = OpFOrdEqual %v2bool %37 %38
%33 = OpAll %bool %39
- OpSelectionMerge %41 None
- OpBranchConditional %33 %42 %41
- %42 = OpLabel
- %45 = OpCompositeExtract %v2float %28 1
- %46 = OpCompositeExtract %v2float %31 1
- %47 = OpFOrdEqual %v2bool %45 %46
- %43 = OpAll %bool %47
- OpBranch %41
- %41 = OpLabel
- %48 = OpPhi %bool %33 %11 %43 %42
- OpSelectionMerge %49 None
- OpBranchConditional %48 %50 %51
- %50 = OpLabel
- OpStore %x_GLF_color %53
- OpBranch %49
- %51 = OpLabel
- OpStore %x_GLF_color %54
- OpBranch %49
+ %43 = OpCompositeExtract %v2float %28 1
+ %44 = OpCompositeExtract %v2float %31 1
+ %45 = OpFOrdEqual %v2bool %43 %44
+ %41 = OpAll %bool %45
+ %46 = OpLogicalAnd %bool %33 %41
+ OpSelectionMerge %47 None
+ OpBranchConditional %46 %48 %49
+ %48 = OpLabel
+ OpStore %x_GLF_color %51
+ OpBranch %47
%49 = OpLabel
+ OpStore %x_GLF_color %52
+ OpBranch %47
+ %47 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %55
+%tint_symbol_2 = OpFunction %void None %53
%tint_symbol = OpFunctionParameter %main_out
- %59 = OpLabel
- %60 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %60
+ %57 = OpLabel
+ %58 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %58
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %62 = OpLabel
- %63 = OpFunctionCall %void %main_1
- %65 = OpLoad %v4float %x_GLF_color
- %66 = OpCompositeConstruct %main_out %65
- %64 = OpFunctionCall %void %tint_symbol_2 %66
+ %60 = OpLabel
+ %61 = OpFunctionCall %void %main_1
+ %63 = OpLoad %v4float %x_GLF_color
+ %64 = OpCompositeConstruct %main_out %63
+ %62 = OpFunctionCall %void %tint_symbol_2 %64
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.wgsl
index 891a913..c9e11f5 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-transpose-multiply/0-opt.spvasm.expected.wgsl
@@ -9,7 +9,7 @@
let x_31 : mat2x2<f32> = m;
let x_32 : mat2x2<f32> = m;
let x_34 : mat2x2<f32> = transpose((x_31 * x_32));
- if ((all((x_30[0u] == x_34[0u])) && all((x_30[1u] == x_34[1u])))) {
+ if ((all((x_30[0u] == x_34[0u])) & all((x_30[1u] == x_34[1u])))) {
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
} else {
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 0.0);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.hlsl
index 258443f..9409852 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.hlsl
@@ -62,19 +62,7 @@
const int x_123 = asint(x_6[1].x);
const int x_126 = asint(x_6[1].x);
const float4x4 x_132 = float4x4(float4(float(x_81), float(x_84), float(x_87), float(x_90)), float4(float(x_93), float(x_96), float(x_99), float(x_102)), float4(float(x_105), float(x_108), float(x_111), float(x_114)), float4(float(x_117), float(x_120), float(x_123), float(x_126)));
- bool tint_tmp_2 = all((x_79[0u] == x_132[0u]));
- if (tint_tmp_2) {
- tint_tmp_2 = all((x_79[1u] == x_132[1u]));
- }
- bool tint_tmp_1 = (tint_tmp_2);
- if (tint_tmp_1) {
- tint_tmp_1 = all((x_79[2u] == x_132[2u]));
- }
- bool tint_tmp = (tint_tmp_1);
- if (tint_tmp) {
- tint_tmp = all((x_79[3u] == x_132[3u]));
- }
- if ((tint_tmp)) {
+ if ((((all((x_79[0u] == x_132[0u])) & all((x_79[1u] == x_132[1u]))) & all((x_79[2u] == x_132[2u]))) & all((x_79[3u] == x_132[3u])))) {
const int x_156 = asint(x_6[2].x);
const int x_159 = asint(x_6[1].x);
const int x_162 = asint(x_6[1].x);
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
index 2e9eaea..5b0e89e 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.msl
@@ -79,7 +79,7 @@
int const x_123 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_126 = x_6.x_GLF_uniform_int_values.arr[1].el;
float4x4 const x_132 = float4x4(float4(float(x_81), float(x_84), float(x_87), float(x_90)), float4(float(x_93), float(x_96), float(x_99), float(x_102)), float4(float(x_105), float(x_108), float(x_111), float(x_114)), float4(float(x_117), float(x_120), float(x_123), float(x_126)));
- if ((((all((x_79[0u] == x_132[0u])) && all((x_79[1u] == x_132[1u]))) && all((x_79[2u] == x_132[2u]))) && all((x_79[3u] == x_132[3u])))) {
+ if ((((all((x_79[0u] == x_132[0u])) & all((x_79[1u] == x_132[1u]))) & all((x_79[2u] == x_132[2u]))) & all((x_79[3u] == x_132[3u])))) {
int const x_156 = x_6.x_GLF_uniform_int_values.arr[2].el;
int const x_159 = x_6.x_GLF_uniform_int_values.arr[1].el;
int const x_162 = x_6.x_GLF_uniform_int_values.arr[1].el;
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.spvasm
index 1bf7a3d..61df56b 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 198
+; Bound: 192
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -78,7 +78,7 @@
%uint_2 = OpConstant %uint 2
%uint_3 = OpConstant %uint 3
%main_out = OpTypeStruct %v4float
- %186 = OpTypeFunction %void %main_out
+ %180 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%m0 = OpVariable %_ptr_Function_mat4v4float Function %27
@@ -199,76 +199,61 @@
%140 = OpCompositeExtract %v4float %137 0
%141 = OpFOrdEqual %v4bool %139 %140
%138 = OpAll %bool %141
- OpSelectionMerge %143 None
- OpBranchConditional %138 %144 %143
- %144 = OpLabel
- %146 = OpCompositeExtract %v4float %84 1
- %147 = OpCompositeExtract %v4float %137 1
- %148 = OpFOrdEqual %v4bool %146 %147
- %145 = OpAll %bool %148
- OpBranch %143
- %143 = OpLabel
- %149 = OpPhi %bool %138 %48 %145 %144
- OpSelectionMerge %150 None
- OpBranchConditional %149 %151 %150
- %151 = OpLabel
- %154 = OpCompositeExtract %v4float %84 2
- %155 = OpCompositeExtract %v4float %137 2
- %156 = OpFOrdEqual %v4bool %154 %155
- %152 = OpAll %bool %156
- OpBranch %150
- %150 = OpLabel
- %157 = OpPhi %bool %149 %143 %152 %151
- OpSelectionMerge %158 None
- OpBranchConditional %157 %159 %158
- %159 = OpLabel
- %162 = OpCompositeExtract %v4float %84 3
- %163 = OpCompositeExtract %v4float %137 3
- %164 = OpFOrdEqual %v4bool %162 %163
- %160 = OpAll %bool %164
- OpBranch %158
- %158 = OpLabel
- %165 = OpPhi %bool %157 %150 %160 %159
- OpSelectionMerge %166 None
- OpBranchConditional %165 %167 %168
- %167 = OpLabel
+ %144 = OpCompositeExtract %v4float %84 1
+ %145 = OpCompositeExtract %v4float %137 1
+ %146 = OpFOrdEqual %v4bool %144 %145
+ %143 = OpAll %bool %146
+ %147 = OpLogicalAnd %bool %138 %143
+ %150 = OpCompositeExtract %v4float %84 2
+ %151 = OpCompositeExtract %v4float %137 2
+ %152 = OpFOrdEqual %v4bool %150 %151
+ %148 = OpAll %bool %152
+ %153 = OpLogicalAnd %bool %147 %148
+ %156 = OpCompositeExtract %v4float %84 3
+ %157 = OpCompositeExtract %v4float %137 3
+ %158 = OpFOrdEqual %v4bool %156 %157
+ %154 = OpAll %bool %158
+ %159 = OpLogicalAnd %bool %153 %154
+ OpSelectionMerge %160 None
+ OpBranchConditional %159 %161 %162
+ %161 = OpLabel
+ %163 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
+ %164 = OpLoad %int %163
+ %165 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %166 = OpLoad %int %165
+ %167 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %168 = OpLoad %int %167
%169 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
%170 = OpLoad %int %169
- %171 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %172 = OpLoad %int %171
- %173 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %174 = OpLoad %int %173
- %175 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_2
- %176 = OpLoad %int %175
- %177 = OpConvertSToF %float %170
- %178 = OpConvertSToF %float %172
- %179 = OpConvertSToF %float %174
- %180 = OpConvertSToF %float %176
- %181 = OpCompositeConstruct %v4float %177 %178 %179 %180
- OpStore %x_GLF_color %181
- OpBranch %166
- %168 = OpLabel
- %182 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
- %183 = OpLoad %int %182
- %184 = OpConvertSToF %float %183
- %185 = OpCompositeConstruct %v4float %184 %184 %184 %184
- OpStore %x_GLF_color %185
- OpBranch %166
- %166 = OpLabel
+ %171 = OpConvertSToF %float %164
+ %172 = OpConvertSToF %float %166
+ %173 = OpConvertSToF %float %168
+ %174 = OpConvertSToF %float %170
+ %175 = OpCompositeConstruct %v4float %171 %172 %173 %174
+ OpStore %x_GLF_color %175
+ OpBranch %160
+ %162 = OpLabel
+ %176 = OpAccessChain %_ptr_Uniform_int %x_6 %uint_0 %int_1
+ %177 = OpLoad %int %176
+ %178 = OpConvertSToF %float %177
+ %179 = OpCompositeConstruct %v4float %178 %178 %178 %178
+ OpStore %x_GLF_color %179
+ OpBranch %160
+ %160 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %186
+%tint_symbol_2 = OpFunction %void None %180
%tint_symbol = OpFunctionParameter %main_out
- %190 = OpLabel
- %191 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %191
+ %184 = OpLabel
+ %185 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %185
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
- %193 = OpLabel
- %194 = OpFunctionCall %void %main_1
- %196 = OpLoad %v4float %x_GLF_color
- %197 = OpCompositeConstruct %main_out %196
- %195 = OpFunctionCall %void %tint_symbol_2 %197
+ %187 = OpLabel
+ %188 = OpFunctionCall %void %main_1
+ %190 = OpLoad %v4float %x_GLF_color
+ %191 = OpCompositeConstruct %main_out %190
+ %189 = OpFunctionCall %void %tint_symbol_2 %191
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.wgsl
index cd04198..5cf3aa2 100644
--- a/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/cov-unused-matrix-copy-inside-loop/0-opt.spvasm.expected.wgsl
@@ -70,7 +70,7 @@
let x_123 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_126 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_132 : mat4x4<f32> = mat4x4<f32>(vec4<f32>(f32(x_81), f32(x_84), f32(x_87), f32(x_90)), vec4<f32>(f32(x_93), f32(x_96), f32(x_99), f32(x_102)), vec4<f32>(f32(x_105), f32(x_108), f32(x_111), f32(x_114)), vec4<f32>(f32(x_117), f32(x_120), f32(x_123), f32(x_126)));
- if ((((all((x_79[0u] == x_132[0u])) && all((x_79[1u] == x_132[1u]))) && all((x_79[2u] == x_132[2u]))) && all((x_79[3u] == x_132[3u])))) {
+ if ((((all((x_79[0u] == x_132[0u])) & all((x_79[1u] == x_132[1u]))) & all((x_79[2u] == x_132[2u]))) & all((x_79[3u] == x_132[3u])))) {
let x_156 : i32 = x_6.x_GLF_uniform_int_values[2];
let x_159 : i32 = x_6.x_GLF_uniform_int_values[1];
let x_162 : i32 = x_6.x_GLF_uniform_int_values[1];
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl
index f1268b0..6c3f3f4 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.hlsl
@@ -28,11 +28,7 @@
break;
}
}
- bool tint_tmp = (donor_replacementGLF_dead0top >= 0);
- if (tint_tmp) {
- tint_tmp = (donor_replacementGLF_dead0top < 9);
- }
- if ((tint_tmp)) {
+ if (((donor_replacementGLF_dead0top >= 0) & (donor_replacementGLF_dead0top < 9))) {
const int x_17 = (donor_replacementGLF_dead0top + 1);
donor_replacementGLF_dead0top = x_17;
x_54 = x_17;
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl
index 837b916..d05608a 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.msl
@@ -41,7 +41,7 @@
}
int const x_14 = donor_replacementGLF_dead0top;
int const x_15 = donor_replacementGLF_dead0top;
- if (((x_14 >= 0) && (x_15 < 9))) {
+ if (((x_14 >= 0) & (x_15 < 9))) {
int const x_16 = donor_replacementGLF_dead0top;
int const x_17 = (x_16 + 1);
donor_replacementGLF_dead0top = x_17;
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.spvasm
index de2d980..6bb20bf 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 115
+; Bound: 113
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -64,13 +64,13 @@
%float_0 = OpConstant %float 0
%int_1 = OpConstant %int 1
%int_9 = OpConstant %int 9
- %79 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+ %77 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%int_3 = OpConstant %int 3
%_ptr_Function_float = OpTypePointer Function %float
%float_1 = OpConstant %float 1
- %102 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %100 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %103 = OpTypeFunction %void %main_out
+ %101 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%k = OpVariable %_ptr_Function_int Function %19
@@ -124,82 +124,77 @@
%64 = OpLoad %int %donor_replacementGLF_dead0top
%65 = OpLoad %int %donor_replacementGLF_dead0top
%66 = OpSGreaterThanEqual %bool %64 %int_0
- OpSelectionMerge %67 None
- OpBranchConditional %66 %68 %67
- %68 = OpLabel
- %70 = OpSLessThan %bool %65 %int_9
- OpBranch %67
- %67 = OpLabel
- %71 = OpPhi %bool %66 %55 %70 %68
- OpSelectionMerge %72 None
- OpBranchConditional %71 %73 %74
- %73 = OpLabel
- %75 = OpLoad %int %donor_replacementGLF_dead0top
- %76 = OpIAdd %int %75 %int_1
- OpStore %donor_replacementGLF_dead0top %76
- OpStore %x_54 %76
- OpBranch %72
- %74 = OpLabel
- OpStore %x_54 %int_0
- OpBranch %72
+ %68 = OpSLessThan %bool %65 %int_9
+ %69 = OpLogicalAnd %bool %66 %68
+ OpSelectionMerge %70 None
+ OpBranchConditional %69 %71 %72
+ %71 = OpLabel
+ %73 = OpLoad %int %donor_replacementGLF_dead0top
+ %74 = OpIAdd %int %73 %int_1
+ OpStore %donor_replacementGLF_dead0top %74
+ OpStore %x_54 %74
+ OpBranch %70
%72 = OpLabel
- %77 = OpLoad %int %x_54
- %78 = OpAccessChain %_ptr_Function_int %donor_replacementGLF_dead0stack %77
- OpStore %78 %int_1
+ OpStore %x_54 %int_0
+ OpBranch %70
+ %70 = OpLabel
+ %75 = OpLoad %int %x_54
+ %76 = OpAccessChain %_ptr_Function_int %donor_replacementGLF_dead0stack %75
+ OpStore %76 %int_1
OpBranch %51
%51 = OpLabel
- OpStore %matrix_b %79
+ OpStore %matrix_b %77
OpStore %b %int_3
+ OpBranch %79
+ %79 = OpLabel
+ OpLoopMerge %80 %81 None
+ OpBranch %82
+ %82 = OpLabel
+ %83 = OpLoad %int %b
+ %84 = OpSGreaterThanEqual %bool %83 %int_0
+ OpSelectionMerge %85 None
+ OpBranchConditional %84 %86 %87
+ %86 = OpLabel
+ OpBranch %85
+ %87 = OpLabel
+ OpBranch %80
+ %85 = OpLabel
+ %88 = OpLoad %int %b
+ %89 = OpLoad %int %b
+ %91 = OpAccessChain %_ptr_Function_float %matrix_b %89
+ %92 = OpLoad %float %91
+ %93 = OpAccessChain %_ptr_Function_float %matrix_b %88
+ %95 = OpFSub %float %92 %float_1
+ OpStore %93 %95
OpBranch %81
%81 = OpLabel
- OpLoopMerge %82 %83 None
- OpBranch %84
- %84 = OpLabel
- %85 = OpLoad %int %b
- %86 = OpSGreaterThanEqual %bool %85 %int_0
- OpSelectionMerge %87 None
- OpBranchConditional %86 %88 %89
- %88 = OpLabel
- OpBranch %87
- %89 = OpLabel
- OpBranch %82
- %87 = OpLabel
- %90 = OpLoad %int %b
- %91 = OpLoad %int %b
- %93 = OpAccessChain %_ptr_Function_float %matrix_b %91
- %94 = OpLoad %float %93
- %95 = OpAccessChain %_ptr_Function_float %matrix_b %90
- %97 = OpFSub %float %94 %float_1
- OpStore %95 %97
- OpBranch %83
- %83 = OpLabel
- %98 = OpLoad %int %b
- %99 = OpISub %int %98 %int_1
- OpStore %b %99
- OpBranch %81
- %82 = OpLabel
+ %96 = OpLoad %int %b
+ %97 = OpISub %int %96 %int_1
+ OpStore %b %97
+ OpBranch %79
+ %80 = OpLabel
OpBranch %35
%35 = OpLabel
- %100 = OpLoad %int %k
- %101 = OpIAdd %int %100 %int_1
- OpStore %k %101
+ %98 = OpLoad %int %k
+ %99 = OpIAdd %int %98 %int_1
+ OpStore %k %99
OpBranch %33
%34 = OpLabel
- OpStore %x_GLF_color %102
+ OpStore %x_GLF_color %100
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %103
+%tint_symbol_2 = OpFunction %void None %101
%tint_symbol = OpFunctionParameter %main_out
- %107 = OpLabel
- %108 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %108
+ %105 = OpLabel
+ %106 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %106
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
- %110 = OpLabel
- %111 = OpFunctionCall %void %main_1
- %113 = OpLoad %v4float %x_GLF_color
- %114 = OpCompositeConstruct %main_out %113
- %112 = OpFunctionCall %void %tint_symbol_2 %114
+ %108 = OpLabel
+ %109 = OpFunctionCall %void %main_1
+ %111 = OpLoad %v4float %x_GLF_color
+ %112 = OpCompositeConstruct %main_out %111
+ %110 = OpFunctionCall %void %tint_symbol_2 %112
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.wgsl
index 26a8a10..25f8cec 100644
--- a/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/loop-dead-if-loop/0-opt.spvasm.expected.wgsl
@@ -34,7 +34,7 @@
}
let x_14 : i32 = donor_replacementGLF_dead0top;
let x_15 : i32 = donor_replacementGLF_dead0top;
- if (((x_14 >= 0) && (x_15 < 9))) {
+ if (((x_14 >= 0) & (x_15 < 9))) {
let x_16 : i32 = donor_replacementGLF_dead0top;
let x_17 : i32 = (x_16 + 1);
donor_replacementGLF_dead0top = x_17;
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl
index 938e563..f41b00d 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.hlsl
@@ -35,11 +35,7 @@
switch(msb10) {
case 1:
case 8: {
- bool tint_tmp = (msb10 >= 0);
- if (tint_tmp) {
- tint_tmp = (msb10 < 9);
- }
- const int x_96 = ((tint_tmp) ? msb10 : 0);
+ const int x_96 = (((msb10 >= 0) & (msb10 < 9)) ? msb10 : 0);
const float x_98 = donor_replacementGLF_dead5sums[x_96];
donor_replacementGLF_dead5sums[x_96] = (x_98 + 1.0f);
break;
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl
index d1d24c8..5965457 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.msl
@@ -68,7 +68,7 @@
int const x_90 = msb10;
int const x_92 = msb10;
int const x_95 = msb10;
- int const x_96 = select(0, x_95, ((x_90 >= 0) && (x_92 < 9)));
+ int const x_96 = select(0, x_95, ((x_90 >= 0) & (x_92 < 9)));
float const x_98 = donor_replacementGLF_dead5sums.arr[x_96];
donor_replacementGLF_dead5sums.arr[x_96] = (x_98 + 1.0f);
break;
diff --git a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.wgsl
index 31f3f0e..d1780a3 100644
--- a/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/nested-loops-switch/0.spvasm.expected.wgsl
@@ -60,7 +60,7 @@
let x_90 : i32 = msb10;
let x_92 : i32 = msb10;
let x_95 : i32 = msb10;
- let x_96 : i32 = select(0, x_95, ((x_90 >= 0) && (x_92 < 9)));
+ let x_96 : i32 = select(0, x_95, ((x_90 >= 0) & (x_92 < 9)));
let x_98 : f32 = donor_replacementGLF_dead5sums[x_96];
donor_replacementGLF_dead5sums[x_96] = (x_98 + 1.0);
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl
index be184c8..9aaf73d 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.hlsl
@@ -25,11 +25,7 @@
const int x_263 = mid;
const int x_265 = j;
const int x_266 = to;
- bool tint_tmp = (x_262 <= x_263);
- if (tint_tmp) {
- tint_tmp = (x_265 <= x_266);
- }
- if ((tint_tmp)) {
+ if (((x_262 <= x_263) & (x_265 <= x_266))) {
} else {
break;
}
@@ -55,11 +51,7 @@
const int x_298 = i;
const int x_300 = i;
const int x_301 = mid;
- bool tint_tmp_1 = (x_298 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_300 <= x_301);
- }
- if ((tint_tmp_1)) {
+ if (((x_298 < 10) & (x_300 <= x_301))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl
index 6e7adb4..5c560fc 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.msl
@@ -33,7 +33,7 @@
int const x_263 = *(mid);
int const x_265 = j;
int const x_266 = *(to);
- if (((x_262 <= x_263) && (x_265 <= x_266))) {
+ if (((x_262 <= x_263) & (x_265 <= x_266))) {
} else {
break;
}
@@ -61,7 +61,7 @@
int const x_298 = i;
int const x_300 = i;
int const x_301 = *(mid);
- if (((x_298 < 10) && (x_300 <= x_301))) {
+ if (((x_298 < 10) & (x_300 <= x_301))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.wgsl
index e61feb5..961f5bc 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/0-opt.spvasm.expected.wgsl
@@ -36,7 +36,7 @@
let x_263 : i32 = *(mid);
let x_265 : i32 = j;
let x_266 : i32 = *(to);
- if (((x_262 <= x_263) && (x_265 <= x_266))) {
+ if (((x_262 <= x_263) & (x_265 <= x_266))) {
} else {
break;
}
@@ -64,7 +64,7 @@
let x_298 : i32 = i;
let x_300 : i32 = i;
let x_301 : i32 = *(mid);
- if (((x_298 < 10) && (x_300 <= x_301))) {
+ if (((x_298 < 10) & (x_300 <= x_301))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl
index b6f582e..e78af85 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.hlsl
@@ -25,11 +25,7 @@
const int x_264 = mid;
const int x_266 = j;
const int x_267 = to;
- bool tint_tmp = (x_263 <= x_264);
- if (tint_tmp) {
- tint_tmp = (x_266 <= x_267);
- }
- if ((tint_tmp)) {
+ if (((x_263 <= x_264) & (x_266 <= x_267))) {
} else {
break;
}
@@ -55,11 +51,7 @@
const int x_299 = i;
const int x_301 = i;
const int x_302 = mid;
- bool tint_tmp_1 = (x_299 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_301 <= x_302);
- }
- if ((tint_tmp_1)) {
+ if (((x_299 < 10) & (x_301 <= x_302))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl
index 983295b..5676576 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.msl
@@ -33,7 +33,7 @@
int const x_264 = *(mid);
int const x_266 = j;
int const x_267 = *(to);
- if (((x_263 <= x_264) && (x_266 <= x_267))) {
+ if (((x_263 <= x_264) & (x_266 <= x_267))) {
} else {
break;
}
@@ -61,7 +61,7 @@
int const x_299 = i;
int const x_301 = i;
int const x_302 = *(mid);
- if (((x_299 < 10) && (x_301 <= x_302))) {
+ if (((x_299 < 10) & (x_301 <= x_302))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.wgsl
index b969e06..e37d777 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block/1.spvasm.expected.wgsl
@@ -36,7 +36,7 @@
let x_264 : i32 = *(mid);
let x_266 : i32 = j;
let x_267 : i32 = *(to);
- if (((x_263 <= x_264) && (x_266 <= x_267))) {
+ if (((x_263 <= x_264) & (x_266 <= x_267))) {
} else {
break;
}
@@ -64,7 +64,7 @@
let x_299 : i32 = i;
let x_301 : i32 = i;
let x_302 : i32 = *(mid);
- if (((x_299 < 10) && (x_301 <= x_302))) {
+ if (((x_299 < 10) & (x_301 <= x_302))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl
index 61539cb..cebe086 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.hlsl
@@ -25,11 +25,7 @@
const int x_265 = mid;
const int x_267 = j;
const int x_268 = to;
- bool tint_tmp = (x_264 <= x_265);
- if (tint_tmp) {
- tint_tmp = (x_267 <= x_268);
- }
- if ((tint_tmp)) {
+ if (((x_264 <= x_265) & (x_267 <= x_268))) {
} else {
break;
}
@@ -59,11 +55,7 @@
const int x_301 = i;
const int x_303 = i;
const int x_304 = mid;
- bool tint_tmp_1 = (x_301 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_303 <= x_304);
- }
- if ((tint_tmp_1)) {
+ if (((x_301 < 10) & (x_303 <= x_304))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl
index e2f2448..4bc9816 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.msl
@@ -33,7 +33,7 @@
int const x_265 = *(mid);
int const x_267 = j;
int const x_268 = *(to);
- if (((x_264 <= x_265) && (x_267 <= x_268))) {
+ if (((x_264 <= x_265) & (x_267 <= x_268))) {
} else {
break;
}
@@ -65,7 +65,7 @@
int const x_301 = i;
int const x_303 = i;
int const x_304 = *(mid);
- if (((x_301 < 10) && (x_303 <= x_304))) {
+ if (((x_301 < 10) & (x_303 <= x_304))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.wgsl
index b26ac12..a1f8110 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-double-branch-to-same-block3/1.spvasm.expected.wgsl
@@ -36,7 +36,7 @@
let x_265 : i32 = *(mid);
let x_267 : i32 = j;
let x_268 : i32 = *(to);
- if (((x_264 <= x_265) && (x_267 <= x_268))) {
+ if (((x_264 <= x_265) & (x_267 <= x_268))) {
} else {
break;
}
@@ -68,7 +68,7 @@
let x_301 : i32 = i;
let x_303 : i32 = i;
let x_304 : i32 = *(mid);
- if (((x_301 < 10) && (x_303 <= x_304))) {
+ if (((x_301 < 10) & (x_303 <= x_304))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl
index 975a0e5..6c28e9e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.hlsl
@@ -163,11 +163,7 @@
x_131 = x_131_phi;
const int x_134 = x_134_phi;
x_136 = x_136_phi;
- bool tint_tmp = (x_136 <= x_126);
- if (tint_tmp) {
- tint_tmp = (x_134 <= x_129);
- }
- if ((tint_tmp)) {
+ if (((x_136 <= x_126) & (x_134 <= x_129))) {
} else {
break;
}
@@ -204,11 +200,7 @@
int x_162 = 0;
const int x_158 = x_158_phi;
const int x_161 = x_161_phi;
- bool tint_tmp_1 = (x_161 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_161 <= x_126);
- }
- if ((tint_tmp_1)) {
+ if (((x_161 < 10) & (x_161 <= x_126))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl
index e8a7ca8..27feeef 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.msl
@@ -173,7 +173,7 @@
x_131 = x_131_phi;
int const x_134 = x_134_phi;
x_136 = x_136_phi;
- if (((x_136 <= x_126) && (x_134 <= x_129))) {
+ if (((x_136 <= x_126) & (x_134 <= x_129))) {
} else {
break;
}
@@ -210,7 +210,7 @@
int x_162 = 0;
int const x_158 = x_158_phi;
int const x_161 = x_161_phi;
- if (((x_161 < 10) && (x_161 <= x_126))) {
+ if (((x_161 < 10) & (x_161 <= x_126))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.wgsl
index fc4bfa1..705774f 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/1.spvasm.expected.wgsl
@@ -158,7 +158,7 @@
x_131 = x_131_phi;
let x_134 : i32 = x_134_phi;
x_136 = x_136_phi;
- if (((x_136 <= x_126) && (x_134 <= x_129))) {
+ if (((x_136 <= x_126) & (x_134 <= x_129))) {
} else {
break;
}
@@ -196,7 +196,7 @@
var x_162 : i32;
let x_158 : i32 = x_158_phi;
let x_161 : i32 = x_161_phi;
- if (((x_161 < 10) && (x_161 <= x_126))) {
+ if (((x_161 < 10) & (x_161 <= x_126))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl
index 3b86173..40b050e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.hlsl
@@ -159,11 +159,7 @@
x_130 = x_130_phi;
const int x_133 = x_133_phi;
x_135 = x_135_phi;
- bool tint_tmp = (x_135 <= x_125);
- if (tint_tmp) {
- tint_tmp = (x_133 <= x_128);
- }
- if ((tint_tmp)) {
+ if (((x_135 <= x_125) & (x_133 <= x_128))) {
} else {
break;
}
@@ -200,11 +196,7 @@
int x_161 = 0;
const int x_157 = x_157_phi;
const int x_160 = x_160_phi;
- bool tint_tmp_1 = (x_160 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_160 <= x_125);
- }
- if ((tint_tmp_1)) {
+ if (((x_160 < 10) & (x_160 <= x_125))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl
index 64e598b..14e0ab3 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.msl
@@ -169,7 +169,7 @@
x_130 = x_130_phi;
int const x_133 = x_133_phi;
x_135 = x_135_phi;
- if (((x_135 <= x_125) && (x_133 <= x_128))) {
+ if (((x_135 <= x_125) & (x_133 <= x_128))) {
} else {
break;
}
@@ -206,7 +206,7 @@
int x_161 = 0;
int const x_157 = x_157_phi;
int const x_160 = x_160_phi;
- if (((x_160 < 10) && (x_160 <= x_125))) {
+ if (((x_160 < 10) & (x_160 <= x_125))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.wgsl
index 0d0b64b..235e196 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-O-prop-up-mutate-var/2.spvasm.expected.wgsl
@@ -155,7 +155,7 @@
x_130 = x_130_phi;
let x_133 : i32 = x_133_phi;
x_135 = x_135_phi;
- if (((x_135 <= x_125) && (x_133 <= x_128))) {
+ if (((x_135 <= x_125) & (x_133 <= x_128))) {
} else {
break;
}
@@ -193,7 +193,7 @@
var x_161 : i32;
let x_157 : i32 = x_157_phi;
let x_160 : i32 = x_160_phi;
- if (((x_160 < 10) && (x_160 <= x_125))) {
+ if (((x_160 < 10) & (x_160 <= x_125))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl
index 6a30ba4..d473288 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.hlsl
@@ -22,11 +22,7 @@
const int x_260 = mid;
const int x_262 = j;
const int x_263 = to;
- bool tint_tmp = (x_259 <= x_260);
- if (tint_tmp) {
- tint_tmp = (x_262 <= x_263);
- }
- if ((tint_tmp)) {
+ if (((x_259 <= x_260) & (x_262 <= x_263))) {
} else {
break;
}
@@ -52,11 +48,7 @@
const int x_295 = i;
const int x_297 = i;
const int x_298 = mid;
- bool tint_tmp_1 = (x_295 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_297 <= x_298);
- }
- if ((tint_tmp_1)) {
+ if (((x_295 < 10) & (x_297 <= x_298))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl
index 6340b47..fd9f3b9 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.msl
@@ -30,7 +30,7 @@
int const x_260 = *(mid);
int const x_262 = j;
int const x_263 = *(to);
- if (((x_259 <= x_260) && (x_262 <= x_263))) {
+ if (((x_259 <= x_260) & (x_262 <= x_263))) {
} else {
break;
}
@@ -58,7 +58,7 @@
int const x_295 = i;
int const x_297 = i;
int const x_298 = *(mid);
- if (((x_295 < 10) && (x_297 <= x_298))) {
+ if (((x_295 < 10) & (x_297 <= x_298))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.wgsl
index c8f464e..9c02946 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/0.spvasm.expected.wgsl
@@ -29,7 +29,7 @@
let x_260 : i32 = *(mid);
let x_262 : i32 = j;
let x_263 : i32 = *(to);
- if (((x_259 <= x_260) && (x_262 <= x_263))) {
+ if (((x_259 <= x_260) & (x_262 <= x_263))) {
} else {
break;
}
@@ -57,7 +57,7 @@
let x_295 : i32 = i;
let x_297 : i32 = i;
let x_298 : i32 = *(mid);
- if (((x_295 < 10) && (x_297 <= x_298))) {
+ if (((x_295 < 10) & (x_297 <= x_298))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl
index b21b248..500e49e 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.hlsl
@@ -22,11 +22,7 @@
const int x_271 = mid;
const int x_273 = j;
const int x_274 = to;
- bool tint_tmp = (x_270 <= x_271);
- if (tint_tmp) {
- tint_tmp = (x_273 <= x_274);
- }
- if ((tint_tmp)) {
+ if (((x_270 <= x_271) & (x_273 <= x_274))) {
} else {
break;
}
@@ -52,11 +48,7 @@
const int x_306 = i;
const int x_308 = i;
const int x_309 = mid;
- bool tint_tmp_1 = (x_306 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_308 <= x_309);
- }
- if ((tint_tmp_1)) {
+ if (((x_306 < 10) & (x_308 <= x_309))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl
index 941121e..83c2354 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.msl
@@ -30,7 +30,7 @@
int const x_271 = *(mid);
int const x_273 = j;
int const x_274 = *(to);
- if (((x_270 <= x_271) && (x_273 <= x_274))) {
+ if (((x_270 <= x_271) & (x_273 <= x_274))) {
} else {
break;
}
@@ -58,7 +58,7 @@
int const x_306 = i;
int const x_308 = i;
int const x_309 = *(mid);
- if (((x_306 < 10) && (x_308 <= x_309))) {
+ if (((x_306 < 10) & (x_308 <= x_309))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.wgsl
index 4e442a3..ce49bac 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-dead-code/1.spvasm.expected.wgsl
@@ -29,7 +29,7 @@
let x_271 : i32 = *(mid);
let x_273 : i32 = j;
let x_274 : i32 = *(to);
- if (((x_270 <= x_271) && (x_273 <= x_274))) {
+ if (((x_270 <= x_271) & (x_273 <= x_274))) {
} else {
break;
}
@@ -57,7 +57,7 @@
let x_306 : i32 = i;
let x_308 : i32 = i;
let x_309 : i32 = *(mid);
- if (((x_306 < 10) && (x_308 <= x_309))) {
+ if (((x_306 < 10) & (x_308 <= x_309))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl
index 5cccfe9..53b5eb3 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.hlsl
@@ -45,11 +45,7 @@
const int x_267 = mid;
const int x_269 = j;
const int x_270 = to;
- bool tint_tmp = (x_266 <= x_267);
- if (tint_tmp) {
- tint_tmp = (x_269 <= x_270);
- }
- if ((tint_tmp)) {
+ if (((x_266 <= x_267) & (x_269 <= x_270))) {
} else {
break;
}
@@ -157,11 +153,7 @@
const int x_376 = i;
const int x_378 = i;
const int x_379 = mid;
- bool tint_tmp_1 = (x_376 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_378 <= x_379);
- }
- if ((tint_tmp_1)) {
+ if (((x_376 < 10) & (x_378 <= x_379))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl
index a023050..d184fe6 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.msl
@@ -53,7 +53,7 @@
int const x_267 = *(mid);
int const x_269 = j;
int const x_270 = *(to);
- if (((x_266 <= x_267) && (x_269 <= x_270))) {
+ if (((x_266 <= x_267) & (x_269 <= x_270))) {
} else {
break;
}
@@ -166,7 +166,7 @@
int const x_376 = i;
int const x_378 = i;
int const x_379 = *(mid);
- if (((x_376 < 10) && (x_378 <= x_379))) {
+ if (((x_376 < 10) & (x_378 <= x_379))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.wgsl
index 5fac853..395b996 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/1.spvasm.expected.wgsl
@@ -52,7 +52,7 @@
let x_267 : i32 = *(mid);
let x_269 : i32 = j;
let x_270 : i32 = *(to);
- if (((x_266 <= x_267) && (x_269 <= x_270))) {
+ if (((x_266 <= x_267) & (x_269 <= x_270))) {
} else {
break;
}
@@ -165,7 +165,7 @@
let x_376 : i32 = i;
let x_378 : i32 = i;
let x_379 : i32 = *(mid);
- if (((x_376 < 10) && (x_378 <= x_379))) {
+ if (((x_376 < 10) & (x_378 <= x_379))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl
index 9cf6e4b..316ccb0 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.hlsl
@@ -44,11 +44,7 @@
const int x_265 = mid;
const int x_267 = j;
const int x_268 = to;
- bool tint_tmp = (x_264 <= x_265);
- if (tint_tmp) {
- tint_tmp = (x_267 <= x_268);
- }
- if ((tint_tmp)) {
+ if (((x_264 <= x_265) & (x_267 <= x_268))) {
} else {
break;
}
@@ -156,11 +152,7 @@
const int x_374 = i;
const int x_376 = i;
const int x_377 = mid;
- bool tint_tmp_1 = (x_374 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_376 <= x_377);
- }
- if ((tint_tmp_1)) {
+ if (((x_374 < 10) & (x_376 <= x_377))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl
index c3a165b..3c42a41 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.msl
@@ -52,7 +52,7 @@
int const x_265 = *(mid);
int const x_267 = j;
int const x_268 = *(to);
- if (((x_264 <= x_265) && (x_267 <= x_268))) {
+ if (((x_264 <= x_265) & (x_267 <= x_268))) {
} else {
break;
}
@@ -165,7 +165,7 @@
int const x_374 = i;
int const x_376 = i;
int const x_377 = *(mid);
- if (((x_374 < 10) && (x_376 <= x_377))) {
+ if (((x_374 < 10) & (x_376 <= x_377))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.wgsl
index e349c0c..b3b7461 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-flatten-selection-dead-continues/2-opt.spvasm.expected.wgsl
@@ -51,7 +51,7 @@
let x_265 : i32 = *(mid);
let x_267 : i32 = j;
let x_268 : i32 = *(to);
- if (((x_264 <= x_265) && (x_267 <= x_268))) {
+ if (((x_264 <= x_265) & (x_267 <= x_268))) {
} else {
break;
}
@@ -164,7 +164,7 @@
let x_374 : i32 = i;
let x_376 : i32 = i;
let x_377 : i32 = *(mid);
- if (((x_374 < 10) && (x_376 <= x_377))) {
+ if (((x_374 < 10) & (x_376 <= x_377))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl
index 03b86e8..11f7dec 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.hlsl
@@ -22,11 +22,7 @@
const int x_312 = mid;
const int x_314 = j;
const int x_315 = to;
- bool tint_tmp = (x_311 <= x_312);
- if (tint_tmp) {
- tint_tmp = (x_314 <= x_315);
- }
- if ((tint_tmp)) {
+ if (((x_311 <= x_312) & (x_314 <= x_315))) {
} else {
break;
}
@@ -52,11 +48,7 @@
const int x_347 = i;
const int x_349 = i;
const int x_350 = mid;
- bool tint_tmp_1 = (x_347 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_349 <= x_350);
- }
- if ((tint_tmp_1)) {
+ if (((x_347 < 10) & (x_349 <= x_350))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl
index 6506890..e99a3a3 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.msl
@@ -30,7 +30,7 @@
int const x_312 = *(mid);
int const x_314 = j;
int const x_315 = *(to);
- if (((x_311 <= x_312) && (x_314 <= x_315))) {
+ if (((x_311 <= x_312) & (x_314 <= x_315))) {
} else {
break;
}
@@ -58,7 +58,7 @@
int const x_347 = i;
int const x_349 = i;
int const x_350 = *(mid);
- if (((x_347 < 10) && (x_349 <= x_350))) {
+ if (((x_347 < 10) & (x_349 <= x_350))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.wgsl
index bf16229..4f2a421 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/1.spvasm.expected.wgsl
@@ -29,7 +29,7 @@
let x_312 : i32 = *(mid);
let x_314 : i32 = j;
let x_315 : i32 = *(to);
- if (((x_311 <= x_312) && (x_314 <= x_315))) {
+ if (((x_311 <= x_312) & (x_314 <= x_315))) {
} else {
break;
}
@@ -57,7 +57,7 @@
let x_347 : i32 = i;
let x_349 : i32 = i;
let x_350 : i32 = *(mid);
- if (((x_347 < 10) && (x_349 <= x_350))) {
+ if (((x_347 < 10) & (x_349 <= x_350))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl
index 30e945e..4e85af2 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.hlsl
@@ -22,11 +22,7 @@
const int x_311 = mid;
const int x_313 = j;
const int x_314 = to;
- bool tint_tmp = (x_310 <= x_311);
- if (tint_tmp) {
- tint_tmp = (x_313 <= x_314);
- }
- if ((tint_tmp)) {
+ if (((x_310 <= x_311) & (x_313 <= x_314))) {
} else {
break;
}
@@ -52,11 +48,7 @@
const int x_346 = i;
const int x_348 = i;
const int x_349 = mid;
- bool tint_tmp_1 = (x_346 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_348 <= x_349);
- }
- if ((tint_tmp_1)) {
+ if (((x_346 < 10) & (x_348 <= x_349))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl
index a550d0f..12cf733 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.msl
@@ -30,7 +30,7 @@
int const x_311 = *(mid);
int const x_313 = j;
int const x_314 = *(to);
- if (((x_310 <= x_311) && (x_313 <= x_314))) {
+ if (((x_310 <= x_311) & (x_313 <= x_314))) {
} else {
break;
}
@@ -58,7 +58,7 @@
int const x_346 = i;
int const x_348 = i;
int const x_349 = *(mid);
- if (((x_346 < 10) && (x_348 <= x_349))) {
+ if (((x_346 < 10) & (x_348 <= x_349))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.wgsl
index 57c9c29..f9f5006 100644
--- a/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/spv-stable-mergesort-func-inline-mutate-var/2.spvasm.expected.wgsl
@@ -29,7 +29,7 @@
let x_311 : i32 = *(mid);
let x_313 : i32 = j;
let x_314 : i32 = *(to);
- if (((x_310 <= x_311) && (x_313 <= x_314))) {
+ if (((x_310 <= x_311) & (x_313 <= x_314))) {
} else {
break;
}
@@ -57,7 +57,7 @@
let x_346 : i32 = i;
let x_348 : i32 = i;
let x_349 : i32 = *(mid);
- if (((x_346 < 10) && (x_348 <= x_349))) {
+ if (((x_346 < 10) & (x_348 <= x_349))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl
index edd60f7..8f288a0 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.hlsl
@@ -22,11 +22,7 @@
const int x_269 = mid;
const int x_271 = j;
const int x_272 = to;
- bool tint_tmp = (x_268 <= x_269);
- if (tint_tmp) {
- tint_tmp = (x_271 <= x_272);
- }
- if ((tint_tmp)) {
+ if (((x_268 <= x_269) & (x_271 <= x_272))) {
} else {
break;
}
@@ -52,11 +48,7 @@
const int x_304 = i;
const int x_306 = i;
const int x_307 = mid;
- bool tint_tmp_1 = (x_304 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_306 <= x_307);
- }
- if ((tint_tmp_1)) {
+ if (((x_304 < 10) & (x_306 <= x_307))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl
index eb075ff..f5841d1 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.msl
@@ -30,7 +30,7 @@
int const x_269 = *(mid);
int const x_271 = j;
int const x_272 = *(to);
- if (((x_268 <= x_269) && (x_271 <= x_272))) {
+ if (((x_268 <= x_269) & (x_271 <= x_272))) {
} else {
break;
}
@@ -58,7 +58,7 @@
int const x_304 = i;
int const x_306 = i;
int const x_307 = *(mid);
- if (((x_304 < 10) && (x_306 <= x_307))) {
+ if (((x_304 < 10) & (x_306 <= x_307))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.wgsl
index 460ad4b..da0de00 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-clamped-conditional-bit-shift/1.spvasm.expected.wgsl
@@ -29,7 +29,7 @@
let x_269 : i32 = *(mid);
let x_271 : i32 = j;
let x_272 : i32 = *(to);
- if (((x_268 <= x_269) && (x_271 <= x_272))) {
+ if (((x_268 <= x_269) & (x_271 <= x_272))) {
} else {
break;
}
@@ -57,7 +57,7 @@
let x_304 : i32 = i;
let x_306 : i32 = i;
let x_307 : i32 = *(mid);
- if (((x_304 < 10) && (x_306 <= x_307))) {
+ if (((x_304 < 10) & (x_306 <= x_307))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl
index d8b974e..0f638e2 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.hlsl
@@ -126,11 +126,7 @@
x_121 = x_121_phi;
const int x_124 = x_124_phi;
x_126 = x_126_phi;
- bool tint_tmp = (x_126 <= x_116);
- if (tint_tmp) {
- tint_tmp = (x_124 <= x_119);
- }
- if ((tint_tmp)) {
+ if (((x_126 <= x_116) & (x_124 <= x_119))) {
} else {
break;
}
@@ -167,11 +163,7 @@
int x_152 = 0;
const int x_148 = x_148_phi;
const int x_151 = x_151_phi;
- bool tint_tmp_1 = (x_151 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_151 <= x_116);
- }
- if ((tint_tmp_1)) {
+ if (((x_151 < 10) & (x_151 <= x_116))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl
index ae3ef06..80b6ad8 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.msl
@@ -136,7 +136,7 @@
x_121 = x_121_phi;
int const x_124 = x_124_phi;
x_126 = x_126_phi;
- if (((x_126 <= x_116) && (x_124 <= x_119))) {
+ if (((x_126 <= x_116) & (x_124 <= x_119))) {
} else {
break;
}
@@ -173,7 +173,7 @@
int x_152 = 0;
int const x_148 = x_148_phi;
int const x_151 = x_151_phi;
- if (((x_151 < 10) && (x_151 <= x_116))) {
+ if (((x_151 < 10) & (x_151 <= x_116))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.wgsl
index eb23a41..81c3d6c 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-for-always-false-if-discard/1.spvasm.expected.wgsl
@@ -122,7 +122,7 @@
x_121 = x_121_phi;
let x_124 : i32 = x_124_phi;
x_126 = x_126_phi;
- if (((x_126 <= x_116) && (x_124 <= x_119))) {
+ if (((x_126 <= x_116) & (x_124 <= x_119))) {
} else {
break;
}
@@ -160,7 +160,7 @@
var x_152 : i32;
let x_148 : i32 = x_148_phi;
let x_151 : i32 = x_151_phi;
- if (((x_151 < 10) && (x_151 <= x_116))) {
+ if (((x_151 < 10) & (x_151 <= x_116))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl
index 347df10..a730b99 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.hlsl
@@ -22,11 +22,7 @@
const int x_271 = mid;
const int x_273 = j;
const int x_274 = to;
- bool tint_tmp = (x_270 <= x_271);
- if (tint_tmp) {
- tint_tmp = (x_273 <= x_274);
- }
- if ((tint_tmp)) {
+ if (((x_270 <= x_271) & (x_273 <= x_274))) {
} else {
break;
}
@@ -52,11 +48,7 @@
const int x_306 = i;
const int x_308 = i;
const int x_309 = mid;
- bool tint_tmp_1 = (x_306 < 10);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_308 <= x_309);
- }
- if ((tint_tmp_1)) {
+ if (((x_306 < 10) & (x_308 <= x_309))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl
index 23be1b2..0e73bb3 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.msl
@@ -30,7 +30,7 @@
int const x_271 = *(mid);
int const x_273 = j;
int const x_274 = *(to);
- if (((x_270 <= x_271) && (x_273 <= x_274))) {
+ if (((x_270 <= x_271) & (x_273 <= x_274))) {
} else {
break;
}
@@ -58,7 +58,7 @@
int const x_306 = i;
int const x_308 = i;
int const x_309 = *(mid);
- if (((x_306 < 10) && (x_308 <= x_309))) {
+ if (((x_306 < 10) & (x_308 <= x_309))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.wgsl
index c64c646..1649944 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-mergesort-reversed-for-loop/1.spvasm.expected.wgsl
@@ -29,7 +29,7 @@
let x_271 : i32 = *(mid);
let x_273 : i32 = j;
let x_274 : i32 = *(to);
- if (((x_270 <= x_271) && (x_273 <= x_274))) {
+ if (((x_270 <= x_271) & (x_273 <= x_274))) {
} else {
break;
}
@@ -57,7 +57,7 @@
let x_306 : i32 = i;
let x_308 : i32 = i;
let x_309 : i32 = *(mid);
- if (((x_306 < 10) && (x_308 <= x_309))) {
+ if (((x_306 < 10) & (x_308 <= x_309))) {
} else {
break;
}
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl
index fd9d668..4b03ca9 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.hlsl
@@ -55,18 +55,10 @@
param_3 = float2((x_123 - x_124), (x_127 - x_128));
const float x_131 = cross2d_vf2_vf2_(param_2, param_3);
pbc = x_131;
- bool tint_tmp = (x_114 < 0.0f);
- if (tint_tmp) {
- tint_tmp = (x_131 < 0.0f);
- }
- const bool x_134 = (tint_tmp);
+ const bool x_134 = ((x_114 < 0.0f) & (x_131 < 0.0f));
x_141_phi = x_134;
if (!(x_134)) {
- bool tint_tmp_1 = (x_114 >= 0.0f);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_131 >= 0.0f);
- }
- x_140 = (tint_tmp_1);
+ x_140 = ((x_114 >= 0.0f) & (x_131 >= 0.0f));
x_141_phi = x_140;
}
if (!(x_141_phi)) {
@@ -87,18 +79,10 @@
param_5 = float2((x_152 - x_153), (x_155 - x_156));
const float x_159 = cross2d_vf2_vf2_(param_4, param_5);
pca = x_159;
- bool tint_tmp_2 = (x_114 < 0.0f);
- if (tint_tmp_2) {
- tint_tmp_2 = (x_159 < 0.0f);
- }
- const bool x_162 = (tint_tmp_2);
+ const bool x_162 = ((x_114 < 0.0f) & (x_159 < 0.0f));
x_169_phi = x_162;
if (!(x_162)) {
- bool tint_tmp_3 = (x_114 >= 0.0f);
- if (tint_tmp_3) {
- tint_tmp_3 = (x_159 >= 0.0f);
- }
- x_168 = (tint_tmp_3);
+ x_168 = ((x_114 >= 0.0f) & (x_159 >= 0.0f));
x_169_phi = x_168;
}
if (!(x_169_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl
index c8cbf19..43a265b 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.msl
@@ -62,10 +62,10 @@
param_3 = float2((x_123 - x_124), (x_127 - x_128));
float const x_131 = cross2d_vf2_vf2_(&(param_2), &(param_3));
pbc = x_131;
- bool const x_134 = ((x_114 < 0.0f) && (x_131 < 0.0f));
+ bool const x_134 = ((x_114 < 0.0f) & (x_131 < 0.0f));
x_141_phi = x_134;
if (!(x_134)) {
- x_140 = ((x_114 >= 0.0f) && (x_131 >= 0.0f));
+ x_140 = ((x_114 >= 0.0f) & (x_131 >= 0.0f));
x_141_phi = x_140;
}
bool const x_141 = x_141_phi;
@@ -87,10 +87,10 @@
param_5 = float2((x_152 - x_153), (x_155 - x_156));
float const x_159 = cross2d_vf2_vf2_(&(param_4), &(param_5));
pca = x_159;
- bool const x_162 = ((x_114 < 0.0f) && (x_159 < 0.0f));
+ bool const x_162 = ((x_114 < 0.0f) & (x_159 < 0.0f));
x_169_phi = x_162;
if (!(x_162)) {
- x_168 = ((x_114 >= 0.0f) && (x_159 >= 0.0f));
+ x_168 = ((x_114 >= 0.0f) & (x_159 >= 0.0f));
x_169_phi = x_168;
}
bool const x_169 = x_169_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.spvasm
index 59e04f8..97a8140 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 265
+; Bound: 257
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -92,22 +92,22 @@
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%void = OpTypeVoid
- %214 = OpTypeFunction %void
+ %206 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
- %233 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
+ %225 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
- %236 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
+ %228 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
- %239 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
+ %231 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
%float_1 = OpConstant %float 1
- %250 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %251 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+ %242 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %243 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %252 = OpTypeFunction %void %main_out
+ %244 = OpTypeFunction %void %main_out
%cross2d_vf2_vf2_ = OpFunction %float None %15
%a = OpFunctionParameter %_ptr_Function_v2float
%b = OpFunctionParameter %_ptr_Function_v2float
@@ -204,157 +204,137 @@
%137 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_2 %param_3
OpStore %pbc %137
%141 = OpFOrdLessThan %bool %104 %float_0
- OpSelectionMerge %142 None
- OpBranchConditional %141 %143 %142
- %143 = OpLabel
- %144 = OpFOrdLessThan %bool %137 %float_0
- OpBranch %142
- %142 = OpLabel
- %145 = OpPhi %bool %141 %73 %144 %143
- OpStore %x_141_phi %145
- %146 = OpLogicalNot %bool %145
- OpSelectionMerge %147 None
- OpBranchConditional %146 %148 %147
- %148 = OpLabel
- %149 = OpFOrdGreaterThanEqual %bool %104 %float_0
- OpSelectionMerge %150 None
- OpBranchConditional %149 %151 %150
- %151 = OpLabel
- %152 = OpFOrdGreaterThanEqual %bool %137 %float_0
- OpBranch %150
- %150 = OpLabel
- %153 = OpPhi %bool %149 %148 %152 %151
- OpStore %x_140 %153
- %154 = OpLoad %bool %x_140
- OpStore %x_141_phi %154
- OpBranch %147
- %147 = OpLabel
- %155 = OpLoad %bool %x_141_phi
- %156 = OpLogicalNot %bool %155
- OpSelectionMerge %157 None
- OpBranchConditional %156 %158 %157
- %158 = OpLabel
+ %142 = OpFOrdLessThan %bool %137 %float_0
+ %143 = OpLogicalAnd %bool %141 %142
+ OpStore %x_141_phi %143
+ %144 = OpLogicalNot %bool %143
+ OpSelectionMerge %145 None
+ OpBranchConditional %144 %146 %145
+ %146 = OpLabel
+ %147 = OpFOrdGreaterThanEqual %bool %104 %float_0
+ %148 = OpFOrdGreaterThanEqual %bool %137 %float_0
+ %149 = OpLogicalAnd %bool %147 %148
+ OpStore %x_140 %149
+ %150 = OpLoad %bool %x_140
+ OpStore %x_141_phi %150
+ OpBranch %145
+ %145 = OpLabel
+ %151 = OpLoad %bool %x_141_phi
+ %152 = OpLogicalNot %bool %151
+ OpSelectionMerge %153 None
+ OpBranchConditional %152 %154 %153
+ %154 = OpLabel
OpStore %x_90 %true
OpStore %x_91 %int_0
OpStore %x_173_phi %int_0
OpBranch %72
- %157 = OpLabel
- %162 = OpAccessChain %_ptr_Function_float %p %uint_0
- %163 = OpLoad %float %162
- %165 = OpAccessChain %_ptr_Function_float %c %uint_0
- %166 = OpLoad %float %165
- %168 = OpAccessChain %_ptr_Function_float %p %uint_1
- %169 = OpLoad %float %168
- %171 = OpAccessChain %_ptr_Function_float %c %uint_1
- %172 = OpLoad %float %171
- %174 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
- %175 = OpLoad %float %174
- %177 = OpAccessChain %_ptr_Function_float %c %uint_0
- %178 = OpLoad %float %177
- %180 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
- %181 = OpLoad %float %180
- %183 = OpAccessChain %_ptr_Function_float %c %uint_1
- %184 = OpLoad %float %183
- %185 = OpFSub %float %163 %166
- %186 = OpFSub %float %169 %172
- %187 = OpCompositeConstruct %v2float %185 %186
- OpStore %param_4 %187
- %188 = OpFSub %float %175 %178
- %189 = OpFSub %float %181 %184
- %190 = OpCompositeConstruct %v2float %188 %189
- OpStore %param_5 %190
- %191 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
- OpStore %pca %191
- %194 = OpFOrdLessThan %bool %104 %float_0
- OpSelectionMerge %195 None
- OpBranchConditional %194 %196 %195
- %196 = OpLabel
- %197 = OpFOrdLessThan %bool %191 %float_0
- OpBranch %195
+ %153 = OpLabel
+ %158 = OpAccessChain %_ptr_Function_float %p %uint_0
+ %159 = OpLoad %float %158
+ %161 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %162 = OpLoad %float %161
+ %164 = OpAccessChain %_ptr_Function_float %p %uint_1
+ %165 = OpLoad %float %164
+ %167 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %168 = OpLoad %float %167
+ %170 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
+ %171 = OpLoad %float %170
+ %173 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %174 = OpLoad %float %173
+ %176 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
+ %177 = OpLoad %float %176
+ %179 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %180 = OpLoad %float %179
+ %181 = OpFSub %float %159 %162
+ %182 = OpFSub %float %165 %168
+ %183 = OpCompositeConstruct %v2float %181 %182
+ OpStore %param_4 %183
+ %184 = OpFSub %float %171 %174
+ %185 = OpFSub %float %177 %180
+ %186 = OpCompositeConstruct %v2float %184 %185
+ OpStore %param_5 %186
+ %187 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
+ OpStore %pca %187
+ %190 = OpFOrdLessThan %bool %104 %float_0
+ %191 = OpFOrdLessThan %bool %187 %float_0
+ %192 = OpLogicalAnd %bool %190 %191
+ OpStore %x_169_phi %192
+ %193 = OpLogicalNot %bool %192
+ OpSelectionMerge %194 None
+ OpBranchConditional %193 %195 %194
%195 = OpLabel
- %198 = OpPhi %bool %194 %157 %197 %196
- OpStore %x_169_phi %198
- %199 = OpLogicalNot %bool %198
- OpSelectionMerge %200 None
- OpBranchConditional %199 %201 %200
- %201 = OpLabel
- %202 = OpFOrdGreaterThanEqual %bool %104 %float_0
- OpSelectionMerge %203 None
- OpBranchConditional %202 %204 %203
- %204 = OpLabel
- %205 = OpFOrdGreaterThanEqual %bool %191 %float_0
- OpBranch %203
+ %196 = OpFOrdGreaterThanEqual %bool %104 %float_0
+ %197 = OpFOrdGreaterThanEqual %bool %187 %float_0
+ %198 = OpLogicalAnd %bool %196 %197
+ OpStore %x_168 %198
+ %199 = OpLoad %bool %x_168
+ OpStore %x_169_phi %199
+ OpBranch %194
+ %194 = OpLabel
+ %200 = OpLoad %bool %x_169_phi
+ %201 = OpLogicalNot %bool %200
+ OpSelectionMerge %202 None
+ OpBranchConditional %201 %203 %202
%203 = OpLabel
- %206 = OpPhi %bool %202 %201 %205 %204
- OpStore %x_168 %206
- %207 = OpLoad %bool %x_168
- OpStore %x_169_phi %207
- OpBranch %200
- %200 = OpLabel
- %208 = OpLoad %bool %x_169_phi
- %209 = OpLogicalNot %bool %208
- OpSelectionMerge %210 None
- OpBranchConditional %209 %211 %210
- %211 = OpLabel
OpStore %x_90 %true
OpStore %x_91 %int_0
OpStore %x_173_phi %int_0
OpBranch %72
- %210 = OpLabel
+ %202 = OpLabel
OpStore %x_90 %true
OpStore %x_91 %int_1
OpStore %x_173_phi %int_1
OpBranch %72
%72 = OpLabel
- %213 = OpLoad %int %x_173_phi
- OpReturnValue %213
+ %205 = OpLoad %int %x_173_phi
+ OpReturnValue %205
OpFunctionEnd
- %main_1 = OpFunction %void None %214
- %217 = OpLabel
+ %main_1 = OpFunction %void None %206
+ %209 = OpLabel
%pos = OpVariable %_ptr_Function_v2float Function %59
%param_6 = OpVariable %_ptr_Function_v2float Function %59
%param_7 = OpVariable %_ptr_Function_v2float Function %59
%param_8 = OpVariable %_ptr_Function_v2float Function %59
%param_9 = OpVariable %_ptr_Function_v2float Function %59
- %223 = OpLoad %v4float %gl_FragCoord
- %225 = OpAccessChain %_ptr_Uniform_v2float %x_24 %uint_0
- %226 = OpLoad %v2float %225
- %227 = OpCompositeExtract %float %223 0
- %228 = OpCompositeExtract %float %223 1
- %229 = OpCompositeConstruct %v2float %227 %228
- %230 = OpFDiv %v2float %229 %226
- OpStore %pos %230
- OpStore %param_6 %230
- OpStore %param_7 %233
- OpStore %param_8 %236
- OpStore %param_9 %239
- %240 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
- %245 = OpIEqual %bool %240 %int_1
- OpSelectionMerge %246 None
- OpBranchConditional %245 %247 %248
- %247 = OpLabel
- OpStore %x_GLF_color %250
- OpBranch %246
- %248 = OpLabel
- OpStore %x_GLF_color %251
- OpBranch %246
- %246 = OpLabel
+ %215 = OpLoad %v4float %gl_FragCoord
+ %217 = OpAccessChain %_ptr_Uniform_v2float %x_24 %uint_0
+ %218 = OpLoad %v2float %217
+ %219 = OpCompositeExtract %float %215 0
+ %220 = OpCompositeExtract %float %215 1
+ %221 = OpCompositeConstruct %v2float %219 %220
+ %222 = OpFDiv %v2float %221 %218
+ OpStore %pos %222
+ OpStore %param_6 %222
+ OpStore %param_7 %225
+ OpStore %param_8 %228
+ OpStore %param_9 %231
+ %232 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
+ %237 = OpIEqual %bool %232 %int_1
+ OpSelectionMerge %238 None
+ OpBranchConditional %237 %239 %240
+ %239 = OpLabel
+ OpStore %x_GLF_color %242
+ OpBranch %238
+ %240 = OpLabel
+ OpStore %x_GLF_color %243
+ OpBranch %238
+ %238 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %252
+%tint_symbol_3 = OpFunction %void None %244
%tint_symbol_1 = OpFunctionParameter %main_out
- %256 = OpLabel
- %257 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %257
+ %248 = OpLabel
+ %249 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %249
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %214
- %259 = OpLabel
- %260 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %260
- %261 = OpFunctionCall %void %main_1
- %263 = OpLoad %v4float %x_GLF_color
- %264 = OpCompositeConstruct %main_out %263
- %262 = OpFunctionCall %void %tint_symbol_3 %264
+ %main = OpFunction %void None %206
+ %251 = OpLabel
+ %252 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %252
+ %253 = OpFunctionCall %void %main_1
+ %255 = OpLoad %v4float %x_GLF_color
+ %256 = OpCompositeConstruct %main_out %255
+ %254 = OpFunctionCall %void %tint_symbol_3 %256
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.wgsl
index d2eec41..bf20547 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-array-nested-loop/0-opt.spvasm.expected.wgsl
@@ -68,10 +68,10 @@
param_3 = vec2<f32>((x_123 - x_124), (x_127 - x_128));
let x_131 : f32 = cross2d_vf2_vf2_(&(param_2), &(param_3));
pbc = x_131;
- let x_134 : bool = ((x_114 < 0.0) && (x_131 < 0.0));
+ let x_134 : bool = ((x_114 < 0.0) & (x_131 < 0.0));
x_141_phi = x_134;
if (!(x_134)) {
- x_140 = ((x_114 >= 0.0) && (x_131 >= 0.0));
+ x_140 = ((x_114 >= 0.0) & (x_131 >= 0.0));
x_141_phi = x_140;
}
let x_141 : bool = x_141_phi;
@@ -93,10 +93,10 @@
param_5 = vec2<f32>((x_152 - x_153), (x_155 - x_156));
let x_159 : f32 = cross2d_vf2_vf2_(&(param_4), &(param_5));
pca = x_159;
- let x_162 : bool = ((x_114 < 0.0) && (x_159 < 0.0));
+ let x_162 : bool = ((x_114 < 0.0) & (x_159 < 0.0));
x_169_phi = x_162;
if (!(x_162)) {
- x_168 = ((x_114 >= 0.0) && (x_159 >= 0.0));
+ x_168 = ((x_114 >= 0.0) & (x_159 >= 0.0));
x_169_phi = x_168;
}
let x_169 : bool = x_169_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl
index 421b7ed..6a87269 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.hlsl
@@ -50,18 +50,10 @@
param_3 = float2((x_116 - x_117), (x_120 - x_121));
const float x_124 = cross2d_vf2_vf2_(param_2, param_3);
pbc = x_124;
- bool tint_tmp = (pab < 0.0f);
- if (tint_tmp) {
- tint_tmp = (pbc < 0.0f);
- }
- const bool x_129 = (tint_tmp);
+ const bool x_129 = ((pab < 0.0f) & (pbc < 0.0f));
x_138_phi = x_129;
if (!(x_129)) {
- bool tint_tmp_1 = (pab >= 0.0f);
- if (tint_tmp_1) {
- tint_tmp_1 = (pbc >= 0.0f);
- }
- x_137 = (tint_tmp_1);
+ x_137 = ((pab >= 0.0f) & (pbc >= 0.0f));
x_138_phi = x_137;
}
if (!(x_138_phi)) {
@@ -79,18 +71,10 @@
param_5 = float2((x_149 - x_150), (x_152 - x_153));
const float x_156 = cross2d_vf2_vf2_(param_4, param_5);
pca = x_156;
- bool tint_tmp_2 = (pab < 0.0f);
- if (tint_tmp_2) {
- tint_tmp_2 = (pca < 0.0f);
- }
- const bool x_161 = (tint_tmp_2);
+ const bool x_161 = ((pab < 0.0f) & (pca < 0.0f));
x_170_phi = x_161;
if (!(x_161)) {
- bool tint_tmp_3 = (pab >= 0.0f);
- if (tint_tmp_3) {
- tint_tmp_3 = (pca >= 0.0f);
- }
- x_169 = (tint_tmp_3);
+ x_169 = ((pab >= 0.0f) & (pca >= 0.0f));
x_170_phi = x_169;
}
if (!(x_170_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl
index ed7f078..2285b7e 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.msl
@@ -59,12 +59,12 @@
pbc = x_124;
float const x_125 = pab;
float const x_127 = pbc;
- bool const x_129 = ((x_125 < 0.0f) && (x_127 < 0.0f));
+ bool const x_129 = ((x_125 < 0.0f) & (x_127 < 0.0f));
x_138_phi = x_129;
if (!(x_129)) {
float const x_133 = pab;
float const x_135 = pbc;
- x_137 = ((x_133 >= 0.0f) && (x_135 >= 0.0f));
+ x_137 = ((x_133 >= 0.0f) & (x_135 >= 0.0f));
x_138_phi = x_137;
}
bool const x_138 = x_138_phi;
@@ -85,12 +85,12 @@
pca = x_156;
float const x_157 = pab;
float const x_159 = pca;
- bool const x_161 = ((x_157 < 0.0f) && (x_159 < 0.0f));
+ bool const x_161 = ((x_157 < 0.0f) & (x_159 < 0.0f));
x_170_phi = x_161;
if (!(x_161)) {
float const x_165 = pab;
float const x_167 = pca;
- x_169 = ((x_165 >= 0.0f) && (x_167 >= 0.0f));
+ x_169 = ((x_165 >= 0.0f) & (x_167 >= 0.0f));
x_170_phi = x_169;
}
bool const x_170 = x_170_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.spvasm
index dadcc8e..cbaf950 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 264
+; Bound: 256
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -85,22 +85,22 @@
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%void = OpTypeVoid
- %212 = OpTypeFunction %void
+ %204 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
- %232 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
+ %224 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
- %235 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
+ %227 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
- %238 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
+ %230 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
%float_1 = OpConstant %float 1
- %249 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %250 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+ %241 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %242 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %251 = OpTypeFunction %void %main_out
+ %243 = OpTypeFunction %void %main_out
%cross2d_vf2_vf2_ = OpFunction %float None %15
%a = OpFunctionParameter %_ptr_Function_v2float
%b = OpFunctionParameter %_ptr_Function_v2float
@@ -192,152 +192,132 @@
%132 = OpLoad %float %pab
%133 = OpLoad %float %pbc
%135 = OpFOrdLessThan %bool %132 %float_0
- OpSelectionMerge %136 None
- OpBranchConditional %135 %137 %136
- %137 = OpLabel
- %138 = OpFOrdLessThan %bool %133 %float_0
- OpBranch %136
- %136 = OpLabel
- %139 = OpPhi %bool %135 %47 %138 %137
- OpStore %x_138_phi %139
- %140 = OpLogicalNot %bool %139
- OpSelectionMerge %141 None
- OpBranchConditional %140 %142 %141
- %142 = OpLabel
- %143 = OpLoad %float %pab
- %144 = OpLoad %float %pbc
- %145 = OpFOrdGreaterThanEqual %bool %143 %float_0
- OpSelectionMerge %146 None
- OpBranchConditional %145 %147 %146
- %147 = OpLabel
- %148 = OpFOrdGreaterThanEqual %bool %144 %float_0
- OpBranch %146
- %146 = OpLabel
- %149 = OpPhi %bool %145 %142 %148 %147
- OpStore %x_137 %149
- %150 = OpLoad %bool %x_137
- OpStore %x_138_phi %150
- OpBranch %141
- %141 = OpLabel
- %151 = OpLoad %bool %x_138_phi
- %152 = OpLogicalNot %bool %151
- OpSelectionMerge %153 None
- OpBranchConditional %152 %154 %153
- %154 = OpLabel
+ %136 = OpFOrdLessThan %bool %133 %float_0
+ %137 = OpLogicalAnd %bool %135 %136
+ OpStore %x_138_phi %137
+ %138 = OpLogicalNot %bool %137
+ OpSelectionMerge %139 None
+ OpBranchConditional %138 %140 %139
+ %140 = OpLabel
+ %141 = OpLoad %float %pab
+ %142 = OpLoad %float %pbc
+ %143 = OpFOrdGreaterThanEqual %bool %141 %float_0
+ %144 = OpFOrdGreaterThanEqual %bool %142 %float_0
+ %145 = OpLogicalAnd %bool %143 %144
+ OpStore %x_137 %145
+ %146 = OpLoad %bool %x_137
+ OpStore %x_138_phi %146
+ OpBranch %139
+ %139 = OpLabel
+ %147 = OpLoad %bool %x_138_phi
+ %148 = OpLogicalNot %bool %147
+ OpSelectionMerge %149 None
+ OpBranchConditional %148 %150 %149
+ %150 = OpLabel
OpReturnValue %int_0
- %153 = OpLabel
- %157 = OpAccessChain %_ptr_Function_float %p %uint_0
- %158 = OpLoad %float %157
- %160 = OpAccessChain %_ptr_Function_float %c %uint_0
- %161 = OpLoad %float %160
- %163 = OpAccessChain %_ptr_Function_float %p %uint_1
- %164 = OpLoad %float %163
- %166 = OpAccessChain %_ptr_Function_float %c %uint_1
- %167 = OpLoad %float %166
- %169 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
- %170 = OpLoad %float %169
- %172 = OpAccessChain %_ptr_Function_float %c %uint_0
- %173 = OpLoad %float %172
- %175 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
- %176 = OpLoad %float %175
- %178 = OpAccessChain %_ptr_Function_float %c %uint_1
- %179 = OpLoad %float %178
- %180 = OpFSub %float %158 %161
- %181 = OpFSub %float %164 %167
- %182 = OpCompositeConstruct %v2float %180 %181
- OpStore %param_4 %182
- %183 = OpFSub %float %170 %173
- %184 = OpFSub %float %176 %179
- %185 = OpCompositeConstruct %v2float %183 %184
- OpStore %param_5 %185
- %186 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
- OpStore %pca %186
- %189 = OpLoad %float %pab
- %190 = OpLoad %float %pca
- %191 = OpFOrdLessThan %bool %189 %float_0
- OpSelectionMerge %192 None
- OpBranchConditional %191 %193 %192
- %193 = OpLabel
- %194 = OpFOrdLessThan %bool %190 %float_0
- OpBranch %192
+ %149 = OpLabel
+ %153 = OpAccessChain %_ptr_Function_float %p %uint_0
+ %154 = OpLoad %float %153
+ %156 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %157 = OpLoad %float %156
+ %159 = OpAccessChain %_ptr_Function_float %p %uint_1
+ %160 = OpLoad %float %159
+ %162 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %163 = OpLoad %float %162
+ %165 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
+ %166 = OpLoad %float %165
+ %168 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %169 = OpLoad %float %168
+ %171 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
+ %172 = OpLoad %float %171
+ %174 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %175 = OpLoad %float %174
+ %176 = OpFSub %float %154 %157
+ %177 = OpFSub %float %160 %163
+ %178 = OpCompositeConstruct %v2float %176 %177
+ OpStore %param_4 %178
+ %179 = OpFSub %float %166 %169
+ %180 = OpFSub %float %172 %175
+ %181 = OpCompositeConstruct %v2float %179 %180
+ OpStore %param_5 %181
+ %182 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
+ OpStore %pca %182
+ %185 = OpLoad %float %pab
+ %186 = OpLoad %float %pca
+ %187 = OpFOrdLessThan %bool %185 %float_0
+ %188 = OpFOrdLessThan %bool %186 %float_0
+ %189 = OpLogicalAnd %bool %187 %188
+ OpStore %x_170_phi %189
+ %190 = OpLogicalNot %bool %189
+ OpSelectionMerge %191 None
+ OpBranchConditional %190 %192 %191
%192 = OpLabel
- %195 = OpPhi %bool %191 %153 %194 %193
- OpStore %x_170_phi %195
- %196 = OpLogicalNot %bool %195
- OpSelectionMerge %197 None
- OpBranchConditional %196 %198 %197
- %198 = OpLabel
- %199 = OpLoad %float %pab
- %200 = OpLoad %float %pca
- %201 = OpFOrdGreaterThanEqual %bool %199 %float_0
- OpSelectionMerge %202 None
- OpBranchConditional %201 %203 %202
- %203 = OpLabel
- %204 = OpFOrdGreaterThanEqual %bool %200 %float_0
- OpBranch %202
+ %193 = OpLoad %float %pab
+ %194 = OpLoad %float %pca
+ %195 = OpFOrdGreaterThanEqual %bool %193 %float_0
+ %196 = OpFOrdGreaterThanEqual %bool %194 %float_0
+ %197 = OpLogicalAnd %bool %195 %196
+ OpStore %x_169 %197
+ %198 = OpLoad %bool %x_169
+ OpStore %x_170_phi %198
+ OpBranch %191
+ %191 = OpLabel
+ %199 = OpLoad %bool %x_170_phi
+ %200 = OpLogicalNot %bool %199
+ OpSelectionMerge %201 None
+ OpBranchConditional %200 %202 %201
%202 = OpLabel
- %205 = OpPhi %bool %201 %198 %204 %203
- OpStore %x_169 %205
- %206 = OpLoad %bool %x_169
- OpStore %x_170_phi %206
- OpBranch %197
- %197 = OpLabel
- %207 = OpLoad %bool %x_170_phi
- %208 = OpLogicalNot %bool %207
- OpSelectionMerge %209 None
- OpBranchConditional %208 %210 %209
- %210 = OpLabel
OpReturnValue %int_0
- %209 = OpLabel
+ %201 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
- %main_1 = OpFunction %void None %212
- %215 = OpLabel
+ %main_1 = OpFunction %void None %204
+ %207 = OpLabel
%pos = OpVariable %_ptr_Function_v2float Function %51
%param_6 = OpVariable %_ptr_Function_v2float Function %51
%param_7 = OpVariable %_ptr_Function_v2float Function %51
%param_8 = OpVariable %_ptr_Function_v2float Function %51
%param_9 = OpVariable %_ptr_Function_v2float Function %51
- %221 = OpLoad %v4float %gl_FragCoord
- %223 = OpAccessChain %_ptr_Uniform_v2float %x_24 %uint_0
- %224 = OpLoad %v2float %223
- %225 = OpCompositeExtract %float %221 0
- %226 = OpCompositeExtract %float %221 1
- %227 = OpCompositeConstruct %v2float %225 %226
- %228 = OpFDiv %v2float %227 %224
- OpStore %pos %228
- %229 = OpLoad %v2float %pos
- OpStore %param_6 %229
- OpStore %param_7 %232
- OpStore %param_8 %235
- OpStore %param_9 %238
- %239 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
- %244 = OpIEqual %bool %239 %int_1
- OpSelectionMerge %245 None
- OpBranchConditional %244 %246 %247
- %246 = OpLabel
- OpStore %x_GLF_color %249
- OpBranch %245
- %247 = OpLabel
- OpStore %x_GLF_color %250
- OpBranch %245
- %245 = OpLabel
+ %213 = OpLoad %v4float %gl_FragCoord
+ %215 = OpAccessChain %_ptr_Uniform_v2float %x_24 %uint_0
+ %216 = OpLoad %v2float %215
+ %217 = OpCompositeExtract %float %213 0
+ %218 = OpCompositeExtract %float %213 1
+ %219 = OpCompositeConstruct %v2float %217 %218
+ %220 = OpFDiv %v2float %219 %216
+ OpStore %pos %220
+ %221 = OpLoad %v2float %pos
+ OpStore %param_6 %221
+ OpStore %param_7 %224
+ OpStore %param_8 %227
+ OpStore %param_9 %230
+ %231 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
+ %236 = OpIEqual %bool %231 %int_1
+ OpSelectionMerge %237 None
+ OpBranchConditional %236 %238 %239
+ %238 = OpLabel
+ OpStore %x_GLF_color %241
+ OpBranch %237
+ %239 = OpLabel
+ OpStore %x_GLF_color %242
+ OpBranch %237
+ %237 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %251
+%tint_symbol_3 = OpFunction %void None %243
%tint_symbol_1 = OpFunctionParameter %main_out
- %255 = OpLabel
- %256 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %256
+ %247 = OpLabel
+ %248 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %248
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %212
- %258 = OpLabel
- %259 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %259
- %260 = OpFunctionCall %void %main_1
- %262 = OpLoad %v4float %x_GLF_color
- %263 = OpCompositeConstruct %main_out %262
- %261 = OpFunctionCall %void %tint_symbol_3 %263
+ %main = OpFunction %void None %204
+ %250 = OpLabel
+ %251 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %251
+ %252 = OpFunctionCall %void %main_1
+ %254 = OpLoad %v4float %x_GLF_color
+ %255 = OpCompositeConstruct %main_out %254
+ %253 = OpFunctionCall %void %tint_symbol_3 %255
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.wgsl
index 11cfd54..f5247c3 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/0.spvasm.expected.wgsl
@@ -65,12 +65,12 @@
pbc = x_124;
let x_125 : f32 = pab;
let x_127 : f32 = pbc;
- let x_129 : bool = ((x_125 < 0.0) && (x_127 < 0.0));
+ let x_129 : bool = ((x_125 < 0.0) & (x_127 < 0.0));
x_138_phi = x_129;
if (!(x_129)) {
let x_133 : f32 = pab;
let x_135 : f32 = pbc;
- x_137 = ((x_133 >= 0.0) && (x_135 >= 0.0));
+ x_137 = ((x_133 >= 0.0) & (x_135 >= 0.0));
x_138_phi = x_137;
}
let x_138 : bool = x_138_phi;
@@ -91,12 +91,12 @@
pca = x_156;
let x_157 : f32 = pab;
let x_159 : f32 = pca;
- let x_161 : bool = ((x_157 < 0.0) && (x_159 < 0.0));
+ let x_161 : bool = ((x_157 < 0.0) & (x_159 < 0.0));
x_170_phi = x_161;
if (!(x_161)) {
let x_165 : f32 = pab;
let x_167 : f32 = pca;
- x_169 = ((x_165 >= 0.0) && (x_167 >= 0.0));
+ x_169 = ((x_165 >= 0.0) & (x_167 >= 0.0));
x_170_phi = x_169;
}
let x_170 : bool = x_170_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl
index 75aaaf6..2c4cd16 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.hlsl
@@ -77,18 +77,10 @@
param_3 = float2((x_153 - x_154), (x_156 - x_157));
const float x_160 = cross2d_vf2_vf2_(param_2, param_3);
pbc = x_160;
- bool tint_tmp = (pab < 0.0f);
- if (tint_tmp) {
- tint_tmp = (pbc < 0.0f);
- }
- const bool x_165 = (tint_tmp);
+ const bool x_165 = ((pab < 0.0f) & (pbc < 0.0f));
x_174_phi = x_165;
if (!(x_165)) {
- bool tint_tmp_1 = (pab >= 0.0f);
- if (tint_tmp_1) {
- tint_tmp_1 = (pbc >= 0.0f);
- }
- x_173 = (tint_tmp_1);
+ x_173 = ((pab >= 0.0f) & (pbc >= 0.0f));
x_174_phi = x_173;
}
if (!(x_174_phi)) {
@@ -106,18 +98,10 @@
param_5 = float2((x_185 - x_186), (x_188 - x_189));
const float x_192 = cross2d_vf2_vf2_(param_4, param_5);
pca = x_192;
- bool tint_tmp_2 = (pab < 0.0f);
- if (tint_tmp_2) {
- tint_tmp_2 = (pca < 0.0f);
- }
- const bool x_197 = (tint_tmp_2);
+ const bool x_197 = ((pab < 0.0f) & (pca < 0.0f));
x_206_phi = x_197;
if (!(x_197)) {
- bool tint_tmp_3 = (pab >= 0.0f);
- if (tint_tmp_3) {
- tint_tmp_3 = (pca >= 0.0f);
- }
- x_205 = (tint_tmp_3);
+ x_205 = ((pab >= 0.0f) & (pca >= 0.0f));
x_206_phi = x_205;
}
if (!(x_206_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl
index d0400d8..75d95c2 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.msl
@@ -88,12 +88,12 @@
pbc = x_160;
float const x_161 = pab;
float const x_163 = pbc;
- bool const x_165 = ((x_161 < 0.0f) && (x_163 < 0.0f));
+ bool const x_165 = ((x_161 < 0.0f) & (x_163 < 0.0f));
x_174_phi = x_165;
if (!(x_165)) {
float const x_169 = pab;
float const x_171 = pbc;
- x_173 = ((x_169 >= 0.0f) && (x_171 >= 0.0f));
+ x_173 = ((x_169 >= 0.0f) & (x_171 >= 0.0f));
x_174_phi = x_173;
}
bool const x_174 = x_174_phi;
@@ -114,12 +114,12 @@
pca = x_192;
float const x_193 = pab;
float const x_195 = pca;
- bool const x_197 = ((x_193 < 0.0f) && (x_195 < 0.0f));
+ bool const x_197 = ((x_193 < 0.0f) & (x_195 < 0.0f));
x_206_phi = x_197;
if (!(x_197)) {
float const x_201 = pab;
float const x_203 = pca;
- x_205 = ((x_201 >= 0.0f) && (x_203 >= 0.0f));
+ x_205 = ((x_201 >= 0.0f) & (x_203 >= 0.0f));
x_206_phi = x_205;
}
bool const x_206 = x_206_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.spvasm
index 98ab5e5..fd2f1dc 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 306
+; Bound: 298
; Schema: 0
OpCapability Shader
%97 = OpExtInstImport "GLSL.std.450"
@@ -94,21 +94,21 @@
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%void = OpTypeVoid
- %255 = OpTypeFunction %void
+ %247 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
- %275 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
+ %267 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
- %278 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
+ %270 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
- %281 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
- %291 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %292 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+ %273 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
+ %283 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %284 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %293 = OpTypeFunction %void %main_out
+ %285 = OpTypeFunction %void %main_out
%cross2d_vf2_vf2_ = OpFunction %float None %15
%a = OpFunctionParameter %_ptr_Function_v2float
%b = OpFunctionParameter %_ptr_Function_v2float
@@ -248,152 +248,132 @@
%176 = OpLoad %float %pab
%177 = OpLoad %float %pbc
%178 = OpFOrdLessThan %bool %176 %float_0
- OpSelectionMerge %179 None
- OpBranchConditional %178 %180 %179
- %180 = OpLabel
- %181 = OpFOrdLessThan %bool %177 %float_0
- OpBranch %179
- %179 = OpLabel
- %182 = OpPhi %bool %178 %76 %181 %180
- OpStore %x_174_phi %182
- %183 = OpLogicalNot %bool %182
- OpSelectionMerge %184 None
- OpBranchConditional %183 %185 %184
- %185 = OpLabel
- %186 = OpLoad %float %pab
- %187 = OpLoad %float %pbc
- %188 = OpFOrdGreaterThanEqual %bool %186 %float_0
- OpSelectionMerge %189 None
- OpBranchConditional %188 %190 %189
- %190 = OpLabel
- %191 = OpFOrdGreaterThanEqual %bool %187 %float_0
- OpBranch %189
- %189 = OpLabel
- %192 = OpPhi %bool %188 %185 %191 %190
- OpStore %x_173 %192
- %193 = OpLoad %bool %x_173
- OpStore %x_174_phi %193
- OpBranch %184
- %184 = OpLabel
- %194 = OpLoad %bool %x_174_phi
- %195 = OpLogicalNot %bool %194
- OpSelectionMerge %196 None
- OpBranchConditional %195 %197 %196
- %197 = OpLabel
+ %179 = OpFOrdLessThan %bool %177 %float_0
+ %180 = OpLogicalAnd %bool %178 %179
+ OpStore %x_174_phi %180
+ %181 = OpLogicalNot %bool %180
+ OpSelectionMerge %182 None
+ OpBranchConditional %181 %183 %182
+ %183 = OpLabel
+ %184 = OpLoad %float %pab
+ %185 = OpLoad %float %pbc
+ %186 = OpFOrdGreaterThanEqual %bool %184 %float_0
+ %187 = OpFOrdGreaterThanEqual %bool %185 %float_0
+ %188 = OpLogicalAnd %bool %186 %187
+ OpStore %x_173 %188
+ %189 = OpLoad %bool %x_173
+ OpStore %x_174_phi %189
+ OpBranch %182
+ %182 = OpLabel
+ %190 = OpLoad %bool %x_174_phi
+ %191 = OpLogicalNot %bool %190
+ OpSelectionMerge %192 None
+ OpBranchConditional %191 %193 %192
+ %193 = OpLabel
OpReturnValue %int_0
- %196 = OpLabel
- %200 = OpAccessChain %_ptr_Function_float %p %uint_0
- %201 = OpLoad %float %200
- %203 = OpAccessChain %_ptr_Function_float %c %uint_0
- %204 = OpLoad %float %203
- %206 = OpAccessChain %_ptr_Function_float %p %uint_1
- %207 = OpLoad %float %206
- %209 = OpAccessChain %_ptr_Function_float %c %uint_1
- %210 = OpLoad %float %209
- %212 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
- %213 = OpLoad %float %212
- %215 = OpAccessChain %_ptr_Function_float %c %uint_0
- %216 = OpLoad %float %215
- %218 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
- %219 = OpLoad %float %218
- %221 = OpAccessChain %_ptr_Function_float %c %uint_1
- %222 = OpLoad %float %221
- %223 = OpFSub %float %201 %204
- %224 = OpFSub %float %207 %210
- %225 = OpCompositeConstruct %v2float %223 %224
- OpStore %param_4 %225
- %226 = OpFSub %float %213 %216
- %227 = OpFSub %float %219 %222
- %228 = OpCompositeConstruct %v2float %226 %227
- OpStore %param_5 %228
- %229 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
- OpStore %pca %229
- %232 = OpLoad %float %pab
- %233 = OpLoad %float %pca
- %234 = OpFOrdLessThan %bool %232 %float_0
- OpSelectionMerge %235 None
- OpBranchConditional %234 %236 %235
- %236 = OpLabel
- %237 = OpFOrdLessThan %bool %233 %float_0
- OpBranch %235
+ %192 = OpLabel
+ %196 = OpAccessChain %_ptr_Function_float %p %uint_0
+ %197 = OpLoad %float %196
+ %199 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %200 = OpLoad %float %199
+ %202 = OpAccessChain %_ptr_Function_float %p %uint_1
+ %203 = OpLoad %float %202
+ %205 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %206 = OpLoad %float %205
+ %208 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
+ %209 = OpLoad %float %208
+ %211 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %212 = OpLoad %float %211
+ %214 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
+ %215 = OpLoad %float %214
+ %217 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %218 = OpLoad %float %217
+ %219 = OpFSub %float %197 %200
+ %220 = OpFSub %float %203 %206
+ %221 = OpCompositeConstruct %v2float %219 %220
+ OpStore %param_4 %221
+ %222 = OpFSub %float %209 %212
+ %223 = OpFSub %float %215 %218
+ %224 = OpCompositeConstruct %v2float %222 %223
+ OpStore %param_5 %224
+ %225 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
+ OpStore %pca %225
+ %228 = OpLoad %float %pab
+ %229 = OpLoad %float %pca
+ %230 = OpFOrdLessThan %bool %228 %float_0
+ %231 = OpFOrdLessThan %bool %229 %float_0
+ %232 = OpLogicalAnd %bool %230 %231
+ OpStore %x_206_phi %232
+ %233 = OpLogicalNot %bool %232
+ OpSelectionMerge %234 None
+ OpBranchConditional %233 %235 %234
%235 = OpLabel
- %238 = OpPhi %bool %234 %196 %237 %236
- OpStore %x_206_phi %238
- %239 = OpLogicalNot %bool %238
- OpSelectionMerge %240 None
- OpBranchConditional %239 %241 %240
- %241 = OpLabel
- %242 = OpLoad %float %pab
- %243 = OpLoad %float %pca
- %244 = OpFOrdGreaterThanEqual %bool %242 %float_0
- OpSelectionMerge %245 None
- OpBranchConditional %244 %246 %245
- %246 = OpLabel
- %247 = OpFOrdGreaterThanEqual %bool %243 %float_0
- OpBranch %245
+ %236 = OpLoad %float %pab
+ %237 = OpLoad %float %pca
+ %238 = OpFOrdGreaterThanEqual %bool %236 %float_0
+ %239 = OpFOrdGreaterThanEqual %bool %237 %float_0
+ %240 = OpLogicalAnd %bool %238 %239
+ OpStore %x_205 %240
+ %241 = OpLoad %bool %x_205
+ OpStore %x_206_phi %241
+ OpBranch %234
+ %234 = OpLabel
+ %242 = OpLoad %bool %x_206_phi
+ %243 = OpLogicalNot %bool %242
+ OpSelectionMerge %244 None
+ OpBranchConditional %243 %245 %244
%245 = OpLabel
- %248 = OpPhi %bool %244 %241 %247 %246
- OpStore %x_205 %248
- %249 = OpLoad %bool %x_205
- OpStore %x_206_phi %249
- OpBranch %240
- %240 = OpLabel
- %250 = OpLoad %bool %x_206_phi
- %251 = OpLogicalNot %bool %250
- OpSelectionMerge %252 None
- OpBranchConditional %251 %253 %252
- %253 = OpLabel
OpReturnValue %int_0
- %252 = OpLabel
+ %244 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
- %main_1 = OpFunction %void None %255
- %258 = OpLabel
+ %main_1 = OpFunction %void None %247
+ %250 = OpLabel
%pos = OpVariable %_ptr_Function_v2float Function %55
%param_6 = OpVariable %_ptr_Function_v2float Function %55
%param_7 = OpVariable %_ptr_Function_v2float Function %55
%param_8 = OpVariable %_ptr_Function_v2float Function %55
%param_9 = OpVariable %_ptr_Function_v2float Function %55
- %264 = OpLoad %v4float %gl_FragCoord
- %266 = OpAccessChain %_ptr_Uniform_v2float %x_15 %uint_0
- %267 = OpLoad %v2float %266
- %268 = OpCompositeExtract %float %264 0
- %269 = OpCompositeExtract %float %264 1
- %270 = OpCompositeConstruct %v2float %268 %269
- %271 = OpFDiv %v2float %270 %267
- OpStore %pos %271
- %272 = OpLoad %v2float %pos
- OpStore %param_6 %272
- OpStore %param_7 %275
- OpStore %param_8 %278
- OpStore %param_9 %281
- %282 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
- %287 = OpIEqual %bool %282 %int_1
- OpSelectionMerge %288 None
- OpBranchConditional %287 %289 %290
- %289 = OpLabel
- OpStore %x_GLF_color %291
- OpBranch %288
- %290 = OpLabel
- OpStore %x_GLF_color %292
- OpBranch %288
- %288 = OpLabel
+ %256 = OpLoad %v4float %gl_FragCoord
+ %258 = OpAccessChain %_ptr_Uniform_v2float %x_15 %uint_0
+ %259 = OpLoad %v2float %258
+ %260 = OpCompositeExtract %float %256 0
+ %261 = OpCompositeExtract %float %256 1
+ %262 = OpCompositeConstruct %v2float %260 %261
+ %263 = OpFDiv %v2float %262 %259
+ OpStore %pos %263
+ %264 = OpLoad %v2float %pos
+ OpStore %param_6 %264
+ OpStore %param_7 %267
+ OpStore %param_8 %270
+ OpStore %param_9 %273
+ %274 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
+ %279 = OpIEqual %bool %274 %int_1
+ OpSelectionMerge %280 None
+ OpBranchConditional %279 %281 %282
+ %281 = OpLabel
+ OpStore %x_GLF_color %283
+ OpBranch %280
+ %282 = OpLabel
+ OpStore %x_GLF_color %284
+ OpBranch %280
+ %280 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %293
+%tint_symbol_3 = OpFunction %void None %285
%tint_symbol_1 = OpFunctionParameter %main_out
- %297 = OpLabel
- %298 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %298
+ %289 = OpLabel
+ %290 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %290
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %255
- %300 = OpLabel
- %301 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %301
- %302 = OpFunctionCall %void %main_1
- %304 = OpLoad %v4float %x_GLF_color
- %305 = OpCompositeConstruct %main_out %304
- %303 = OpFunctionCall %void %tint_symbol_3 %305
+ %main = OpFunction %void None %247
+ %292 = OpLabel
+ %293 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %293
+ %294 = OpFunctionCall %void %main_1
+ %296 = OpLoad %v4float %x_GLF_color
+ %297 = OpCompositeConstruct %main_out %296
+ %295 = OpFunctionCall %void %tint_symbol_3 %297
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.wgsl
index d58c35b..88c9076 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-clamp-conditional-mix/1.spvasm.expected.wgsl
@@ -95,12 +95,12 @@
pbc = x_160;
let x_161 : f32 = pab;
let x_163 : f32 = pbc;
- let x_165 : bool = ((x_161 < 0.0) && (x_163 < 0.0));
+ let x_165 : bool = ((x_161 < 0.0) & (x_163 < 0.0));
x_174_phi = x_165;
if (!(x_165)) {
let x_169 : f32 = pab;
let x_171 : f32 = pbc;
- x_173 = ((x_169 >= 0.0) && (x_171 >= 0.0));
+ x_173 = ((x_169 >= 0.0) & (x_171 >= 0.0));
x_174_phi = x_173;
}
let x_174 : bool = x_174_phi;
@@ -121,12 +121,12 @@
pca = x_192;
let x_193 : f32 = pab;
let x_195 : f32 = pca;
- let x_197 : bool = ((x_193 < 0.0) && (x_195 < 0.0));
+ let x_197 : bool = ((x_193 < 0.0) & (x_195 < 0.0));
x_206_phi = x_197;
if (!(x_197)) {
let x_201 : f32 = pab;
let x_203 : f32 = pca;
- x_205 = ((x_201 >= 0.0) && (x_203 >= 0.0));
+ x_205 = ((x_201 >= 0.0) & (x_203 >= 0.0));
x_206_phi = x_205;
}
let x_206 : bool = x_206_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl
index f228156..55c6a35 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.hlsl
@@ -50,18 +50,10 @@
param_3 = float2((x_122 - x_124), (x_127 - x_129));
const float x_132 = cross2d_vf2_vf2_(param_2, param_3);
pbc = x_132;
- bool tint_tmp = (pab < 0.0f);
- if (tint_tmp) {
- tint_tmp = (pbc < 0.0f);
- }
- const bool x_137 = (tint_tmp);
+ const bool x_137 = ((pab < 0.0f) & (pbc < 0.0f));
x_146_phi = x_137;
if (!(x_137)) {
- bool tint_tmp_1 = (pab >= 0.0f);
- if (tint_tmp_1) {
- tint_tmp_1 = (pbc >= 0.0f);
- }
- x_145 = (tint_tmp_1);
+ x_145 = ((pab >= 0.0f) & (pbc >= 0.0f));
x_146_phi = x_145;
}
if (!(x_146_phi)) {
@@ -79,18 +71,10 @@
param_5 = float2((x_162 - x_164), (x_167 - x_169));
const float x_172 = cross2d_vf2_vf2_(param_4, param_5);
pca = x_172;
- bool tint_tmp_2 = (pab < 0.0f);
- if (tint_tmp_2) {
- tint_tmp_2 = (pca < 0.0f);
- }
- const bool x_177 = (tint_tmp_2);
+ const bool x_177 = ((pab < 0.0f) & (pca < 0.0f));
x_186_phi = x_177;
if (!(x_177)) {
- bool tint_tmp_3 = (pab >= 0.0f);
- if (tint_tmp_3) {
- tint_tmp_3 = (pca >= 0.0f);
- }
- x_185 = (tint_tmp_3);
+ x_185 = ((pab >= 0.0f) & (pca >= 0.0f));
x_186_phi = x_185;
}
if (!(x_186_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl
index 8d1f7be..9d7d4bb 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.msl
@@ -59,12 +59,12 @@
pbc = x_132;
float const x_133 = pab;
float const x_135 = pbc;
- bool const x_137 = ((x_133 < 0.0f) && (x_135 < 0.0f));
+ bool const x_137 = ((x_133 < 0.0f) & (x_135 < 0.0f));
x_146_phi = x_137;
if (!(x_137)) {
float const x_141 = pab;
float const x_143 = pbc;
- x_145 = ((x_141 >= 0.0f) && (x_143 >= 0.0f));
+ x_145 = ((x_141 >= 0.0f) & (x_143 >= 0.0f));
x_146_phi = x_145;
}
bool const x_146 = x_146_phi;
@@ -85,12 +85,12 @@
pca = x_172;
float const x_173 = pab;
float const x_175 = pca;
- bool const x_177 = ((x_173 < 0.0f) && (x_175 < 0.0f));
+ bool const x_177 = ((x_173 < 0.0f) & (x_175 < 0.0f));
x_186_phi = x_177;
if (!(x_177)) {
float const x_181 = pab;
float const x_183 = pca;
- x_185 = ((x_181 >= 0.0f) && (x_183 >= 0.0f));
+ x_185 = ((x_181 >= 0.0f) & (x_183 >= 0.0f));
x_186_phi = x_185;
}
bool const x_186 = x_186_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.spvasm
index 0d3239b..c9284d5 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 264
+; Bound: 256
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -85,22 +85,22 @@
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%void = OpTypeVoid
- %212 = OpTypeFunction %void
+ %204 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
- %232 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
+ %224 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
- %235 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
+ %227 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
- %238 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
+ %230 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
%float_1 = OpConstant %float 1
- %249 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %250 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+ %241 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %242 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %251 = OpTypeFunction %void %main_out
+ %243 = OpTypeFunction %void %main_out
%cross2d_vf2_vf2_ = OpFunction %float None %15
%a = OpFunctionParameter %_ptr_Function_v2float
%b = OpFunctionParameter %_ptr_Function_v2float
@@ -192,152 +192,132 @@
%132 = OpLoad %float %pab
%133 = OpLoad %float %pbc
%135 = OpFOrdLessThan %bool %132 %float_0
- OpSelectionMerge %136 None
- OpBranchConditional %135 %137 %136
- %137 = OpLabel
- %138 = OpFOrdLessThan %bool %133 %float_0
- OpBranch %136
- %136 = OpLabel
- %139 = OpPhi %bool %135 %47 %138 %137
- OpStore %x_146_phi %139
- %140 = OpLogicalNot %bool %139
- OpSelectionMerge %141 None
- OpBranchConditional %140 %142 %141
- %142 = OpLabel
- %143 = OpLoad %float %pab
- %144 = OpLoad %float %pbc
- %145 = OpFOrdGreaterThanEqual %bool %143 %float_0
- OpSelectionMerge %146 None
- OpBranchConditional %145 %147 %146
- %147 = OpLabel
- %148 = OpFOrdGreaterThanEqual %bool %144 %float_0
- OpBranch %146
- %146 = OpLabel
- %149 = OpPhi %bool %145 %142 %148 %147
- OpStore %x_145 %149
- %150 = OpLoad %bool %x_145
- OpStore %x_146_phi %150
- OpBranch %141
- %141 = OpLabel
- %151 = OpLoad %bool %x_146_phi
- %152 = OpLogicalNot %bool %151
- OpSelectionMerge %153 None
- OpBranchConditional %152 %154 %153
- %154 = OpLabel
+ %136 = OpFOrdLessThan %bool %133 %float_0
+ %137 = OpLogicalAnd %bool %135 %136
+ OpStore %x_146_phi %137
+ %138 = OpLogicalNot %bool %137
+ OpSelectionMerge %139 None
+ OpBranchConditional %138 %140 %139
+ %140 = OpLabel
+ %141 = OpLoad %float %pab
+ %142 = OpLoad %float %pbc
+ %143 = OpFOrdGreaterThanEqual %bool %141 %float_0
+ %144 = OpFOrdGreaterThanEqual %bool %142 %float_0
+ %145 = OpLogicalAnd %bool %143 %144
+ OpStore %x_145 %145
+ %146 = OpLoad %bool %x_145
+ OpStore %x_146_phi %146
+ OpBranch %139
+ %139 = OpLabel
+ %147 = OpLoad %bool %x_146_phi
+ %148 = OpLogicalNot %bool %147
+ OpSelectionMerge %149 None
+ OpBranchConditional %148 %150 %149
+ %150 = OpLabel
OpReturnValue %int_0
- %153 = OpLabel
- %157 = OpAccessChain %_ptr_Function_float %p %uint_0
- %158 = OpLoad %float %157
- %160 = OpAccessChain %_ptr_Function_float %c %uint_0
- %161 = OpLoad %float %160
- %163 = OpAccessChain %_ptr_Function_float %p %uint_1
- %164 = OpLoad %float %163
- %166 = OpAccessChain %_ptr_Function_float %c %uint_1
- %167 = OpLoad %float %166
- %169 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
- %170 = OpLoad %float %169
- %172 = OpAccessChain %_ptr_Function_float %c %uint_0
- %173 = OpLoad %float %172
- %175 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
- %176 = OpLoad %float %175
- %178 = OpAccessChain %_ptr_Function_float %c %uint_1
- %179 = OpLoad %float %178
- %180 = OpFSub %float %158 %161
- %181 = OpFSub %float %164 %167
- %182 = OpCompositeConstruct %v2float %180 %181
- OpStore %param_4 %182
- %183 = OpFSub %float %170 %173
- %184 = OpFSub %float %176 %179
- %185 = OpCompositeConstruct %v2float %183 %184
- OpStore %param_5 %185
- %186 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
- OpStore %pca %186
- %189 = OpLoad %float %pab
- %190 = OpLoad %float %pca
- %191 = OpFOrdLessThan %bool %189 %float_0
- OpSelectionMerge %192 None
- OpBranchConditional %191 %193 %192
- %193 = OpLabel
- %194 = OpFOrdLessThan %bool %190 %float_0
- OpBranch %192
+ %149 = OpLabel
+ %153 = OpAccessChain %_ptr_Function_float %p %uint_0
+ %154 = OpLoad %float %153
+ %156 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %157 = OpLoad %float %156
+ %159 = OpAccessChain %_ptr_Function_float %p %uint_1
+ %160 = OpLoad %float %159
+ %162 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %163 = OpLoad %float %162
+ %165 = OpAccessChain %_ptr_Function_float %a_1 %uint_0
+ %166 = OpLoad %float %165
+ %168 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %169 = OpLoad %float %168
+ %171 = OpAccessChain %_ptr_Function_float %a_1 %uint_1
+ %172 = OpLoad %float %171
+ %174 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %175 = OpLoad %float %174
+ %176 = OpFSub %float %154 %157
+ %177 = OpFSub %float %160 %163
+ %178 = OpCompositeConstruct %v2float %176 %177
+ OpStore %param_4 %178
+ %179 = OpFSub %float %166 %169
+ %180 = OpFSub %float %172 %175
+ %181 = OpCompositeConstruct %v2float %179 %180
+ OpStore %param_5 %181
+ %182 = OpFunctionCall %float %cross2d_vf2_vf2_ %param_4 %param_5
+ OpStore %pca %182
+ %185 = OpLoad %float %pab
+ %186 = OpLoad %float %pca
+ %187 = OpFOrdLessThan %bool %185 %float_0
+ %188 = OpFOrdLessThan %bool %186 %float_0
+ %189 = OpLogicalAnd %bool %187 %188
+ OpStore %x_186_phi %189
+ %190 = OpLogicalNot %bool %189
+ OpSelectionMerge %191 None
+ OpBranchConditional %190 %192 %191
%192 = OpLabel
- %195 = OpPhi %bool %191 %153 %194 %193
- OpStore %x_186_phi %195
- %196 = OpLogicalNot %bool %195
- OpSelectionMerge %197 None
- OpBranchConditional %196 %198 %197
- %198 = OpLabel
- %199 = OpLoad %float %pab
- %200 = OpLoad %float %pca
- %201 = OpFOrdGreaterThanEqual %bool %199 %float_0
- OpSelectionMerge %202 None
- OpBranchConditional %201 %203 %202
- %203 = OpLabel
- %204 = OpFOrdGreaterThanEqual %bool %200 %float_0
- OpBranch %202
+ %193 = OpLoad %float %pab
+ %194 = OpLoad %float %pca
+ %195 = OpFOrdGreaterThanEqual %bool %193 %float_0
+ %196 = OpFOrdGreaterThanEqual %bool %194 %float_0
+ %197 = OpLogicalAnd %bool %195 %196
+ OpStore %x_185 %197
+ %198 = OpLoad %bool %x_185
+ OpStore %x_186_phi %198
+ OpBranch %191
+ %191 = OpLabel
+ %199 = OpLoad %bool %x_186_phi
+ %200 = OpLogicalNot %bool %199
+ OpSelectionMerge %201 None
+ OpBranchConditional %200 %202 %201
%202 = OpLabel
- %205 = OpPhi %bool %201 %198 %204 %203
- OpStore %x_185 %205
- %206 = OpLoad %bool %x_185
- OpStore %x_186_phi %206
- OpBranch %197
- %197 = OpLabel
- %207 = OpLoad %bool %x_186_phi
- %208 = OpLogicalNot %bool %207
- OpSelectionMerge %209 None
- OpBranchConditional %208 %210 %209
- %210 = OpLabel
OpReturnValue %int_0
- %209 = OpLabel
+ %201 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
- %main_1 = OpFunction %void None %212
- %215 = OpLabel
+ %main_1 = OpFunction %void None %204
+ %207 = OpLabel
%pos = OpVariable %_ptr_Function_v2float Function %51
%param_6 = OpVariable %_ptr_Function_v2float Function %51
%param_7 = OpVariable %_ptr_Function_v2float Function %51
%param_8 = OpVariable %_ptr_Function_v2float Function %51
%param_9 = OpVariable %_ptr_Function_v2float Function %51
- %221 = OpLoad %v4float %gl_FragCoord
- %223 = OpAccessChain %_ptr_Uniform_v2float %x_24 %uint_0
- %224 = OpLoad %v2float %223
- %225 = OpCompositeExtract %float %221 0
- %226 = OpCompositeExtract %float %221 1
- %227 = OpCompositeConstruct %v2float %225 %226
- %228 = OpFDiv %v2float %227 %224
- OpStore %pos %228
- %229 = OpLoad %v2float %pos
- OpStore %param_6 %229
- OpStore %param_7 %232
- OpStore %param_8 %235
- OpStore %param_9 %238
- %239 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
- %244 = OpIEqual %bool %239 %int_1
- OpSelectionMerge %245 None
- OpBranchConditional %244 %246 %247
- %246 = OpLabel
- OpStore %x_GLF_color %249
- OpBranch %245
- %247 = OpLabel
- OpStore %x_GLF_color %250
- OpBranch %245
- %245 = OpLabel
+ %213 = OpLoad %v4float %gl_FragCoord
+ %215 = OpAccessChain %_ptr_Uniform_v2float %x_24 %uint_0
+ %216 = OpLoad %v2float %215
+ %217 = OpCompositeExtract %float %213 0
+ %218 = OpCompositeExtract %float %213 1
+ %219 = OpCompositeConstruct %v2float %217 %218
+ %220 = OpFDiv %v2float %219 %216
+ OpStore %pos %220
+ %221 = OpLoad %v2float %pos
+ OpStore %param_6 %221
+ OpStore %param_7 %224
+ OpStore %param_8 %227
+ OpStore %param_9 %230
+ %231 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
+ %236 = OpIEqual %bool %231 %int_1
+ OpSelectionMerge %237 None
+ OpBranchConditional %236 %238 %239
+ %238 = OpLabel
+ OpStore %x_GLF_color %241
+ OpBranch %237
+ %239 = OpLabel
+ OpStore %x_GLF_color %242
+ OpBranch %237
+ %237 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %251
+%tint_symbol_3 = OpFunction %void None %243
%tint_symbol_1 = OpFunctionParameter %main_out
- %255 = OpLabel
- %256 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %256
+ %247 = OpLabel
+ %248 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %248
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %212
- %258 = OpLabel
- %259 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %259
- %260 = OpFunctionCall %void %main_1
- %262 = OpLoad %v4float %x_GLF_color
- %263 = OpCompositeConstruct %main_out %262
- %261 = OpFunctionCall %void %tint_symbol_3 %263
+ %main = OpFunction %void None %204
+ %250 = OpLabel
+ %251 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %251
+ %252 = OpFunctionCall %void %main_1
+ %254 = OpLoad %v4float %x_GLF_color
+ %255 = OpCompositeConstruct %main_out %254
+ %253 = OpFunctionCall %void %tint_symbol_3 %255
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.wgsl
index 33d8a7d..535c1de 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-conditional-clamped-float/0.spvasm.expected.wgsl
@@ -57,12 +57,12 @@
pbc = x_132;
let x_133 : f32 = pab;
let x_135 : f32 = pbc;
- let x_137 : bool = ((x_133 < 0.0) && (x_135 < 0.0));
+ let x_137 : bool = ((x_133 < 0.0) & (x_135 < 0.0));
x_146_phi = x_137;
if (!(x_137)) {
let x_141 : f32 = pab;
let x_143 : f32 = pbc;
- x_145 = ((x_141 >= 0.0) && (x_143 >= 0.0));
+ x_145 = ((x_141 >= 0.0) & (x_143 >= 0.0));
x_146_phi = x_145;
}
let x_146 : bool = x_146_phi;
@@ -83,12 +83,12 @@
pca = x_172;
let x_173 : f32 = pab;
let x_175 : f32 = pca;
- let x_177 : bool = ((x_173 < 0.0) && (x_175 < 0.0));
+ let x_177 : bool = ((x_173 < 0.0) & (x_175 < 0.0));
x_186_phi = x_177;
if (!(x_177)) {
let x_181 : f32 = pab;
let x_183 : f32 = pca;
- x_185 = ((x_181 >= 0.0) && (x_183 >= 0.0));
+ x_185 = ((x_181 >= 0.0) & (x_183 >= 0.0));
x_186_phi = x_185;
}
let x_186 : bool = x_186_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl
index c32dae7..8f680e0 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.hlsl
@@ -51,18 +51,10 @@
const float x_126 = ((x_117 * x_119) - (x_122 * x_124));
x_67 = x_126;
const bool x_127 = (x_99 < 0.0f);
- bool tint_tmp = x_127;
- if (tint_tmp) {
- tint_tmp = (x_126 < 0.0f);
- }
- const bool x_129 = (tint_tmp);
+ const bool x_129 = (x_127 & (x_126 < 0.0f));
x_136_phi = x_129;
if (!(x_129)) {
- bool tint_tmp_1 = (x_99 >= 0.0f);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_126 >= 0.0f);
- }
- x_135 = (tint_tmp_1);
+ x_135 = ((x_99 >= 0.0f) & (x_126 >= 0.0f));
x_136_phi = x_135;
}
if (!(x_136_phi)) {
@@ -84,18 +76,10 @@
const float x_162 = param_4.y;
const float x_164 = ((x_155 * x_157) - (x_160 * x_162));
x_66 = x_164;
- bool tint_tmp_2 = x_127;
- if (tint_tmp_2) {
- tint_tmp_2 = (x_164 < 0.0f);
- }
- const bool x_166 = (tint_tmp_2);
+ const bool x_166 = (x_127 & (x_164 < 0.0f));
x_173_phi = x_166;
if (!(x_166)) {
- bool tint_tmp_3 = (x_99 >= 0.0f);
- if (tint_tmp_3) {
- tint_tmp_3 = (x_164 >= 0.0f);
- }
- x_172 = (tint_tmp_3);
+ x_172 = ((x_99 >= 0.0f) & (x_164 >= 0.0f));
x_173_phi = x_172;
}
if (!(x_173_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl
index fc78937..5b5a4a7 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.msl
@@ -58,10 +58,10 @@
float const x_126 = ((x_117 * x_119) - (x_122 * x_124));
x_67 = x_126;
bool const x_127 = (x_99 < 0.0f);
- bool const x_129 = (x_127 && (x_126 < 0.0f));
+ bool const x_129 = (x_127 & (x_126 < 0.0f));
x_136_phi = x_129;
if (!(x_129)) {
- x_135 = ((x_99 >= 0.0f) && (x_126 >= 0.0f));
+ x_135 = ((x_99 >= 0.0f) & (x_126 >= 0.0f));
x_136_phi = x_135;
}
bool const x_136 = x_136_phi;
@@ -84,10 +84,10 @@
float const x_162 = param_4.y;
float const x_164 = ((x_155 * x_157) - (x_160 * x_162));
x_66 = x_164;
- bool const x_166 = (x_127 && (x_164 < 0.0f));
+ bool const x_166 = (x_127 & (x_164 < 0.0f));
x_173_phi = x_166;
if (!(x_166)) {
- x_172 = ((x_99 >= 0.0f) && (x_164 >= 0.0f));
+ x_172 = ((x_99 >= 0.0f) & (x_164 >= 0.0f));
x_173_phi = x_172;
}
bool const x_173 = x_173_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.spvasm
index 69ebf78..ce35196 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 257
+; Bound: 249
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -80,22 +80,22 @@
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%void = OpTypeVoid
- %207 = OpTypeFunction %void
+ %199 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
- %225 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
+ %217 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
- %228 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
+ %220 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
- %231 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
+ %223 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
%float_1 = OpConstant %float 1
- %242 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %243 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+ %234 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %235 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %244 = OpTypeFunction %void %main_out
+ %236 = OpTypeFunction %void %main_out
%pointInTriangle_vf2_vf2_vf2_vf2_ = OpFunction %int None %15
%p = OpFunctionParameter %_ptr_Function_v2float
%a = OpFunctionParameter %_ptr_Function_v2float
@@ -188,152 +188,132 @@
%127 = OpFSub %float %125 %126
OpStore %x_67 %127
%129 = OpFOrdLessThan %bool %86 %float_0
- OpSelectionMerge %130 None
- OpBranchConditional %129 %131 %130
- %131 = OpLabel
- %132 = OpFOrdLessThan %bool %127 %float_0
- OpBranch %130
- %130 = OpLabel
- %133 = OpPhi %bool %129 %23 %132 %131
- OpStore %x_136_phi %133
- %134 = OpLogicalNot %bool %133
- OpSelectionMerge %135 None
- OpBranchConditional %134 %136 %135
- %136 = OpLabel
- %137 = OpFOrdGreaterThanEqual %bool %86 %float_0
- OpSelectionMerge %138 None
- OpBranchConditional %137 %139 %138
- %139 = OpLabel
- %140 = OpFOrdGreaterThanEqual %bool %127 %float_0
- OpBranch %138
- %138 = OpLabel
- %141 = OpPhi %bool %137 %136 %140 %139
- OpStore %x_135 %141
- %142 = OpLoad %bool %x_135
- OpStore %x_136_phi %142
- OpBranch %135
- %135 = OpLabel
- %143 = OpLoad %bool %x_136_phi
- %144 = OpLogicalNot %bool %143
- OpSelectionMerge %145 None
- OpBranchConditional %144 %146 %145
- %146 = OpLabel
+ %130 = OpFOrdLessThan %bool %127 %float_0
+ %131 = OpLogicalAnd %bool %129 %130
+ OpStore %x_136_phi %131
+ %132 = OpLogicalNot %bool %131
+ OpSelectionMerge %133 None
+ OpBranchConditional %132 %134 %133
+ %134 = OpLabel
+ %135 = OpFOrdGreaterThanEqual %bool %86 %float_0
+ %136 = OpFOrdGreaterThanEqual %bool %127 %float_0
+ %137 = OpLogicalAnd %bool %135 %136
+ OpStore %x_135 %137
+ %138 = OpLoad %bool %x_135
+ OpStore %x_136_phi %138
+ OpBranch %133
+ %133 = OpLabel
+ %139 = OpLoad %bool %x_136_phi
+ %140 = OpLogicalNot %bool %139
+ OpSelectionMerge %141 None
+ OpBranchConditional %140 %142 %141
+ %142 = OpLabel
OpReturnValue %int_0
- %145 = OpLabel
- %149 = OpAccessChain %_ptr_Function_float %p %uint_0
- %150 = OpLoad %float %149
- %152 = OpAccessChain %_ptr_Function_float %c %uint_0
- %153 = OpLoad %float %152
- %155 = OpAccessChain %_ptr_Function_float %p %uint_1
- %156 = OpLoad %float %155
- %158 = OpAccessChain %_ptr_Function_float %c %uint_1
- %159 = OpLoad %float %158
- %161 = OpAccessChain %_ptr_Function_float %a %uint_0
- %162 = OpLoad %float %161
- %164 = OpAccessChain %_ptr_Function_float %c %uint_0
- %165 = OpLoad %float %164
- %167 = OpAccessChain %_ptr_Function_float %a %uint_1
- %168 = OpLoad %float %167
- %170 = OpAccessChain %_ptr_Function_float %c %uint_1
- %171 = OpLoad %float %170
- %172 = OpFSub %float %150 %153
- %173 = OpFSub %float %156 %159
- %174 = OpCompositeConstruct %v2float %172 %173
- OpStore %param_4 %174
- %175 = OpFSub %float %162 %165
- %176 = OpFSub %float %168 %171
- %177 = OpCompositeConstruct %v2float %175 %176
- OpStore %param_5 %177
- %178 = OpAccessChain %_ptr_Function_float %param_4 %uint_0
+ %141 = OpLabel
+ %145 = OpAccessChain %_ptr_Function_float %p %uint_0
+ %146 = OpLoad %float %145
+ %148 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %149 = OpLoad %float %148
+ %151 = OpAccessChain %_ptr_Function_float %p %uint_1
+ %152 = OpLoad %float %151
+ %154 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %155 = OpLoad %float %154
+ %157 = OpAccessChain %_ptr_Function_float %a %uint_0
+ %158 = OpLoad %float %157
+ %160 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %161 = OpLoad %float %160
+ %163 = OpAccessChain %_ptr_Function_float %a %uint_1
+ %164 = OpLoad %float %163
+ %166 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %167 = OpLoad %float %166
+ %168 = OpFSub %float %146 %149
+ %169 = OpFSub %float %152 %155
+ %170 = OpCompositeConstruct %v2float %168 %169
+ OpStore %param_4 %170
+ %171 = OpFSub %float %158 %161
+ %172 = OpFSub %float %164 %167
+ %173 = OpCompositeConstruct %v2float %171 %172
+ OpStore %param_5 %173
+ %174 = OpAccessChain %_ptr_Function_float %param_4 %uint_0
+ %175 = OpLoad %float %174
+ %176 = OpAccessChain %_ptr_Function_float %param_5 %uint_1
+ %177 = OpLoad %float %176
+ %178 = OpAccessChain %_ptr_Function_float %param_5 %uint_0
%179 = OpLoad %float %178
- %180 = OpAccessChain %_ptr_Function_float %param_5 %uint_1
+ %180 = OpAccessChain %_ptr_Function_float %param_4 %uint_1
%181 = OpLoad %float %180
- %182 = OpAccessChain %_ptr_Function_float %param_5 %uint_0
- %183 = OpLoad %float %182
- %184 = OpAccessChain %_ptr_Function_float %param_4 %uint_1
- %185 = OpLoad %float %184
- %186 = OpFMul %float %179 %181
- %187 = OpFMul %float %183 %185
- %188 = OpFSub %float %186 %187
- OpStore %x_66 %188
- OpSelectionMerge %189 None
- OpBranchConditional %129 %190 %189
- %190 = OpLabel
- %191 = OpFOrdLessThan %bool %188 %float_0
- OpBranch %189
+ %182 = OpFMul %float %175 %177
+ %183 = OpFMul %float %179 %181
+ %184 = OpFSub %float %182 %183
+ OpStore %x_66 %184
+ %185 = OpFOrdLessThan %bool %184 %float_0
+ %186 = OpLogicalAnd %bool %129 %185
+ OpStore %x_173_phi %186
+ %187 = OpLogicalNot %bool %186
+ OpSelectionMerge %188 None
+ OpBranchConditional %187 %189 %188
%189 = OpLabel
- %192 = OpPhi %bool %129 %145 %191 %190
- OpStore %x_173_phi %192
- %193 = OpLogicalNot %bool %192
- OpSelectionMerge %194 None
- OpBranchConditional %193 %195 %194
- %195 = OpLabel
- %196 = OpFOrdGreaterThanEqual %bool %86 %float_0
- OpSelectionMerge %197 None
- OpBranchConditional %196 %198 %197
- %198 = OpLabel
- %199 = OpFOrdGreaterThanEqual %bool %188 %float_0
- OpBranch %197
+ %190 = OpFOrdGreaterThanEqual %bool %86 %float_0
+ %191 = OpFOrdGreaterThanEqual %bool %184 %float_0
+ %192 = OpLogicalAnd %bool %190 %191
+ OpStore %x_172 %192
+ %193 = OpLoad %bool %x_172
+ OpStore %x_173_phi %193
+ OpBranch %188
+ %188 = OpLabel
+ %194 = OpLoad %bool %x_173_phi
+ %195 = OpLogicalNot %bool %194
+ OpSelectionMerge %196 None
+ OpBranchConditional %195 %197 %196
%197 = OpLabel
- %200 = OpPhi %bool %196 %195 %199 %198
- OpStore %x_172 %200
- %201 = OpLoad %bool %x_172
- OpStore %x_173_phi %201
- OpBranch %194
- %194 = OpLabel
- %202 = OpLoad %bool %x_173_phi
- %203 = OpLogicalNot %bool %202
- OpSelectionMerge %204 None
- OpBranchConditional %203 %205 %204
- %205 = OpLabel
OpReturnValue %int_0
- %204 = OpLabel
+ %196 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
- %main_1 = OpFunction %void None %207
- %210 = OpLabel
+ %main_1 = OpFunction %void None %199
+ %202 = OpLabel
%param_6 = OpVariable %_ptr_Function_v2float Function %30
%param_7 = OpVariable %_ptr_Function_v2float Function %30
%param_8 = OpVariable %_ptr_Function_v2float Function %30
%param_9 = OpVariable %_ptr_Function_v2float Function %30
- %215 = OpLoad %v4float %gl_FragCoord
- %217 = OpAccessChain %_ptr_Uniform_v2float %x_17 %uint_0
- %218 = OpLoad %v2float %217
- %219 = OpCompositeExtract %float %215 0
- %220 = OpCompositeExtract %float %215 1
- %221 = OpCompositeConstruct %v2float %219 %220
- %222 = OpFDiv %v2float %221 %218
- OpStore %param_6 %222
- OpStore %param_7 %225
- OpStore %param_8 %228
- OpStore %param_9 %231
- %232 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
- %237 = OpIEqual %bool %232 %int_1
- OpSelectionMerge %238 None
- OpBranchConditional %237 %239 %240
- %239 = OpLabel
- OpStore %x_GLF_color %242
- OpBranch %238
- %240 = OpLabel
- OpStore %x_GLF_color %243
- OpBranch %238
- %238 = OpLabel
+ %207 = OpLoad %v4float %gl_FragCoord
+ %209 = OpAccessChain %_ptr_Uniform_v2float %x_17 %uint_0
+ %210 = OpLoad %v2float %209
+ %211 = OpCompositeExtract %float %207 0
+ %212 = OpCompositeExtract %float %207 1
+ %213 = OpCompositeConstruct %v2float %211 %212
+ %214 = OpFDiv %v2float %213 %210
+ OpStore %param_6 %214
+ OpStore %param_7 %217
+ OpStore %param_8 %220
+ OpStore %param_9 %223
+ %224 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
+ %229 = OpIEqual %bool %224 %int_1
+ OpSelectionMerge %230 None
+ OpBranchConditional %229 %231 %232
+ %231 = OpLabel
+ OpStore %x_GLF_color %234
+ OpBranch %230
+ %232 = OpLabel
+ OpStore %x_GLF_color %235
+ OpBranch %230
+ %230 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %244
+%tint_symbol_3 = OpFunction %void None %236
%tint_symbol_1 = OpFunctionParameter %main_out
- %248 = OpLabel
- %249 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %249
+ %240 = OpLabel
+ %241 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %241
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %207
- %251 = OpLabel
- %252 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %252
- %253 = OpFunctionCall %void %main_1
- %255 = OpLoad %v4float %x_GLF_color
- %256 = OpCompositeConstruct %main_out %255
- %254 = OpFunctionCall %void %tint_symbol_3 %256
+ %main = OpFunction %void None %199
+ %243 = OpLabel
+ %244 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %244
+ %245 = OpFunctionCall %void %main_1
+ %247 = OpLoad %v4float %x_GLF_color
+ %248 = OpCompositeConstruct %main_out %247
+ %246 = OpFunctionCall %void %tint_symbol_3 %248
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.wgsl
index 414b559..f49e3e9 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/0.spvasm.expected.wgsl
@@ -64,10 +64,10 @@
let x_126 : f32 = ((x_117 * x_119) - (x_122 * x_124));
x_67 = x_126;
let x_127 : bool = (x_99 < 0.0);
- let x_129 : bool = (x_127 && (x_126 < 0.0));
+ let x_129 : bool = (x_127 & (x_126 < 0.0));
x_136_phi = x_129;
if (!(x_129)) {
- x_135 = ((x_99 >= 0.0) && (x_126 >= 0.0));
+ x_135 = ((x_99 >= 0.0) & (x_126 >= 0.0));
x_136_phi = x_135;
}
let x_136 : bool = x_136_phi;
@@ -90,10 +90,10 @@
let x_162 : f32 = param_4.y;
let x_164 : f32 = ((x_155 * x_157) - (x_160 * x_162));
x_66 = x_164;
- let x_166 : bool = (x_127 && (x_164 < 0.0));
+ let x_166 : bool = (x_127 & (x_164 < 0.0));
x_173_phi = x_166;
if (!(x_166)) {
- x_172 = ((x_99 >= 0.0) && (x_164 >= 0.0));
+ x_172 = ((x_99 >= 0.0) & (x_164 >= 0.0));
x_173_phi = x_172;
}
let x_173 : bool = x_173_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl
index 1e6b252..1593598 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.hlsl
@@ -54,18 +54,10 @@
const float x_138 = ((x_129 * x_131) - (x_134 * x_136));
x_79 = x_138;
const bool x_139 = (x_111 < 0.0f);
- bool tint_tmp = x_139;
- if (tint_tmp) {
- tint_tmp = (x_138 < 0.0f);
- }
- const bool x_141 = (tint_tmp);
+ const bool x_141 = (x_139 & (x_138 < 0.0f));
x_148_phi = x_141;
if (!(x_141)) {
- bool tint_tmp_1 = (x_111 >= 0.0f);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_138 >= 0.0f);
- }
- x_147 = (tint_tmp_1);
+ x_147 = ((x_111 >= 0.0f) & (x_138 >= 0.0f));
x_148_phi = x_147;
}
int x_153_phi = 0;
@@ -119,18 +111,10 @@
const float x_193 = param_4.y;
const float x_195 = ((x_186 * x_188) - (x_191 * x_193));
x_78 = x_195;
- bool tint_tmp_2 = x_139;
- if (tint_tmp_2) {
- tint_tmp_2 = (x_195 < 0.0f);
- }
- const bool x_197 = (tint_tmp_2);
+ const bool x_197 = (x_139 & (x_195 < 0.0f));
x_204_phi = x_197;
if (!(x_197)) {
- bool tint_tmp_3 = (x_111 >= 0.0f);
- if (tint_tmp_3) {
- tint_tmp_3 = (x_195 >= 0.0f);
- }
- x_203 = (tint_tmp_3);
+ x_203 = ((x_111 >= 0.0f) & (x_195 >= 0.0f));
x_204_phi = x_203;
}
if (!(x_204_phi)) {
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl
index 6537e89..a726115 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.msl
@@ -61,10 +61,10 @@
float const x_138 = ((x_129 * x_131) - (x_134 * x_136));
x_79 = x_138;
bool const x_139 = (x_111 < 0.0f);
- bool const x_141 = (x_139 && (x_138 < 0.0f));
+ bool const x_141 = (x_139 & (x_138 < 0.0f));
x_148_phi = x_141;
if (!(x_141)) {
- x_147 = ((x_111 >= 0.0f) && (x_138 >= 0.0f));
+ x_147 = ((x_111 >= 0.0f) & (x_138 >= 0.0f));
x_148_phi = x_147;
}
int x_153_phi = 0;
@@ -119,10 +119,10 @@
float const x_193 = param_4.y;
float const x_195 = ((x_186 * x_188) - (x_191 * x_193));
x_78 = x_195;
- bool const x_197 = (x_139 && (x_195 < 0.0f));
+ bool const x_197 = (x_139 & (x_195 < 0.0f));
x_204_phi = x_197;
if (!(x_197)) {
- x_203 = ((x_111 >= 0.0f) && (x_195 >= 0.0f));
+ x_203 = ((x_111 >= 0.0f) & (x_195 >= 0.0f));
x_204_phi = x_203;
}
bool const x_204 = x_204_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.spvasm
index 8e4e6fc..a995146 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 300
+; Bound: 292
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -93,28 +93,28 @@
%uint_1 = OpConstant %uint 1
%float_0 = OpConstant %float 0
%_ptr_Function_int = OpTypePointer Function %int
- %148 = OpConstantNull %int
+ %144 = OpConstantNull %int
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_1 = OpConstant %float 1
- %170 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+ %166 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%int_1 = OpConstant %int 1
%void = OpTypeVoid
- %244 = OpTypeFunction %void
+ %236 = OpTypeFunction %void
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_300000012 = OpConstant %float 0.300000012
- %262 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
+ %254 = OpConstantComposite %v2float %float_0_699999988 %float_0_300000012
%float_0_5 = OpConstant %float 0.5
%float_0_899999976 = OpConstant %float 0.899999976
- %265 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
+ %257 = OpConstantComposite %v2float %float_0_5 %float_0_899999976
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_400000006 = OpConstant %float 0.400000006
- %268 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
- %285 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
- %286 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+ %260 = OpConstantComposite %v2float %float_0_100000001 %float_0_400000006
+ %277 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+ %278 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%main_out = OpTypeStruct %v4float
- %287 = OpTypeFunction %void %main_out
+ %279 = OpTypeFunction %void %main_out
%pointInTriangle_vf2_vf2_vf2_vf2_ = OpFunction %int None %18
%p = OpFunctionParameter %_ptr_Function_v2float
%a = OpFunctionParameter %_ptr_Function_v2float
@@ -134,10 +134,10 @@
%x_203 = OpVariable %_ptr_Function_bool Function %42
%x_148_phi = OpVariable %_ptr_Function_bool Function %42
%x_204_phi = OpVariable %_ptr_Function_bool Function %42
- %x_153_phi = OpVariable %_ptr_Function_int Function %148
- %x_154 = OpVariable %_ptr_Function_int Function %148
- %x_164_phi = OpVariable %_ptr_Function_int Function %148
- %x_165 = OpVariable %_ptr_Function_int Function %148
+ %x_153_phi = OpVariable %_ptr_Function_int Function %144
+ %x_154 = OpVariable %_ptr_Function_int Function %144
+ %x_164_phi = OpVariable %_ptr_Function_int Function %144
+ %x_165 = OpVariable %_ptr_Function_int Function %144
%49 = OpAccessChain %_ptr_Function_float %p %uint_0
%50 = OpLoad %float %49
%52 = OpAccessChain %_ptr_Function_float %a %uint_0
@@ -211,213 +211,193 @@
%130 = OpFSub %float %128 %129
OpStore %x_79 %130
%132 = OpFOrdLessThan %bool %89 %float_0
- OpSelectionMerge %133 None
- OpBranchConditional %132 %134 %133
- %134 = OpLabel
- %135 = OpFOrdLessThan %bool %130 %float_0
- OpBranch %133
- %133 = OpLabel
- %136 = OpPhi %bool %132 %26 %135 %134
- OpStore %x_148_phi %136
- %137 = OpLogicalNot %bool %136
- OpSelectionMerge %138 None
- OpBranchConditional %137 %139 %138
- %139 = OpLabel
- %140 = OpFOrdGreaterThanEqual %bool %89 %float_0
- OpSelectionMerge %141 None
- OpBranchConditional %140 %142 %141
- %142 = OpLabel
- %143 = OpFOrdGreaterThanEqual %bool %130 %float_0
- OpBranch %141
- %141 = OpLabel
- %144 = OpPhi %bool %140 %139 %143 %142
- OpStore %x_147 %144
- %145 = OpLoad %bool %x_147
- OpStore %x_148_phi %145
- OpBranch %138
- %138 = OpLabel
- %149 = OpLoad %bool %x_148_phi
- %150 = OpLogicalNot %bool %149
- OpSelectionMerge %151 None
- OpBranchConditional %150 %152 %151
- %152 = OpLabel
+ %133 = OpFOrdLessThan %bool %130 %float_0
+ %134 = OpLogicalAnd %bool %132 %133
+ OpStore %x_148_phi %134
+ %135 = OpLogicalNot %bool %134
+ OpSelectionMerge %136 None
+ OpBranchConditional %135 %137 %136
+ %137 = OpLabel
+ %138 = OpFOrdGreaterThanEqual %bool %89 %float_0
+ %139 = OpFOrdGreaterThanEqual %bool %130 %float_0
+ %140 = OpLogicalAnd %bool %138 %139
+ OpStore %x_147 %140
+ %141 = OpLoad %bool %x_147
+ OpStore %x_148_phi %141
+ OpBranch %136
+ %136 = OpLabel
+ %145 = OpLoad %bool %x_148_phi
+ %146 = OpLogicalNot %bool %145
+ OpSelectionMerge %147 None
+ OpBranchConditional %146 %148 %147
+ %148 = OpLabel
OpStore %x_153_phi %int_0
- OpBranch %154
- %154 = OpLabel
- OpLoopMerge %155 %156 None
- OpBranch %157
- %157 = OpLabel
- %160 = OpLoad %int %x_153_phi
- %162 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_1
- %163 = OpLoad %float %162
- %164 = OpConvertFToS %int %163
- %165 = OpSLessThan %bool %160 %164
- OpSelectionMerge %166 None
- OpBranchConditional %165 %167 %168
- %167 = OpLabel
- OpBranch %166
- %168 = OpLabel
- OpBranch %155
- %166 = OpLabel
- OpStore %x_GLF_color %170
+ OpBranch %150
+ %150 = OpLabel
+ OpLoopMerge %151 %152 None
+ OpBranch %153
+ %153 = OpLabel
+ %156 = OpLoad %int %x_153_phi
+ %158 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_1
+ %159 = OpLoad %float %158
+ %160 = OpConvertFToS %int %159
+ %161 = OpSLessThan %bool %156 %160
+ OpSelectionMerge %162 None
+ OpBranchConditional %161 %163 %164
+ %163 = OpLabel
+ OpBranch %162
+ %164 = OpLabel
+ OpBranch %151
+ %162 = OpLabel
+ OpStore %x_GLF_color %166
OpStore %x_164_phi %int_0
- OpBranch %171
- %171 = OpLabel
- OpLoopMerge %172 %173 None
+ OpBranch %167
+ %167 = OpLabel
+ OpLoopMerge %168 %169 None
+ OpBranch %170
+ %170 = OpLabel
+ %172 = OpLoad %int %x_164_phi
+ %173 = OpSLessThan %bool %172 %160
+ OpSelectionMerge %174 None
+ OpBranchConditional %173 %175 %176
+ %175 = OpLabel
OpBranch %174
+ %176 = OpLabel
+ OpBranch %168
%174 = OpLabel
- %176 = OpLoad %int %x_164_phi
- %177 = OpSLessThan %bool %176 %164
- OpSelectionMerge %178 None
- OpBranchConditional %177 %179 %180
- %179 = OpLabel
- OpBranch %178
- %180 = OpLabel
- OpBranch %172
- %178 = OpLabel
- OpStore %x_GLF_color %170
- OpBranch %173
- %173 = OpLabel
- %182 = OpIAdd %int %176 %int_1
- OpStore %x_165 %182
- %183 = OpLoad %int %x_165
- OpStore %x_164_phi %183
- OpBranch %171
- %172 = OpLabel
- OpBranch %156
- %156 = OpLabel
- %184 = OpIAdd %int %160 %int_1
- OpStore %x_154 %184
- %185 = OpLoad %int %x_154
- OpStore %x_153_phi %185
- OpBranch %154
- %155 = OpLabel
- OpReturnValue %int_0
+ OpStore %x_GLF_color %166
+ OpBranch %169
+ %169 = OpLabel
+ %178 = OpIAdd %int %172 %int_1
+ OpStore %x_165 %178
+ %179 = OpLoad %int %x_165
+ OpStore %x_164_phi %179
+ OpBranch %167
+ %168 = OpLabel
+ OpBranch %152
+ %152 = OpLabel
+ %180 = OpIAdd %int %156 %int_1
+ OpStore %x_154 %180
+ %181 = OpLoad %int %x_154
+ OpStore %x_153_phi %181
+ OpBranch %150
%151 = OpLabel
- %187 = OpAccessChain %_ptr_Function_float %p %uint_0
- %188 = OpLoad %float %187
- %190 = OpAccessChain %_ptr_Function_float %c %uint_0
- %191 = OpLoad %float %190
- %193 = OpAccessChain %_ptr_Function_float %p %uint_1
- %194 = OpLoad %float %193
- %196 = OpAccessChain %_ptr_Function_float %c %uint_1
- %197 = OpLoad %float %196
- %199 = OpAccessChain %_ptr_Function_float %a %uint_0
- %200 = OpLoad %float %199
- %202 = OpAccessChain %_ptr_Function_float %c %uint_0
- %203 = OpLoad %float %202
- %205 = OpAccessChain %_ptr_Function_float %a %uint_1
- %206 = OpLoad %float %205
- %208 = OpAccessChain %_ptr_Function_float %c %uint_1
- %209 = OpLoad %float %208
- %210 = OpFSub %float %188 %191
- %211 = OpFSub %float %194 %197
- %212 = OpCompositeConstruct %v2float %210 %211
- OpStore %param_4 %212
- %213 = OpFSub %float %200 %203
- %214 = OpFSub %float %206 %209
- %215 = OpCompositeConstruct %v2float %213 %214
- OpStore %param_5 %215
- %216 = OpAccessChain %_ptr_Function_float %param_4 %uint_0
- %217 = OpLoad %float %216
- %218 = OpAccessChain %_ptr_Function_float %param_5 %uint_1
- %219 = OpLoad %float %218
- %220 = OpAccessChain %_ptr_Function_float %param_5 %uint_0
- %221 = OpLoad %float %220
- %222 = OpAccessChain %_ptr_Function_float %param_4 %uint_1
- %223 = OpLoad %float %222
- %224 = OpFMul %float %217 %219
- %225 = OpFMul %float %221 %223
- %226 = OpFSub %float %224 %225
- OpStore %x_78 %226
- OpSelectionMerge %227 None
- OpBranchConditional %132 %228 %227
- %228 = OpLabel
- %229 = OpFOrdLessThan %bool %226 %float_0
- OpBranch %227
- %227 = OpLabel
- %230 = OpPhi %bool %132 %151 %229 %228
- OpStore %x_204_phi %230
- %231 = OpLogicalNot %bool %230
- OpSelectionMerge %232 None
- OpBranchConditional %231 %233 %232
- %233 = OpLabel
- %234 = OpFOrdGreaterThanEqual %bool %89 %float_0
- OpSelectionMerge %235 None
- OpBranchConditional %234 %236 %235
- %236 = OpLabel
- %237 = OpFOrdGreaterThanEqual %bool %226 %float_0
- OpBranch %235
- %235 = OpLabel
- %238 = OpPhi %bool %234 %233 %237 %236
- OpStore %x_203 %238
- %239 = OpLoad %bool %x_203
- OpStore %x_204_phi %239
- OpBranch %232
- %232 = OpLabel
- %240 = OpLoad %bool %x_204_phi
- %241 = OpLogicalNot %bool %240
- OpSelectionMerge %242 None
- OpBranchConditional %241 %243 %242
- %243 = OpLabel
OpReturnValue %int_0
- %242 = OpLabel
+ %147 = OpLabel
+ %183 = OpAccessChain %_ptr_Function_float %p %uint_0
+ %184 = OpLoad %float %183
+ %186 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %187 = OpLoad %float %186
+ %189 = OpAccessChain %_ptr_Function_float %p %uint_1
+ %190 = OpLoad %float %189
+ %192 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %193 = OpLoad %float %192
+ %195 = OpAccessChain %_ptr_Function_float %a %uint_0
+ %196 = OpLoad %float %195
+ %198 = OpAccessChain %_ptr_Function_float %c %uint_0
+ %199 = OpLoad %float %198
+ %201 = OpAccessChain %_ptr_Function_float %a %uint_1
+ %202 = OpLoad %float %201
+ %204 = OpAccessChain %_ptr_Function_float %c %uint_1
+ %205 = OpLoad %float %204
+ %206 = OpFSub %float %184 %187
+ %207 = OpFSub %float %190 %193
+ %208 = OpCompositeConstruct %v2float %206 %207
+ OpStore %param_4 %208
+ %209 = OpFSub %float %196 %199
+ %210 = OpFSub %float %202 %205
+ %211 = OpCompositeConstruct %v2float %209 %210
+ OpStore %param_5 %211
+ %212 = OpAccessChain %_ptr_Function_float %param_4 %uint_0
+ %213 = OpLoad %float %212
+ %214 = OpAccessChain %_ptr_Function_float %param_5 %uint_1
+ %215 = OpLoad %float %214
+ %216 = OpAccessChain %_ptr_Function_float %param_5 %uint_0
+ %217 = OpLoad %float %216
+ %218 = OpAccessChain %_ptr_Function_float %param_4 %uint_1
+ %219 = OpLoad %float %218
+ %220 = OpFMul %float %213 %215
+ %221 = OpFMul %float %217 %219
+ %222 = OpFSub %float %220 %221
+ OpStore %x_78 %222
+ %223 = OpFOrdLessThan %bool %222 %float_0
+ %224 = OpLogicalAnd %bool %132 %223
+ OpStore %x_204_phi %224
+ %225 = OpLogicalNot %bool %224
+ OpSelectionMerge %226 None
+ OpBranchConditional %225 %227 %226
+ %227 = OpLabel
+ %228 = OpFOrdGreaterThanEqual %bool %89 %float_0
+ %229 = OpFOrdGreaterThanEqual %bool %222 %float_0
+ %230 = OpLogicalAnd %bool %228 %229
+ OpStore %x_203 %230
+ %231 = OpLoad %bool %x_203
+ OpStore %x_204_phi %231
+ OpBranch %226
+ %226 = OpLabel
+ %232 = OpLoad %bool %x_204_phi
+ %233 = OpLogicalNot %bool %232
+ OpSelectionMerge %234 None
+ OpBranchConditional %233 %235 %234
+ %235 = OpLabel
+ OpReturnValue %int_0
+ %234 = OpLabel
OpReturnValue %int_1
OpFunctionEnd
- %main_1 = OpFunction %void None %244
- %247 = OpLabel
+ %main_1 = OpFunction %void None %236
+ %239 = OpLabel
%param_6 = OpVariable %_ptr_Function_v2float Function %33
%param_7 = OpVariable %_ptr_Function_v2float Function %33
%param_8 = OpVariable %_ptr_Function_v2float Function %33
%param_9 = OpVariable %_ptr_Function_v2float Function %33
- %252 = OpLoad %v4float %gl_FragCoord
- %254 = OpAccessChain %_ptr_Uniform_v2float %x_19 %uint_0
- %255 = OpLoad %v2float %254
- %256 = OpCompositeExtract %float %252 0
- %257 = OpCompositeExtract %float %252 1
- %258 = OpCompositeConstruct %v2float %256 %257
- %259 = OpFDiv %v2float %258 %255
- OpStore %param_6 %259
- OpStore %param_7 %262
- OpStore %param_8 %265
- OpStore %param_9 %268
- %269 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
- %274 = OpIEqual %bool %269 %int_1
+ %244 = OpLoad %v4float %gl_FragCoord
+ %246 = OpAccessChain %_ptr_Uniform_v2float %x_19 %uint_0
+ %247 = OpLoad %v2float %246
+ %248 = OpCompositeExtract %float %244 0
+ %249 = OpCompositeExtract %float %244 1
+ %250 = OpCompositeConstruct %v2float %248 %249
+ %251 = OpFDiv %v2float %250 %247
+ OpStore %param_6 %251
+ OpStore %param_7 %254
+ OpStore %param_8 %257
+ OpStore %param_9 %260
+ %261 = OpFunctionCall %int %pointInTriangle_vf2_vf2_vf2_vf2_ %param_6 %param_7 %param_8 %param_9
+ %266 = OpIEqual %bool %261 %int_1
+ OpSelectionMerge %267 None
+ OpBranchConditional %266 %268 %269
+ %268 = OpLabel
+ %270 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_1
+ %271 = OpLoad %float %270
+ %272 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_0
+ %273 = OpLoad %float %272
+ %274 = OpFOrdGreaterThanEqual %bool %271 %273
OpSelectionMerge %275 None
- OpBranchConditional %274 %276 %277
+ OpBranchConditional %274 %276 %275
%276 = OpLabel
- %278 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_1
- %279 = OpLoad %float %278
- %280 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %uint_0
- %281 = OpLoad %float %280
- %282 = OpFOrdGreaterThanEqual %bool %279 %281
- OpSelectionMerge %283 None
- OpBranchConditional %282 %284 %283
- %284 = OpLabel
- OpStore %x_GLF_color %285
- OpBranch %283
- %283 = OpLabel
- OpBranch %275
- %277 = OpLabel
- OpStore %x_GLF_color %286
+ OpStore %x_GLF_color %277
OpBranch %275
%275 = OpLabel
+ OpBranch %267
+ %269 = OpLabel
+ OpStore %x_GLF_color %278
+ OpBranch %267
+ %267 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %287
+%tint_symbol_3 = OpFunction %void None %279
%tint_symbol_1 = OpFunctionParameter %main_out
- %291 = OpLabel
- %292 = OpCompositeExtract %v4float %tint_symbol_1 0
- OpStore %tint_symbol_2 %292
+ %283 = OpLabel
+ %284 = OpCompositeExtract %v4float %tint_symbol_1 0
+ OpStore %tint_symbol_2 %284
OpReturn
OpFunctionEnd
- %main = OpFunction %void None %244
- %294 = OpLabel
- %295 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %295
- %296 = OpFunctionCall %void %main_1
- %298 = OpLoad %v4float %x_GLF_color
- %299 = OpCompositeConstruct %main_out %298
- %297 = OpFunctionCall %void %tint_symbol_3 %299
+ %main = OpFunction %void None %236
+ %286 = OpLabel
+ %287 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %287
+ %288 = OpFunctionCall %void %main_1
+ %290 = OpLoad %v4float %x_GLF_color
+ %291 = OpCompositeConstruct %main_out %290
+ %289 = OpFunctionCall %void %tint_symbol_3 %291
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.wgsl
index c9e248c..d62e9db 100644
--- a/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/stable-triangle-nested-for-loop-and-true-if/1.spvasm.expected.wgsl
@@ -71,10 +71,10 @@
let x_138 : f32 = ((x_129 * x_131) - (x_134 * x_136));
x_79 = x_138;
let x_139 : bool = (x_111 < 0.0);
- let x_141 : bool = (x_139 && (x_138 < 0.0));
+ let x_141 : bool = (x_139 & (x_138 < 0.0));
x_148_phi = x_141;
if (!(x_141)) {
- x_147 = ((x_111 >= 0.0) && (x_138 >= 0.0));
+ x_147 = ((x_111 >= 0.0) & (x_138 >= 0.0));
x_148_phi = x_147;
}
var x_153_phi : i32;
@@ -131,10 +131,10 @@
let x_193 : f32 = param_4.y;
let x_195 : f32 = ((x_186 * x_188) - (x_191 * x_193));
x_78 = x_195;
- let x_197 : bool = (x_139 && (x_195 < 0.0));
+ let x_197 : bool = (x_139 & (x_195 < 0.0));
x_204_phi = x_197;
if (!(x_197)) {
- x_203 = ((x_111 >= 0.0) && (x_195 >= 0.0));
+ x_203 = ((x_111 >= 0.0) & (x_195 >= 0.0));
x_204_phi = x_203;
}
let x_204 : bool = x_204_phi;
diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl
index aa5c43e..0536ebc 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.msl
@@ -74,7 +74,7 @@
int const x_32 = d;
int const x_33 = d;
int const x_34 = d;
- tempm43[select(0, x_31, ((x_29 >= 0) && (x_30 < 4)))][select(0, x_34, ((x_32 >= 0) && (x_33 < 3)))] = 1.0f;
+ tempm43[select(0, x_31, ((x_29 >= 0) & (x_30 < 4)))][select(0, x_34, ((x_32 >= 0) & (x_33 < 3)))] = 1.0f;
{
int const x_35 = c;
c = (x_35 + 1);
@@ -83,7 +83,7 @@
int const x_37 = idx;
int const x_38 = idx;
int const x_39 = idx;
- int const x_117 = select(0, x_39, ((x_37 >= 0) && (x_38 < 9)));
+ int const x_117 = select(0, x_39, ((x_37 >= 0) & (x_38 < 9)));
int const x_40 = ctr;
float const x_119 = m43[x_40].y;
float const x_121 = GLF_live6sums.arr[x_117];
diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.spvasm
index 63de0fc..ecf8eb6 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 152
+; Bound: 146
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -82,7 +82,7 @@
%int_9 = OpConstant %int 9
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
- %140 = OpTypeFunction %void %main_out
+ %134 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %12
%15 = OpLabel
%idx = OpVariable %_ptr_Function_int Function %18
@@ -176,80 +176,65 @@
%98 = OpLoad %int %d
%99 = OpLoad %int %d
%101 = OpSGreaterThanEqual %bool %94 %int_0
- OpSelectionMerge %102 None
- OpBranchConditional %101 %103 %102
- %103 = OpLabel
- %105 = OpSLessThan %bool %95 %int_4
- OpBranch %102
- %102 = OpLabel
- %106 = OpPhi %bool %101 %91 %105 %103
- %100 = OpSelect %int %106 %96 %int_0
- %108 = OpSGreaterThanEqual %bool %97 %int_0
- OpSelectionMerge %109 None
- OpBranchConditional %108 %110 %109
- %110 = OpLabel
- %112 = OpSLessThan %bool %98 %int_3
- OpBranch %109
- %109 = OpLabel
- %113 = OpPhi %bool %108 %102 %112 %110
- %107 = OpSelect %int %113 %99 %int_0
- %115 = OpAccessChain %_ptr_Function_float %tempm43 %100 %107
- OpStore %115 %float_1
+ %103 = OpSLessThan %bool %95 %int_4
+ %104 = OpLogicalAnd %bool %101 %103
+ %100 = OpSelect %int %104 %96 %int_0
+ %106 = OpSGreaterThanEqual %bool %97 %int_0
+ %108 = OpSLessThan %bool %98 %int_3
+ %109 = OpLogicalAnd %bool %106 %108
+ %105 = OpSelect %int %109 %99 %int_0
+ %111 = OpAccessChain %_ptr_Function_float %tempm43 %100 %105
+ OpStore %111 %float_1
OpBranch %87
%87 = OpLabel
- %116 = OpLoad %int %c
- %117 = OpIAdd %int %116 %int_1
- OpStore %c %117
+ %112 = OpLoad %int %c
+ %113 = OpIAdd %int %112 %int_1
+ OpStore %c %113
OpBranch %85
%86 = OpLabel
- %118 = OpLoad %int %idx
- %119 = OpLoad %int %idx
- %120 = OpLoad %int %idx
- %122 = OpSGreaterThanEqual %bool %118 %int_0
- OpSelectionMerge %123 None
- OpBranchConditional %122 %124 %123
- %124 = OpLabel
- %126 = OpSLessThan %bool %119 %int_9
- OpBranch %123
- %123 = OpLabel
- %127 = OpPhi %bool %122 %86 %126 %124
- %121 = OpSelect %int %127 %120 %int_0
- %128 = OpLoad %int %ctr
- %130 = OpAccessChain %_ptr_Function_float %m43 %128 %uint_1
- %131 = OpLoad %float %130
- %132 = OpAccessChain %_ptr_Function_float %GLF_live6sums %121
- %133 = OpLoad %float %132
- %134 = OpAccessChain %_ptr_Function_float %GLF_live6sums %121
- %135 = OpFAdd %float %133 %131
- OpStore %134 %135
+ %114 = OpLoad %int %idx
+ %115 = OpLoad %int %idx
+ %116 = OpLoad %int %idx
+ %118 = OpSGreaterThanEqual %bool %114 %int_0
+ %120 = OpSLessThan %bool %115 %int_9
+ %121 = OpLogicalAnd %bool %118 %120
+ %117 = OpSelect %int %121 %116 %int_0
+ %122 = OpLoad %int %ctr
+ %124 = OpAccessChain %_ptr_Function_float %m43 %122 %uint_1
+ %125 = OpLoad %float %124
+ %126 = OpAccessChain %_ptr_Function_float %GLF_live6sums %117
+ %127 = OpLoad %float %126
+ %128 = OpAccessChain %_ptr_Function_float %GLF_live6sums %117
+ %129 = OpFAdd %float %127 %125
+ OpStore %128 %129
OpBranch %69
%69 = OpLabel
- %136 = OpLoad %int %ctr
- %137 = OpIAdd %int %136 %int_1
- OpStore %ctr %137
+ %130 = OpLoad %int %ctr
+ %131 = OpIAdd %int %130 %int_1
+ OpStore %ctr %131
OpBranch %67
%68 = OpLabel
- %138 = OpLoad %int %idx
- %139 = OpIAdd %int %138 %int_1
- OpStore %idx %139
+ %132 = OpLoad %int %idx
+ %133 = OpIAdd %int %132 %int_1
+ OpStore %idx %133
OpBranch %50
%50 = OpLabel
OpBranch %48
%49 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %140
+%tint_symbol_2 = OpFunction %void None %134
%tint_symbol = OpFunctionParameter %main_out
- %144 = OpLabel
- %145 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %145
+ %138 = OpLabel
+ %139 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %139
OpReturn
OpFunctionEnd
%main = OpFunction %void None %12
- %147 = OpLabel
- %148 = OpFunctionCall %void %main_1
- %150 = OpLoad %v4float %x_GLF_color
- %151 = OpCompositeConstruct %main_out %150
- %149 = OpFunctionCall %void %tint_symbol_2 %151
+ %141 = OpLabel
+ %142 = OpFunctionCall %void %main_1
+ %144 = OpLoad %v4float %x_GLF_color
+ %145 = OpCompositeConstruct %main_out %144
+ %143 = OpFunctionCall %void %tint_symbol_2 %145
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.wgsl
index 00e805e..3cc4eb9 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-before-break/0-opt.spvasm.expected.wgsl
@@ -67,7 +67,7 @@
let x_32 : i32 = d;
let x_33 : i32 = d;
let x_34 : i32 = d;
- tempm43[select(0, x_31, ((x_29 >= 0) && (x_30 < 4)))][select(0, x_34, ((x_32 >= 0) && (x_33 < 3)))] = 1.0;
+ tempm43[select(0, x_31, ((x_29 >= 0) & (x_30 < 4)))][select(0, x_34, ((x_32 >= 0) & (x_33 < 3)))] = 1.0;
continuing {
let x_35 : i32 = c;
@@ -77,7 +77,7 @@
let x_37 : i32 = idx;
let x_38 : i32 = idx;
let x_39 : i32 = idx;
- let x_117 : i32 = select(0, x_39, ((x_37 >= 0) && (x_38 < 9)));
+ let x_117 : i32 = select(0, x_39, ((x_37 >= 0) & (x_38 < 9)));
let x_40 : i32 = ctr;
let x_119 : f32 = m43[x_40].y;
let x_121 : f32 = GLF_live6sums[x_117];
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl
index 4e1c940..b703400 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.hlsl
@@ -76,11 +76,7 @@
return;
} else {
GLF_live8i = 1;
- bool tint_tmp = (GLF_live8i >= 0);
- if (tint_tmp) {
- tint_tmp = (GLF_live8i < 50);
- }
- const int x_369 = ((tint_tmp) ? GLF_live8i : 0);
+ const int x_369 = (((GLF_live8i >= 0) & (GLF_live8i < 50)) ? GLF_live8i : 0);
const float x_371 = GLF_live8A[0];
const float x_373 = GLF_live8A[x_369];
GLF_live8A[x_369] = (x_373 + x_371);
@@ -270,16 +266,8 @@
const int x_145 = GLF_live4index;
const int x_146 = GLF_live4index;
const float x_269 = GLF_live4obj.even_numbers[1];
- bool tint_tmp_1 = (x_144 >= 0);
- if (tint_tmp_1) {
- tint_tmp_1 = (x_145 < 10);
- }
- GLF_live4obj.even_numbers[((tint_tmp_1) ? x_146 : 0)] = x_269;
- bool tint_tmp_2 = (GLF_live4i >= 0);
- if (tint_tmp_2) {
- tint_tmp_2 = (GLF_live4i < 10);
- }
- GLF_live4obj.even_numbers[((tint_tmp_2) ? GLF_live4i : 0)] = 1.0f;
+ GLF_live4obj.even_numbers[(((x_144 >= 0) & (x_145 < 10)) ? x_146 : 0)] = x_269;
+ GLF_live4obj.even_numbers[(((GLF_live4i >= 0) & (GLF_live4i < 10)) ? GLF_live4i : 0)] = 1.0f;
}
}
param_24 = treeIndex_1;
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl
index 10ddae2..ff8271a 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.msl
@@ -99,7 +99,7 @@
int const x_94 = GLF_live8i;
int const x_95 = GLF_live8i;
int const x_96 = GLF_live8i;
- int const x_369 = select(0, x_96, ((x_94 >= 0) && (x_95 < 50)));
+ int const x_369 = select(0, x_96, ((x_94 >= 0) & (x_95 < 50)));
float const x_371 = GLF_live8A.arr[0];
float const x_373 = GLF_live8A.arr[x_369];
GLF_live8A.arr[x_369] = (x_373 + x_371);
@@ -323,11 +323,11 @@
int const x_145 = GLF_live4index;
int const x_146 = GLF_live4index;
float const x_269 = GLF_live4obj.even_numbers.arr[1];
- GLF_live4obj.even_numbers.arr[select(0, x_146, ((x_144 >= 0) && (x_145 < 10)))] = x_269;
+ GLF_live4obj.even_numbers.arr[select(0, x_146, ((x_144 >= 0) & (x_145 < 10)))] = x_269;
int const x_147 = GLF_live4i;
int const x_148 = GLF_live4i;
int const x_149 = GLF_live4i;
- GLF_live4obj.even_numbers.arr[select(0, x_149, ((x_147 >= 0) && (x_148 < 10)))] = 1.0f;
+ GLF_live4obj.even_numbers.arr[select(0, x_149, ((x_147 >= 0) & (x_148 < 10)))] = 1.0f;
{
int const x_150 = GLF_live4i;
GLF_live4i = (x_150 + 1);
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.wgsl
index eaa0aec..9264f8a 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-after-search/0-opt.spvasm.expected.wgsl
@@ -92,7 +92,7 @@
let x_94 : i32 = GLF_live8i;
let x_95 : i32 = GLF_live8i;
let x_96 : i32 = GLF_live8i;
- let x_369 : i32 = select(0, x_96, ((x_94 >= 0) && (x_95 < 50)));
+ let x_369 : i32 = select(0, x_96, ((x_94 >= 0) & (x_95 < 50)));
let x_371 : f32 = GLF_live8A[0];
let x_373 : f32 = GLF_live8A[x_369];
GLF_live8A[x_369] = (x_373 + x_371);
@@ -318,11 +318,11 @@
let x_145 : i32 = GLF_live4index;
let x_146 : i32 = GLF_live4index;
let x_269 : f32 = GLF_live4obj.even_numbers[1];
- GLF_live4obj.even_numbers[select(0, x_146, ((x_144 >= 0) && (x_145 < 10)))] = x_269;
+ GLF_live4obj.even_numbers[select(0, x_146, ((x_144 >= 0) & (x_145 < 10)))] = x_269;
let x_147 : i32 = GLF_live4i;
let x_148 : i32 = GLF_live4i;
let x_149 : i32 = GLF_live4i;
- GLF_live4obj.even_numbers[select(0, x_149, ((x_147 >= 0) && (x_148 < 10)))] = 1.0;
+ GLF_live4obj.even_numbers[select(0, x_149, ((x_147 >= 0) & (x_148 < 10)))] = 1.0;
continuing {
let x_150 : i32 = GLF_live4i;
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl
index 26a0704..f40061c 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.hlsl
@@ -44,22 +44,10 @@
d = 0;
{
for(; (1 < ll4); d = (d + 1)) {
- bool tint_tmp = (d >= 0);
- if (tint_tmp) {
- tint_tmp = (d < 4);
- }
- bool tint_tmp_1 = (r >= 0);
- if (tint_tmp_1) {
- tint_tmp_1 = (r < 3);
- }
- set_float3(tempm43[((tint_tmp) ? d : 0)], ((tint_tmp_1) ? r : 0), 1.0f);
+ set_float3(tempm43[(((d >= 0) & (d < 4)) ? d : 0)], (((r >= 0) & (r < 3)) ? r : 0), 1.0f);
}
}
- bool tint_tmp_2 = (idx >= 0);
- if (tint_tmp_2) {
- tint_tmp_2 = (idx < 9);
- }
- const int x_111 = ((tint_tmp_2) ? idx : 0);
+ const int x_111 = (((idx >= 0) & (idx < 9)) ? idx : 0);
const float x_113 = m43[c].y;
const float x_115 = sums[x_111];
sums[x_111] = (x_115 + x_113);
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl
index 2070937..534ff4c 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.msl
@@ -70,7 +70,7 @@
int const x_27 = r;
int const x_28 = r;
int const x_29 = r;
- tempm43[select(0, x_26, ((x_24 >= 0) && (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) && (x_28 < 3)))] = 1.0f;
+ tempm43[select(0, x_26, ((x_24 >= 0) & (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) & (x_28 < 3)))] = 1.0f;
{
int const x_30 = d;
d = (x_30 + 1);
@@ -79,7 +79,7 @@
int const x_32 = idx;
int const x_33 = idx;
int const x_34 = idx;
- int const x_111 = select(0, x_34, ((x_32 >= 0) && (x_33 < 9)));
+ int const x_111 = select(0, x_34, ((x_32 >= 0) & (x_33 < 9)));
int const x_35 = c;
float const x_113 = m43[x_35].y;
float const x_115 = sums.arr[x_111];
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.spvasm b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.spvasm
index 397a1d8..98c20bd 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 147
+; Bound: 141
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -72,7 +72,7 @@
%int_9 = OpConstant %int 9
%uint_1 = OpConstant %uint 1
%main_out = OpTypeStruct %v4float
- %135 = OpTypeFunction %void %main_out
+ %129 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %8
%11 = OpLabel
%m43 = OpVariable %_ptr_Function_mat4v3float Function %16
@@ -165,80 +165,65 @@
%93 = OpLoad %int %r
%94 = OpLoad %int %r
%96 = OpSGreaterThanEqual %bool %89 %int_0
- OpSelectionMerge %97 None
- OpBranchConditional %96 %98 %97
- %98 = OpLabel
- %100 = OpSLessThan %bool %90 %int_4
- OpBranch %97
- %97 = OpLabel
- %101 = OpPhi %bool %96 %86 %100 %98
- %95 = OpSelect %int %101 %91 %int_0
- %103 = OpSGreaterThanEqual %bool %92 %int_0
- OpSelectionMerge %104 None
- OpBranchConditional %103 %105 %104
- %105 = OpLabel
- %107 = OpSLessThan %bool %93 %int_3
- OpBranch %104
- %104 = OpLabel
- %108 = OpPhi %bool %103 %97 %107 %105
- %102 = OpSelect %int %108 %94 %int_0
- %110 = OpAccessChain %_ptr_Function_float %tempm43 %95 %102
- OpStore %110 %float_1
+ %98 = OpSLessThan %bool %90 %int_4
+ %99 = OpLogicalAnd %bool %96 %98
+ %95 = OpSelect %int %99 %91 %int_0
+ %101 = OpSGreaterThanEqual %bool %92 %int_0
+ %103 = OpSLessThan %bool %93 %int_3
+ %104 = OpLogicalAnd %bool %101 %103
+ %100 = OpSelect %int %104 %94 %int_0
+ %106 = OpAccessChain %_ptr_Function_float %tempm43 %95 %100
+ OpStore %106 %float_1
OpBranch %82
%82 = OpLabel
- %111 = OpLoad %int %d
- %112 = OpIAdd %int %111 %int_1
- OpStore %d %112
+ %107 = OpLoad %int %d
+ %108 = OpIAdd %int %107 %int_1
+ OpStore %d %108
OpBranch %80
%81 = OpLabel
- %113 = OpLoad %int %idx
- %114 = OpLoad %int %idx
- %115 = OpLoad %int %idx
- %117 = OpSGreaterThanEqual %bool %113 %int_0
- OpSelectionMerge %118 None
- OpBranchConditional %117 %119 %118
- %119 = OpLabel
- %121 = OpSLessThan %bool %114 %int_9
- OpBranch %118
- %118 = OpLabel
- %122 = OpPhi %bool %117 %81 %121 %119
- %116 = OpSelect %int %122 %115 %int_0
- %123 = OpLoad %int %c
- %125 = OpAccessChain %_ptr_Function_float %m43 %123 %uint_1
- %126 = OpLoad %float %125
- %127 = OpAccessChain %_ptr_Function_float %sums %116
- %128 = OpLoad %float %127
- %129 = OpAccessChain %_ptr_Function_float %sums %116
- %130 = OpFAdd %float %128 %126
- OpStore %129 %130
+ %109 = OpLoad %int %idx
+ %110 = OpLoad %int %idx
+ %111 = OpLoad %int %idx
+ %113 = OpSGreaterThanEqual %bool %109 %int_0
+ %115 = OpSLessThan %bool %110 %int_9
+ %116 = OpLogicalAnd %bool %113 %115
+ %112 = OpSelect %int %116 %111 %int_0
+ %117 = OpLoad %int %c
+ %119 = OpAccessChain %_ptr_Function_float %m43 %117 %uint_1
+ %120 = OpLoad %float %119
+ %121 = OpAccessChain %_ptr_Function_float %sums %112
+ %122 = OpLoad %float %121
+ %123 = OpAccessChain %_ptr_Function_float %sums %112
+ %124 = OpFAdd %float %122 %120
+ OpStore %123 %124
OpBranch %66
%66 = OpLabel
- %131 = OpLoad %int %c
- %132 = OpIAdd %int %131 %int_1
- OpStore %c %132
+ %125 = OpLoad %int %c
+ %126 = OpIAdd %int %125 %int_1
+ OpStore %c %126
OpBranch %64
%65 = OpLabel
- %133 = OpLoad %int %idx
- %134 = OpIAdd %int %133 %int_1
- OpStore %idx %134
+ %127 = OpLoad %int %idx
+ %128 = OpIAdd %int %127 %int_1
+ OpStore %idx %128
OpBranch %47
%47 = OpLabel
OpBranch %45
%46 = OpLabel
OpReturn
OpFunctionEnd
-%tint_symbol_2 = OpFunction %void None %135
+%tint_symbol_2 = OpFunction %void None %129
%tint_symbol = OpFunctionParameter %main_out
- %139 = OpLabel
- %140 = OpCompositeExtract %v4float %tint_symbol 0
- OpStore %tint_symbol_1 %140
+ %133 = OpLabel
+ %134 = OpCompositeExtract %v4float %tint_symbol 0
+ OpStore %tint_symbol_1 %134
OpReturn
OpFunctionEnd
%main = OpFunction %void None %8
- %142 = OpLabel
- %143 = OpFunctionCall %void %main_1
- %145 = OpLoad %v4float %x_GLF_color
- %146 = OpCompositeConstruct %main_out %145
- %144 = OpFunctionCall %void %tint_symbol_2 %146
+ %136 = OpLabel
+ %137 = OpFunctionCall %void %main_1
+ %139 = OpLoad %v4float %x_GLF_color
+ %140 = OpCompositeConstruct %main_out %139
+ %138 = OpFunctionCall %void %tint_symbol_2 %140
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.wgsl b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.wgsl
index dd18573..365856f 100644
--- a/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/graphicsfuzz/write-red-in-loop-nest/0-opt.spvasm.expected.wgsl
@@ -59,7 +59,7 @@
let x_27 : i32 = r;
let x_28 : i32 = r;
let x_29 : i32 = r;
- tempm43[select(0, x_26, ((x_24 >= 0) && (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) && (x_28 < 3)))] = 1.0;
+ tempm43[select(0, x_26, ((x_24 >= 0) & (x_25 < 4)))][select(0, x_29, ((x_27 >= 0) & (x_28 < 3)))] = 1.0;
continuing {
let x_30 : i32 = d;
@@ -69,7 +69,7 @@
let x_32 : i32 = idx;
let x_33 : i32 = idx;
let x_34 : i32 = idx;
- let x_111 : i32 = select(0, x_34, ((x_32 >= 0) && (x_33 < 9)));
+ let x_111 : i32 = select(0, x_34, ((x_32 >= 0) & (x_33 < 9)));
let x_35 : i32 = c;
let x_113 : f32 = m43[x_35].y;
let x_115 : f32 = sums[x_111];
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl
index 1ad88d2..c94c14d 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.hlsl
@@ -8,11 +8,7 @@
x_is_odd = ((int(x_24) & 1) == 1);
const float x_29 = gl_FragCoord.y;
y_is_odd = ((int(x_29) & 1) == 1);
- bool tint_tmp = x_is_odd;
- if (!tint_tmp) {
- tint_tmp = y_is_odd;
- }
- out_data = ((tint_tmp) ? 1 : 0);
+ out_data = ((x_is_odd | y_is_odd) ? 1 : 0);
return;
}
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl
index a2b97bf..9d51ced 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.msl
@@ -17,7 +17,7 @@
y_is_odd = ((int(x_29) & 1) == 1);
bool const x_33 = x_is_odd;
bool const x_34 = y_is_odd;
- *(tint_symbol_6) = select(0, 1, (x_33 || x_34));
+ *(tint_symbol_6) = select(0, 1, (x_33 | x_34));
return;
}
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.spvasm b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.spvasm
index 3488753..f4f2052 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.spvasm
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.spvasm
@@ -1,7 +1,7 @@
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
-; Bound: 58
+; Bound: 56
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
@@ -47,7 +47,7 @@
%uint_1 = OpConstant %uint 1
%int_0 = OpConstant %int 0
%main_out = OpTypeStruct %int
- %45 = OpTypeFunction %void %main_out
+ %43 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %14
%17 = OpLabel
%x_is_odd = OpVariable %_ptr_Function_bool Function %21
@@ -66,30 +66,25 @@
OpStore %y_is_odd %37
%38 = OpLoad %bool %x_is_odd
%39 = OpLoad %bool %y_is_odd
- OpSelectionMerge %41 None
- OpBranchConditional %38 %41 %42
- %42 = OpLabel
- OpBranch %41
- %41 = OpLabel
- %43 = OpPhi %bool %38 %17 %39 %42
- %40 = OpSelect %int %43 %int_1 %int_0
+ %41 = OpLogicalOr %bool %38 %39
+ %40 = OpSelect %int %41 %int_1 %int_0
OpStore %out_data %40
OpReturn
OpFunctionEnd
-%tint_symbol_3 = OpFunction %void None %45
+%tint_symbol_3 = OpFunction %void None %43
%tint_symbol_1 = OpFunctionParameter %main_out
- %49 = OpLabel
- %50 = OpCompositeExtract %int %tint_symbol_1 0
- OpStore %tint_symbol_2 %50
+ %47 = OpLabel
+ %48 = OpCompositeExtract %int %tint_symbol_1 0
+ OpStore %tint_symbol_2 %48
OpReturn
OpFunctionEnd
%main = OpFunction %void None %14
- %52 = OpLabel
- %53 = OpLoad %v4float %tint_symbol
- OpStore %gl_FragCoord %53
- %54 = OpFunctionCall %void %main_1
- %56 = OpLoad %int %out_data
- %57 = OpCompositeConstruct %main_out %56
- %55 = OpFunctionCall %void %tint_symbol_3 %57
+ %50 = OpLabel
+ %51 = OpLoad %v4float %tint_symbol
+ OpStore %gl_FragCoord %51
+ %52 = OpFunctionCall %void %main_1
+ %54 = OpLoad %int %out_data
+ %55 = OpCompositeConstruct %main_out %54
+ %53 = OpFunctionCall %void %tint_symbol_3 %55
OpReturn
OpFunctionEnd
diff --git a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.wgsl b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.wgsl
index 3820a70..5610438 100644
--- a/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.wgsl
+++ b/test/vk-gl-cts/spirv_assembly/instruction/terminate_invocation/no_output_write/2-opt.spvasm.expected.wgsl
@@ -11,7 +11,7 @@
y_is_odd = ((i32(x_29) & 1) == 1);
let x_33 : bool = x_is_odd;
let x_34 : bool = y_is_odd;
- out_data = select(0, 1, (x_33 || x_34));
+ out_data = select(0, 1, (x_33 | x_34));
return;
}