aboutsummaryrefslogtreecommitdiff
path: root/tools/test-js-optimizer-asm-pre-output.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/test-js-optimizer-asm-pre-output.js')
-rw-r--r--tools/test-js-optimizer-asm-pre-output.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/tools/test-js-optimizer-asm-pre-output.js b/tools/test-js-optimizer-asm-pre-output.js
index 72608aa8..ab953e5d 100644
--- a/tools/test-js-optimizer-asm-pre-output.js
+++ b/tools/test-js-optimizer-asm-pre-output.js
@@ -18,7 +18,7 @@ function b($this, $__n) {
}
$4 = $this;
$5 = HEAP8[$4 & 16777215] | 0;
- if (($5 & 1) << 24 >> 24 == 0) {
+ if (($5 & 1) == 0) {
$14 = 10;
$13 = $5;
} else {
@@ -38,14 +38,14 @@ function b($this, $__n) {
} else {
$30 = $13;
}
- if (($30 & 1) << 24 >> 24 == 0) {
+ if (($30 & 1) == 0) {
$38 = $this + 1 | 0;
} else {
$38 = HEAP32[($this + 8 & 16777215) >> 2] | 0;
}
_memset($38 + $23 | 0, 0, $__n | 0, 1, 1213141516);
$40 = $23 + $__n | 0;
- if ((HEAP8[$4 & 16777215] & 1) << 24 >> 24 == 0) {
+ if ((HEAP8[$4 & 16777215] & 1) == 0) {
HEAP8[$4 & 16777215] = $40 << 1 & 255;
} else {
HEAP32[($this + 4 & 16777215) >> 2] = $40;
@@ -93,4 +93,18 @@ function i32_8() {
print(5);
}
}
+function sign_extension_simplification() {
+ if ((HEAP8[$4 & 16777215] & 127) == 0) {
+ print(5);
+ }
+ if ((HEAP8[$4 & 16777215] & 128) << 24 >> 24 == 0) {
+ print(5);
+ }
+ if ((HEAP32[$5 & 16777215] & 32767) == 0) {
+ print(5);
+ }
+ if ((HEAP32[$5 & 16777215] & 32768) << 16 >> 16 == 0) {
+ print(5);
+ }
+}