aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-03-26 13:55:29 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-03-26 13:55:29 -0700
commit5b348504869e2a60c47173b32f7761fdc96ca132 (patch)
treef0212acb17dd3ee53f047818644c78b52fea4490 /tools/eliminator
parentc35860bfad958ec1b7b4f2aa7496705aec5080d9 (diff)
eliminate X=X which can happen due to elimination
Diffstat (limited to 'tools/eliminator')
-rw-r--r--tools/eliminator/asm-eliminator-test-output.js9
-rw-r--r--tools/eliminator/asm-eliminator-test.js12
2 files changed, 20 insertions, 1 deletions
diff --git a/tools/eliminator/asm-eliminator-test-output.js b/tools/eliminator/asm-eliminator-test-output.js
index 7a8baef2..e1bc83bf 100644
--- a/tools/eliminator/asm-eliminator-test-output.js
+++ b/tools/eliminator/asm-eliminator-test-output.js
@@ -810,4 +810,13 @@ function cute($this, $outImage) {
}
return 0;
}
+function selfAssign() {
+ var i1 = 0;
+ i1 = HEAP32[2] | 0;
+ HEAP32[2] = i1 + 1;
+ if (waka) {
+ return 0;
+ }
+ return i1 & 16384 | 0;
+}
diff --git a/tools/eliminator/asm-eliminator-test.js b/tools/eliminator/asm-eliminator-test.js
index ad1ed05e..8886d54a 100644
--- a/tools/eliminator/asm-eliminator-test.js
+++ b/tools/eliminator/asm-eliminator-test.js
@@ -1027,5 +1027,15 @@ function cute($this, $outImage) {
}
return 0;
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["asm", "__Z11printResultPiS_j", "_segment_holding", "__ZN5identC2EiPKcPci", "_vec2Length", "exc", "label", "confuusion", "tempDouble", "_org_apache_harmony_luni_util_NumberConverter_freeFormat__", "__ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_", "_java_nio_charset_Charset_forNameInternal___java_lang_String", "looop2", "looop3", "looop4", "looop5", "looop6", "looop7", "looop8", "multiloop", "multiloop2", "tempDouble2", "watIf", "select2", "binary", "cute"]
+function selfAssign() {
+ var i1 = 0;
+ i1 = HEAP32[2] | 0;
+ HEAP32[2] = i1 + 1;
+ if (waka) {
+ return (STACKTOP = STACKTOP, 0);
+ }
+ STACKTOP = STACKTOP;
+ return i1 & 16384 | 0;
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["asm", "__Z11printResultPiS_j", "_segment_holding", "__ZN5identC2EiPKcPci", "_vec2Length", "exc", "label", "confuusion", "tempDouble", "_org_apache_harmony_luni_util_NumberConverter_freeFormat__", "__ZN23b2EdgeAndPolygonContact8EvaluateEP10b2ManifoldRK11b2TransformS4_", "_java_nio_charset_Charset_forNameInternal___java_lang_String", "looop2", "looop3", "looop4", "looop5", "looop6", "looop7", "looop8", "multiloop", "multiloop2", "tempDouble2", "watIf", "select2", "binary", "cute", "selfAssign"]