Merge pull request #1124 from xorgy/check-inner-implicit-atomic-uint
GLSL: Check for implicit inner dimension in array of atomic_uint.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 2299e90..b0e51df 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -6061,6 +6061,7 @@
optimizer.RegisterPass(CreateInsertExtractElimPass());
optimizer.RegisterPass(CreateAggressiveDCEPass());
optimizer.RegisterPass(CreateDeadBranchElimPass());
+ optimizer.RegisterPass(CreateCFGCleanupPass());
optimizer.RegisterPass(CreateBlockMergePass());
optimizer.RegisterPass(CreateLocalMultiStoreElimPass());
optimizer.RegisterPass(CreateInsertExtractElimPass());
diff --git a/Test/cppIntMinOverNegativeOne.frag b/Test/cppIntMinOverNegativeOne.frag
index 1cdaaeb..b7e0a95 100644
--- a/Test/cppIntMinOverNegativeOne.frag
+++ b/Test/cppIntMinOverNegativeOne.frag
@@ -1,3 +1,6 @@
#if (-2147483648 / -1) != 0
#error INT_MIN / -1 should yield 0, something went wrong.
+#endif
+#if (-2147483648 % -1) != 0
+#error INT_MIN % -1 should yield 0, something went wrong.
#endif
\ No newline at end of file
diff --git a/glslang/MachineIndependent/preprocessor/Pp.cpp b/glslang/MachineIndependent/preprocessor/Pp.cpp
index 0cb560c..aeb42a0 100644
--- a/glslang/MachineIndependent/preprocessor/Pp.cpp
+++ b/glslang/MachineIndependent/preprocessor/Pp.cpp
@@ -352,7 +352,7 @@
int op_sub(int a, int b) { return a - b; }
int op_mul(int a, int b) { return a * b; }
int op_div(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a / b; }
- int op_mod(int a, int b) { return a % b; }
+ int op_mod(int a, int b) { return a == INT_MIN && b == -1 ? 0 : a % b; }
int op_pos(int a) { return a; }
int op_neg(int a) { return -a; }
int op_cmpl(int a) { return ~a; }
diff --git a/known_good.json b/known_good.json
index ea3a808..87cc63d 100644
--- a/known_good.json
+++ b/known_good.json
@@ -5,7 +5,7 @@
"site" : "github",
"subrepo" : "KhronosGroup/SPIRV-Tools",
"subdir" : "External/spirv-tools",
- "commit" : "1a9061a2be884eed0e518ac19866246a5c9babc0"
+ "commit" : "5834719fc17d4735fce0102738b87b70255cfd5f"
},
{
"name" : "spirv-tools/external/spirv-headers",