aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-asm-last.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test-js-optimizer-asm-last.js')
-rw-r--r--tools/test-js-optimizer-asm-last.js35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/test-js-optimizer-asm-last.js b/tools/test-js-optimizer-asm-last.js
index 6331879e..1d39b1a6 100644
--- a/tools/test-js-optimizer-asm-last.js
+++ b/tools/test-js-optimizer-asm-last.js
@@ -30,6 +30,7 @@ function finall(x) {
a = +-0xde0b6b000000000;
a = -+0xde0b6b000000000;
a = -0xde0b6b000000000;
+ f(g() & -1);
return +12e10;
}
function looop() {
@@ -51,6 +52,40 @@ function looop() {
break;
}
}
+ while (1) {
+ do_it();
+ if (a()) continue; // we cannot move to do-while, continue will hit the while check
+ if (!x()) {
+ break;
+ }
+ }
+ while (1) {
+ do_it();
+ do {
+ if (a()) continue; // ok to optimize, continue is not for us
+ } while (b());
+ if (!x()) {
+ break;
+ }
+ }
+ while (1) {
+ do_it();
+ while (b()) {
+ if (a()) continue; // also ok to optimize, continue is not for us
+ }
+ if (!x()) {
+ break;
+ }
+ }
+ X: while (1) {
+ do_it();
+ while (b()) {
+ if (a()) continue X; // not ok to optimize
+ }
+ if (!x()) {
+ break;
+ }
+ }
}
// EMSCRIPTEN_GENERATED_FUNCTIONS: ["finall", "looop"]