aboutsummaryrefslogtreecommitdiff
path: root/tools/eliminator
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-12-12 18:55:36 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-12-12 18:55:36 -0800
commit8f4c82a6d7b48e4754aed6e7ed20488774a83a4f (patch)
tree070263aa740ef55c9eb9ec6df6faecc79364dfd0 /tools/eliminator
parent524910b8d152bbd6a2aff719059f5a4ef0386126 (diff)
do not try to eliminate phi variables, which are unsafe to be removed and the llvm optimizer will remove anyhow if unused
Diffstat (limited to 'tools/eliminator')
-rw-r--r--tools/eliminator/eliminator-test-output.js8
-rw-r--r--tools/eliminator/eliminator-test.js12
2 files changed, 19 insertions, 1 deletions
diff --git a/tools/eliminator/eliminator-test-output.js b/tools/eliminator/eliminator-test-output.js
index cc164f57..0d60d305 100644
--- a/tools/eliminator/eliminator-test-output.js
+++ b/tools/eliminator/eliminator-test-output.js
@@ -6140,4 +6140,12 @@ function asm(x, y) {
b = a * a;
fleefl(b | 0, a | 0);
}
+function phi() {
+ if (wat()) {
+ var $10 = 1;
+ } else {
+ var $10 = (_init_mparams() | 0) != 0;
+ }
+ var $10;
+}
diff --git a/tools/eliminator/eliminator-test.js b/tools/eliminator/eliminator-test.js
index 07a41d71..3d71c210 100644
--- a/tools/eliminator/eliminator-test.js
+++ b/tools/eliminator/eliminator-test.js
@@ -8837,5 +8837,15 @@ function asm(x, y) { // asm-style code, without special asm requested so will no
b = a*a;
fleefl(b|0, a|0);
}
-// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU", "asm"]
+function phi() {
+ if (wat()) {
+ var $10 = 1;
+ } else {
+ var $7=_init_mparams();
+ var $8=(($7)|0)!=0;
+ var $10 = $8;
+ }
+ var $10;
+}
+// EMSCRIPTEN_GENERATED_FUNCTIONS: ["a", "b", "c", "f", "g", "h", "py", "r", "t", "f2", "f3", "llvm3_1", "_inflate", "_malloc", "_mallocNoU", "asm", "phi"]